/* Unique World Holidays — Home page "Need Help Planning Your Trip?" section.
   Heading pattern matches Seasonal Favorites/Testimonials (Poppins, navy
   #012245 on white). Given a light tint (#f6f8fb) instead of plain white so
   it doesn't visually merge with Testimonials directly above it.

   Result cards reuse the SAME .uwh-sf-card-inner/-face/-front/-back rules
   from home-seasonal-favorites-section.css (both files are always enqueued
   together on the home page) — only the OUTER wrapper differs: Seasonal
   Favorites' `.uwh-sf-card` is absolutely positioned by its carousel JS,
   this section's `.uwh-tf-card` is a plain CSS grid item, so it needs its
   own (much simpler) position/size/flip-trigger rules below instead of
   reusing `.uwh-sf-card` itself. */

.uwh-tf {
  width: 100%;
  background-color: #f6f8fb;
  padding: 80px 0;
}

/* Guard: #uwh-hero-title (header-scroll.js's fixed, z-index:10000 reveal
   text — grows back to full size while scrolling through this range as
   part of its own footer-docking animation) must never visually cover
   this section. trip-finder.js toggles this class based on a live
   getBoundingClientRect() overlap check, independent of header-scroll.js's
   own scroll-trigger timing — that can legitimately leave the title
   mid-transition (still position:fixed) at a scroll position that's now
   squarely inside this section, since this section occupies real scroll
   distance in that same range. Opacity only: the title is already
   pointer-events:none, so hiding it here never affected clicks either
   way. Doesn't touch header-scroll.js's own positioning logic at all. */
#uwh-hero-title.uwh-tf-hide-hero-title {
  /* Instant, no transition — a fade here means there's a real window
     where a screenshot (or a real eye, briefly) catches the title
     partway between visible and hidden, overlapping content at a
     washed-out partial opacity. That's harmless in itself (a sub-200ms
     blend, confirmed live it always settles correctly right after), but
     it reads as "stuck at a weird faded state" rather than a clean
     cut — a toggle this size doesn't need to be smoothed for it to feel
     right, and removing the ambiguity entirely is worth more here than
     the polish of a fade would have been. */
  opacity: 0 !important;
}

.uwh-tf-heading {
  text-align: center;
  margin: 0 0 48px;
  padding: 0 24px;
}

.uwh-tf-title {
  margin: 0;
  max-width: 780px;
  margin-inline: auto;
  font-family: Poppins, sans-serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.3;
  color: #012245;
}

/* ---- Form row ---- */
.uwh-tf-form {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.uwh-tf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
}

.uwh-tf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 200px;
}

.uwh-tf-field-submit {
  flex: 0 0 auto;
}

.uwh-tf-field label {
  font-family: Poppins, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #012245;
}

.uwh-tf-select-wrap {
  position: relative;
}

.uwh-tf-select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 14px 40px 14px 16px;
  border-radius: 10px;
  border: 1.5px solid #d8dee7;
  background: #ffffff;
  font-family: Roboto, sans-serif;
  font-size: 15px;
  color: #012245;
  cursor: pointer;
  height: 50px;
}

.uwh-tf-select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #012245;
  border-bottom: 2px solid #012245;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.uwh-tf-select-wrap select:disabled {
  background: #eef1f5;
  color: #98a2b3;
  cursor: not-allowed;
}

/* Invisible click-catcher over a disabled select — native `disabled`
   selects swallow click events in most browsers, so this is what actually
   lets us show "Please select Duration first" on click/tap. JS toggles
   `.is-active` to match the select's current disabled state. */
.uwh-tf-select-guard {
  position: absolute;
  inset: 0;
  display: none;
  cursor: not-allowed;
}
.uwh-tf-select-guard.is-active {
  display: block;
}

.uwh-tf-submit {
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  background: #012245;
  color: #ffffff;
  font-family: Poppins, sans-serif;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.uwh-tf-submit:not(:disabled):hover,
.uwh-tf-submit:not(:disabled):focus {
  filter: brightness(1.15);
}
.uwh-tf-submit:disabled {
  background: #c7ced9;
  cursor: not-allowed;
}

.uwh-tf-message {
  text-align: center;
  min-height: 20px;
  margin: 16px 0 0;
  font-family: Roboto, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #b3261e;
}
.uwh-tf-message:empty {
  margin: 0;
}

/* ---- Results ---- */
.uwh-tf-results {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.uwh-tf-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 48px;
}

.uwh-tf-card {
  position: relative;
  height: 380px;
  cursor: pointer;
  -webkit-perspective: 1600px;
  perspective: 1600px;
  border-radius: 14px;
}
.uwh-tf-card.is-flipped .uwh-sf-card-inner {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

.uwh-tf-empty {
  text-align: center;
  margin-top: 48px;
  padding: 40px 20px;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  color: #5b6472;
  background: #ffffff;
  border-radius: 14px;
}

.uwh-tf-loading {
  text-align: center;
  margin-top: 48px;
  padding: 40px 20px;
  font-family: Roboto, sans-serif;
  font-size: 15px;
  color: #5b6472;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .uwh-tf-title {
    font-size: 30px;
  }
}

@media (max-width: 782px) {
  .uwh-tf {
    padding: 56px 0;
  }
  .uwh-tf-row {
    flex-direction: column;
    align-items: stretch;
  }
  .uwh-tf-field,
  .uwh-tf-field-submit {
    flex: 1 1 auto;
    width: 100%;
  }
  .uwh-tf-submit {
    width: 100%;
  }
  .uwh-tf-card {
    height: 340px;
  }
}

@media (max-width: 480px) {
  .uwh-tf-title {
    font-size: 24px;
  }
  .uwh-tf-results-grid {
    grid-template-columns: 1fr;
  }
}
