/* ==========================================================================
   itinerary.id — home page styles
   Shared tokens/components live in globals.css.
   ========================================================================== */

/* ---- Hero ---- */
.hero {
  position: relative;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin: 1.5rem auto 0;
  min-height: min(44rem, calc(100svh - var(--header-h) - 3rem));
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 40%),
    linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 56.25rem);
  padding-block: clamp(2.5rem, 8vh, 5rem);
  text-align: center;
  color: var(--on-media);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.hero-content .tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 500;
  color: var(--secondary);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.hero-content h1 {
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* ---- Hero search form ---- */
.search-box {
  margin-top: clamp(1.5rem, 5vh, 3rem);
  width: 100%;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  align-items: stretch;
  gap: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(1rem);
  backdrop-filter: blur(1rem);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.25);
  padding: 1.25rem 1.5rem;
  text-align: left;
}

@supports not ((backdrop-filter: blur(1rem)) or (-webkit-backdrop-filter: blur(1rem))) {
  .search-box {
    background: rgba(35, 48, 50, 0.9);
  }
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-right: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.search-field:nth-of-type(3) {
  border-right: none;
}

.search-field label {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

.search-field input,
.search-field select {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.25rem;
  min-height: 44px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
}

.search-field select option {
  color: var(--text);
  background: var(--bg);
}

.search-field input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.search-field input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.search-btn {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  color: var(--primary-strong);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.search-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.search-btn:hover {
  background: var(--primary-strong);
  color: #ffffff;
}

@media (max-width: 900px) {
  .search-box {
    grid-template-columns: 1fr;
    max-width: 26rem;
    margin-inline: auto;
  }

  .search-field {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    padding-right: 0;
    padding-bottom: 0.75rem;
  }

  .search-field:nth-of-type(3) {
    border-bottom: none;
  }

  .search-btn {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .hero {
    width: 100%;
    margin-top: 0;
    border-radius: 0;
  }
}

/* ---- Carousel ---- */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 16 / 8;
  min-height: 24rem;
  max-height: 80vh;
  overflow: hidden;
}

.slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scrim-bottom);
}

.slide-caption {
  position: absolute;
  z-index: 1;
  left: clamp(1rem, 5vw, 4rem);
  right: clamp(1rem, 5vw, 4rem);
  bottom: clamp(2.5rem, 8vh, 4rem);
  color: var(--on-media);
}

.slide-caption h3 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
}

.slide-caption .slide-sub {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--secondary);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  margin-top: 0.25rem;
}

.slide-caption .slide-desc {
  max-width: 55ch;
  margin-top: 0.75rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 700px) {
  .slide {
    aspect-ratio: 4 / 5;
    max-height: none;
  }

  .slide-caption .slide-desc {
    display: none;
  }
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.carousel-button svg {
  width: 26px;
  height: 26px;
}

.carousel-button:hover {
  background: rgba(0, 0, 0, 0.6);
}

.carousel-button.prev {
  left: clamp(0.5rem, 2vw, 1.5rem);
}

.carousel-button.next {
  right: clamp(0.5rem, 2vw, 1.5rem);
}

.carousel-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0.75rem;
  display: flex;
  gap: 0.25rem;
}

.carousel-dots button {
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.carousel-dots button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-dots button[aria-selected="true"]::before {
  background: #ffffff;
  transform: scale(1.25);
}

/* ---- Newsletter ---- */
.newsletter {
  padding-block: clamp(3rem, 8vh, 5rem);
}

.newsletter .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.newsletter-copy .eyebrow {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
}

.newsletter-copy h2 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.newsletter-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.newsletter-form input {
  flex: 1;
  min-width: 14rem;
  min-height: 48px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--text);
}

.newsletter-form input::placeholder {
  color: var(--text-muted);
}

.newsletter-form .btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.newsletter-status {
  flex-basis: 100%;
  color: var(--primary);
  font-weight: 500;
  min-height: 0;
}

.newsletter-status:empty {
  display: none;
}
