/* =========================================================
   Bay Area Behavioral Services — global styles
   Palette keeps the brand family (plum / teal / navy)
   refreshed into a calmer, modern, mobile-first look.
   ========================================================= */

:root {
  --plum:      #514463;   /* primary brand, softened */
  --plum-deep: #3b3049;
  --teal:      #4f857b;   /* secondary, muted sage-teal */
  --teal-deep: #3a655d;
  --navy:      #3d4a5c;   /* footer, soft slate */
  --gold:      #c2a86a;   /* warm accent, muted antique gold */
  --cream:     #f7f4ef;   /* page background */
  --sand:      #ece5db;   /* soft section band */
  --ink:       #34323b;   /* body text */
  --muted:     #6f6a76;
  --white:     #ffffff;
  --line:      #e5ddd2;

  --radius:    5px;
  --radius-sm: 4px;
  --shadow:    0 4px 16px rgba(53, 32, 60, .07);
  --shadow-sm: 0 1px 3px rgba(53, 32, 60, .06);
  --maxw:      1160px;
  --font-head: "Georgia", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--plum);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; color: var(--teal-deep); }

p { margin: 0 0 1.1em; }

a { color: var(--teal-deep); }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.section { padding: 72px 0; }
.section--sand { background: var(--sand); }
.section--plum { background: var(--plum); color: #f2e9f0; }
.section--plum h2, .section--plum h3 { color: #fff; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: .6em;
  font-family: var(--font-body);
}
.section--plum .eyebrow { color: var(--gold); }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.gold-rule { height: 3px; width: 64px; background: var(--gold); border: 0; margin: 0 0 1.4em; border-radius: 3px; }
.center .gold-rule { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-body);
  font-weight: 700; font-size: 1rem;
  padding: 14px 26px; border-radius: 4px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gold); color: #3a2a08; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #d8b25c; }
.btn--teal { background: var(--teal); color: #fff; }
.btn--teal:hover { background: var(--teal-deep); }
.btn--ghost { background: transparent; color: var(--plum); border-color: var(--plum); }
.section--plum .btn--ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.btn--lg { font-size: 1.15rem; padding: 16px 32px; }

/* ================= HEADER ================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,243,238,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 22px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text .b1 { font-family: var(--font-head); color: var(--plum); font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; }
.brand-text .b2 { font-size: .68rem; text-transform: uppercase; letter-spacing: .22em; color: var(--teal); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--plum-deep); font-weight: 600; font-size: .96rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: rgba(74,44,84,.08); }
.nav a.active { color: var(--teal-deep); }
.nav a.active::after { content: ""; display: block; height: 2px; background: var(--gold); margin-top: 3px; border-radius: 2px; }

.header-cta { display: flex; align-items: center; gap: 10px; }
.call-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--teal); color: #fff; text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 4px; white-space: nowrap; }
.call-btn:hover { background: var(--teal-deep); }

.menu-toggle { display: none; background: var(--plum); color: #fff; border: 0; width: 46px; height: 42px; border-radius: 10px; font-size: 1.4rem; cursor: pointer; }

@media (max-width: 940px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px; gap: 2px;
    display: none; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-cta .call-btn .call-label { display: none; }
}

/* Mobile sticky bottom call bar */
.mobile-callbar { display: none; }
@media (max-width: 640px) {
  .mobile-callbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: var(--plum); box-shadow: 0 -6px 20px rgba(0,0,0,.18);
  }
  .mobile-callbar a { flex: 1; text-align: center; color: #fff; text-decoration: none; font-weight: 700; padding: 15px 8px; display: flex; align-items: center; justify-content: center; gap: 8px; }
  .mobile-callbar a + a { border-left: 1px solid rgba(255,255,255,.2); }
  .mobile-callbar a.mc-call { background: var(--gold); color: #3a2a08; }
  body { padding-bottom: 58px; }
}

/* ================= HERO ================= */
.hero { position: relative; background: linear-gradient(135deg, var(--plum) 0%, var(--plum-deep) 100%); color: #fff; overflow: hidden; }
.hero::after { content:""; position:absolute; right:-120px; top:-120px; width:420px; height:420px; background: radial-gradient(circle, rgba(194,168,106,.16), transparent 70%); }
.hero .container { position: relative; z-index: 2; padding-top: 84px; padding-bottom: 84px; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .eyebrow { color: var(--gold); }
.hero p { color: rgba(255,255,255,.9); font-size: 1.2rem; max-width: 52ch; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 30px; }
.badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff; padding: 7px 15px; border-radius: 4px; font-size: .9rem; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-phone { font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.hero-phone small { display:block; font-family: var(--font-body); font-size: .8rem; letter-spacing:.15em; text-transform: uppercase; color: var(--gold); font-weight:700; }

.page-hero { background: linear-gradient(135deg, var(--plum) 0%, var(--plum-deep) 100%); color: #fff; }
.page-hero .container { padding-top: 60px; padding-bottom: 60px; }
.page-hero h1 { color:#fff; margin-bottom:.3em; }
.page-hero p { color: rgba(255,255,255,.88); max-width: 60ch; margin: 0; }

/* ================= CARDS / GRIDS ================= */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.card h3 { margin-top: 0; }
.card .icon { width: 46px; height: 46px; border-radius: 12px; background: rgba(47,111,116,.12); display:flex; align-items:center; justify-content:center; margin-bottom: 14px; font-size: 1.4rem; }

/* Specialties chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--white); border: 1px solid var(--line); border-radius: 4px; padding: 8px 16px; font-weight: 600; color: var(--plum); font-size: .95rem; }

/* ================= TEAM ================= */
.team-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 34px; }
.team-controls label { font-weight: 600; color: var(--muted); font-size: .9rem; }
.team-controls select, .team-controls input {
  font-family: var(--font-body); font-size: 1rem; padding: 10px 14px; border-radius: 4px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .team-grid { grid-template-columns: 1fr; } }

.therapist { background:#fff; border:1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.therapist__photo { aspect-ratio: 4/5; width: 100%; object-fit: cover; background: linear-gradient(135deg, var(--teal), var(--plum)); }
.therapist__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.therapist__name { font-family: var(--font-head); font-size: 1.3rem; color: var(--plum); margin: 0; }
.therapist__cred { color: var(--teal-deep); font-weight: 700; font-size: .9rem; margin: 2px 0 12px; }
.therapist__meta { font-size: .9rem; margin: 0 0 6px; }
.therapist__meta b { color: var(--plum-deep); }
.therapist__tags { display:flex; flex-wrap:wrap; gap:6px; margin: 12px 0; }
.therapist__tag { background: rgba(79,133,123,.1); color: var(--teal-deep); border-radius: 4px; padding: 4px 11px; font-size: .8rem; font-weight: 600; }
.therapist__tag--more { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.therapist__bio { color: var(--muted); font-size: .95rem; margin: 6px 0 0; }
.therapist details { margin-top: auto; }
.therapist details summary { cursor: pointer; color: var(--teal-deep); font-weight: 700; margin-top: 12px; list-style: none; }
.therapist details summary::-webkit-details-marker { display: none; }
.therapist details summary::after { content: " ↓"; }
.therapist details[open] summary::after { content: " ↑"; }
.no-results { text-align:center; color: var(--muted); padding: 40px; grid-column: 1 / -1; }

/* ================= FAQ / ACCORDION ================= */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { background:#fff; border:1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 14px; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { cursor: pointer; padding: 20px 24px; font-family: var(--font-head); font-size: 1.15rem; color: var(--plum); font-weight: 600; list-style: none; display:flex; justify-content: space-between; gap: 16px; align-items:center; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content: "+"; font-size: 1.6rem; color: var(--teal); font-family: var(--font-body); line-height:1; transition: transform .25s ease; }
.faq details[open] summary::after { content: "+"; transform: rotate(45deg); }
.faq .faq-body { padding: 0 24px 22px; color: var(--ink); }
.faq .faq-body ul { margin: .4em 0 0; padding-left: 1.2em; }
.faq .faq-body li { margin-bottom: .4em; }
.faq .faq-subhead { max-width:860px; margin: 34px auto 12px; color: var(--teal); text-transform: uppercase; letter-spacing:.14em; font-size:.8rem; font-weight:700; }
.faq .faq-subhead:first-child { margin-top: 0; }

/* Smooth "tab opening" reveal on dropdowns */
.faq details[open] .faq-body { animation: dropReveal .28s ease; }
.therapist details[open] .therapist__bio,
.therapist details[open] .therapist__meta { animation: dropReveal .28s ease; }
@keyframes dropReveal { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .faq details[open] .faq-body, .therapist details[open] .therapist__bio, .therapist details[open] .therapist__meta { animation: none; }
  .faq summary::after { transition: none; }
}

/* ================= LISTS / INSURANCE ================= */
.ins-group { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.ins-group h3 { margin-top:0; }
.ins-list { list-style: none; padding: 0; margin: 0; columns: 2; }
.ins-list li { padding: 6px 0 6px 26px; position: relative; break-inside: avoid; }
.ins-list li::before { content:""; position:absolute; left:3px; top:12px; width:6px; height:11px; border:solid var(--teal); border-width:0 2px 2px 0; transform: rotate(45deg); }
@media (max-width: 520px){ .ins-list { columns: 1; } }

.pill-note { background: rgba(201,162,75,.14); border: 1px solid rgba(201,162,75,.4); border-radius: var(--radius-sm); padding: 16px 20px; color: var(--plum-deep); }

/* ================= CONTACT ================= */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 34px; align-items: start; }
@media (max-width: 860px){ .contact-grid { grid-template-columns: 1fr; } }
.form-frame { width:100%; border:0; border-radius: var(--radius); box-shadow: var(--shadow); background:#fff; min-height: 900px; }
.form-wrap { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow-sm); }

.info-card { background: var(--white); border:1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.info-card h3 { margin-top:0; }
.info-card a { font-weight: 700; }

/* ================= FOOTER ================= */
.site-footer { background: var(--navy); color: #d6dced; padding: 56px 0 30px; }
.footer-grid { display:grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; }
@media (max-width: 780px){ .footer-grid { grid-template-columns: 1fr; gap: 26px; } }
.site-footer h4 { color:#fff; font-family: var(--font-body); text-transform: uppercase; letter-spacing:.12em; font-size:.85rem; margin:0 0 14px; }
.site-footer a { color:#d6dced; text-decoration:none; }
.site-footer a:hover { color:#fff; text-decoration: underline; }
.footer-nav { list-style:none; padding:0; margin:0; }
.footer-nav li { margin-bottom: 8px; }
.footer-brand p { color:#aeb8d0; font-size:.95rem; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.14); margin-top: 34px; padding-top: 18px; font-size:.82rem; color:#9aa4bd; display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; }

/* ---------- Accreditations / recognition ---------- */
.seals { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; justify-content: center; margin-top: 34px; }
.seal { display: flex; flex-direction: column; align-items: center; text-align: center; width: 200px; }
.seal img { height: 130px; width: auto; }
.seal .seal-ph { height: 130px; width: 130px; border-radius: 50%; border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; padding: 10px; }
.seal figcaption { margin-top: 12px; font-weight: 700; color: var(--plum); font-size: .95rem; }
.award { height: 130px; width: 130px; border-radius: 50%; background: var(--plum); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 14px; border: 3px solid var(--gold); }
.award .yr { font-family: var(--font-head); font-size: 1.7rem; font-weight: 700; color: var(--gold); line-height: 1; }
.award .tx { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; line-height: 1.25; }

/* utility */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-teal { color: var(--teal-deep); }
