/* ─────────────────────────────────────────────────────────────
   Aquaventure World — Global UI Polish
   Applied on top of Tailwind CDN. Do not add Tailwind classes here.
   ───────────────────────────────────────────────────────────── */
@import url("footer.css");

/* ── Hero video (reference layout) ─────────────────────────── */
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-video-section .hero-bg-parallax {
  overflow: hidden;
}
.hero-video-controls {
  position: absolute;
  bottom: clamp(20px, 3.5vw, 32px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  gap: 12px;
}
.hero-video-ctrl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.hero-video-ctrl:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  transform: scale(1.05);
}
.hero-video-ctrl:active { transform: scale(0.96); }
.hero-video-ctrl .material-symbols-outlined {
  font-size: 22px;
  pointer-events: none;
}
@media (max-width: 767px) {
  .hero-video-ctrl {
    width: 40px;
    height: 40px;
  }
  .hero-video-ctrl .material-symbols-outlined {
    font-size: 20px;
  }
}

/* Hide video UI until media is actually playing (poster-only = photo, no controls) */
.hero-video-controls:not(.is-video-active),
.video-controls:not(.is-video-active),
.aqua-split-controls:not(.is-video-active),
.aqua-trident-controls:not(.is-video-active) {
  display: none !important;
}

/* ── 1. Font rendering ─────────────────────────────────────── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-padding-top: 124px; /* account for sticky nav */
}

/* ── 2. Text wrapping ──────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  text-wrap: balance;
}
p, li, figcaption, td, th {
  text-wrap: pretty;
}

/* ── 3. Tabular numerals ───────────────────────────────────── */
[data-count],
.price-value,
td,
.stat-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── 4. Focus ring (keyboard navigation) ───────────────────── */
*:focus-visible {
  outline: 2px solid #00666d;
  outline-offset: 3px;
  border-radius: 6px;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid #00666d;
  outline-offset: 3px;
}

/* ── 5. Button tactile press state ─────────────────────────── */
button:not(:disabled):not(.carousel-btn):not(.wp-tickets-arrow):not(.bk-carousel-nav):active,
a.btn-ripple:active:not(.ticket-cta):not(.wp-ticket-cta) {
  transform: scale(0.97) !important;
  transition-duration: 80ms !important;
}
.ticket-cta:active,
.wp-ticket-cta:active {
  transform: none !important;
}

/* Carousel nav arrows — no hover/press animation */
.carousel-btn,
.wp-tickets-arrow,
.bk-carousel-nav {
  transition: none !important;
}
.carousel-btn:active:not(:disabled) {
  transform: translateY(-50%) !important;
}
.ticket-carousel[data-carousel] .carousel-btn:active,
.watersports-carousel .carousel-btn:active,
.wp-tickets-carousel .carousel-btn:active,
.wp-tickets-carousel .wp-tickets-arrow:active {
  transform: none !important;
}

/* ── 6. Text selection color ───────────────────────────────── */
::selection {
  background: rgba(0, 102, 109, 0.18);
  color: #002022;
}

/* ── 7. Scroll-bar styling (WebKit) ───────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f2f4f6; }
::-webkit-scrollbar-thumb { background: #bdc9ca; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #00666d; }

/* ── 8. Subtle image outline to prevent bleed ─────────────── */
.card-img,
.attraction-card img,
.flip-front img {
  outline: 1px solid rgba(0, 0, 0, 0.06);
  outline-offset: -1px;
}

/* ── 9. Card image aspect ratio (prevent layout shift) ──────── */
.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.card-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 10. Hero badge — pulsing dot + blur border ────────────── */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  padding: 6px 18px 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #76d5de;
  flex-shrink: 0;
  animation: badge-dot-pulse 2.2s ease-in-out infinite;
}
@keyframes badge-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.8); }
}

/* ── 11. Section eyebrow / tag ─────────────────────────────── */
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00647a;
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}
.section-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 12px;
  height: 2px;
  background: #4cd6fb;
  transform: translateY(-50%);
  border-radius: 1px;
}

/* ── 12. Footer link hover underline ───────────────────────── */
footer a:not(.site-footer__brand) {
  position: relative;
  text-decoration: none;
}
footer a:not(.site-footer__brand)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 220ms cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.6;
}
footer a:not(.site-footer__brand):hover::after {
  width: 100%;
}

/* ── 13. Stats bar number typography ───────────────────────── */
.stat-num {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* ── 14. Concentric radius fix ─────────────────────────────── */
/* Outer rounded-2xl (16px) + p-8 (32px) → inner content can use rounded-xl (12px) */
.rounded-2xl > .card-inner-content { border-radius: 12px; }

/* ── 15. Nav link hover: icon micro-lift is in animation-utils.js ── */
nav a {
  transition-property: color;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── 16. Table row smooth transition ───────────────────────── */
table tbody tr {
  transition: background-color 150ms ease-out;
}

/* ── 17. Img lazy load blur-in effect ─────────────────────── */
img[loading="lazy"] {
  background: #eceef0;
}

/* ── 18. Mobile nav menu ───────────────────────────────────── */
#mobile-nav-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
#mobile-nav-menu.open {
  max-height: 400px;
}

/* ── 19. Improved hero subtitle (body text in hero) ────────── */
.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
  text-wrap: pretty;
}

/* ── 20. Skeleton loader for cards ────────────────────────── */
.img-skeleton {
  background: linear-gradient(90deg, #eceef0 25%, #e6e8ea 50%, #eceef0 75%);
  background-size: 200% 100%;
  animation: skeleton-sweep 1.5s ease-in-out infinite;
}
@keyframes skeleton-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── 21. Floating label / price pill on cards ──────────────── */
.price-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: #00666d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-variant-numeric: tabular-nums;
}

/* ── 22. Stats highlight number on dark bg ─────────────────── */
.stat-value-lg {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── 23. Better CTA background — primary gradient ─────────── */
.cta-gradient {
  background: linear-gradient(135deg, #004f55 0%, #00666d 40%, #007f99 100%);
}

/* ── 24. Smooth page entry ──────────────────────────────────── */
body {
  animation: page-enter 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes page-enter {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}

/* ── 26. Scroll-reveal system (global) ──────────────────────── */
/*   animation-utils.js adds .is-visible via IntersectionObserver
     and .stagger-N on children of .stagger-auto containers.
     Only transform + opacity → GPU-only, no layout triggers.     */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity   500ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition-delay: 0ms !important;
}

/* Stagger delays — keep each step ≤ 80ms to stay snappy */
.reveal.stagger-1  { transition-delay:  60ms; }
.reveal.stagger-2  { transition-delay: 130ms; }
.reveal.stagger-3  { transition-delay: 190ms; }
.reveal.stagger-4  { transition-delay: 250ms; }
.reveal.stagger-5  { transition-delay: 310ms; }
.reveal.stagger-6  { transition-delay: 360ms; }
.reveal.stagger-7  { transition-delay: 405ms; }
.reveal.stagger-8  { transition-delay: 445ms; }
.reveal.stagger-9  { transition-delay: 480ms; }
.reveal.stagger-10 { transition-delay: 510ms; }

/* ── 27. Hero load animation (global fallback) ──────────────── */
.hero-content-init {
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition:
    opacity   600ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-content-init.hero-in {
  opacity: 1;
  transform: none;
}

/* ── 28. Lazy-image fade-in ──────────────────────────────────── */
/*   animation-utils.js adds .img-loaded on load event.
     Images already complete get .img-loaded synchronously.
     Mega-menu images load eagerly (no lazy) — see nav-mega.js.     */
img[loading="lazy"]:not(.img-loaded) {
  opacity: 0;
}
img[loading="lazy"] {
  transition: opacity 380ms ease;
}
img[loading="lazy"].img-loaded {
  opacity: 1;
}
/* Safety: never hide nav mega-menu promo/thumb images */
.site-nav-mega-promo img,
.site-nav-mega-thumb {
  opacity: 1 !important;
  transition: none;
}

/* ── Reduced-motion overrides ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.stagger-1, .reveal.stagger-2, .reveal.stagger-3,
  .reveal.stagger-4, .reveal.stagger-5, .reveal.stagger-6,
  .reveal.stagger-7, .reveal.stagger-8, .reveal.stagger-9,
  .reveal.stagger-10 {
    transition: none !important;
    transition-delay: 0ms !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-content-init {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  img[loading="lazy"]:not(.img-loaded) { opacity: 1; }
  img[loading="lazy"] { transition: none; }
}

/* ── 25. Divider wave ───────────────────────────────────────── */
.wave-top, .wave-bottom {
  display: block;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
}
.wave-top svg, .wave-bottom svg {
  display: block;
  width: 100%;
}
