/* ===== SHOWCASE THEMES =====
 * Each theme overrides CSS custom properties on [data-theme="<id>"].
 * Layout-level differences (border-radius, fonts, hero treatment) are
 * also driven from variables so theme switching is animated and instant.
 */

:root {
  --transition-theme: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  transition:
    background-color var(--transition-theme),
    color var(--transition-theme);
}

/* ===== CLINICAL (default) =====
 * Corporate-medical, trust-first. Cool blues, sans-serif, generous whitespace.
 */
[data-theme="clinical"] {
  --accent: #1a4f6e;
  --accent-light: #2874a6;
  --accent-dim: rgba(26, 79, 110, 0.08);
  --accent-border: rgba(26, 79, 110, 0.18);
  --bg: #f8f9fb;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --border: #e2e6ea;
  --border-light: #eef0f2;
  --text: #0f1d2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --radius: 10px;
  --radius-lg: 14px;
  --hero-style: photo;
}

/* ===== EDITORIAL =====
 * Magazine, long-form authority. Serif headlines, cream/ochre, narrower content column.
 */
[data-theme="editorial"] {
  --accent: #8a4a1f;
  --accent-light: #b46a35;
  --accent-dim: rgba(138, 74, 31, 0.07);
  --accent-border: rgba(138, 74, 31, 0.20);
  --bg: #faf6ef;
  --bg-alt: #ffffff;
  --bg-card: #fffdf9;
  --border: #e8dfd0;
  --border-light: #efe8db;
  --text: #2a2014;
  --text-secondary: #4d4233;
  --text-muted: #837460;
  --font-primary: 'Source Sans 3', -apple-system, sans-serif;
  --font-display: 'Source Serif 4', 'Georgia', serif;
  --radius: 4px;
  --radius-lg: 6px;
  --hero-style: editorial;
}

[data-theme="editorial"] h1,
[data-theme="editorial"] h2,
[data-theme="editorial"] h3,
[data-theme="editorial"] .nav-logo,
[data-theme="editorial"] .hero-credentials {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

[data-theme="editorial"] h1 {
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* ===== WARM =====
 * Patient-friendly, approachable. Terracotta + sage, rounded shapes, softer tone.
 */
[data-theme="warm"] {
  --accent: #c8553d;
  --accent-light: #d97757;
  --accent-dim: rgba(200, 85, 61, 0.08);
  --accent-border: rgba(200, 85, 61, 0.20);
  --bg: #fdfaf6;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --border: #ece4d8;
  --border-light: #f3ede2;
  --text: #2c2620;
  --text-secondary: #5c5249;
  --text-muted: #8a7e72;
  --font-primary: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Nunito', sans-serif;
  --radius: 18px;
  --radius-lg: 24px;
  --hero-style: split;
}

[data-theme="warm"] h1,
[data-theme="warm"] h2,
[data-theme="warm"] h3 {
  font-weight: 800;
}

[data-theme="warm"] .btn-primary,
[data-theme="warm"] .btn-outline {
  border-radius: 100px;
}

/* ===== PREMIUM =====
 * "Harley Street" specialist. Near-black, ivory, gold accent, ultra-minimal.
 */
[data-theme="premium"] {
  --accent: #b08d3f;
  --accent-light: #c9a456;
  --accent-dim: rgba(176, 141, 63, 0.10);
  --accent-border: rgba(176, 141, 63, 0.30);
  --bg: #11110f;
  --bg-alt: #1a1a17;
  --bg-card: #1f1f1c;
  --border: #2a2a26;
  --border-light: #232320;
  --text: #f4f0e6;
  --text-secondary: #c8c2b3;
  --text-muted: #8a8579;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --radius: 2px;
  --radius-lg: 4px;
  --hero-style: minimal;
}

[data-theme="premium"] h1,
[data-theme="premium"] h2,
[data-theme="premium"] .nav-logo,
[data-theme="premium"] .hero-credentials {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

[data-theme="premium"] h1 {
  font-weight: 400;
}

[data-theme="premium"] .nav {
  background: rgba(17, 17, 15, 0.85);
  backdrop-filter: blur(12px);
}

[data-theme="premium"] .nav.scrolled {
  background: rgba(17, 17, 15, 0.95);
  border-bottom: 1px solid var(--border);
}

[data-theme="premium"] .section-label {
  letter-spacing: 0.25em;
  font-weight: 400;
}

[data-theme="premium"] .btn-primary {
  background: var(--accent);
  color: #11110f;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

[data-theme="premium"] .btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

[data-theme="premium"] .service-card,
[data-theme="premium"] .post-card {
  background: var(--bg-card);
  border-color: var(--border);
}

/* ===== FEATURE TOGGLES =====
 * Optional sections default to hidden; opt-in via body[data-feature-*="on"].
 */

.feature-booking,
.feature-trust-strip,
.feature-resources {
  display: none;
}
body[data-feature-booking="on"] .feature-booking { display: block; }
body[data-feature-trust-strip="on"] .feature-trust-strip { display: block; }
body[data-feature-resources="on"] .feature-resources { display: block; }

/* ===== BLOG DENSITY =====
 * `featured` shows 3, `recent` shows up to 12, `hidden` removes the
 * latest-articles section and the Blog nav link.
 */
body[data-feature-blog="featured"] .posts-grid > .post-card:nth-child(n+4),
body[data-feature-blog="recent"]   .posts-grid > .post-card:nth-child(n+13) {
  display: none;
}
body[data-feature-blog="hidden"] .latest-articles,
body[data-feature-blog="hidden"] .nav-links a[href="/blog"] {
  display: none;
}

/* ===== HERO VARIANTS =====
 * Three layouts demonstrating different aesthetic directions.
 */

/* SPLIT: large rectangular photo on the left, content on the right.
 * Editorial/magazine feel, photo dominates.
 */
body[data-hero="split"] .hero-practice {
  padding: 0;
}
body[data-hero="split"] .hero-practice > .container {
  max-width: 100%;
  padding: 0;
}
body[data-hero="split"] .hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  min-height: 600px;
}
body[data-hero="split"] .hero-photo {
  margin: 0;
  width: 100%;
  height: 100%;
  display: block;
}
body[data-hero="split"] .hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
}
body[data-hero="split"] .hero-content {
  padding: 5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 900px) {
  body[data-hero="split"] .hero-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  body[data-hero="split"] .hero-photo {
    aspect-ratio: 4 / 3;
    height: auto;
  }
  body[data-hero="split"] .hero-content {
    padding: 3rem 1.5rem;
  }
}

/* MINIMAL: no photo, large centered typography. Premium/specialist feel. */
body[data-hero="minimal"] .hero-photo {
  display: none;
}
body[data-hero="minimal"] .hero-layout {
  display: block;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 0 2rem;
}
body[data-hero="minimal"] .hero-content {
  align-items: center;
}
body[data-hero="minimal"] .hero-credentials {
  margin-bottom: 1.5rem;
}
body[data-hero="minimal"] h1 {
  font-size: clamp(3.2rem, 7vw, 5rem);
  margin-bottom: 1rem;
}
body[data-hero="minimal"] .hero-tags,
body[data-hero="minimal"] .hero-actions {
  justify-content: center;
}
body[data-hero="minimal"] .hero-location {
  justify-content: center;
}

/* ===== TRUST STRIP ===== */
.feature-trust-strip {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  justify-content: center;
}
.trust-strip-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.trust-strip-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
}
.trust-logo {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

/* ===== ONLINE BOOKING WIDGET ===== */
.feature-booking {
  padding: 5rem 0;
  background: var(--accent-dim);
}
.booking-widget {
  max-width: 980px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.booking-widget-header h2 {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}
.booking-widget-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}
.booking-widget-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.booking-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.booking-step.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.booking-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
}
[data-theme="premium"] .booking-step-num {
  color: #11110f;
}
.booking-step-body strong {
  color: var(--text);
  display: block;
  font-size: 0.95rem;
}
.booking-step-body p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}
.booking-cta {
  margin-top: 0.5rem;
  align-self: flex-start;
}
@media (max-width: 800px) {
  .booking-widget {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
}

/* ===== PATIENT RESOURCES ===== */
.feature-resources {
  padding: 5rem 0;
  background: var(--bg-alt);
}
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.resource-card {
  display: block;
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.resource-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.resource-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 1rem;
}
.resource-icon svg {
  width: 100%;
  height: 100%;
}
.resource-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}
.resource-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.resource-meta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
