/* ================================================================
   Castle Med Spa — Treatment Page Shared Stylesheet
   ================================================================ */

/* DESIGN SYSTEM */
:root {
  --color-primary: #EC4899;
  --color-secondary: #F9A8D4;
  --color-cta: #8B5CF6;
  --color-background: #FDF2F8;
  --color-bg-alt: #FFFFFF;
  --color-text: #831843;
  --color-text-muted: #475569;
  --color-white: #FFFFFF;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-500: #6B7280;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --shadow-sm: 0 1px 2px rgba(131, 24, 67, 0.05);
  --shadow-md: 0 4px 6px rgba(131, 24, 67, 0.08);
  --shadow-lg: 0 15px 30px rgba(131, 24, 67, 0.12);

  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-standard: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  line-height: 1.2;
}
a { color: inherit; text-decoration: none; transition: color var(--transition-standard); }
button { font-family: 'Inter', sans-serif; cursor: pointer; border: none; background: none; }

/* Utils */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-standard);
  text-decoration: none;
}
.btn-primary {
  background: var(--color-cta);
  color: var(--color-white);
  border: 2px solid var(--color-cta);
}
.btn-primary:hover {
  background: #7C3AED;
  border-color: #7C3AED;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid rgba(236, 72, 153, 0.1);
  transition: all 0.3s ease;
}
.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo img { height: 40px; width: auto; object-fit: contain; }
.logo span { color: var(--color-text); font-weight: 400; }

.nav-links {
  display: none;
  gap: var(--space-xl);
  align-items: center;
}
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-link { font-weight: 500; font-size: 0.95rem; }
.nav-link:hover { color: var(--color-primary); }

/* Services Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--color-text);
  transition: color var(--transition-standard);
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  padding: 0;
}
.nav-dropdown-toggle:hover { color: var(--color-primary); }
.nav-dropdown-toggle svg { transition: transform 0.25s ease; flex-shrink: 0; }
.nav-dropdown.open .nav-dropdown-toggle svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  min-width: 240px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(131, 24, 67, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.1);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 200;
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: white;
  border-top: 1px solid rgba(236, 72, 153, 0.1);
  border-left: 1px solid rgba(236, 72, 153, 0.1);
}
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: all var(--transition-standard);
  text-decoration: none;
}
.nav-dropdown-item:hover {
  background: rgba(236, 72, 153, 0.05);
  color: var(--color-primary);
  padding-left: 26px;
}
.nav-dropdown-item.active { color: var(--color-primary); }
.nav-dropdown-item .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-secondary);
  flex-shrink: 0;
  transition: background var(--transition-standard);
}
.nav-dropdown-item:hover .dot,
.nav-dropdown-item.active .dot { background: var(--color-primary); }

/* ── Hamburger ── */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  border-radius: var(--radius-md);
  transition: background var(--transition-standard);
}
.hamburger-btn:hover { background: rgba(236, 72, 153, 0.08); }
.hamburger-btn span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 768px) { .hamburger-btn { display: none; } }

/* ── Mobile Menu Overlay ── */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}
.mobile-overlay.open { pointer-events: auto; }
.mobile-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(131, 24, 67, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-overlay.open .mobile-overlay-bg { opacity: 1; }
.mobile-drawer {
  position: absolute;
  top: 0; right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--color-white);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(131, 24, 67, 0.15);
  z-index: 1;
  overflow-y: auto;
}
.mobile-overlay.open .mobile-drawer { transform: translateX(0); }
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-gray-100);
}
.mobile-drawer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}
.mobile-drawer-logo span { color: var(--color-text); font-weight: 400; }
.mobile-close-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-gray-100);
  color: var(--color-text-muted);
  font-size: 1.125rem;
  cursor: pointer;
  transition: all var(--transition-standard);
}
.mobile-close-btn:hover { background: var(--color-primary); color: white; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 16px 0;
  flex: 1;
}
.mobile-nav-link {
  display: block;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-gray-100);
  transition: all var(--transition-standard);
}
.mobile-nav-link:hover {
  color: var(--color-primary);
  background: rgba(236, 72, 153, 0.04);
  padding-left: 32px;
}
.mobile-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-gray-100);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-gray-100);
  width: 100%;
  font-family: 'Inter', sans-serif;
}
.mobile-nav-group-toggle svg { transition: transform 0.25s ease; color: var(--color-text-muted); }
.mobile-nav-group.open .mobile-nav-group-toggle svg { transform: rotate(180deg); }
.mobile-nav-sub {
  display: none;
  background: rgba(249, 168, 212, 0.05);
  border-bottom: 1px solid var(--color-gray-100);
}
.mobile-nav-group.open .mobile-nav-sub { display: block; }
.mobile-nav-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px 11px 36px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 500;
  transition: all var(--transition-standard);
  text-decoration: none;
  border-bottom: 1px solid rgba(236, 72, 153, 0.06);
}
.mobile-nav-sub-item:last-child { border-bottom: none; }
.mobile-nav-sub-item:hover,
.mobile-nav-sub-item.active { color: var(--color-primary); background: rgba(236,72,153,0.04); }
.mobile-nav-sub-item .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-secondary); flex-shrink: 0; }
.mobile-nav-sub-item.active .dot { background: var(--color-primary); }
.mobile-nav-footer {
  padding: 24px;
  border-top: 1px solid var(--color-gray-100);
}
.mobile-nav-footer .btn { width: 100%; text-align: center; }

/* ── Treatment Hero ── */
.treatment-hero {
  padding: 140px 0 64px;
  color: white;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
  opacity: 0.85;
}
.breadcrumb a { color: white; }
.breadcrumb a:hover { opacity: 0.75; }
.breadcrumb span { opacity: 0.6; }
.treatment-hero .hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: white;
  margin-bottom: var(--space-md);
}
.treatment-hero .hero-desc {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  line-height: 1.7;
}

/* ── Treatments Section ── */
.treatments-section {
  padding: var(--space-4xl) 0;
}

/* Treatment Grid */
.treatment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}
@media (min-width: 640px) { .treatment-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .treatment-grid { grid-template-columns: repeat(3, 1fr); } }

/* Treatment Card */
.treatment-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-100);
  transition: all var(--transition-standard);
  display: flex;
  flex-direction: column;
}
.treatment-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(236, 72, 153, 0.2);
}
.treatment-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.5s ease;
}
.treatment-card:hover .treatment-img { transform: scale(1.03); }
.treatment-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.treatment-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.treatment-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(236, 72, 153, 0.1);
  color: var(--color-primary);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.treatment-duration {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.treatment-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}
.treatment-desc {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: var(--space-md);
}
.treatment-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
}
.note-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}
.note-item svg { flex-shrink: 0; color: var(--color-primary); opacity: 0.7; }
.book-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-standard);
  width: 100%;
}
.book-btn:hover {
  background: var(--color-primary);
  color: white;
}

/* ── Footer (4-column dark, synced with index.html) ── */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: var(--space-4xl) 0 var(--space-2xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); } }
@media (max-width: 640px)  { .footer-grid { grid-template-columns: 1fr; } }

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: var(--space-md);
}
.footer-logo span { color: white; font-weight: 400; }
.footer-tagline { font-size: 0.9rem; line-height: 1.7; margin-bottom: var(--space-lg); }

.footer-col-title { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: white; margin-bottom: var(--space-lg); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.65); transition: color var(--transition-standard); }
.footer-links a:hover { color: var(--color-secondary); }

.footer-contact-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; margin-bottom: 12px; }
.footer-contact-item svg { color: var(--color-secondary); flex-shrink: 0; margin-top: 2px; }
.footer-contact-item a { color: rgba(255,255,255,0.65); transition: color var(--transition-standard); }
.footer-contact-item a:hover { color: var(--color-secondary); }

.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; }
.footer-bottom a { color: rgba(255,255,255,0.5); transition: color var(--transition-standard); }
.footer-bottom a:hover { color: var(--color-secondary); }

/* ── Detail-page photo inside .ba-image (overrides gradient placeholder) ── */
/* Hard-constrain the photo card so it never dwarfs the text column */
.ba-card {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
/* Force the image box to a fixed square — width drives the box, image fills it */
.ba-image {
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  overflow: hidden;
  height: auto !important;
  display: block;
}
.ba-image img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
/* Hide the gradient-overlay pseudo on photo boxes (works in Chrome/Safari/Firefox 121+) */
.ba-image:has(img)::after { display: none !important; }
/* Re-position badge as overlay since we removed flex+padding */
.ba-image .ba-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 3;
}
