/* ═══════════════════════════════════════════════════════════
   UCLA TMS Clinical & Research Service — Website Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────── */
/* Loaded via <link> tags in HTML <head> for better performance */

/* ── CSS Variables ────────────────────────────────────── */
:root {
  --ucla-blue: #2774AE;
  --ucla-blue-dark: #1B5583;
  --ucla-gold: #FFD100;
  --ucla-gold-soft: #FFF0B3;
  --navy: #0B2341;
  --navy-light: #163A5F;
  --slate: #2D3748;
  --slate-light: #718096;
  --warm-gray: #F7F5F2;
  --cream: #FDFBF7;
  --white: #FFFFFF;
  --border: #E2E0DC;
  --border-light: #F0EEEA;
  --success: #2D8A56;
  --font-display: 'Satoshi', 'Hanken Grotesk', -apple-system, sans-serif;
  --font-brand: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(11,35,65,0.06);
  --shadow-md: 0 4px 16px rgba(11,35,65,0.08);
  --shadow-lg: 0 8px 32px rgba(11,35,65,0.1);
  --shadow-xl: 0 16px 48px rgba(11,35,65,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  /* Brief F (P2-2): switched from ease-in-out to ease-out for premium entrance feel. */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.25s var(--ease-out);
  /* Card-system hover lift (Brief C) — fine-grained, separate from --transition. */
  --transition-lift: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), border-color 0.18s var(--ease-out);
  --max-width: 1200px;
  /* Aliases for additional component styles */
  --primary: #2774AE;
  --gold: #FFD100;
  --text: #0B2341;
  --surface: #F7F5F2;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--cream);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: var(--ucla-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ucla-blue-dark); }

/* ── Keyboard focus ring (a11y): branded, shows on keyboard nav, suppressed on mouse ── */
:focus-visible {
  outline: 2px solid var(--ucla-blue);
  outline-offset: 3px;
}
.hero :focus-visible,
.page-hero :focus-visible,
.cta-banner :focus-visible,
.footer :focus-visible,
.top-bar :focus-visible {
  outline-color: var(--ucla-gold);
}
:focus:not(:focus-visible) { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: 1rem; color: var(--slate); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section-padding { padding: 60px 0; }
@media (max-width: 768px) { .section-padding { padding: 44px 0; } }
/* Tighter rhythm for sparse bands (single CTA / no grid) so they don't
   read as an unfinished empty band. */
.section-padding--tight { padding: 40px 0; }
@media (max-width: 768px) { .section-padding--tight { padding: 32px 0; } }

/* ── Utility ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-slate { color: var(--slate); }
.text-blue { color: var(--ucla-blue); }
.text-gold { color: #B8860B; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-lead { color: var(--navy); line-height: 1.7; }
.font-medium { font-weight: 500; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.bg-warm-gray { background: var(--warm-gray); }
.mx-auto { margin-left: auto; margin-right: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-full);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: none; cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--ucla-blue);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--ucla-blue-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--ucla-gold);
  color: var(--navy);
}
.btn-gold:hover {
  background: #E6BC00;
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--ucla-blue);
  border: 2px solid var(--ucla-blue);
}
.btn-outline:hover {
  background: var(--ucla-blue);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-white {
  background: var(--white);
  color: var(--ucla-blue);
}
.btn-white:hover {
  background: var(--cream);
  color: var(--ucla-blue-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Ghost button for dark hero backgrounds — secondary action paired with a filled primary */
.btn-hero-ghost {
  background: rgba(255,255,255,0.14);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 6px 18px rgba(11,35,65,0.25);
}
.btn-hero-ghost:hover {
  background: rgba(255,255,255,0.24);
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 8px 22px rgba(11,35,65,0.3);
}

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

.btn-icon {
  width: 20px; height: 20px;
  transition: transform var(--transition);
}
.btn:hover .btn-icon { transform: translateX(3px); }

/* ── Section Headers ─────────────────────────────────── */
.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ucla-blue);
  margin-bottom: 12px;
}

.section-title { margin-bottom: 16px; }

/* Tabular figures so stat readouts keep an even digit rhythm */
.hero-stat-number, .feature-number, .stat-value, .stat-highlight, .accent-stat-number {
  font-variant-numeric: tabular-nums;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--slate-light);
  max-width: 640px;
  line-height: 1.7;
}

.section-header {
  margin-bottom: 48px;
}

/* Left-aligned section intro (rhythm variant — breaks the all-centered
   cadence; pairs well above grids, per the "A Better Path" model). The
   subtitle keeps its reading-width cap but anchors left instead of
   centering. Stacks identically on mobile — alignment is already
   block-start, so no horizontal-scroll or asymmetry risk. */
.section-header--left {
  text-align: left;
  max-width: 760px;
}
.section-header--left .section-subtitle { margin-left: 0; margin-right: 0; }

/* ── Top Bar ──────────────────────────────────────────── */
.top-bar {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  padding: 8px 0;
}

.top-bar-inner {
  display: flex; justify-content: space-between; align-items: center;
}

.top-bar a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.top-bar a:hover { color: var(--ucla-gold); }

.top-bar-links { display: flex; gap: 20px; align-items: center; }

.top-bar-phone {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--white) !important;
}

/* ── Header/Nav ──────────────────────────────────────── */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  gap: 32px;
}

.logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; flex-shrink: 0;
}

.logo-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
}
/* Header brain mark: a black brain silhouette on the white header, recolored
   from the white-on-transparent source via filter (object-fit keeps it undistorted). */
.header .logo-icon {
  border-radius: 0;
  object-fit: contain;
  filter: brightness(0);
}

.logo-text {
  display: flex; flex-direction: column; line-height: 1.15;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.logo-subtitle {
  font-size: 0.845rem; font-weight: 500;
  color: var(--slate-light);
  letter-spacing: 0.02em;
  /* Justify the single line so its right edge meets the wordmark's exactly. */
  text-align: justify;
  text-align-last: justify;
}

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 8px 14px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500;
  color: var(--slate);
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--ucla-blue); background: rgba(39,116,174,0.06);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-trigger {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 4px;
}
.nav-dropdown-trigger svg { width: 14px; height: 14px; transition: transform var(--transition); }
.nav-dropdown:hover .nav-dropdown-trigger svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px; padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0.22s;
  z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}

.nav-dropdown-item {
  display: block; padding: 10px 14px;
  border-radius: 8px; font-size: 0.88rem;
  color: var(--slate); font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-dropdown-item:hover {
  background: rgba(39,116,174,0.06); color: var(--ucla-blue);
}

.header-actions { display: flex; gap: 16px; align-items: center; flex-shrink: 0; }

.header-refer-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ucla-blue);
  border: 1.5px solid var(--ucla-blue);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.header-refer-link:hover {
  background: var(--ucla-blue);
  color: var(--white);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--navy);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed; inset: 0; z-index: 999;
  background: rgba(11,35,65,0.5); backdrop-filter: blur(4px);
}
.mobile-nav.open { display: block; }

.mobile-nav-panel {
  position: absolute; top: 0; right: 0;
  width: min(380px, 90vw); height: 100%;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } }

.mobile-nav-close {
  background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--slate); float: right;
}
.mobile-nav-close svg { width: 24px; height: 24px; }

.mobile-nav-links {
  list-style: none; padding-top: 48px;
}
.mobile-nav-links a {
  display: block; padding: 14px 0;
  font-size: 1.05rem; font-weight: 500;
  color: var(--navy); border-bottom: 1px solid var(--border-light);
  text-decoration: none;
}
.mobile-nav-links a:hover { color: var(--ucla-blue); }
.mobile-nav-links .sub-link { padding-left: 20px; font-size: 0.95rem; color: var(--slate); }

/* Mobile Nav Accordion Groups */
.mobile-nav-group {
  list-style: none;
}

.mobile-nav-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
  transition: color var(--transition);
}

.mobile-nav-group-trigger:hover {
  color: var(--ucla-blue);
}

.mobile-nav-group-trigger svg {
  flex-shrink: 0;
  color: var(--slate-light);
  transition: transform var(--transition);
}

.mobile-nav-group-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.mobile-nav-group-items {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-nav-group-items li a {
  display: block;
  padding: 10px 0 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--slate);
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  transition: color var(--transition);
}

.mobile-nav-group-items li a:hover {
  color: var(--ucla-blue);
}

.mobile-nav-group-items li:last-child a {
  border-bottom: none;
}

.mobile-nav-divider {
  list-style: none;
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.mobile-nav-actions {
  display: flex; flex-direction: column; gap: 12px;
  padding-top: 24px;
}

@media (max-width: 1024px) {
  .nav, .header-actions { display: none; }
  .nav-toggle { display: block; }
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #0D3259 40%, var(--ucla-blue-dark) 100%);
  color: var(--white);
  overflow: hidden;
}
/* The hero is a flex section, so its container shrink-wraps to content and centers unless we
   force full width. width:100% lets max-width + margin:auto align it with the header container. */
.hero--photo .container { width: 100%; }

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(39,116,174,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255,209,0,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative; z-index: 2;
  padding: 40px 0 32px;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,209,0,0.12);
  border: 1px solid rgba(255,209,0,0.25);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--ucla-gold);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  text-transform: uppercase;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--ucla-gold);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(8,24,46,0.45), 0 2px 18px rgba(8,24,46,0.4);
}

.hero h1 .gold { color: var(--ucla-gold); }

.hero-description {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 560px;
  text-shadow: 0 1px 3px rgba(8,24,46,0.5), 0 1px 14px rgba(8,24,46,0.45);
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-provider-link { margin-top: 16px; }
.hero-provider-link a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition);
}
.hero-provider-link a:hover { color: var(--white); }

.hero-stat-strip {
  position: relative; z-index: 2;
  display: flex; gap: 0;
  margin-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
  flex: 1; padding: 24px 0;
  border-right: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.hero-stat:last-child { border-right: none; }

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}

.hero-stat-label {
  font-size: 0.78rem; font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 768px) {
  .hero-content { padding: 40px 0 32px; }
  .hero-stat-strip { flex-wrap: wrap; }
  .hero-stat { flex: 1 0 50%; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 18px 0; }
}

/* ── Page Hero (inner pages) ──────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ucla-blue-dark) 100%);
  color: var(--white);
  padding: 72px 0 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(39,116,174,0.25) 0%, transparent 60%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero .breadcrumb {
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,0.65); }
.page-hero .breadcrumb a:hover { color: var(--ucla-gold); }
.page-hero p { color: rgba(255,255,255,0.7); max-width: 640px; }

/* ═══════════════════════════════════════════════════════════
   CARD SYSTEM (Brief C — P1-1)
   One coherent card language across the site. The Locations cards
   (real photo + soft elevation + map-pin) set the quality bar; this
   recipe brings every other card type up to it.

   Surface recipe:
     • white surface, single hairline border (--border)
     • --radius-lg corners
     • resting soft navy-tinted elevation (--shadow-sm)
   Hover (GPU-only — transform/box-shadow/border-color, ~180ms ease-out):
     • lift translateY(-2px) + shadow bump to --shadow-md
     • border warms toward UCLA blue

   Apply via the .card-surface utility on new markup, or via the
   :where() group selector below which retrofits the existing bespoke
   card classes onto the shared recipe without a mass markup rewrite.
   ═══════════════════════════════════════════════════════════ */
.card-surface,
:where(.card, .condition-card, .feature-anchor, .location-card,
       .location-detail-card, .study-card, .video-card, .crosslink-card,
       .division-tile) {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-lift);
}

/* Shared hover lift. Scoped to the same set so depth + motion read as
   one system. Links and static cards alike get the lift. */
.card-surface:hover,
:where(.card:hover, .condition-card:hover, .feature-anchor:hover,
       .location-card:hover, .location-detail-card:hover, .study-card:hover,
       .video-card:hover, .crosslink-card:hover, .division-tile:hover) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(39,116,174,0.18);
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  padding: 32px;
}

.card-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: rgba(39,116,174,0.08);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--ucla-blue);
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.95rem; color: var(--slate); }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 0.9rem;
  margin-top: 16px; color: var(--ucla-blue);
}
.card-link svg { width: 16px; height: 16px; transition: transform var(--transition); }
.card-link:hover svg { transform: translateX(4px); }

.card-grid {
  display: grid; gap: 24px;
}
.card-grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ── Conditions/Treatment Cards ──────────────────────── */
/* Surface (white / hairline / --radius-lg / --shadow-sm) + hover lift come
   from the card system above. Only layout + the animated top accent here. */
.condition-card {
  padding: 22px 24px;
  text-decoration: none;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.condition-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--ucla-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.condition-card:hover::before { transform: scaleX(1); }

/* Treatment badges (Brief C — P1-1). Lightened from saturated full-color bars
   to soft tinted-background chips + a colored label. Same hue mapping
   (FDA green / Accelerated gold / Advanced navy-blue), same text, contrast-safe
   label colors (all ≥4.5:1 on their tint). */
.condition-tag {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ucla-blue-dark);
  background: rgba(39,116,174,0.12);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}
.condition-tag.fda { color: #1B6E42; background: rgba(45,138,86,0.12); }
.condition-tag.accelerated { color: #7A5A00; background: rgba(255,209,0,0.18); }
.condition-tag.advanced { color: var(--ucla-blue-dark); background: rgba(39,116,174,0.12); }
.condition-tag.off-label { color: var(--slate); background: var(--warm-gray); }

.condition-card h3 { font-size: 1.12rem; margin-bottom: 6px; color: var(--navy); }
.condition-card p { font-size: 0.85rem; flex: 1; }

/* ── Why UCLA / Feature Strip ────────────────────────── */
.features-section { background: var(--warm-gray); }

.feature-item {
  text-align: left;
  padding: 28px 20px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.feature-item:hover {
  border-color: rgba(39,116,174,0.15);
  box-shadow: var(--shadow-sm);
}

.feature-number {
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 700;
  color: var(--ucla-blue);
  line-height: 1;
  margin-bottom: 8px;
}
.feature-number svg { color: var(--ucla-blue); }

.feature-label {
  font-size: 0.9rem; font-weight: 600;
  color: var(--navy); margin-bottom: 6px;
}

.feature-desc {
  font-size: 0.82rem; color: var(--slate);
  line-height: 1.5;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

/* ── Why UCLA: Anchor + Stat Layout ──────────────────────── */
.features-anchor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
/* Surface + hover lift inherited from the card system. */
.feature-anchor {
  padding: 36px 32px;
  text-align: left;
}
.feature-anchor .feature-number {
  margin-bottom: 12px;
}
.feature-anchor .feature-label {
  font-size: 1.1rem;
  font-weight: 700;
}
.feature-anchor .feature-desc {
  font-size: 0.92rem;
  line-height: 1.6;
}
.features-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .features-anchor-row { grid-template-columns: 1fr; }
  .features-stat-strip { grid-template-columns: 1fr; }
}

/* ── Locations Strip ──────────────────────────────────── */
/* The quality bar for the system. Surface + hover lift now shared;
   keeps its photo bleed (defined below) + map-pin. */
.location-card {
  padding: 28px;
  text-align: left;
  overflow: hidden;
}

.location-card h3 { margin-bottom: 4px; }
.location-card .address { font-size: 0.88rem; color: var(--slate); margin-bottom: 16px; line-height: 1.6; }

.location-pin {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(39,116,174,0.08);
  color: var(--ucla-blue);
  margin-bottom: 16px;
}

/* ── Insurance Logos ─────────────────────────────────── */
.insurance-logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.insurance-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  min-height: 80px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.insurance-logo-item:hover {
  border-color: rgba(39,116,174,0.2);
  box-shadow: var(--shadow-sm);
}

.insurance-logo-item img {
  max-width: 140px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: saturate(0) opacity(0.7);
  transition: filter var(--transition);
}

.insurance-logo-item:hover img {
  filter: saturate(1) opacity(1);
}

/* Dedicated insurance page: keep 4-column layout with larger logos */
.insurance-logo-grid--page {
  grid-template-columns: repeat(4, 1fr);
}
.insurance-logo-grid--page .insurance-logo-item {
  padding: 24px;
  min-height: 100px;
}
.insurance-logo-grid--page .insurance-logo-item img {
  max-width: 160px;
  max-height: 56px;
}

@media (max-width: 768px) {
  .insurance-logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .insurance-logo-item {
    padding: 16px;
    min-height: 64px;
  }
  .insurance-logo-item img {
    max-width: 100px;
    max-height: 36px;
  }
}

@media (max-width: 480px) {
  .insurance-logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── CTA Banner ──────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ucla-blue-dark) 100%);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(39,116,174,0.2) 0%, transparent 60%);
}
.cta-banner .container { position: relative; z-index: 2; }
.cta-banner h2 { color: var(--white); margin-bottom: 12px; }
.cta-banner p { color: rgba(255,255,255,0.7); margin-bottom: 28px; font-size: 1.1rem; }
.cta-banner .cta-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.cta-banner .cta-phone {
  font-size: 1.3rem; font-weight: 700;
  color: var(--ucla-gold);
  display: block; margin-bottom: 8px;
  font-family: var(--font-display);
}
.cta-banner .cta-email {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo { margin-bottom: 8px; }
.footer-brand .logo-icon { border-radius: 8px; }
.footer-brand .logo-title { color: var(--white); }
.footer-brand .logo-subtitle { color: rgba(255,255,255,0.6); }
.footer-brand p { color: rgba(255,255,255,0.66); font-size: 0.88rem; margin-top: 16px; line-height: 1.7; }

.footer h4 {
  color: var(--white);
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  color: rgba(255,255,255,0.72);
  font-size: 0.88rem;
  transition: color var(--transition);
  text-decoration: none;
}
.footer-links a:hover { color: var(--ucla-gold); }

.footer-location {
  margin-bottom: 20px;
}
.footer-location h5 {
  font-weight: 600; color: var(--white);
  font-size: 0.88rem; margin-bottom: 4px;
}
.footer-location p {
  font-size: 0.82rem; color: rgba(255,255,255,0.62);
  line-height: 1.6; margin-bottom: 0;
}

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.58);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,0.62); font-size: 0.8rem; }
.footer-bottom-links a:hover { color: rgba(255,255,255,0.6); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 0; }

  /* Footer accordion on mobile */
  .footer-grid > div:not(.footer-brand) {
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .footer h4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 0;
    margin-bottom: 0;
    user-select: none;
  }
  .footer h4::after {
    content: '';
    width: 10px; height: 10px;
    border-right: 2px solid rgba(255,255,255,0.4);
    border-bottom: 2px solid rgba(255,255,255,0.4);
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    flex-shrink: 0;
  }
  .footer h4.footer-open::after {
    transform: rotate(-135deg);
  }

  .footer-collapse {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .footer-collapse.footer-open {
    max-height: 400px;
  }
  .footer-collapse .footer-links,
  .footer-collapse .footer-location {
    padding-bottom: 4px;
  }
}

/* ── FAQ Accordion ────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all var(--transition);
}
.faq-item:hover { border-color: rgba(39,116,174,0.2); }

.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  background: var(--white);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 600;
  color: var(--navy);
  border: none; width: 100%; text-align: left;
  transition: all var(--transition);
}
.faq-question:hover { background: var(--warm-gray); }
.faq-question svg {
  width: 20px; height: 20px; flex-shrink: 0;
  color: var(--slate-light);
  transition: transform var(--transition);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-item.open .faq-question { color: var(--ucla-blue); }

.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 600px; }

.faq-answer-inner {
  padding: 0 24px 24px;
  color: var(--slate);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ── Steps / Timeline ────────────────────────────────── */
.steps { counter-reset: step; }

.step {
  display: flex; gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border-light);
  counter-increment: step;
}
.step:last-child { border-bottom: none; }

.step-number {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(39,116,174,0.08);
  color: var(--ucla-blue);
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.step-content h3 {
  font-size: 1.15rem; margin-bottom: 8px;
  font-family: var(--font-body); font-weight: 600;
}
.step-content p { font-size: 0.95rem; }

/* ── Team Grid ────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.team-card {
  text-align: center; padding: 18px 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.team-card:hover {
  border-color: rgba(39,116,174,0.15);
}

.team-photo {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(39,116,174,0.12), rgba(39,116,174,0.04));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--ucla-blue);
}

.team-card h4 { font-size: 1rem; margin-bottom: 4px; }
.team-card .title { font-size: 0.82rem; color: var(--slate-light); line-height: 1.4; }

/* ── Prose Content ────────────────────────────────────── */
.prose { max-width: 800px; }
.prose h2 { margin: 40px 0 16px; }
.prose h3 { margin: 32px 0 12px; }
.prose p { font-size: 1.05rem; line-height: 1.85; }
.prose ul, .prose ol {
  padding-left: 24px; margin-bottom: 16px;
}
.prose li {
  margin-bottom: 8px; font-size: 1rem;
  color: var(--slate); line-height: 1.7;
}

/* ── Two-Column Layout ───────────────────────────────── */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: start;
}
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* ── Info Box ─────────────────────────────────────────── */
.info-box {
  background: var(--warm-gray);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  border: 1px solid rgba(39,116,174,0.18);
}
.info-box h4 { margin-bottom: 10px; }
.info-box p { font-size: 0.95rem; }

.info-box.gold { background: var(--ucla-gold-soft); border-color: rgba(255,209,0,0.45); }
.info-box.green { background: #F0FDF4; border-color: rgba(45,138,86,0.28); }

/* ── Stat Highlight ───────────────────────────────────── */
.stat-strip-section {
  padding: 32px 0 0;
}

.stat-highlight {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding: 32px 0;
}

.stat-item {
  flex: 1; min-width: 140px;
  text-align: center;
  padding: 24px;
  background: var(--warm-gray);
  border-radius: var(--radius);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  color: var(--ucla-blue);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem; color: var(--slate);
}

/* ── Responsive Adjustments ───────────────────────────── */
@media (max-width: 768px) {
  .top-bar { display: none; }
}

@media (max-width: 480px) {
  .btn { padding: 12px 22px; font-size: 0.88rem; min-height: 44px; }
  .hero h1 { font-size: 2rem; }
  .hero-actions { flex-direction: column; }
  .hero-stat-strip { flex-direction: column; }
  .hero-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .section-padding { padding: 36px 0; }
  .card { padding: 24px; }
}

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

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ── Treatment Page Template ──────────────────────────── */
.treatment-overview {
  display: grid; grid-template-columns: 2fr 1fr; gap: 48px;
  align-items: start;
}
/* When .treatment-overview is used as a prose column inside content-with-sidebar, disable its grid */
.content-with-sidebar .treatment-overview,
.treatment-overview.prose {
  display: block;
}
@media (max-width: 768px) { .treatment-overview { grid-template-columns: 1fr; } }

.treatment-sidebar {
  background: var(--warm-gray);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky; top: 100px;
}

.treatment-sidebar h3,
.treatment-sidebar h4 { margin-bottom: 16px; font-family: var(--font-display); }

/* Sidebar card wrapper (used in treatment pages) */
.sidebar-card {
  background: transparent;
}
.sidebar-card h3 { font-size: 1.15rem; margin-bottom: 16px; }

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  font-size: 0.92rem;
  color: var(--slate);
  border-bottom: 1px solid var(--border-light);
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item svg { width: 18px; height: 18px; color: var(--ucla-blue); flex-shrink: 0; }

/* Label-value style sidebar items */
.sidebar-item .sidebar-label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.85rem;
  min-width: 100px;
}
.sidebar-item .sidebar-value {
  color: var(--slate);
  font-size: 0.9rem;
  margin-left: auto;
  text-align: right;
}

/* ── Page Hero Subtitle ──────────────────────────────── */
.page-hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 640px;
  line-height: 1.7;
  margin-top: 4px;
}

/* ── Breadcrumb ──────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb span {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* ── Prose Improvements ──────────────────────────────── */
.prose h2 {
  margin-top: 36px;
  margin-bottom: 14px;
}
.prose h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.prose p {
  margin-bottom: 16px;
  line-height: 1.75;
}
.prose ul, .prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
}
.prose li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.prose img {
  border-radius: 12px;
  margin: 24px 0;
  width: 100%;
  height: auto;
}

/* ── Superscript Citations ────────────────────────────── */
.prose sup a {
  color: var(--ucla-blue);
  text-decoration: none;
  font-size: 0.7em;
  font-weight: 600;
  padding: 0 1px;
}
.prose sup a:hover {
  text-decoration: underline;
}

/* ── Contact Form ─────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block; font-weight: 600; font-size: 0.9rem;
  color: var(--navy); margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem; /* >=16px: prevents iOS Safari auto-zoom on focus */
  color: var(--navy);
  background: var(--white);
  transition: border-color var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--ucla-blue);
  box-shadow: 0 0 0 3px rgba(39,116,174,0.1);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* ── Skip to content (a11y) ───────────────────────────── */
.skip-link {
  position: absolute; top: -100px; left: 0;
  background: var(--ucla-blue); color: var(--white);
  padding: 12px 24px; z-index: 10000;
  font-weight: 600; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* ============================================
   ADDITIONAL STYLES FOR REMAINING PAGES
   ============================================ */

/* Team Page */
.team-section { margin-bottom: 48px; }
.team-section h2 { font-size: 1.6rem; margin-bottom: 8px; }
.team-section .section-subtitle { color: var(--slate-light); margin-bottom: 24px; }
.team-card .team-name { font-size: 0.95rem; margin-bottom: 2px; }
.team-card .team-credentials { font-size: 0.75rem; color: var(--primary); margin-top: 1px; font-weight: 500; }
.team-card .team-role { font-size: 0.75rem; margin-top: 2px; }
.team-card .team-bio { font-size: 0.82rem; color: var(--slate); line-height: 1.6; margin-top: 12px; display: none; text-align: left; padding: 12px 8px 0; border-top: 1px solid var(--border); }
.team-card .team-bio p { margin-bottom: 8px; }
.team-card .team-bio h5 { font-size: 0.8rem; font-weight: 700; color: var(--navy); margin: 14px 0 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.team-card .team-bio ul { padding-left: 0; list-style: none; margin: 0 0 8px; }
.team-card .team-bio ul li { padding: 2px 0; font-size: 0.8rem; }
.team-card.expanded .team-bio { display: block; }
.team-card .bio-toggle { background: none; border: none; color: var(--primary); font-size: 0.78rem; cursor: pointer; padding: 4px 0; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; margin: 0 auto; }
.team-card .bio-toggle:hover { text-decoration: underline; }
.team-photo.has-img { background: none; }
.team-photo.has-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* References Section */
.references { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.references h3 { font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-light); }
.references ol { font-size: 0.7rem; color: var(--slate-light); line-height: 1.5; padding-left: 16px; margin: 0; }
.references ol li { margin-bottom: 2px; }
.references ol li a { color: var(--primary); }

/* Location Detail Cards */
.location-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; margin-top: 32px; }
/* Surface + hover lift from the card system; keeps overflow clip for the map. */
.location-detail-card { overflow: hidden; }
.location-detail-card .location-map { width: 100%; height: 220px; border: none; }
.location-detail-card .location-info { padding: 24px; }
.location-detail-card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.location-detail-card .location-address { color: var(--slate); font-size: 0.9rem; line-height: 1.6; margin-bottom: 16px; }
.location-detail-card .location-hours { font-size: 0.88rem; color: var(--slate-light); margin-bottom: 16px; }
.location-detail-card .location-hours strong { color: var(--text); }

/* Insurance Page Grid — now uses .insurance-logo-grid--page (see Insurance Logos section) */

/* Research / Studies */
.study-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 24px; margin-top: 24px; }
/* Surface + hover lift from the card system lift these formerly flat text
   boxes. No per-card icon: the list is homogeneous (every card is a study /
   a lab), so a single repeated glyph would read as decoration, not clarity. */
.study-card { padding: 24px; position: relative; }
.study-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.study-card p { font-size: 0.88rem; color: var(--slate); line-height: 1.55; margin-bottom: 10px; }
.study-status { position: absolute; top: 24px; right: 24px; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.study-status.enrolling { background: #dcfce7; color: #166534; }
.study-status.full { background: #fef3c7; color: #92400e; }
.study-status.completed { background: #e0e7ff; color: #3730a3; }
.study-contact { font-size: 0.85rem; color: var(--primary); font-weight: 500; }

/* Video embed */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 24px; }
/* Surface + hover lift from the card system; overflow clips the thumbnail. */
.video-card { overflow: hidden; }
.video-card .video-wrap { position: relative; padding-bottom: 56.25%; height: 0; }
.video-card .video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-card .video-caption { padding: 16px; }
.video-card .video-caption h4 { font-size: 0.95rem; margin-bottom: 4px; }
.video-card .video-caption p { font-size: 0.82rem; color: var(--slate-light); }

/* YouTube Lite Facade */
.youtube-facade {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  background-color: #000;
  background-size: cover;
  background-position: center;
}
.youtube-facade::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.15);
  transition: background 0.2s ease;
}
.youtube-facade:hover::after {
  background: rgba(0,0,0,0.05);
}
.youtube-facade .play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 68px; height: 48px;
  background: rgba(255,0,0,0.85);
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.youtube-facade:hover .play-btn {
  background: #ff0000;
  transform: translate(-50%, -50%) scale(1.08);
}
.youtube-facade .play-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent white;
}

/* Medically-reviewed byline (E-E-A-T) on clinical pages */
.medical-review {
  display: flex; align-items: center; gap: 8px;
  max-width: 760px; margin: 40px auto 8px; padding: 12px 16px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--warm-gray); color: var(--slate); font-size: 0.85rem;
}
.medical-review svg { width: 18px; height: 18px; color: var(--success); flex: none; }
.medical-review strong { color: var(--navy); font-weight: 600; }

/* Contact Form */
.contact-layout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
@media (max-width: 768px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 6px; color: var(--text); }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: 'DM Sans', sans-serif; transition: border-color 0.2s; background: white; }
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(39,116,174,0.1); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-sidebar { background: var(--surface); border-radius: 16px; padding: 32px; }
.contact-sidebar h3 { font-size: 1.1rem; margin-bottom: 16px; }
.contact-sidebar .contact-method { margin-bottom: 20px; display: flex; gap: 12px; align-items: flex-start; }
.contact-sidebar .contact-method svg { flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.contact-sidebar .contact-method a { color: var(--primary); font-weight: 500; }

/* Provider Page */
.referral-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 24px 0; }
.referral-method { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 24px; text-align: center; }
.referral-method svg { color: var(--primary); margin-bottom: 12px; }
.referral-method h4 { font-size: 0.95rem; margin-bottom: 8px; }
.referral-method p { font-size: 0.85rem; color: var(--slate); }
.referral-method a { color: var(--primary); font-weight: 500; }

/* Giving Page */
.giving-hero { text-align: center; max-width: 700px; margin: 0 auto; }
.giving-hero p { font-size: 1.1rem; color: var(--slate); line-height: 1.7; }
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin: 32px 0; }
.impact-card { text-align: center; padding: 32px 20px; }
.impact-card svg { color: var(--primary); margin-bottom: 12px; }
.impact-card h4 { font-size: 0.95rem; margin-bottom: 8px; }
.impact-card p { font-size: 0.85rem; color: var(--slate); }

/* Training Page */
.training-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 24px 0; }
.training-highlight { text-align: center; padding: 24px 16px; background: var(--surface); border-radius: 12px; }
.training-highlight svg { color: var(--primary); margin-bottom: 8px; }

/* Info Box Variants — colors only (base styles defined above under "Info Box") */
.info-box.blue { background: #eff6ff; border-left-color: var(--primary); }
.info-box.gray { background: var(--surface); border-left-color: var(--slate-light); }

/* Two-column prose + sidebar */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }
@media (max-width: 900px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .content-with-sidebar .treatment-sidebar {
    order: -1;
    position: static;
    border-radius: var(--radius);
    padding: 20px 24px;
  }
  .content-with-sidebar .treatment-sidebar .sidebar-card {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0 24px;
  }
  .content-with-sidebar .treatment-sidebar .sidebar-card h3 {
    grid-column: 1 / -1;
    margin-bottom: 8px;
    font-size: 1rem;
  }
  .content-with-sidebar .treatment-sidebar .sidebar-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 8px 0;
  }
  .content-with-sidebar .treatment-sidebar .sidebar-item .sidebar-value {
    margin-left: 0;
    text-align: left;
  }
}

/* Legal pages */
.legal-content { max-width: 800px; }
.legal-content h2 { font-size: 1.2rem; margin-top: 32px; margin-bottom: 12px; }
.legal-content p { font-size: 0.92rem; color: var(--slate); line-height: 1.7; margin-bottom: 16px; }

/* Publications list */
.pub-list { list-style: none; padding: 0; }
.pub-list li { padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; line-height: 1.6; color: var(--slate); }
.pub-list li:last-child { border-bottom: none; }
.pub-list .pub-title { font-weight: 600; color: var(--text); }
.pub-list a { color: var(--primary); }

/* Misc utility */
.mb-0 { margin-bottom: 0; }
.external-link-icon { display: inline-block; width: 12px; height: 12px; margin-left: 4px; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════
   DESIGN ELEVATION — Premium Visual Polish
   ═══════════════════════════════════════════════════════════ */

/* ── Scroll-Triggered Reveal Animations ─────────────────── */
/* NOTE: Actual reveal styles are scoped under .js-loaded (below)
   so content remains visible if JavaScript fails to load. */

/* ── Enhanced Sticky Header ─────────────────────────────── */
.header {
  transition: box-shadow var(--transition), border-color var(--transition);
}
.header.scrolled {
  box-shadow: 0 4px 20px rgba(11,35,65,0.1);
  border-bottom-color: transparent;
}

/* ── Hero with Photography ──────────────────────────────── */
.hero--photo {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
}

.hero--photo .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero--photo .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.hero-bg__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  filter: blur(20px);
  transform: scale(1.1);
  z-index: 0;
}

.hero-bg picture {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg picture img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-bg picture img.loaded {
  opacity: 1;
}

.hero--photo .hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  /* Two-layer scrim for text legibility over the brain photo. A soft navy "pool"
     pinned behind the text block lifts the gold headline + white description off the
     brain's bright left rim; underneath, a directional gradient holds navy across the
     whole text column and only clears past ~85% so the brain core keeps its glow.
     Tuned so white/gold type clears WCAG AA over the image's brightest pixels. */
  background:
    radial-gradient(68% 62% at 27% 50%,
      rgba(11,35,65,0.50) 0%,
      rgba(11,35,65,0.20) 55%,
      rgba(11,35,65,0) 80%),
    linear-gradient(
      100deg,
      rgba(11,35,65,0.95) 0%,
      rgba(11,35,65,0.90) 40%,
      rgba(11,35,65,0.80) 56%,
      rgba(11,35,65,0.62) 70%,
      rgba(11,35,65,0.32) 84%,
      rgba(11,35,65,0.0) 100%
    );
}

.hero--photo .hero-content {
  position: relative;
  z-index: 2;
}

@media (max-width: 768px) {
  /* P0-2: Strengthened mobile overlay — darker through the text band so
     the description and subtitle reach ≥4.5:1 contrast over the brain image.
     The top stop was already fine (0.92); the mid/bottom stops were too light
     at 0.8/0.6 over the bright brain core. Desktop 105deg rule unchanged. */
  .hero--photo .hero-bg::after {
    background: linear-gradient(
      180deg,
      rgba(11,35,65,0.95) 0%,
      rgba(11,35,65,0.92) 25%,
      rgba(11,35,65,0.90) 45%,
      rgba(11,35,65,0.88) 60%,
      rgba(11,35,65,0.82) 80%,
      rgba(11,35,65,0.75) 100%
    );
  }
  /* Supplement overlay with a stronger text-shadow on the description
     so individual characters remain legible even near image edges. */
  .hero--photo .hero-description {
    text-shadow: 0 1px 8px rgba(11,35,65,0.9), 0 2px 24px rgba(11,35,65,0.7);
  }
  .hero--photo { min-height: auto; }
}

/* ── Physician Feature Section ──────────────────────────── */
.physician-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--white);
}

.physician-feature .pf-image {
  position: relative;
  min-height: 380px;
  overflow: hidden;
}

.physician-feature .pf-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s cubic-bezier(0.16, 1, 0.3, 1);
}

.physician-feature:hover .pf-image img {
  transform: scale(1.03);
}

.physician-feature .pf-content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.physician-feature .pf-content .section-eyebrow {
  margin-bottom: 16px;
}

.physician-feature .pf-content h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 16px;
}

.physician-feature .pf-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 24px;
}

.pf-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.pf-highlight {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 500;
}

.pf-highlight svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .physician-feature {
    grid-template-columns: 1fr;
  }
  .physician-feature .pf-image {
    min-height: 260px;
  }
  .physician-feature .pf-content {
    padding: 32px;
  }
}

/* ── Testimonial / Video Section ────────────────────────── */
.testimonial-section {
  position: relative;
}

.testimonial-section .video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Featured patient-story videos: a slightly richer resting elevation than the
   base card (deliberate hierarchy), unified -2px lift from the card system. */
.testimonial-section .video-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-lift);
}

.testimonial-section .video-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .testimonial-section .video-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Featured Patient Video ────────────────────────────── */
.video-featured {
  margin: 24px 0;
}

.video-featured .video-featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
  margin-bottom: 16px;
}

.video-featured .video-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.video-featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 580px;
}

@media (max-width: 600px) {
  .video-featured-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
}

/* ═══ Chic patient-video treatment (site-wide) ══════════════
   Rounded thumbnail with soft elevation, frosted minimal play
   button, slim caption (no white card band). Mirrors the homepage
   .hp-video styling so the strip reads the same on every page. */
.video-card { background: transparent; border: none; border-radius: 0; box-shadow: none; overflow: visible; }
.video-card:hover { transform: none; box-shadow: none; border-color: transparent; }
.testimonial-section .video-card,
.video-featured .video-card { border-radius: 0; overflow: visible; box-shadow: none; }
.testimonial-section .video-card:hover,
.video-featured .video-card:hover { transform: none; box-shadow: none; }
.video-card .video-wrap {
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 10px 30px -12px rgba(11,35,65,0.18);
  transition: box-shadow 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}
.video-card:hover .video-wrap { box-shadow: 0 30px 60px -24px rgba(11,35,65,0.28); transform: translateY(-3px); }
.video-card .video-caption { padding: 13px 4px 0; }
.video-card .video-caption h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--navy); }
.video-card .video-caption p { font-size: 0.85rem; }
.youtube-facade::after { background: rgba(11,35,65,0.20); }
.youtube-facade:hover::after { background: rgba(11,35,65,0.08); }
.youtube-facade .play-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.16); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.7); box-shadow: 0 6px 18px rgba(0,0,0,0.28);
}
.youtube-facade:hover .play-btn { background: rgba(255,255,255,0.28); transform: translate(-50%, -50%) scale(1.07); }
.youtube-facade .play-btn::after { border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; left: 56%; }
/* Larger play button for the bigger "featured" single videos */
.video-featured .youtube-facade .play-btn { width: 58px; height: 58px; }
.video-featured .youtube-facade .play-btn::after { border-width: 9px 0 9px 15px; }

/* ── Location Cards with Photos ─────────────────────────── */
.location-card .location-photo {
  display: block;
  width: calc(100% + 56px);
  height: 260px;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: -28px -28px 16px -28px;
}

/* ── Section Dividers ───────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
  margin: 0;
}

/* ── Inline Photo ───────────────────────────────────────── */
.inline-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 32px 0;
}

.inline-photo img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Content Grid (treatment page images) ───────────────── */
.content-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.content-img img {
  width: 100%;
  height: auto;
}

/* ── Gold Accent Line ───────────────────────────────────── */
.gold-accent {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--ucla-gold);
  border-radius: 2px;
  margin-bottom: 20px;
}

/* ── Comparison Table ───────────────────────────────────── */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin: 24px 0;
}

.comparison-table th {
  background: var(--navy);
  color: var(--white);
  padding: 14px 20px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comparison-table td {
  padding: 14px 20px;
  font-size: 0.92rem;
  color: var(--slate);
  border-bottom: 1px solid var(--border-light);
  line-height: 1.6;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:nth-child(even) td {
  background: var(--warm-gray);
}

/* ── Form Validation States ─────────────────────────────── */
.field-error {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1) !important;
}

/* ── Form Success / Error States ──────────────────────── */
.form-success {
  text-align: center;
  padding: 48px 24px;
}
.form-success svg {
  color: var(--success);
  margin-bottom: 16px;
}
.form-success h3 {
  margin-bottom: 12px;
}
.form-success p {
  font-size: 1rem;
  color: var(--slate);
  max-width: 480px;
  margin: 0 auto 12px;
}

.form-error {
  padding: 24px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius);
  text-align: center;
}
.form-error p {
  font-size: 0.95rem;
  margin-bottom: 12px;
}

/* Submit button loading state */
#contact-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* ── FAQ Category Headers ───────────────────────────────── */
.faq-category {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin: 32px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ucla-blue);
}
.faq-category:first-child {
  margin-top: 0;
}

/* ── Treatment page stat strip ──────────────────────────── */
.treatment-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

.treatment-stat {
  flex: 1;
  background: var(--warm-gray);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.treatment-stat .stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ucla-blue);
  line-height: 1;
  margin-bottom: 4px;
}

.treatment-stat .stat-label {
  font-size: 0.78rem;
  color: var(--slate-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 600px) {
  .treatment-stats {
    flex-direction: column;
    gap: 12px;
  }
}

/* ── Cross-link cards at bottom of pages ────────────────── */
.crosslinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 48px;
}

/* Surface + hover lift from the card system. */
.crosslink-card {
  display: block;
  padding: 24px;
  text-decoration: none;
}

.crosslink-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--navy);
}

.crosslink-card p {
  font-size: 0.85rem;
  color: var(--slate-light);
  margin: 0;
}

/* ── Dropdown open state for touch devices ──────────────── */
.nav-dropdown.dropdown-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ── Active nav link ────────────────────────────────────── */
.nav-link.active,
.nav-dropdown-item.active {
  color: var(--ucla-blue);
  font-weight: 600;
}

/* ── Sticky Mobile CTA Bar ─────────────────────────────── */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 998;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(11,35,65,0.1);
  padding: 10px 16px;
  gap: 10px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.mobile-sticky-cta.visible {
  transform: translateY(0);
}

.mobile-sticky-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  line-height: 1;
  transition: all var(--transition);
}

.mobile-sticky-call {
  background: var(--ucla-blue);
  color: var(--white);
}
.mobile-sticky-call:hover {
  background: var(--ucla-blue-dark);
  color: var(--white);
}

.mobile-sticky-contact {
  background: var(--warm-gray);
  color: var(--navy);
  border: 1px solid var(--border);
}
.mobile-sticky-contact:hover {
  background: var(--cream);
  color: var(--navy);
}

@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex;
  }
  /* Add bottom padding to body so content isn't hidden behind the sticky bar */
  body {
    padding-bottom: 72px;
  }
}

@media (min-width: 769px) {
  .mobile-sticky-cta {
    display: none !important;
  }
}

/* ── Scroll-Reveal: JS Fallback ────────────────────────── */
/* Elements are visible by default. Only hide them when JS is loaded. */
.js-loaded .scroll-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.js-loaded .scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.js-loaded .scroll-reveal-child {
  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);
}
.js-loaded .scroll-reveal-child.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero Brain Sparkles ────────────────────────────────── */
.hero-sparkles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 6px 2px rgba(180,210,255,0.6), 0 0 12px 4px rgba(120,180,255,0.3);
  opacity: 0;
  animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  15% { opacity: 1; transform: scale(1.2); }
  30% { opacity: 0.6; transform: scale(0.8); }
  45% { opacity: 0; transform: scale(0.5); }
}

.hero-sparkle:nth-child(1)  { top: 28%; right: 22%; animation-delay: 0s; }
.hero-sparkle:nth-child(2)  { top: 35%; right: 34%; animation-delay: 0.8s; width: 3px; height: 3px; }
.hero-sparkle:nth-child(3)  { top: 18%; right: 28%; animation-delay: 1.6s; }
.hero-sparkle:nth-child(4)  { top: 45%; right: 18%; animation-delay: 2.4s; width: 3px; height: 3px; }
.hero-sparkle:nth-child(5)  { top: 22%; right: 40%; animation-delay: 0.4s; }
.hero-sparkle:nth-child(6)  { top: 52%; right: 30%; animation-delay: 1.2s; width: 3px; height: 3px; }
.hero-sparkle:nth-child(7)  { top: 40%; right: 42%; animation-delay: 2.0s; }
.hero-sparkle:nth-child(8)  { top: 32%; right: 15%; animation-delay: 0.6s; width: 5px; height: 5px; }
.hero-sparkle:nth-child(9)  { top: 55%; right: 25%; animation-delay: 1.8s; }
.hero-sparkle:nth-child(10) { top: 15%; right: 35%; animation-delay: 2.6s; width: 3px; height: 3px; }
.hero-sparkle:nth-child(11) { top: 48%; right: 38%; animation-delay: 1.0s; }
.hero-sparkle:nth-child(12) { top: 25%; right: 48%; animation-delay: 2.2s; width: 3px; height: 3px; }

@media (max-width: 768px) {
  .hero-sparkles { display: none; }
}

/* ── Treatment Page Single-Column Layout ─────────────────── */
.treatment-content-single {
  max-width: 760px;
  margin: 0 auto;
}

.treatment-content-single h2 {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.treatment-content-single h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Allow wide elements to break out of narrow p max-width */
.treatment-content-single .info-box,
.treatment-content-single .crosslinks,
.treatment-content-single .comparison-table,
.treatment-content-single .content-img,
.treatment-content-single .key-fact,
.treatment-content-single .video-grid,
.treatment-content-single .references {
  max-width: none;
}

/* ── Key Fact Callout ───────────────────────────────────── */
/* Brief F (P2-3): replaced colored left-stripe with full hairline border + tinted
   background. Icon stays; all-sides border + blue-tinted fill reads "callout" without
   the AI-tell stripe. */
.key-fact {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(39, 116, 174, 0.05);
  border-radius: var(--radius);
  border: 1px solid rgba(39, 116, 174, 0.18);
  margin: 28px 0;
}

.key-fact-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(39,116,174,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ucla-blue);
}

.key-fact-icon svg {
  width: 18px;
  height: 18px;
}

.key-fact-content {
  flex: 1;
}

.key-fact-content strong {
  display: block;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.key-fact-content p {
  font-size: 0.92rem;
  color: var(--slate);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .key-fact {
    flex-direction: column;
    gap: 12px;
  }
}

/* ── Treatment Page Wide Layout ──────────────────────────── */
.treatment-content-wide {
  max-width: 920px;
  margin: 0 auto;
}
.treatment-content-wide h2 {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}
.treatment-content-wide h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.treatment-content-wide .info-box,
.treatment-content-wide .crosslinks,
.treatment-content-wide .comparison-table,
.treatment-content-wide .comparison-grid,
.treatment-content-wide .content-photo-row,
.treatment-content-wide .content-img,
.treatment-content-wide .key-fact,
.treatment-content-wide .accent-stat,
.treatment-content-wide .treatment-timeline,
.treatment-content-wide .video-grid,
.treatment-content-wide .video-featured,
.treatment-content-wide .references {
  max-width: none;
}

/* Brief F (P2-1): cap reading column on wide-layout treatment pages to ~66ch so body
   copy stays in the comfortable 65–75ch range. Full-bleed elements (info-box, video,
   crosslinks, comparison tables, key-facts, accent-stats, references) already have
   max-width:none above and are unaffected. */
.treatment-content-wide.prose > p,
.treatment-content-wide.prose > ul,
.treatment-content-wide.prose > ol,
.treatment-content-wide.prose > h3 {
  max-width: 66ch;
}

.prose-with-image h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
@media (max-width: 768px) { .prose-with-image { grid-template-columns: 1fr !important; } }

/* ── Accent Stat Callout ─────────────────────────────────── */
.accent-stat {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 32px 0;
  color: var(--white);
}
.accent-stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--ucla-gold);
  line-height: 1;
  flex-shrink: 0;
}
.accent-stat-text {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}
.accent-stat-text strong {
  color: var(--white);
}
.accent-stat-cite {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}
.accent-stat-cite a {
  color: var(--ucla-gold);
}
@media (max-width: 480px) {
  .accent-stat {
    flex-direction: column;
    text-align: center;
    padding: 24px;
    gap: 12px;
  }
}

/* ── Comparison Grid (TMS vs Medications) ────────────────── */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0;
}
.comparison-grid-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comparison-grid-header:first-child {
  background: var(--ucla-blue);
  color: var(--white);
}
.comparison-grid-header:nth-child(2) {
  background: var(--warm-gray);
  color: var(--navy);
  border-left: 1px solid var(--border);
}
.comparison-grid-cell {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--slate);
  border-top: 1px solid var(--border-light);
  line-height: 1.5;
}
.comparison-grid-cell:nth-child(even) {
  border-left: 1px solid var(--border-light);
}
@media (max-width: 480px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .comparison-grid-header:nth-child(2) {
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .comparison-grid-cell:nth-child(even) {
    border-left: none;
  }
}

/* ── Content Photo Row (replaces inline float:right images) ── */
.content-photo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin: 28px 0;
}
.content-photo-row img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.content-photo-row .photo-text p:last-child {
  margin-bottom: 0;
}
@media (max-width: 768px) {
  .content-photo-row {
    grid-template-columns: 1fr;
  }
  .content-photo-row img {
    order: -1;
  }
}

/* ── Treatment Timeline Graphic ──────────────────────────── */
.treatment-timeline {
  display: flex;
  gap: 0;
  margin: 32px 0;
  position: relative;
}
.treatment-timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 40px;
  right: 40px;
  height: 3px;
  background: var(--border);
  z-index: 0;
}
.timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}
.timeline-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--ucla-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ucla-blue);
}
.timeline-step.active .timeline-dot {
  background: var(--ucla-blue);
  color: var(--white);
}
.timeline-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}
.timeline-desc {
  font-size: 0.78rem;
  color: var(--slate);
  line-height: 1.4;
  max-width: 150px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .treatment-timeline {
    flex-direction: column;
    gap: 16px;
  }
  .treatment-timeline::before {
    top: 0;
    bottom: 0;
    left: 28px;
    right: auto;
    width: 3px;
    height: auto;
  }
  .timeline-step {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
  }
  .timeline-dot {
    margin: 0;
    flex-shrink: 0;
  }
  .timeline-desc {
    max-width: none;
  }
}

/* ── Collapsible References ──────────────────────────────── */
.references-collapsible {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.references-collapsible .references-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-light);
  padding: 0;
  margin-bottom: 0;
}
.references-collapsible .references-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}
.references-collapsible.open .references-toggle {
  margin-bottom: 12px;
}
.references-collapsible.open .references-toggle svg {
  transform: rotate(180deg);
}
.references-collapsible .references-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.references-collapsible.open .references-body {
  max-height: 600px;
}
.references-collapsible .references-body ol {
  font-size: 0.7rem;
  color: var(--slate-light);
  line-height: 1.5;
  padding-left: 16px;
  margin: 0;
}
.references-collapsible .references-body ol li {
  margin-bottom: 2px;
}
.references-collapsible .references-body ol li a {
  color: var(--primary);
}

/* ── Reduced Motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-in {
    animation: none;
    opacity: 1;
  }

  .js-loaded .scroll-reveal,
  .js-loaded .scroll-reveal.revealed,
  .js-loaded .scroll-reveal-child,
  .js-loaded .scroll-reveal-child.revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-badge-dot {
    animation: none;
  }

  /* Card system (Brief C): keep the shadow/border hover feedback but drop the
     positional lift when the user prefers reduced motion. */
  .card-surface:hover,
  .testimonial-section .video-card:hover,
  :where(.card:hover, .condition-card:hover, .feature-anchor:hover,
         .location-card:hover, .location-detail-card:hover, .study-card:hover,
         .video-card:hover, .crosslink-card:hover, .division-tile:hover) {
    transform: none;
  }
}

/* ── Mega dropdown (grouped, multi-column nav menu) ── */
.nav-dropdown-menu.nav-mega {
  display: flex;
  gap: 6px 32px;
  min-width: 540px;
  padding: 14px 18px;
}
.nav-mega-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
}
.nav-mega-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ucla-blue);
  padding: 2px 14px 6px;
}

/* ── Hero brand subtitle line (under the H1 lockup) ── */
.hero-subtitle-line {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.05rem, 2.2vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.92;
  margin-top: 10px;
}

/* ── Hero: extra sparkles + warm gold accents (denser field over the brain) ── */
.hero-sparkle:nth-child(13) { top: 30%; right: 10%; animation-delay: 0.3s; }
.hero-sparkle:nth-child(14) { top: 20%; right: 50%; animation-delay: 1.1s; width: 3px; height: 3px; }
.hero-sparkle:nth-child(15) { top: 60%; right: 20%; animation-delay: 1.9s; width: 5px; height: 5px; }
.hero-sparkle:nth-child(16) { top: 12%; right: 18%; animation-delay: 0.9s; }
.hero-sparkle:nth-child(17) { top: 58%; right: 44%; animation-delay: 2.3s; width: 3px; height: 3px; }
.hero-sparkle:nth-child(18) { top: 38%; right: 12%; animation-delay: 1.5s; }
.hero-sparkle:nth-child(19) { top: 48%; right: 52%; animation-delay: 0.7s; width: 3px; height: 3px; }
.hero-sparkle:nth-child(20) { top: 26%; right: 30%; animation-delay: 2.7s; width: 5px; height: 5px; }
.hero-sparkle:nth-child(3n) {
  background: rgba(255, 224, 150, 0.95);
  box-shadow: 0 0 6px 2px rgba(255, 209, 0, 0.5), 0 0 12px 4px rgba(255, 180, 60, 0.25);
}

/* ── Hero: luminous bloom over the brain ── */
.hero-glow {
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  width: 48%;
  height: 82%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
    rgba(120, 180, 255, 0.30) 0%,
    rgba(255, 209, 0, 0.10) 38%,
    rgba(11, 35, 65, 0) 72%);
  filter: blur(34px);
  animation: heroGlow 8s ease-in-out infinite;
}
@keyframes heroGlow {
  0%, 100% { opacity: 0.65; transform: translateY(-50%) scale(1); }
  50%      { opacity: 1;    transform: translateY(-50%) scale(1.06); }
}

/* ── Hero: slow cinematic drift on the brain photo ── */
.hero--photo .hero-bg picture img {
  animation: heroDrift 26s ease-in-out infinite alternate;
}
@keyframes heroDrift {
  from { transform: scale(1.02); }
  to   { transform: scale(1.08) translateX(-1.5%); }
}

/* ── Hero: promoted Refer a Patient CTA ── */
.hero-provider-link {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-refer-lead {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.02em;
}
.hero-provider-link a.hero-refer-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ucla-gold);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--transition), color var(--transition), gap var(--transition);
}
.hero-provider-link a.hero-refer-cta:hover {
  color: #FFDD33;
  border-bottom-color: rgba(255, 209, 0, 0.55);
  gap: 10px;
}
.hero-provider-link a.hero-refer-cta:active { transform: translateY(1px); }

/* ── Division breadth band (surfaces the academic scope on the homepage) ── */
.division-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 8px;
}
/* Surface + hover lift from the card system. Leading line icon (.division-icon)
   added to elevate these formerly flat border-only tiles. */
.division-tile {
  display: block;
  padding: 26px 22px;
  text-decoration: none;
  color: inherit;
}
.division-tile:active { transform: translateY(-1px); }
.division-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: rgba(39,116,174,0.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--ucla-blue);
  margin-bottom: 16px;
  transition: background var(--transition);
}
.division-icon svg { width: 22px; height: 22px; }
.division-tile:hover .division-icon { background: rgba(39,116,174,0.14); }
.division-tile h3 {
  font-family: var(--font-display);
  color: var(--navy);
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.division-tile p {
  color: var(--slate);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 14px;
}
.division-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ucla-blue);
  letter-spacing: 0.02em;
}

/* Two-up variant (About page): the base grid is a four-tile row; with only
   two tiles they strand at quarter-width. Balance them as equal halves —
   "one enterprise, two sides" — and scale the card content up to suit the
   roomier format instead of reading as stretched small tiles. */
.division-grid--duo {
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 920px;
  margin-top: 40px;
}
.division-grid--duo .division-tile { padding: 32px 30px; display: flex; flex-direction: column; }
.division-grid--duo .division-link { margin-top: auto; }  /* pin CTAs to a shared baseline */
.division-grid--duo .division-icon { width: 50px; height: 50px; margin-bottom: 18px; }
.division-grid--duo .division-icon svg { width: 25px; height: 25px; }
.division-grid--duo .division-tile h3 { font-size: 1.4rem; }
.division-grid--duo .division-tile p { font-size: 0.96rem; }

@media (max-width: 980px) { .division-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .division-grid { grid-template-columns: 1fr; } }

/* ── Accessibility: respect reduced motion for hero ambient effects ── */
@media (prefers-reduced-motion: reduce) {
  .hero-glow,
  .hero--photo .hero-bg picture img { animation: none !important; }
}
