/* ============================================================
   Mantra Luxury Spa — style.css
   Google Fonts import fallback (already in head.php via <link>)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  --primary:           #172A45;
  --secondary:         #C79A5B;
  --background:        #FCFBF8;
  --foreground:        #2D2D2D;
  --muted:             #F0EDE6;
  --muted-foreground:  #6B7280;
  --border:            #E8E3DB;
  --card:              #FFFFFF;
  --wa-green:          #25D366;
  --radius-card:       24px;
  --transition-base:   0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base ─────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ── Accessibility ────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--secondary);
  color: var(--primary);
  font-weight: 600;
  border-radius: 8px;
  outline: none;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* ── Scrollbar utilities ──────────────────────────────────── */
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* ── Glass utilities ──────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.glass-dark {
  background: rgba(23, 42, 69, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* ════════════════════════════════════════════════════════════
   NAVBAR
   CRITICAL: All positioning here uses plain CSS — NOT Tailwind
   classes — so it works even before Tailwind CDN initialises.
════════════════════════════════════════════════════════════ */

/* ── Fixed header: must never rely on Tailwind for position ── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;      /* beat everything, including floating CTA */
  background: transparent;
  padding-top:    1.25rem;  /* py-5 */
  padding-bottom: 1.25rem;
  transition: background 0.5s ease, padding 0.5s ease, box-shadow 0.5s ease;
}

/* ── Nav-item: must have position:relative for dropdown anchor ── */
.nav-item {
  position: relative;
}

/* ── Mobile menu: hidden by CSS so it NEVER shows without JS ──
   JS sets element.style.display = 'flex' to open,
   element.style.display = 'none' to close.
   The inline style="display:none" on the HTML element is a
   second layer of defence (highest specificity). ─────────── */
#mobile-menu {
  display: none;          /* CSS layer 1 */
  position: fixed;
  inset: 0;
  z-index: 9998;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--primary);
}
#mobile-menu.open {
  display: flex;          /* JS adds .open via classList + sets style */
}

/* Scrolled state — white frosted glass */
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 2px 24px rgba(23, 42, 69, 0.08);
  padding-top:    0.75rem;
  padding-bottom: 0.75rem;
}

/* Logo toggle */
#site-header .logo-white {
  display: block;
}
#site-header .logo-color {
  display: none;
}
#site-header.scrolled .logo-white {
  display: none;
}
#site-header.scrolled .logo-color {
  display: block;
}

/* Light-bg pages — always show colour logo */
body.light-nav #site-header .logo-white { display: none; }
body.light-nav #site-header .logo-color { display: block; }

/* Nav link colours */
.nav-link {
  color: white;
}
#site-header.scrolled .nav-link,
body.light-nav .nav-link {
  color: var(--primary);
}
.nav-link:hover,
.nav-link--active {
  color: var(--secondary) !important;
}

.nav-phone-number { color: white; }
.nav-phone-sub    { color: rgba(255,255,255,0.4); }
#site-header.scrolled .nav-phone-number,
body.light-nav    .nav-phone-number { color: var(--primary); }
#site-header.scrolled .nav-phone-sub,
body.light-nav    .nav-phone-sub    { color: rgba(23,42,69,0.4); }

.nav-hamburger-icon { color: white; }
#site-header.scrolled .nav-hamburger-icon,
body.light-nav .nav-hamburger-icon { color: var(--primary); }

/* Nav underline hover */
.nav-item:hover .nav-underline {
  width: 100%;
}

/* Chevron rotation when dropdown open */
.nav-item.dropdown-open .dropdown-chevron {
  transform: rotate(180deg);
}

/* ── Mega Dropdown ─────────────────────────────────────────── */
/*
  The .mega-menu outer wrapper is position:absolute under a position:relative
  nav-item. We use a FIXED pixel position strategy instead of left:50% so the
  860 px panel centres on "Services" regardless of nav-item width.
  The wrapper has NO width of its own — it is sized by the 860 px inner div.
*/
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1),
              transform 0.35s cubic-bezier(0.16,1,0.3,1);
  z-index: 50;
  padding-top: 2rem;   /* pt-8 = 32px */
  /* Clamp so it never exceeds the viewport on narrow screens */
  max-width: calc(100vw - 2rem);
}

.nav-item:hover .mega-menu,
.nav-item.dropdown-open .mega-menu {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Inner panel: hard 860 px width, falls back gracefully */
.mega-menu-inner {
  width: 860px;
  max-width: 100%;
}

/* Service row arrow nudge */
.service-row:hover .lucide-arrow-right {
  transform: translateX(2px);
  color: var(--secondary);
}

/* ── Mobile Menu ─────────────────────────────────────────── */
/*
  display:none is set as an INLINE style on the element in nav.php — that
  has highest specificity and cannot be overridden by any stylesheet,
  including Tailwind CDN. JS removes/sets display via element.style.display.
  Only opacity + pointer-events are handled here for the fade animation.
*/
.mobile-menu {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile accordion */
.mobile-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-accordion.open {
  max-height: 600px;
}

#mobile-services-chevron.rotated {
  transform: rotate(180deg);
}

/* ════════════════════════════════════════════════════════════
   GALLERY STRIP
════════════════════════════════════════════════════════════ */
.gallery-strip {
  display: flex;
}

.gallery-item {
  flex: 1;
  transition: flex 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 0;
}

@media (min-width: 768px) {
  .gallery-item:hover {
    flex: 2;
  }
  .gallery-item:hover .gallery-img {
    transform: scale(1.05);
  }
  .gallery-item:hover .gallery-overlay {
    background: rgba(23, 42, 69, 0.10);
  }
}

/* ════════════════════════════════════════════════════════════
   FLOATING CTA
════════════════════════════════════════════════════════════ */
.floating-cta-panel {
  transform: translateX(0);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity  0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 1;
}

.floating-cta-panel.collapsed {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

.floating-cta-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-cta-btn:hover {
  transform: translateX(-4px);
}

.floating-cta-btn:active {
  transform: scale(0.95);
}

/* ════════════════════════════════════════════════════════════
   STICKY BOTTOM BAR — safe area
════════════════════════════════════════════════════════════ */
#sticky-bottom-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ════════════════════════════════════════════════════════════
   INTERSECTION OBSERVER ANIMATIONS
════════════════════════════════════════════════════════════ */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].in-view {
  opacity: 1;
  transform: translateY(0);
}

[data-animate][data-delay="100"] { transition-delay: 0.10s; }
[data-animate][data-delay="200"] { transition-delay: 0.20s; }
[data-animate][data-delay="300"] { transition-delay: 0.30s; }
[data-animate][data-delay="400"] { transition-delay: 0.40s; }
[data-animate][data-delay="500"] { transition-delay: 0.50s; }
[data-animate][data-delay="600"] { transition-delay: 0.60s; }

/* ════════════════════════════════════════════════════════════
   COUNTER ANIMATION
════════════════════════════════════════════════════════════ */
[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════
   UTILITY CLASSES
════════════════════════════════════════════════════════════ */

/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

/* Aspect ratios */
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video  { aspect-ratio: 16 / 9; }
.aspect-4\/3   { aspect-ratio: 4 / 3; }

/* Card base */
.card {
  background: var(--card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
}

/* Gold divider */
.divider-gold {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

/* Smooth image load */
img {
  max-width: 100%;
  height: auto;
}

/* Button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: var(--transition-base);
  cursor: pointer;
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--secondary);
  color: var(--primary);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  box-shadow: 0 4px 24px rgba(199, 154, 91, 0.30);
}

.btn-primary:hover {
  background: rgba(199, 154, 91, 0.90);
  box-shadow: 0 10px 40px rgba(199, 154, 91, 0.45);
  transform: scale(1.04);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.10);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.6875rem;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.04);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE HELPERS
════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  #floating-cta { display: none !important; }
}

@media (min-width: 1280px) {
  #sticky-bottom-bar { display: none !important; }
}

/* ════════════════════════════════════════════════════════════
   PRINT
════════════════════════════════════════════════════════════ */
@media print {
  #site-header,
  #mobile-menu,
  #floating-cta,
  #sticky-bottom-bar { display: none !important; }
}


#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(23, 42, 69, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}



.treatment-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(180, 83, 9, 0.95);
  backdrop-filter: blur(8px);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.25);
}

.treatment-duration {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.treatment-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.2) 100%);
  pointer-events: none;
}

.treatment-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.treatment-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.treatment-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.treatment-card:hover .treatment-image {
  transform: scale(1.05);
}

.treatment-name {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 20px;
  font-weight: 600;
  color: #172a45;
  margin-bottom: 8px;
  line-height: 1.3;
}

.treatment-description {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 16px;
}

.treatment-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.benefit-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #172a45;
  padding: 0;
}

.benefit-tag::before {
  content: '✓';
  font-weight: 700;
  color: #b45309;
  font-size: 12px;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: #25d366;
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
}

.btn-whatsapp:hover {
  background: #1ebe59;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transform: translateY(-1px);
}

.treatment-secondary-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  background: white;
  color: #172a45;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
}

.btn-secondary:hover {
  border-color: #b45309;
  background: rgba(180, 83, 9, 0.05);
  color: #b45309;
}

.treatments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

@media (max-width: 1024px) {
  .treatments-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 640px) {
  .treatments-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.treatment-card {
  animation: fadeInUp 0.6s ease-out forwards;
}

.treatment-card:nth-child(n) { animation-delay: 0.Xs; }