/* ==========================================================================
   Vanguard Behavioral Health — Modern Design System
   Calm-clinical palette: sage/ivory with a warm terracotta accent.
   ========================================================================== */

:root {
  --bg: #FAF7F1;
  --surface: #FFFFFF;
  --surface-2: #F1EEE3;
  --ink: #23302A;
  --ink-soft: #5B6A61;
  --ink-faint: #8B9791;

  --sage-50: #EFF4F0;
  --sage-100: #DCE6DE;
  --sage-300: #9CB9A6;
  --sage-500: #5C8672;
  --sage-600: #4A6F5C;
  --sage-700: #3A5947;
  --sage-900: #1E2E24;

  --terracotta: #C1663E;
  --terracotta-dark: #A2532F;
  --terracotta-tint: #F3E2D6;

  --line: #E4DECD;
  --shadow-sm: 0 2px 10px rgba(30, 46, 36, 0.06);
  --shadow-md: 0 12px 32px rgba(30, 46, 36, 0.10);
  --shadow-lg: 0 24px 60px rgba(30, 46, 36, 0.16);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--sage-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 96px 0; }
@media (max-width: 768px) { section { padding: 64px 0; } }

/* ---------- Utility ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--terracotta);
  display: inline-block;
}
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.section-head p { font-size: 1.05rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--sage-700); color: #fff; }
.btn-primary:hover { background: var(--sage-900); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-accent { background: var(--terracotta); color: #fff; }
.btn-accent:hover { background: var(--terracotta-dark); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.btn-outline { background: transparent; border-color: var(--sage-300); color: var(--sage-700); }
.btn-outline:hover { background: var(--sage-50); border-color: var(--sage-500); }
.btn-block { width: 100%; justify-content: center; }

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage-100);
  color: var(--sage-700);
  flex: none;
}
.icon-badge svg { width: 26px; height: 26px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 241, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--sage-900);
  line-height: 1.1;
}
.brand-name span { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.7rem; color: var(--ink-faint); letter-spacing: .04em; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a.nav-link {
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.main-nav a.nav-link:hover, .main-nav li.current > a.nav-link { background: var(--sage-100); color: var(--sage-700); }
.main-nav .has-dropdown { position: relative; }
.main-nav .has-dropdown > a svg { width: 14px; height: 14px; transition: transform .2s ease; }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 2px;
  min-width: 440px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  border: 1px solid var(--line);
}
@media (min-width: 993px) {
  .main-nav .has-dropdown:hover .dropdown-panel,
  .main-nav .has-dropdown:focus-within .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  .main-nav .has-dropdown:hover > a svg { transform: rotate(180deg); }
}
.dropdown-panel a {
  display: block;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.dropdown-panel a:hover { background: var(--sage-50); color: var(--sage-700); }
.dropdown-panel .group-label {
  grid-column: 1 / -1;
  padding: 10px 14px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.header-actions { display: flex; align-items: center; gap: 14px; }
.header-phone { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.92rem; color: var(--sage-700); }
.header-phone svg { width: 18px; height: 18px; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; color: var(--sage-900); }
.nav-toggle .icon-close { display: none; }
.nav-toggle.active .icon-menu { display: none; }
.nav-toggle.active .icon-close { display: block; }

@media (max-width: 992px) {
  .main-nav { position: fixed; inset: 0 0 0 auto; width: min(340px, 86vw); height: 100vh; height: 100dvh; background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .28s ease; z-index: 200; padding: 100px 28px 28px; overflow-y: auto; flex-direction: column; align-items: stretch; justify-content: flex-start; }
  .main-nav.open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .main-nav a.nav-link { padding: 12px 14px; }
  .dropdown-panel { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: 4px 0 4px 14px; display: none; grid-template-columns: 1fr; min-width: 0; }
  .main-nav .has-dropdown.mobile-open .dropdown-panel { display: grid; }
  .header-phone { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(30,46,36,.45); z-index: 90; }
  .nav-scrim.show { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-copy .quote { font-family: var(--font-display); font-style: italic; color: var(--sage-600); font-size: 1.15rem; margin-bottom: 10px; }
.hero-copy h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); letter-spacing: -0.01em; }
.hero-copy p.lead { font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.hero-figure { position: relative; }
.hero-figure::before {
  content: "";
  position: absolute;
  inset: -6%;
  background: radial-gradient(circle at 30% 20%, var(--sage-100), transparent 60%);
  border-radius: 50%;
  z-index: -1;
}
.hero-figure img {
  width: 100%;
  border-radius: var(--radius-lg);
}
.hero-stats { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--sage-900); }
.hero-stats div span { font-size: 0.85rem; color: var(--ink-faint); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 420px; margin: 0 auto; }
}

/* ---------- Feature / Choose-us cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card h5 { font-size: 1.1rem; margin: 18px 0 10px; }
.feature-card p { font-size: 0.95rem; margin: 0; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Services section (home) ---------- */
.services-band { background: var(--sage-900); color: #fff; }
.services-band .section-head h2, .services-band .eyebrow { color: #fff; }
.services-band .eyebrow { color: var(--sage-300); }
.services-band-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; }
.services-band-head .section-head { margin-bottom: 0; }
.services-band .section-head p { color: rgba(255,255,255,.7); }
.service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.service-tile {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 30px;
}
.service-tile h5 { color: #fff; font-size: 1.15rem; margin-bottom: 12px; }
.service-tile p { color: rgba(255,255,255,.7); font-size: 0.95rem; margin-bottom: 14px; }
.service-tile a.tile-link { color: var(--sage-300); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.service-tile a.tile-link:hover { color: #fff; }
@media (max-width: 768px) {
  .service-grid { grid-template-columns: 1fr; }
  .services-band-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Provider spotlight ---------- */
.spotlight {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.spotlight-quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--sage-100);
  position: absolute;
  top: 20px;
  left: 40px;
  line-height: 1;
  z-index: 0;
}
.spotlight-body { position: relative; z-index: 1; }
.spotlight-author { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.spotlight-author .icon-badge { background: var(--terracotta-tint); color: var(--terracotta-dark); }
.spotlight-author h3 { margin: 0; font-size: 1.3rem; }
.spotlight-author span { color: var(--terracotta-dark); font-weight: 600; font-size: 0.9rem; }
.spotlight p { font-size: 1.03rem; }
@media (max-width: 768px) { .spotlight { padding: 32px 24px; } }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 14px;
}
.gallery-grid .g-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: zoom-in;
  background-size: cover;
  background-position: center;
}
.gallery-grid .g-item.tall { grid-row: span 2; }
.gallery-grid .g-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30,46,36,.55), transparent 55%);
  opacity: 0;
  transition: opacity .2s ease;
}
.gallery-grid .g-item:hover::after { opacity: 1; }
.gallery-grid .g-item svg {
  position: absolute; bottom: 14px; right: 14px;
  width: 20px; height: 20px; color: #fff;
  opacity: 0; transition: opacity .2s ease;
}
.gallery-grid .g-item:hover svg { opacity: 1; }
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
#lightbox {
  border: none; padding: 0; max-width: 90vw; max-height: 90vh; background: transparent;
}
#lightbox img { max-width: 90vw; max-height: 88vh; border-radius: var(--radius-sm); }
#lightbox::backdrop { background: rgba(20, 30, 24, 0.82); }

/* ---------- Testimonials ---------- */
.testimonial-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, calc(50% - 12px));
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-card {
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.t-stars { color: var(--terracotta); display: flex; gap: 3px; margin-bottom: 12px; }
.t-stars svg { width: 16px; height: 16px; }
.testimonial-card p { font-size: 0.98rem; color: var(--ink); margin-bottom: 16px; }
.t-author { display: flex; align-items: center; gap: 12px; }
.t-author .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--sage-100); color: var(--sage-700);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
}
.t-author h6 { margin: 0; font-family: var(--font-body); font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.t-author span { font-size: 0.8rem; color: var(--ink-faint); }
.carousel-controls { display: flex; gap: 10px; margin-top: 28px; justify-content: flex-end; }
.carousel-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { background: var(--sage-100); }
.carousel-btn svg { width: 18px; height: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sage-900); color: rgba(255,255,255,.78); padding-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand img { height: 38px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: 0.92rem; max-width: 32ch; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a svg { width: 17px; height: 17px; }
.footer-social a:hover { background: var(--terracotta); }
.site-footer h6 { color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 18px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.92rem; color: rgba(255,255,255,.68); }
.footer-links a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 14px; font-size: 0.92rem; color: rgba(255,255,255,.72); }
.footer-contact svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--sage-300); }
.footer-map { border-radius: var(--radius-sm); overflow: hidden; margin-top: 6px; filter: grayscale(0.3); }
.footer-bottom { padding: 22px 0; text-align: center; font-size: 0.82rem; color: rgba(255,255,255,.5); }
@media (max-width: 992px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Breadcrumb / inner-page hero ---------- */
.page-hero {
  background: var(--sage-900);
  color: #fff;
  padding: 64px 0;
  text-align: center;
}
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 10px; }
.page-hero .crumbs { display: flex; gap: 8px; justify-content: center; font-size: 0.9rem; color: rgba(255,255,255,.65); }
.page-hero .crumbs a { color: rgba(255,255,255,.9); }
.page-hero .crumbs a:hover { color: var(--sage-300); }

/* ---------- Condition / service detail layout ---------- */
.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; align-items: start; }
.detail-article .article-pic { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; aspect-ratio: 16/9; }
.detail-article .article-pic img { width: 100%; height: 100%; object-fit: cover; }
.detail-article h1 { font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 20px; }
.detail-article p { font-size: 1.03rem; }
.detail-sidebar { position: sticky; top: 104px; display: flex; flex-direction: column; gap: 24px; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-700); margin-bottom: 16px; }
.service-list li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; font-size: 0.93rem; color: var(--ink-soft);
}
.service-list li a:hover { background: var(--sage-50); color: var(--sage-700); }
.service-list li a.current { background: var(--sage-100); color: var(--sage-700); font-weight: 600; }
.service-list .group-label { padding: 14px 12px 6px; font-size: 0.7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 992px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface-2);
  color: var(--ink);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage-500);
  background: var(--surface);
}
.field input[disabled] { color: var(--ink-faint); }
.field textarea { min-height: 120px; resize: vertical; }
.form-status { display: block; margin-top: 10px; font-size: 0.88rem; min-height: 1.2em; }
.form-status.ok { color: var(--sage-700); }
.form-status.err { color: var(--terracotta-dark); }

/* ---------- Contact page ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-bottom: 64px; }
.contact-layout .contact-pic { border-radius: var(--radius-lg); overflow: hidden; }
.contact-layout .contact-pic img { width: 100%; height: 100%; object-fit: cover; }
.contact-form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-sm); }
.contact-widgets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-widget { display: flex; gap: 16px; align-items: flex-start; }
.contact-widget h5 { font-size: 1rem; margin-bottom: 4px; }
.contact-widget p { font-size: 0.92rem; margin: 0; }
@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-widgets { grid-template-columns: 1fr; }
}

/* ---------- About page ---------- */
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-layout .about-pic { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/5; }
.about-layout .about-pic img { width: 100%; height: 100%; object-fit: cover; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 0.97rem; color: var(--ink); }
.check-list svg { width: 20px; height: 20px; color: var(--sage-600); flex: none; margin-top: 2px; }
@media (max-width: 900px) { .about-layout { grid-template-columns: 1fr; } .about-layout .about-pic { max-width: 420px; margin: 0 auto; } }

/* ---------- Misc ---------- */
.text-center { text-align: center; }
