/* ==========================================================================
   GadamMD — Design tokens (ported directly from the approved mockup)
   ========================================================================== */
:root {
  --bg: #ffffff;
  --tint: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --divider: #d2d2d7;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Nav
   ========================================================================== */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--divider);
}
.nav-inner {
  max-width: 980px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap;
  color: var(--ink); text-decoration: none; cursor: pointer;
}
.brand:hover { color: var(--accent); }
.tabs-wrapper { position: relative; display: flex; align-items: center; }
.tabs {
  display: flex; gap: 4px; background: var(--tint); padding: 4px; border-radius: 980px;
}
.tab {
  border: none; background: transparent; padding: 8px 16px; font-size: 13px;
  font-weight: 500; color: var(--muted); border-radius: 980px; cursor: pointer;
  transition: all .25s ease; white-space: nowrap; text-decoration: none; display: inline-block;
}
.tab.is-active { background: var(--ink); color: #fff; }
.tab:hover:not(.is-active) { color: var(--ink); }
.nav-search-form { display: flex; align-items: center; }
.nav-search-form input[type="search"] {
  border: 1px solid var(--divider); background: var(--tint); border-radius: 980px;
  padding: 8px 16px; font-size: 13px; font-family: inherit; width: 160px;
}

@media (max-width: 1150px) {
  .tabs-wrapper { flex: 1; min-width: 0; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 600px) {
  .nav-inner { flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  .tabs-wrapper { order: 3; width: 100%; flex: none; }
  .tabs { width: 100%; }
  .wrap { padding: 0 16px; }
}

/* ==========================================================================
   Typography helpers
   ========================================================================== */
.eyebrow {
  font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 10px;
}
.page-header { padding: 64px 0 20px; }
.page-header h1 {
  font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.05; margin: 0 0 14px;
}
.lede { font-size: 18px; color: var(--muted); line-height: 1.5; max-width: 640px; margin: 0; }

/* ==========================================================================
   Home hero (photo blended background, bio, page-link cards)
   ========================================================================== */
.bio-hero-blend { background: #333333; min-height: 80vh; display: flex; align-items: center; }
.bio-hero-inner { width: 100%; max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 460px; align-items: center; }
.bio-text-blend { padding: 40px 48px 40px 24px; }
.bio-quote-light { font-size: 18px; font-style: italic; color: rgba(255,255,255,.6); max-width: 460px; margin: 0 0 28px; line-height: 1.5; }
.bio-name-light { font-size: clamp(32px, 4vw, 44px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; color: #fff; }
.bio-title-light { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.7); margin: 0 0 22px; }
.bio-body-light { font-size: 16px; color: rgba(255,255,255,.72); line-height: 1.65; max-width: 460px; margin: 0 0 28px; }
.bio-photo-blend { width: 100%; height: 100%; min-height: 520px; }
.bio-photo-blend img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
@media (max-width: 900px) {
  .bio-hero-inner { grid-template-columns: 1fr; }
  .bio-photo-blend { min-height: 380px; order: -1; }
  .bio-text-blend { padding: 40px 24px; text-align: center; }
  .bio-quote-light, .bio-body-light { margin-left: auto; margin-right: auto; }
}

.btn {
  display: inline-block; background: var(--accent); color: #fff; padding: 10px 22px;
  border-radius: 980px; font-size: 14px; font-weight: 600; text-decoration: none; border: none; cursor: pointer;
}

.page-links-section { padding: 80px 0; border-bottom: 1px solid var(--divider); }
.section-subhead { text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 32px; }
.page-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; max-width: 980px; margin: 0 auto; }
.page-link-card {
  border: none; background: var(--tint); padding: 26px 24px; border-radius: 24px; cursor: pointer;
  text-align: left; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit;
}
.page-link-card:hover { background: #ececef; }
.plc-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.plc-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* ==========================================================================
   Section landing tiles (For Clinicians / For Parents & Patients top level)
   ========================================================================== */
.section-tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.section-tile {
  border: 1px solid var(--divider); background: var(--bg); border-radius: 22px; padding: 32px 28px;
  text-align: left; text-decoration: none; color: inherit; display: block;
}
.section-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.section-tile-badge {
  width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin-bottom: 14px;
}
.section-tile h3 { font-size: 19px; margin: 0 0 8px; }
.section-tile p { font-size: 14px; color: var(--muted); margin: 0; }

/* ==========================================================================
   Taxonomy archive (topic groups) — real pages now, not JS accordions
   ========================================================================== */
.topic-group-list { margin: 24px 0; }
.topic-group-card {
  border: 1px solid var(--divider); border-radius: 18px; padding: 20px 22px; margin-bottom: 10px;
  text-decoration: none; color: inherit; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topic-group-card:hover { background: var(--tint); }
.topic-group-card .tgc-title { font-weight: 700; font-size: 15px; }
.topic-group-card .tgc-count { font-size: 12px; color: var(--muted); }

.post-list-item {
  display: block; text-decoration: none; color: inherit; padding: 18px 0; border-bottom: 1px solid var(--divider);
}
.post-list-item:last-child { border-bottom: none; }
.post-list-item .pli-tag { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .03em; }
.post-list-item h4 { margin: 6px 0 6px; font-size: 17px; }
.post-list-item p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.post-list-item .pli-meta { font-size: 12px; color: var(--muted); margin-top: 6px; display: block; }

/* ==========================================================================
   Single post
   ========================================================================== */
.single-post-card { background: var(--bg); border-radius: var(--radius); padding: 40px 44px; max-width: 720px; margin: 0 auto; border: 1px solid var(--divider); }
.back-link { font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--accent); }
.single-post-title { font-size: 28px; letter-spacing: -0.01em; margin: 10px 0 8px; }
.single-post-meta { font-size: 13px; color: var(--muted); margin: 0 0 28px; }
.single-post-body p { font-size: 15px; color: var(--ink); line-height: 1.7; margin: 0 0 18px; }
@media (max-width: 600px) { .single-post-card { padding: 24px 20px; } .single-post-title { font-size: 22px; } }

/* ==========================================================================
   Things I Use
   ========================================================================== */
.use-item { background: var(--tint); border: 1px solid var(--divider); border-radius: var(--radius); padding: 28px 26px; margin-bottom: 18px; display: block; text-decoration: none; color: inherit; }
.use-item:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.06); }
.use-item h4 { margin: 0 0 8px; font-size: 18px; }
.use-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.disclosure { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

/* ==========================================================================
   My Journey timeline
   ========================================================================== */
.timeline { padding: 20px 0 80px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 1px; background: var(--divider); }
.t-item { position: relative; padding: 16px 20px 20px 52px; margin-bottom: 10px; border-radius: 16px; }
.t-item:nth-child(even) { background: var(--tint); }
.t-num { position: absolute; left: 0; top: 16px; width: 40px; height: 40px; background: var(--bg); border: 1px solid var(--divider); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); }
.t-item h4 { margin: 0 0 6px; font-size: 17px; }
.t-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.t-item .year { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-card { background: var(--tint); border-radius: var(--radius); padding: 32px 30px; margin-bottom: 20px; }
.contact-card-label { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 10px; }
.contact-card h4 { margin: 0 0 12px; font-size: 20px; }
.contact-detail { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 10px; }

/* ==========================================================================
   Reader Voices prompt box
   ========================================================================== */
.prompt-box { background: var(--ink); color: #fff; border-radius: 20px; padding: 36px 32px; margin: 24px 0 40px; text-align: center; }
.prompt-box a { color: #fff; text-decoration: underline; }

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal-section { max-width: 720px; margin: 0 0 32px; }
.legal-section h3 { font-size: 17px; margin: 0 0 10px; }
.legal-section p { font-size: 14.5px; color: var(--muted); line-height: 1.7; margin: 0 0 12px; }

/* ==========================================================================
   Disclaimer box
   ========================================================================== */
.disclaimer { font-size: 12px; color: var(--muted); border: 1px solid var(--divider); border-radius: 12px; padding: 14px 18px; margin: 24px 0 40px; }

/* ==========================================================================
   Format filter toggle (All / Videos / Posts) — For Parents & Patients
   ========================================================================== */
.format-toggle {
  display: inline-flex; gap: 4px; background: var(--tint); padding: 4px;
  border-radius: 980px; margin-bottom: 28px;
}
.format-toggle-btn {
  border: none; background: transparent; padding: 9px 20px; font-size: 14px;
  font-weight: 500; color: var(--muted); border-radius: 980px; cursor: pointer;
  text-decoration: none; display: inline-block; font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.format-toggle-btn.is-active { background: var(--ink); color: #fff; }
.format-toggle-btn:hover:not(.is-active) { color: var(--ink); }

/* ==========================================================================
   Video cards (For Parents & Patients "Latest" videos)
   ========================================================================== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 8px; }
.video-card { text-decoration: none; color: inherit; display: block; }
.video-card h4 { font-size: 15px; font-weight: 600; margin: 12px 0 0; line-height: 1.4; }
.video-thumb {
  position: relative; aspect-ratio: 16/9; background: var(--tint);
  border: 1px solid var(--divider); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.play-icon {
  width: 44px; height: 44px; background: var(--accent); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px; padding-left: 3px;
}
.video-duration {
  position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.7);
  color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 6px;
}

/* Horizontal scrolling strip variant, used for "Latest Videos" */
.video-strip {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.video-card-strip { flex: 0 0 220px; }
.video-card-strip .video-thumb { width: 220px; }

/* ==========================================================================
   Site-wide footer
   ========================================================================== */
.site-footer { padding: 48px 0 32px; background: var(--tint); border-top: 1px solid var(--divider); }
.site-footer-line { font-size: 12.5px; color: var(--muted); line-height: 1.6; max-width: 640px; margin: 0 auto 12px; text-align: center; }
.legal-links { text-align: center; margin: 20px 0 14px; font-size: 13px; }
.legal-links a { color: var(--ink); text-decoration: none; font-weight: 500; }
.legal-links a:hover { color: var(--accent); }
.legal-links span { color: var(--divider); margin: 0 10px; }
.site-footer-copyright { text-align: center; font-size: 12px; color: var(--muted); margin: 0; }

/* ==========================================================================
   New Home page (rebuilt to match preferred design)
   ========================================================================== */
.home-hero { padding: 80px 0 60px; text-align: center; }
.home-eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 16px; }
.home-headline { font-size: clamp(36px, 6vw, 56px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 20px; line-height: 1.05; }
.home-hero-bio { font-size: 19px; color: var(--muted); line-height: 1.55; max-width: 640px; margin: 0 auto 32px; }
.home-hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.btn-secondary { background: var(--tint); color: var(--ink); }
.btn-secondary:hover { background: #ececef; }
.home-credential-card {
  display: inline-flex; align-items: center; gap: 14px; background: var(--tint);
  border: 1px solid var(--divider); border-radius: 980px; padding: 10px 24px 10px 10px; text-align: left;
}
.home-credential-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.home-credential-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.home-credential-card strong { display: block; font-size: 14px; }
.home-credential-card span { display: block; font-size: 12px; color: var(--muted); }

.home-mission, .home-journey-preview, .home-audiences, .home-beyond { padding: 70px 0; border-top: 1px solid var(--divider); text-align: center; }
.home-mission h2, .home-journey-preview h2, .home-audiences h2, .home-beyond h2 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; letter-spacing: -0.015em; margin: 0 0 16px; }
.home-mission-body { color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 640px; margin: 0 auto 40px; }

.mission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.mission-card { background: var(--tint); border-radius: 18px; padding: 28px 20px; }
.mission-icon { font-size: 26px; display: block; margin-bottom: 10px; }
.mission-card h3 { font-size: 16px; margin: 0 0 6px; }
.mission-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }

.home-pullquote { padding: 70px 0; text-align: center; background: var(--ink); }
.home-pullquote blockquote { margin: 0 0 14px; font-size: clamp(22px, 3.5vw, 30px); font-style: italic; color: #fff; max-width: 700px; margin-left: auto; margin-right: auto; line-height: 1.4; }
.home-pullquote-attr { color: rgba(255,255,255,.5); font-size: 13px; margin: 0; }

.journey-preview-list { position: relative; max-width: 700px; margin: 0 auto 36px; text-align: left; padding: 10px 0; }
.journey-preview-list::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: var(--divider); transform: translateX(-50%);
}
.jp-item { position: relative; width: 100%; display: flex; margin-bottom: 32px; }
.jp-item:nth-child(odd) { justify-content: flex-start; }
.jp-item:nth-child(even) { justify-content: flex-end; }
.jp-card { width: 44%; background: var(--tint); border-radius: 16px; padding: 20px 24px; position: relative; }
.jp-item:nth-child(odd) .jp-card::after {
  content: ""; position: absolute; top: 20px; right: -33px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
}
.jp-item:nth-child(even) .jp-card::after {
  content: ""; position: absolute; top: 20px; left: -33px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 3px solid var(--bg);
}
.jp-year { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.jp-card h4 { margin: 6px 0 6px; font-size: 17px; }
.jp-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.55; }

/* Scroll-reveal: hidden until scrolled into view, then fades/slides in */
.reveal-on-scroll { opacity: 0; transform: translateY(28px); transition: opacity .6s ease, transform .6s ease; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 640px) {
  .journey-preview-list::before { left: 20px; }
  .jp-item:nth-child(odd), .jp-item:nth-child(even) { justify-content: flex-start; padding-left: 40px; }
  .jp-card { width: 100%; }
  .jp-item:nth-child(odd) .jp-card::after, .jp-item:nth-child(even) .jp-card::after { left: -33px; right: auto; }
}

.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; max-width: 800px; margin: 0 auto; }
.audience-card { display: block; text-align: left; background: var(--tint); border-radius: 20px; padding: 32px 28px; text-decoration: none; color: inherit; }
.audience-card:hover { background: #ececef; }
.audience-icon { font-size: 28px; display: block; margin-bottom: 14px; }
.audience-card h3 { font-size: 19px; margin: 0 0 8px; }
.audience-card p { font-size: 14px; color: var(--muted); line-height: 1.55; margin: 0 0 16px; }
.audience-link { color: var(--accent); font-weight: 600; font-size: 14px; }

.beyond-list { max-width: 620px; margin: 0 auto; text-align: left; }
.beyond-item { display: flex; align-items: baseline; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--divider); text-decoration: none; color: inherit; }
.beyond-item:last-child { border-bottom: none; }
.beyond-num { font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.beyond-item strong { display: block; font-size: 17px; margin-bottom: 4px; }
.beyond-item p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

.home-final-cta { padding: 80px 0; text-align: center; background: var(--tint); }
.home-final-cta h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 700; margin: 0 0 24px; }
