/* =========================================================
   spa.css — SPA base theme + global components
   Keep base.css loaded for resets/buttons/container
   Includes: tokens, body bg, button tweaks, header/nav, hero, footer,
             shared section head helpers

   NOTE:
   - SPA FOOTER matches CLINIC footer layout/behavior
   - Only the SPA color scheme differs (light tokens + gold accents)
   ========================================================= */

/* =========================================================
   1) THEME TOKENS (SPA)
   ========================================================= */
html[data-brand="spa"] {
  /* Brand */
  --accent: #d6a36b;
  --accent2: #b9854f;
  --accentSoft: rgba(214, 163, 107, 0.22);

  /* Light UI tokens */
  --bg: #fbfaf8;
  --bg2: #f2eee8;
  --surface: rgba(255, 255, 255, 0.86);
  --surface2: rgba(255, 255, 255, 0.72);

  --text: rgba(18, 18, 18, 0.92);
  --muted: rgba(18, 18, 18, 0.62);
  --line: rgba(18, 18, 18, 0.12);

  --shadow: 0 18px 60px rgba(17, 12, 8, 0.12);
  --shadow-soft: 0 12px 40px rgba(17, 12, 8, 0.10);

  /* Layout tokens */
  --edge-pad: 48px;
  --top-pad: 18px;

  /* SPA logo sizing (only applied to .hero-logo--spa) */
  --spa-logo-min: 200px;
  --spa-logo-ideal: 13vw;
  --spa-logo-max: 240px;

  /* Nudge the SPA logo anchor left (spa only) */
  --spa-logo-left-nudge: 14px;
}

/* =========================================================
   2) PAGE BACKGROUND (override base.css)
   ========================================================= */
html[data-brand="spa"] body {
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 18% 0%, rgba(214, 163, 107, 0.22), transparent 58%),
    radial-gradient(900px 700px at 92% 12%, rgba(214, 163, 107, 0.14), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg2) 70%);
}

/* =========================================================
   3) BUTTON TWEAKS (LIGHT)
   ========================================================= */
html[data-brand="spa"] .btn-outline {
  background: rgba(255, 255, 255, 0.55);
  border-color: var(--line);
  color: rgba(18, 18, 18, 0.86);
}

html[data-brand="spa"] .btn-outline:hover {
  background: rgba(255, 255, 255, 0.78);
}

html[data-brand="spa"] .btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: rgba(28, 16, 10, 0.92);
}

/* =========================================================
   4) HEADER (sticky nav cluster)
   ========================================================= */
html[data-brand="spa"] .site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10000;
  padding: var(--top-pad) 0;
  pointer-events: none;

  background: linear-gradient(180deg,
      rgba(251, 250, 248, 0.92) 0%,
      rgba(251, 250, 248, 0.55) 55%,
      rgba(251, 250, 248, 0) 100%);
}

html[data-brand="spa"] .header-right {
  position: fixed;
  top: var(--top-pad);
  right: var(--edge-pad);
  z-index: 10020;

  display: inline-flex;
  align-items: center;
  gap: 12px;

  pointer-events: auto;
}

/* Nav pill (light glass) */
html[data-brand="spa"] .nav-pill {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 0.6vw, 12px);
  padding: clamp(6px, 0.6vw, 12px) clamp(10px, 1vw, 16px);

  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

html[data-brand="spa"] .nav-link {
  color: rgba(18, 18, 18, 0.78);
  font-weight: 750;

  font-size: clamp(0.84rem, 0.85vw, 1.02rem);
  padding: clamp(7px, 0.7vw, 12px) clamp(10px, 0.9vw, 16px);

  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Main nav hover — match the SPA button glow (pill-safe) */
html[data-brand="spa"] .nav-link:hover {
  background: rgba(255, 255, 255, 0.98);
  color: rgba(18, 18, 18, 0.92);

  /* use border color instead of 2px border so layout doesn't shift */
  border-color: rgba(214, 163, 107, 0.55);

  box-shadow:
    inset 0 0 0 1.25px rgba(214, 163, 107, 0.38),
    inset 0 6px 14px rgba(214, 163, 107, 0.18),
    0 12px 26px rgba(214, 163, 107, 0.16);

  transform: translateY(-1px);
}

html[data-brand="spa"] .nav-link.is-active {
  background: rgba(255, 255, 255, 0.98);
  color: rgba(18, 18, 18, 0.98);

  /* keep 1px border to avoid layout shift */
  border-color: rgba(214, 163, 107, 0.88);

  box-shadow:
    inset 0 0 0 1.5px rgba(214, 163, 107, 0.55),
    inset 0 8px 18px rgba(214, 163, 107, 0.22),
    0 0 0 1px rgba(214, 163, 107, 0.22),
    0 18px 44px rgba(214, 163, 107, 0.22);

  transform: translateY(-1px);
}

html[data-brand="spa"] .nav-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}

html[data-brand="spa"] .chev {
  opacity: 0.7;
  transform: translateY(-1px);
}

/* Dropdown */
html[data-brand="spa"] .dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

html[data-brand="spa"] .dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);

  min-width: 290px;
  padding: 10px;
  border-radius: 18px;

  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);

  opacity: 0;
  pointer-events: none;
  translate: 0 -6px;
  transition: opacity 0.14s ease, translate 0.14s ease;
}

html[data-brand="spa"] .dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 12px 12px;
  border-radius: 14px;
  color: rgba(18, 18, 18, 0.82);
  font-weight: 760;
  border: 1px solid transparent;
}

html[data-brand="spa"] .dropdown-menu a:hover {
  background: rgba(214, 163, 107, 0.14);
  border-color: rgba(214, 163, 107, 0.22);
  color: rgba(18, 18, 18, 0.92);
}

@media (hover: hover) {
  html[data-brand="spa"] .dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    translate: 0 0;
  }
}

html[data-brand="spa"] .dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  translate: 0 0;
}

/* Header actions */
html[data-brand="spa"] .header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

html[data-brand="spa"] .book-cta {
  border-radius: 999px;
  padding: clamp(10px, 0.8vw, 13px) clamp(14px, 1.1vw, 18px);
  font-size: clamp(0.9rem, 0.85vw, 1.02rem);
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

/* Desktop default: hide hamburger + panel (handled by responsive.css on mobile) */
html[data-brand="spa"] .mobile-only,
html[data-brand="spa"] .mobile-panel {
  display: none;
}

/* =========================================================
   5) HERO (SPA visuals + full viewport mechanics)
   ========================================================= */
html[data-brand="spa"] .hero {
  position: relative;

  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;

  display: grid;
  align-items: end;

  box-sizing: border-box;
  padding: 170px 0 60px;
  overflow: hidden;
}

/* Logo anchored to hero */
html[data-brand="spa"] .hero-brand {
  position: absolute;
  top: var(--top-pad);
  left: calc(var(--edge-pad) - var(--spa-logo-left-nudge));
  z-index: 10050;
  pointer-events: auto;
}

/* Clearer backdrop behind logo */
html[data-brand="spa"] .hero-brand::before {
  content: "";
  position: absolute;
  inset: -36px;
  border-radius: 999px;
  z-index: -1;

  background:
    radial-gradient(circle at 45% 35%,
      rgba(0, 0, 0, 0.18) 0%,
      rgba(0, 0, 0, 0.06) 45%,
      rgba(0, 0, 0, 0) 72%),
    radial-gradient(circle at 50% 55%,
      rgba(0, 0, 0, 0.10) 0%,
      rgba(0, 0, 0, 0) 65%);

  filter: blur(10px);
  opacity: 0.9;
  transform: translateZ(0);
}

/* Base hero logo */
html[data-brand="spa"] .hero-logo {
  width: auto;
  opacity: 0.98;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.22));
}

/* SPA logo only: larger on desktop */
html[data-brand="spa"] .hero-logo--spa {
  height: clamp(var(--spa-logo-min), var(--spa-logo-ideal), var(--spa-logo-max));
}

/* Media layer */
html[data-brand="spa"] .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

html[data-brand="spa"] .hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

/* Lighter overlay */
html[data-brand="spa"] .hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 700px at 18% 12%, rgba(214, 163, 107, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(0, 0, 0, 0.38) 68%, rgba(0, 0, 0, 0.50) 100%);
}

/* Content */
html[data-brand="spa"] .hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 18px;
}

html[data-brand="spa"] .hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4.2vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 18ch;
  font-weight: 650;

  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

html[data-brand="spa"] .hero p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
  font-size: 1.05rem;
  max-width: 62ch;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

html[data-brand="spa"] .hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   6) SPA SUBNAV (Hero buttons for Services/Packages/Products)
   ========================================================= */
html[data-brand="spa"] .spa-subnav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

html[data-brand="spa"] .spa-subnav .btn {
  box-shadow: var(--shadow-soft);
}

/* =========================
   ACTIVE TAB — white + strong gold edge
   ========================= */
html[data-brand="spa"][data-spa-page="services"] .spa-subnav-services,
html[data-brand="spa"][data-spa-page="packages"] .spa-subnav-packages,
html[data-brand="spa"][data-spa-page="products"] .spa-subnav-products {
  background: rgba(255, 255, 255, 0.98);
  color: rgba(18, 18, 18, 0.98);

  border: 2px solid rgba(214, 163, 107, 0.95);

  box-shadow:
    inset 0 0 0 2px rgba(214, 163, 107, 0.55),
    /* strong inner rim */
    inset 0 8px 18px rgba(214, 163, 107, 0.28),
    /* richer inner glow */
    0 0 0 1px rgba(214, 163, 107, 0.35),
    /* crisp edge halo */
    0 20px 50px rgba(214, 163, 107, 0.28);
  /* outer gold glow */

  transform: translateY(-1px);
}

/* =========================
   HOVER — elevated gold edge
   ========================= */
html[data-brand="spa"] .spa-subnav-link:hover {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(214, 163, 107, 0.75);

  box-shadow:
    inset 0 0 0 1.5px rgba(214, 163, 107, 0.45),
    inset 0 6px 14px rgba(214, 163, 107, 0.22),
    0 14px 36px rgba(214, 163, 107, 0.20);

  transform: translateY(-1px);
}

/* =========================================================
   SPA HERO — same gold-edge hover for the 2nd nav buttons
   (Services / Packages / Products inside .hero-actions)
   Only affects SPA hero outline buttons
   ========================================================= */

html[data-brand="spa"] .hero .hero-actions .btn.btn-outline:hover {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(214, 163, 107, 0.75);

  box-shadow:
    inset 0 0 0 1.5px rgba(214, 163, 107, 0.45),
    inset 0 6px 14px rgba(214, 163, 107, 0.22),
    0 14px 36px rgba(214, 163, 107, 0.20);

  transform: translateY(-1px);
}

/* =========================================================
   SPA HOME — gold-edge hover for outline CTAs (page-only)
   Targets: hero second nav + all "view" outline buttons on this page
   ========================================================= */

/* unify selector to just this page’s sections */
html[data-brand="spa"] .hero .hero-actions .btn.btn-outline:hover,
html[data-brand="spa"] .spa-services-v2 .btn.btn-outline:hover,
html[data-brand="spa"] .spa-packages .btn.btn-outline:hover,
html[data-brand="spa"] .spa-products .btn.btn-outline:hover {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(214, 163, 107, 0.75);

  box-shadow:
    inset 0 0 0 1.5px rgba(214, 163, 107, 0.45),
    inset 0 6px 14px rgba(214, 163, 107, 0.22),
    0 14px 36px rgba(214, 163, 107, 0.20);

  transform: translateY(-1px);
}

/* optional: make sure transition feels smooth (if base doesn't already) */
html[data-brand="spa"] .hero .hero-actions .btn.btn-outline,
html[data-brand="spa"] .spa-services-v2 .btn.btn-outline,
html[data-brand="spa"] .spa-packages .btn.btn-outline,
html[data-brand="spa"] .spa-products .btn.btn-outline {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

/* =========================================================
   SPA PROVIDERS — gold-edge hover for "About" ghost buttons
   ========================================================= */

html[data-brand="spa"] .founders .founder-actions .btn.founder-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid rgba(214, 163, 107, 0.75);
  color: rgba(18, 18, 18, 0.98);

  box-shadow:
    inset 0 0 0 1.5px rgba(214, 163, 107, 0.45),
    inset 0 6px 14px rgba(214, 163, 107, 0.22),
    0 14px 36px rgba(214, 163, 107, 0.20);

  transform: translateY(-1px);
}

/* optional smoothing (safe) */
html[data-brand="spa"] .founders .founder-actions .btn.founder-btn--ghost {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

/* =========================================================
   SPA — GLOBAL "WHITE GLOW" HOVER FOR ALL BUTTONS
   Applies to: .btn (links + buttons), including Send Inquiry,
   hero CTAs, cards, providers, modal actions, etc.
   Scoped to spa brand only.
   ========================================================= */

html[data-brand="spa"] .btn {
  /* smooth everywhere */
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease,
    background .18s ease, color .18s ease, filter .18s ease;
}

/* OUTLINE buttons: white surface + gold rim glow */
html[data-brand="spa"] .btn.btn-outline:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(214, 163, 107, 0.75);

  box-shadow:
    inset 0 0 0 1.5px rgba(214, 163, 107, 0.45),
    inset 0 6px 14px rgba(214, 163, 107, 0.22),
    0 14px 36px rgba(214, 163, 107, 0.20);

  transform: translateY(-1px);
}

/* ACCENT buttons: keep gradient but add a soft "white-ish" glow edge */
html[data-brand="spa"] .btn.btn-accent:hover {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35),
    0 14px 36px rgba(214, 163, 107, 0.26);
  transform: translateY(-1px);
  filter: saturate(1.03) contrast(1.02);
}

/* Optional: keyboard focus should match hover vibe */
html[data-brand="spa"] .btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(214, 163, 107, 0.28),
    0 14px 36px rgba(214, 163, 107, 0.18);
}

/* =========================================================
   7) FOOTER — SPA (matches clinic layout/responsive)
   ========================================================= */
html[data-brand="spa"] .site-footer {
  margin-top: 80px;
  padding: clamp(44px, 5vw, 56px) 0 22px;
  color: rgba(18, 18, 18, .72);

  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(214, 163, 107, .22), transparent 55%),
    radial-gradient(900px 700px at 90% 15%, rgba(214, 163, 107, .14), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .96));
  border-top: 1px solid rgba(18, 18, 18, .10);
}

/* 5 columns (brand | pages | clinic | spa | contact) */
html[data-brand="spa"] .footer-inner {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.15fr) minmax(160px, 1fr) minmax(190px, 1fr) minmax(170px, 1fr) minmax(260px, 1.15fr);
  column-gap: clamp(18px, 3vw, 42px);
  row-gap: clamp(18px, 2.5vw, 28px);
  align-items: start;
}

html[data-brand="spa"] .footer-cols {
  display: contents;
  position: relative;
  margin-top: 28px;
  padding-top: 28px;
}

html[data-brand="spa"] .footer-cols::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(18, 18, 18, .10);
}

html[data-brand="spa"] .footer-brand,
html[data-brand="spa"] .footer-col,
html[data-brand="spa"] .footer-contact {
  min-width: 0;
}

/* Brand */
html[data-brand="spa"] .footer-brand {
  align-items: flex-start;
}

html[data-brand="spa"] .footer-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

html[data-brand="spa"] .footer-brand-logo {
  width: clamp(140px, 10vw, 190px);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(17, 12, 8, .14));
}

html[data-brand="spa"] .footer-brand-type {
  text-align: left;
}

html[data-brand="spa"] .footer-brand-name {
  letter-spacing: .08em;
  font-weight: 850;
  font-size: 1.05rem;
  color: rgba(18, 18, 18, .92);
  white-space: normal;
}

html[data-brand="spa"] .footer-brand-sub {
  letter-spacing: .24em;
  font-weight: 800;
  font-size: .78rem;
  color: rgba(18, 18, 18, .56);
  margin-top: 2px;
  white-space: normal;
}

html[data-brand="spa"] .footer-brand-bottom {
  padding-top: 16px;
}

/* Social */
html[data-brand="spa"] .footer-social {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

html[data-brand="spa"] .social-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;

  border: 1px solid rgba(18, 18, 18, .14);
  background: rgba(255, 255, 255, .60);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(18, 18, 18, .86);
  font-weight: 900;

  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

html[data-brand="spa"] .social-btn:hover {
  transform: translateY(-2px);
  background: rgba(214, 163, 107, .14);
  border-color: rgba(214, 163, 107, .34);
  color: rgba(28, 16, 10, .92);
}

/* Link columns */
html[data-brand="spa"] .footer-col h3 {
  margin: 0 0 12px;
  font-size: .92rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, .92);
}

html[data-brand="spa"] .footer-col a {
  display: block;
  padding: 7px 0;
  text-decoration: none;
  color: rgba(18, 18, 18, .62);
  font-weight: 650;

  white-space: normal;
  overflow-wrap: anywhere;

  transition: color .16s ease, transform .16s ease;
}

html[data-brand="spa"] .footer-col a:hover {
  color: rgba(185, 133, 79, .98);
  transform: translateX(2px);
}

/* Contact */
html[data-brand="spa"] .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  justify-self: stretch;

  position: relative;
  padding-left: 18px;
}

html[data-brand="spa"] .footer-contact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg,
      transparent,
      rgba(18, 18, 18, .18),
      transparent);
}

html[data-brand="spa"] .footer-contact-title {
  margin: 0 0 10px;
  font-weight: 850;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, .86);
}

html[data-brand="spa"] .footer-contact p {
  margin: 0;
  line-height: 1.65;
  font-size: .92rem;
  color: rgba(18, 18, 18, .62);
}

html[data-brand="spa"] .footer-link {
  color: rgba(18, 18, 18, .78);
  text-decoration: none;
  font-weight: 780;
  display: inline-block;
  margin-top: 6px;
  transition: color .16s ease;
}

html[data-brand="spa"] .footer-link:hover {
  color: rgba(185, 133, 79, .98);
}

html[data-brand="spa"] .footer-contact-block:last-child .footer-link {
  margin-top: 0;
  font-size: .96rem;
  color: rgba(18, 18, 18, .88);
}

/* Bottom bar */
html[data-brand="spa"] .footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(18, 18, 18, .10);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  color: rgba(18, 18, 18, .50);
  font-weight: 650;
}

html[data-brand="spa"] .footer-bottom p {
  margin: 0;
}

/* Back to top button */
html[data-brand="spa"] .to-top {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(18, 18, 18, .14);
  background: rgba(255, 255, 255, .60);
  color: rgba(18, 18, 18, .86);
  font-weight: 900;
  cursor: pointer;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

html[data-brand="spa"] .to-top:hover {
  transform: translateY(-2px);
  background: rgba(214, 163, 107, .14);
  border-color: rgba(214, 163, 107, .34);
  color: rgba(28, 16, 10, .92);
}

/* =========================================================
   8) SMALL UTIL
   ========================================================= */
.spa-divider {
  width: 33%;
  height: 2px;
  margin: 18px 0 22px;
  border-radius: 2px;

  background: linear-gradient(90deg,
      rgba(214, 163, 107, 0.95),
      rgba(214, 163, 107, 0.35),
      transparent);
}

/* =========================================================
   9) RESPONSIVE OVERRIDES (SPA-only)
   ========================================================= */

/* Footer -> 1 column at 1400 */
@media (max-width: 1400px) {
  html[data-brand="spa"] .footer-inner {
    grid-template-columns: 1fr;
  }

  html[data-brand="spa"] .footer-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  html[data-brand="spa"] .footer-contact {
    padding-left: 0;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid rgba(18, 18, 18, .10);
  }

  html[data-brand="spa"] .footer-contact::before {
    display: none;
  }

  html[data-brand="spa"] .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  html[data-brand="spa"] .footer-cols::before {
    display: block;
  }

  /* Brand layout matches clinic in 1-col */
  html[data-brand="spa"] .footer-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo type"
      "logo socials";
    column-gap: 20px;
    row-gap: 8px;
    align-items: start;
  }

  html[data-brand="spa"] .footer-brand-stack {
    display: contents;
  }

  html[data-brand="spa"] .footer-brand-logo {
    grid-area: logo;
    width: clamp(160px, 18vw, 220px);
  }

  html[data-brand="spa"] .footer-brand-type {
    grid-area: type;
  }

  html[data-brand="spa"] .footer-social {
    grid-area: socials;
    margin-top: 2px;
    justify-self: start;
    align-self: start;
  }
}

/* =========================================================
   10) SPA: Mobile behavior matches clinic (wins at end)
   ========================================================= */
@media (max-width: 960px) {

  /* match clinic's mobile tokens */
  html[data-brand="spa"] {
    --edge-pad: 16px;
    --top-pad: 10px;
  }

  /* match clinic header padding/safe-area */
  html[data-brand="spa"] .site-header {
    padding-top: calc(var(--top-pad) + env(safe-area-inset-top));
    padding-bottom: 10px;
  }

  /* match clinic pinned row behavior */
  html[data-brand="spa"] .header-right {
    top: calc(var(--top-pad) + env(safe-area-inset-top));
    right: calc(var(--edge-pad) + env(safe-area-inset-right));
    left: calc(var(--edge-pad) + env(safe-area-inset-left));

    width: auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  /* SPA hero stays full viewport (no fixed px) */
  html[data-brand="spa"] .hero {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 120px 0 48px;

    position: relative;
    isolation: isolate;
  }

  html[data-brand="spa"] .hero-brand {
    top: calc(var(--top-pad) + env(safe-area-inset-top));
    left: calc(var(--edge-pad) + env(safe-area-inset-left));
  }

  /* keep your perfect mobile logo size */
  html[data-brand="spa"] .hero-logo--spa {
    height: clamp(96px, 22vw, 132px);
  }
}

@media (max-width: 420px) {

  html[data-brand="spa"] .hero {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 110px 0 42px;
  }

  html[data-brand="spa"] .hero-logo--spa {
    height: 92px;
  }

  html[data-brand="spa"] .site-footer {
    padding: 42px 0 20px;
  }

  html[data-brand="spa"] .footer-col h3 {
    font-size: .88rem;
  }

  html[data-brand="spa"] .social-btn {
    width: 40px;
    height: 40px;
  }
}

/* =========================================================
   11) SPA SERVICES v2 — MOBILE split layout (light panel)
   Requires your services slider CSS (spaService.css) to be loaded.
   ========================================================= */
@media (max-width: 650px) {

  /* Make the card taller so copy never feels crammed */
  html[data-brand="spa"] .services-v2-shell {
    height: clamp(420px, 82vw, 540px);
  }

  /* Top image + bottom panel (same behavior as Mission mobile) */
  html[data-brand="spa"] .services-item.is-active {
    display: grid;
    grid-template-rows: 1fr auto;
  }

  html[data-brand="spa"] .services-item.is-active::before {
    content: "";
    grid-row: 1;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: var(--bg-pos-m, 50% 35%);
    filter: saturate(1.03) contrast(1.02);
  }

  html[data-brand="spa"] .services-item.is-active::after {
    grid-row: 1;
    inset: 0;
    opacity: 1;
    background:
      linear-gradient(180deg,
        rgba(0, 0, 0, .10) 0%,
        rgba(0, 0, 0, .25) 70%,
        rgba(0, 0, 0, .34) 100%);
  }

  html[data-brand="spa"] .services-content {
    position: relative !important;
    grid-row: 2;

    width: auto !important;
    max-width: none !important;

    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;

    padding: 20px 16px 92px;
    text-align: left !important;

    background: linear-gradient(180deg,
        rgba(255, 255, 255, .88) 0%,
        rgba(255, 255, 255, .96) 8%,
        rgba(255, 255, 255, 1) 100%);
    border-top: 1px solid rgba(18, 18, 18, .10);

    color: rgba(18, 18, 18, .92);
    text-shadow: none;

    opacity: 1;
    pointer-events: auto;
  }

  html[data-brand="spa"] .services-title {
    color: rgba(18, 18, 18, .92);
    text-transform: none;
  }

  html[data-brand="spa"] .services-desc {
    color: rgba(18, 18, 18, .70);
    max-width: none;
    margin-bottom: 12px;

    font-size: 0.94rem;
    line-height: 1.5;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
  }

  html[data-brand="spa"] .services-actions {
    justify-content: flex-start !important;
  }

  html[data-brand="spa"] .services-actions .btn.btn-outline {
    border-color: rgba(18, 18, 18, .18);
    background: rgba(255, 255, 255, .70);
    color: rgba(18, 18, 18, .86);
    box-shadow: var(--shadow-soft);
  }

  html[data-brand="spa"] .services-actions .btn.btn-outline:hover {
    background: rgba(255, 255, 255, .90);
    border-color: rgba(18, 18, 18, .28);
  }

  html[data-brand="spa"] .services-actions .btn.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-color: rgba(214, 163, 107, .60);
    color: rgba(28, 16, 10, .92);
  }

  /* Prevent BL/BR positioning rules from fighting on mobile */
  html[data-brand="spa"] .services-item[data-pos="bl"] .services-content,
  html[data-brand="spa"] .services-item[data-pos="br"] .services-content {
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    text-align: left !important;
  }

  html[data-brand="spa"] .services-controls {
    bottom: 12px;
    z-index: 5;
  }
}

/* =========================================================
   FOOTER — SPA (MATCH CLINIC FOOTER LAYOUT/BEHAVIOR)
   NOTE: Layout + breakpoints match clinic; colors stay SPA.
   ========================================================= */

html[data-brand="spa"] .site-footer {
  margin-top: 80px;
  padding: clamp(44px, 5vw, 56px) 0 22px;
  color: rgba(18, 18, 18, .72);

  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(214, 163, 107, .22), transparent 55%),
    radial-gradient(900px 700px at 90% 15%, rgba(214, 163, 107, .14), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .96));
  border-top: 1px solid rgba(18, 18, 18, .10);
}

/* ====== DESKTOP / FULL VIEW (5 columns) ======
   BRAND | PAGES | CLINIC | SPA | ADDRESS
*/
html[data-brand="spa"] .footer-inner {
  display: grid;
  grid-template-columns:
    minmax(220px, 1.15fr)
    /* brand */
    minmax(160px, 1fr)
    /* pages */
    minmax(190px, 1fr)
    /* clinic */
    minmax(170px, 1fr)
    /* spa */
    minmax(260px, 1.15fr);
  /* contact */
  column-gap: clamp(18px, 3vw, 42px);
  row-gap: clamp(18px, 2.5vw, 28px);
  align-items: start;
}

/* Flatten the wrapper so the 3 link columns become real grid columns */
html[data-brand="spa"] .footer-cols {
  display: contents;
  position: relative;
  margin-top: 28px;
  padding-top: 28px;
}

html[data-brand="spa"] .footer-cols::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(18, 18, 18, .10);
}

/* Safety: allow items to shrink without overflow */
html[data-brand="spa"] .footer-brand,
html[data-brand="spa"] .footer-col,
html[data-brand="spa"] .footer-contact {
  min-width: 0;
}

/* ===== Brand ===== */
html[data-brand="spa"] .footer-brand {
  align-items: flex-start;
  gap: 12px;
}

html[data-brand="spa"] .footer-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

html[data-brand="spa"] .footer-brand-logo {
  width: clamp(140px, 10vw, 190px);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(17, 12, 8, .14));
}

html[data-brand="spa"] .footer-brand-type {
  text-align: left;
  padding-top: 18px;
  /* mirrors clinic rhythm */
}

html[data-brand="spa"] .footer-brand-name,
html[data-brand="spa"] .footer-brand-sub {
  white-space: normal;
}

html[data-brand="spa"] .footer-brand-name {
  letter-spacing: .08em;
  font-weight: 850;
  font-size: 1.05rem;
  color: rgba(18, 18, 18, .92);
}

html[data-brand="spa"] .footer-brand-sub {
  letter-spacing: .24em;
  font-weight: 800;
  font-size: .78rem;
  color: rgba(18, 18, 18, .56);
  margin-top: 2px;
}

/* Social */
html[data-brand="spa"] .footer-social {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

html[data-brand="spa"] .social-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-decoration: none;

  border: 1px solid rgba(18, 18, 18, .14);
  background: rgba(255, 255, 255, .60);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(18, 18, 18, .86);
  font-weight: 900;

  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

html[data-brand="spa"] .social-btn:hover {
  transform: translateY(-2px);
  background: rgba(214, 163, 107, .14);
  border-color: rgba(214, 163, 107, .34);
  color: rgba(28, 16, 10, .92);
}

/* ===== Link Columns ===== */
html[data-brand="spa"] .footer-col h3 {
  margin: 0 0 12px;
  font-size: .92rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, .92);
}

html[data-brand="spa"] .footer-col a {
  display: block;
  padding: 7px 0;
  text-decoration: none;
  color: rgba(18, 18, 18, .62);
  font-weight: 650;

  white-space: normal;
  overflow-wrap: anywhere;

  transition: color .16s ease, transform .16s ease;
}

html[data-brand="spa"] .footer-col a:hover {
  color: rgba(185, 133, 79, .98);
  transform: translateX(2px);
}

html[data-brand="spa"] .footer-col+.footer-col {
  margin-top: 2px;
}

/* ===== Contact (Address distinct from links) ===== */
html[data-brand="spa"] .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  justify-self: stretch;

  position: relative;
  padding-left: 18px;
}

html[data-brand="spa"] .footer-contact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg,
      transparent,
      rgba(18, 18, 18, .18),
      transparent);
}

html[data-brand="spa"] .footer-contact-title {
  margin: 0 0 10px;
  font-weight: 850;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(18, 18, 18, .86);
}

html[data-brand="spa"] .footer-contact p {
  margin: 0;
  line-height: 1.65;
  font-size: .92rem;
  color: rgba(18, 18, 18, .62);
}

html[data-brand="spa"] .footer-link {
  color: rgba(18, 18, 18, .78);
  text-decoration: none;
  font-weight: 780;
  display: inline-block;
  margin-top: 6px;
  transition: color .16s ease;
}

html[data-brand="spa"] .footer-link:hover {
  color: rgba(185, 133, 79, .98);
}

html[data-brand="spa"] .footer-contact-block:last-child .footer-link {
  margin-top: 0;
  font-size: .96rem;
  color: rgba(18, 18, 18, .88);
}

/* ===== Bottom bar ===== */
html[data-brand="spa"] .footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(18, 18, 18, .10);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  color: rgba(18, 18, 18, .50);
  font-weight: 650;
}

html[data-brand="spa"] .footer-bottom p {
  margin: 0;
}

/* Back to top button */
html[data-brand="spa"] .to-top {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(18, 18, 18, .14);
  background: rgba(255, 255, 255, .60);
  color: rgba(18, 18, 18, .86);
  font-weight: 900;
  cursor: pointer;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

html[data-brand="spa"] .to-top:hover {
  transform: translateY(-2px);
  background: rgba(214, 163, 107, .14);
  border-color: rgba(214, 163, 107, .34);
  color: rgba(28, 16, 10, .92);
}

/* =========================
   BREAKPOINT: switch to ONE-COLUMN footer (≤1400px)
   Matches clinic behavior: no “mid stacking”, address never cuts off.
   ========================= */
@media (max-width: 1400px) {
  html[data-brand="spa"] .footer-inner {
    grid-template-columns: 1fr;
  }

  /* stop flattening; make middle columns a clean wrap stack */
  html[data-brand="spa"] .footer-cols {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(18px, 3vw, 42px);
    align-items: flex-start;
    margin-top: 28px;
    padding-top: 28px;
  }

  /* keep the separator above the link sections */
  html[data-brand="spa"] .footer-cols::before {
    display: block;
  }

  /* Brand: logo left, type right, socials under type (clinic) */
  html[data-brand="spa"] .footer-brand {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo type"
      "logo socials";
    column-gap: 20px;
    row-gap: 8px;
    align-items: start;
  }

  html[data-brand="spa"] .footer-brand-stack {
    display: contents;
  }

  html[data-brand="spa"] .footer-brand-top {
    grid-area: logo;
  }

  html[data-brand="spa"] .footer-brand-logo {
    width: clamp(160px, 18vw, 220px);
  }

  html[data-brand="spa"] .footer-brand-type {
    grid-area: type;
    padding-top: 0;
  }

  html[data-brand="spa"] .footer-social {
    grid-area: socials;
    margin-top: 2px;
    justify-self: start;
    align-self: start;
  }

  /* Contact: remove vertical divider; add top rule */
  html[data-brand="spa"] .footer-contact {
    padding-left: 0;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid rgba(18, 18, 18, .10);
  }

  html[data-brand="spa"] .footer-contact::before {
    display: none;
  }

  html[data-brand="spa"] .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* =========================
   SMALL SCREENS (≤700px)
   Brand stacks nicely (clinic)
   ========================= */
@media (max-width: 700px) {
  html[data-brand="spa"] .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  html[data-brand="spa"] .footer-brand-logo {
    width: clamp(180px, 48vw, 240px);
  }

  html[data-brand="spa"] .footer-brand-type {
    text-align: left;
  }

  html[data-brand="spa"] .footer-social {
    margin-top: 6px;
  }
}

/* Extra-small: tighten padding a touch */
@media (max-width: 420px) {
  html[data-brand="spa"] .site-footer {
    padding: 42px 0 20px;
  }

  html[data-brand="spa"] .footer-col h3 {
    font-size: .88rem;
  }

  html[data-brand="spa"] .social-btn {
    width: 40px;
    height: 40px;
  }
}

/* Optional: match your existing little spacing tweak */
html[data-brand="spa"] .footer-brand-bottom {
  padding-top: 16px;
}


/* SPA — remove section background panels (keep cards intact) */
html[data-brand="spa"] main>section {
  background: transparent !important;
}

/* If any SPA wrappers are divs instead of section tags, include common patterns */
html[data-brand="spa"] .spa-section,
html[data-brand="spa"] .section,
html[data-brand="spa"] .section-wrap {
  background: transparent !important;
}

/* =========================
   SERVICES PREVIEW (same layout as products)
   Add breathing room under hero
   ========================= */
html[data-brand="spa"] #services-preview {
  padding-top: clamp(34px, 4vw, 64px);
}

/* optional: keep bottom consistent too */
html[data-brand="spa"] #services-preview {
  padding-bottom: clamp(72px, 7vw, 110px);
}