/* Unique World Holidays — shared tour flip-card FACE styling.
   Extracted from home-seasonal-favorites-section.css (where these rules
   originally lived) once a THIRD context needed the exact same card
   design: Seasonal Favorites' own carousel (.uwh-sf-card, absolutely
   positioned by its own JS), Trip Finder's results grid (.uwh-tf-card,
   see trip-finder.css), and now the tour_category taxonomy archive's
   tours grid (.ath-tour-flip-card, see taxonomy-tour_category.php's own
   inline <style>) all render the exact same front/back faces via the
   shared uwh_render_tour_card_faces() PHP helper in functions.php — this
   file is the one place that styles what that markup looks like, so all
   three stay visually identical automatically.

   Deliberately does NOT include the OUTER wrapper (.uwh-sf-card /
   .uwh-tf-card / .ath-tour-flip-card) or its own `.<wrapper>.is-flipped
   .uwh-sf-card-inner { transform: rotateY(180deg); }` trigger rule —
   each context's outer wrapper is genuinely different (carousel item vs.
   grid item, different sizing) and lives in that context's own CSS, just
   targeting these same face classes underneath it. */

.uwh-sf-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Both faces stacked on top of each other via position:absolute so the
   card's own height never changes between states — nothing here is
   driven by face content height. backface-visibility:hidden is what
   stops the "mirror text showing through" glitch mid-flip: without it
   the back face is visible (reversed) right through the front face
   during the middle of the rotation. */
.uwh-sf-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Safari: backface-visibility:hidden on the face alone is NOT enough —
   WebKit does not flatten positioned descendants that sit inside a
   preserve-3d ancestor, so the front face's scrim / title (and the back
   face's title / duration / CTA) keep backface-visibility:visible and
   render MIRRORED through the card once it's flipped away from the viewer
   (Chrome hides them via the face's transform-style:flat, so the bug is
   Safari-only). Pushing the property onto every descendant fixes it; it's
   a no-op on anything not itself 3D-rotated, so it's safe to apply
   broadly. Shared file — this covers Seasonal Favorites, Trip Finder AND
   the tour_category archive cards. */
.uwh-sf-card-face * {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.uwh-sf-card-front {
  background-size: cover;
  background-position: center;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.uwh-sf-card-front-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(1, 34, 69, 0.85) 0%,
    rgba(1, 34, 69, 0.15) 45%,
    rgba(1, 34, 69, 0) 70%
  );
}
.uwh-sf-card-front-title {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 24px;
  font-family: Poppins, sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  text-align: left;
  line-height: 1.35;
}

.uwh-sf-card-back {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  background-color: #012245;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.uwh-sf-card-back-title {
  margin: 0;
  font-family: Poppins, sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}
.uwh-sf-card-duration {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Roboto, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: 50px;
}
.uwh-sf-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  background: #ffffff;
  color: #012245;
  font-family: Poppins, sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 50px;
  transition: filter 0.2s ease;
}
.uwh-sf-card-cta:hover,
.uwh-sf-card-cta:focus {
  filter: brightness(0.94);
  color: #012245;
}

/* ---- Responsive ---- */
@media (max-width: 782px) {
  .uwh-sf-card-front-title {
    font-size: 19px;
    padding: 20px;
  }
  .uwh-sf-card-back {
    padding: 24px;
  }
}
