/* ==========================================================================
   Family Dentist of Palm Beach — shared stylesheet
   Design system per Section 7.3 of the audit & rebuild plan.
   Single-location prototype: Royal Palm Beach, FL.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --navy:    #0D2B45;  /* Primary text, headers, nav background */
  --teal:    #1B7B8A;  /* Primary brand, CTA buttons, icons */
  --teal-dk: #155F6A;  /* Primary button hover */
  --teal-lt: #E4F4F6;  /* Section backgrounds, card fills */
  --sand:    #F7F4EE;  /* Alternating section backgrounds */
  --white:   #FFFFFF;
  --slate:   #4A5568;  /* Body text */
  --muted:   #616A78;  /* Captions, secondary labels — darkened to pass WCAG AA on white/sand */
  --border:  #E2E8F0;

  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --maxw: 1140px;
  --radius: 12px;
  --pill: 99px;
  --shadow-sm: 0 1px 3px rgba(13, 43, 69, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 43, 69, 0.10);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Hard guardrail: nothing may exceed its container (prevents horizontal overflow) */
* { max-width: 100%; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;              /* min 16px prevents iOS zoom on focus */
  line-height: 1.6;
  color: var(--slate);
  background: var(--white);
  overflow-x: hidden;           /* no horizontal scroll at any width */
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--navy); margin: 0 0 0.5em; line-height: 1.15; }
h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 5vw, 60px); }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 42px); }
h3 { font-family: var(--sans); font-weight: 600; font-size: 20px; }
h4 { font-family: var(--sans); font-weight: 600; font-size: 17px; }
p  { margin: 0 0 1em; }
.caption { font-size: 13px; color: var(--muted); }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--teal); margin: 0 0 12px;
}

/* ---------- Layout helpers ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 24px; }
.section--sand { background: var(--sand); }
.section--teal-lt { background: var(--teal-lt); }
/* Teal text on the light-teal background fails AA (4.37:1) — use darker teal for AA */
.section--teal-lt .eyebrow, .section--teal-lt .faq__body a { color: var(--teal-dk); }
.section--navy { background: var(--navy); color: #cfdbe6; }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--slate); font-size: 18px; }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  border-radius: var(--pill); padding: 14px 28px;
  min-height: 48px;                 /* >=44px tap target */
  cursor: pointer; border: 1.5px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn--primary:hover { background: var(--teal-dk); border-color: var(--teal-dk); }
.btn--outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--white { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn--white:hover { background: var(--teal-lt); border-color: var(--teal-lt); }
.btn--ghost-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn--ghost-white:hover { background: var(--white); color: var(--navy); }
.btn--block { display: flex; width: 100%; }

/* ---------- Announcement bar ---------- */
.announce-bar {
  background: var(--navy); color: var(--white);
  text-align: center; font-size: 14.5px; line-height: 1.4;
  padding: 10px 16px;
}
.announce-bar a { color: #7fd4e0; font-weight: 600; white-space: nowrap; }
.announce-bar a:hover { color: var(--white); }

/* ---------- Navigation (sticky) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--white); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; color: var(--navy); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--teal); color: var(--white);
  display: grid; place-items: center; font-family: var(--sans); font-weight: 700; font-size: 18px;
}
.brand__name { line-height: 1; }
.brand__sub { display: block; font-family: var(--sans); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
/* Brand mark: heart-shaped-tooth icon + live text wordmark (replaces the old baked-text logo.jpg) */
.brand__logo { height: 40px; width: auto; display: block; flex-shrink: 0; }
.lp-header .brand__logo { height: 40px; }
.brand__text { font-family: var(--serif); font-size: 19px; line-height: 1.12; white-space: nowrap; color: var(--navy); }

.nav__links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--navy); font-weight: 500; font-size: 15px; }
.nav__links a:hover { color: var(--teal); text-decoration: none; }

.nav__actions { display: flex; align-items: center; gap: 16px; }
.nav__phone { color: var(--navy); font-weight: 700; font-size: 15px; white-space: nowrap; }
.nav__phone:hover { color: var(--teal); text-decoration: none; }

/* CSS-only hamburger toggle (no JS) */
.nav__toggle { display: none; }
.nav__burger {
  display: none; width: 48px; height: 48px; border: 0; background: transparent;
  cursor: pointer; align-items: center; justify-content: center;
}
.nav__burger span, .nav__burger span::before, .nav__burger span::after {
  content: ""; display: block; width: 24px; height: 2px; background: var(--navy);
  position: relative; transition: transform .2s ease, opacity .2s ease;
}
.nav__burger span::before { position: absolute; top: -7px; }
.nav__burger span::after  { position: absolute; top: 7px; }

/* ---------- Image placeholder (no real image files in prototype) ----------
   Colored block standing in for photography. */
.img-ph {
  background: var(--teal-lt);
  color: var(--white);
  display: grid; place-items: center; text-align: center;
  font-family: var(--sans); font-weight: 600; font-size: 15px; line-height: 1.4;
  border-radius: var(--radius); padding: 24px; min-height: 240px;
}

/* ---------- Hero (split layout: navy copy + photo placeholder) ---------- */
.hero { background: var(--navy); }
.hero__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 80px 24px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}
.hero__content { max-width: 620px; }
.hero h1 { color: var(--white); }
.hero__ph {
  min-height: 420px; background: var(--teal-lt); color: var(--white);
  display: grid; place-items: center; text-align: center;
  border-radius: var(--radius); font-weight: 600; padding: 24px;
}
.hero__sub { color: #dbe6ef; font-size: 19px; margin: 0 0 28px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero__pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22);
  color: var(--white); font-size: 13.5px; font-weight: 500;
  padding: 7px 14px; border-radius: var(--pill);
}
.rating-badge { display: inline-flex; align-items: center; gap: 8px; color: var(--white); font-size: 14.5px; }
.rating-badge .stars { color: #ffc94d; letter-spacing: 1px; }
.rating-badge strong { font-weight: 700; }

/* ---------- Offer bar ---------- */
.offer-bar { background: var(--teal); color: var(--white); }
.offer-bar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.offer-bar p { margin: 0; font-size: 17px; }
.offer-bar strong { font-weight: 700; }

/* ---------- Stats strip ---------- */
.stats { background: var(--white); border-bottom: 1px solid var(--border); }
.stats__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}
.stat__num { font-family: var(--serif); font-size: 40px; color: var(--teal); line-height: 1; }
.stat__label { font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.card--pad-lg { padding: 32px; }
.service-card { display: flex; flex-direction: column; }
.service-card .icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  background: var(--teal-lt); color: var(--teal);
  display: grid; place-items: center; font-size: 26px; margin-bottom: 16px;
}
.service-card h3 { margin-bottom: 8px; }
.service-card p { flex: 1; }
.service-card .card-link { font-weight: 600; margin-top: 8px; }

/* ---------- Why choose us ---------- */
.why { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.why__img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.why__list { list-style: none; margin: 0; padding: 0; }
.why__list li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.why__list li:last-child { border-bottom: 0; }
.why__list h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.why__list .tick { color: var(--teal); font-weight: 700; }
.why__list p { margin: 0; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-md);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--navy); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 16px; color: var(--navy);
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--white); min-height: 48px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27,123,138,.15);
}
.form-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; text-align: center; }
.booking { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.booking__copy .eyebrow { color: var(--teal); }

/* ---------- Testimonials ---------- */
.testimonial { display: flex; flex-direction: column; height: 100%; }
.testimonial .stars { color: #ffc94d; letter-spacing: 1px; margin-bottom: 12px; }
.testimonial blockquote { margin: 0 0 18px; font-size: 17px; color: var(--navy); flex: 1; }
.testimonial .who { font-weight: 600; color: var(--navy); }
.testimonial .src { font-size: 13px; color: var(--muted); }

/* Reviews: "see all" link + video testimonial placeholder */
.reviews-all { color: var(--navy); font-weight: 600; text-decoration: underline; }
.reviews-all:hover { color: var(--teal-dk); }
.video-review {
  max-width: 620px; margin: 36px auto 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white); overflow: hidden;
}
.video-thumb {
  position: relative; min-height: 320px;
  background: var(--teal-lt); color: var(--white);
  display: grid; place-items: center; text-align: center;
}
.video-thumb .play {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--teal); color: var(--white);
  display: grid; place-items: center; font-size: 26px; padding-left: 4px;
  box-shadow: var(--shadow-md);
}
.video-thumb__label {
  position: absolute; left: 0; right: 0; bottom: 16px;
  font-weight: 600; font-size: 14px; padding: 0 16px;
}
.video-review__meta { padding: 20px 24px; }

/* ---------- Location card ---------- */
.location { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; }
.location__map { min-height: 320px; border: 0; width: 100%; height: 100%; }
.location__body { padding: 36px; }
.location__body h3 { font-size: 24px; margin-bottom: 6px; }
.location__meta { list-style: none; margin: 0 0 22px; padding: 0; }
.location__meta li { display: flex; gap: 10px; padding: 6px 0; }
.location__meta .ic { color: var(--teal); flex: none; }
.location__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Insurance logos ---------- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.logo-chip {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--pill);
  padding: 12px 22px; font-weight: 600; color: var(--navy); font-size: 15px;
}

/* ---------- FAQ (CSS-only accordion via <details>) ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white); margin-bottom: 14px; padding: 0 22px;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  font-weight: 600; font-size: 17px; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--teal); font-weight: 400; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .faq__body { padding: 16px 0 22px; margin: 0; }

/* ---------- Final CTA strip ---------- */
.cta-strip { background: var(--navy); color: var(--white); text-align: center; }
.cta-strip h2 { color: var(--white); max-width: 760px; margin: 0 auto 24px; }
.cta-strip__btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { background: #08202f; color: #9fb3c2; font-size: 14.5px; }
.footer__grid {
  max-width: var(--maxw); margin: 0 auto; padding: 60px 24px 32px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.footer h3, .footer h4 { color: var(--white); font-size: 15px; margin-bottom: 16px; font-family: var(--sans); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer a { color: #9fb3c2; }
.footer a:hover { color: var(--white); }
.footer .brand { color: var(--white); margin-bottom: 14px; }
.footer .brand__sub { color: #7f97a8; }
.footer__social { display: flex; gap: 12px; margin-top: 8px; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: grid; place-items: center; color: #cfdbe6;
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  max-width: var(--maxw); margin: 0 auto; padding: 20px 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px;
}

/* ---------- Floating chat button ---------- */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: var(--white); font-weight: 600; font-size: 15px;
  padding: 14px 20px; border-radius: var(--pill); box-shadow: var(--shadow-md);
  min-height: 48px;
}
.chat-fab:hover { background: var(--teal-dk); text-decoration: none; }

/* ==========================================================================
   Landing page variants (no nav menu — single-focus)
   ========================================================================== */
.lp-header {
  background: var(--white); border-bottom: 1px solid var(--border);
}
.lp-header__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.lp-header .nav__phone { font-size: 17px; }

.lp-hero { background: var(--navy); color: #dbe6ef; }
.lp-hero__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 56px 24px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: start;
}
.lp-hero h1 { color: var(--white); }
.lp-hero__sub { font-size: 19px; margin-bottom: 24px; }
.lp-hero__points { list-style: none; margin: 0 0 8px; padding: 0; }
.lp-hero__points li { padding: 8px 0; display: flex; gap: 10px; color: #dbe6ef; }
.lp-hero__points .tick { color: #7fd4e0; font-weight: 700; }

.lp-footer { background: var(--navy); color: #7f97a8; text-align: center; padding: 24px; font-size: 13px; }

.trust-strip { background: var(--sand); }
.trust-strip__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 40px 24px;
  display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap;
}
.doctor-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.doctor-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }

/* ==========================================================================
   Sub-page hero (interior pages)
   ========================================================================== */
.page-hero { background: var(--teal-lt); }
.page-hero__inner { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.page-hero h1 { max-width: 900px; }
.lead { font-size: 20px; color: var(--slate); max-width: 760px; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 28px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav__links li { border-top: 1px solid var(--border); }
  .nav__links a { display: block; padding: 16px 24px; }
  .nav__toggle:checked ~ .nav__links { max-height: 420px; }
  .nav__burger { display: inline-flex; }
  .nav__phone { display: none; }

  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__ph { min-height: 240px; }
  .why { grid-template-columns: 1fr; gap: 32px; }
  .booking { grid-template-columns: 1fr; gap: 32px; }
  .location { grid-template-columns: 1fr; }
  .location__map { min-height: 260px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .lp-hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 600px) {
  .section { padding: 56px 20px; }
  .container { padding: 0 20px; }
  .hero__inner { padding: 64px 20px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .offer-bar__inner { flex-direction: column; align-items: flex-start; }
  .hero__cta .btn, .cta-strip__btns .btn { width: 100%; }
  .doctor-card { grid-template-columns: 1fr; text-align: center; }
  .doctor-card img { margin: 0 auto; }
  .footer__bottom { flex-direction: column; }

  /* Keep the icon + wordmark from overflowing/wrapping awkwardly next to the mobile burger */
  .brand { gap: 8px; font-size: 14px; }
  .brand__logo { height: 34px; }
  .brand__text { font-size: 16px; }
  /* Hero CTA + announce-bar Call cover booking on phones — drop the redundant nav button so the 2-line wordmark has room */
  .nav__actions .btn--primary { display: none; }
}
