/* =========================================================================
   Cedarwood Family Dentistry — Stylesheet
   Mobile-first. Designed for 375px viewport, scales up to desktop.
   Brand colors: forest green #2D5F3F + warm cream #F5EFE0.
   ========================================================================= */

/* ---------- Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 17px;
  line-height: 1.55;
  color: #1f1f1f;
  background: #F5EFE0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: #2D5F3F; text-decoration: underline; text-underline-offset: 3px; }
a:hover, a:focus-visible { text-decoration: none; }
:focus-visible {
  outline: 3px solid #2D5F3F;
  outline-offset: 2px;
  border-radius: 2px;
}
h1, h2, h3, h4 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: #1f1f1f;
}
h1 { font-size: 1.85rem; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; letter-spacing: -0.005em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.25em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
table { width: 100%; border-collapse: collapse; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #2D5F3F;
  color: #F5EFE0;
  padding: 0.75em 1em;
  z-index: 1000;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Header (mobile-first) ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: #F5EFE0;
  border-bottom: 1px solid rgba(45, 95, 63, 0.15);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.site-logo {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #2D5F3F;
  text-decoration: none;
  line-height: 1.1;
}
.site-logo span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #4a4a4a;
  text-transform: uppercase;
}

/* Header CTA — sticky "Book online" button — present from first paint */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2D5F3F;
  color: #F5EFE0;
  font-family: Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.6em 1em;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid #2D5F3F;
  min-height: 44px;
  white-space: nowrap;
}
.header-cta:hover, .header-cta:focus-visible {
  background: #F5EFE0;
  color: #2D5F3F;
  text-decoration: none;
}

/* Hamburger button + slide-in nav */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid #2D5F3F;
  color: #2D5F3F;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle:hover, .nav-toggle:focus-visible {
  background: #2D5F3F;
  color: #F5EFE0;
}
.nav-toggle svg { width: 22px; height: 22px; }

.primary-nav {
  display: none;
  background: #F5EFE0;
  border-top: 1px solid rgba(45, 95, 63, 0.15);
}
.primary-nav.is-open { display: block; }
.primary-nav ul {
  list-style: none;
  padding: 0.5rem 1rem 1rem;
  margin: 0;
  max-width: 1100px;
  margin: 0 auto;
}
.primary-nav li { margin: 0; }
.primary-nav a {
  display: block;
  padding: 0.85rem 0;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  color: #1f1f1f;
  text-decoration: none;
  border-bottom: 1px solid rgba(45, 95, 63, 0.1);
  min-height: 44px;
}
.primary-nav a:hover, .primary-nav a:focus-visible { color: #2D5F3F; }
.primary-nav a.current { color: #2D5F3F; font-weight: 700; }
.nav-phone {
  display: block;
  padding: 0.85rem 0;
  font-weight: 700;
  color: #2D5F3F !important;
}

/* ---------- Layout ---------- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1rem;
}
.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
main { min-height: 60vh; }
section { padding: 2.25rem 0; }
section + section { border-top: 1px solid rgba(45, 95, 63, 0.12); }

/* ---------- Hero ---------- */
.hero {
  padding: 2rem 0 2.5rem;
  background: #F5EFE0;
}
.hero h1 {
  font-size: 1.85rem;
  margin-bottom: 0.6rem;
}
.hero .subhead {
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  color: #2a2a2a;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2D5F3F;
  color: #F5EFE0;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.9em 1.4em;
  border-radius: 4px;
  text-decoration: none;
  border: 2px solid #2D5F3F;
  min-height: 48px;
  cursor: pointer;
  text-align: center;
}
.btn:hover, .btn:focus-visible {
  background: #F5EFE0;
  color: #2D5F3F;
  text-decoration: none;
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-secondary {
  background: transparent;
  color: #2D5F3F;
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  background: #2D5F3F;
  color: #F5EFE0;
}
.btn-subtext {
  display: block;
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.6rem;
  font-style: italic;
}
.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Secondary text link below primary CTA */
.text-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 1rem;
  color: #2D5F3F;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Insurance strip ---------- */
.insurance-strip {
  background: #ffffff;
  border-left: 4px solid #2D5F3F;
  border-radius: 0 4px 4px 0;
  padding: 1.25rem;
  margin: 0 -0.25rem;
}
.insurance-strip h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.insurance-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.insurance-logo-row .logo-placeholder {
  background: #F5EFE0;
  border: 1px dashed #2D5F3F;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: #2D5F3F;
  border-radius: 3px;
  font-family: Georgia, serif;
}

/* ---------- Proof strip ---------- */
.proof-strip {
  background: #2D5F3F;
  color: #F5EFE0;
  padding: 1.5rem 0;
}
.proof-strip .container { padding: 0 1rem; }
.proof-items {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.proof-item {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 700;
}
.proof-item strong { display: block; font-size: 1.15rem; }

/* ---------- Price preview table ---------- */
.price-table {
  width: 100%;
  margin: 1.25rem 0;
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.price-table th, .price-table td {
  text-align: left;
  padding: 0.85rem 0.85rem;
  border-bottom: 1px solid rgba(45, 95, 63, 0.12);
  font-size: 0.95rem;
}
.price-table th {
  background: rgba(45, 95, 63, 0.08);
  color: #2D5F3F;
  font-weight: 700;
}
.price-table td:last-child { text-align: right; font-weight: 700; }
.price-table tr:last-child td { border-bottom: none; }
.price-note {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: #555;
  margin-top: 2px;
}

/* ---------- Photo placeholders ---------- */
.photo-placeholder {
  background: #2D5F3F;
  color: #F5EFE0;
  padding: 2rem 1.25rem;
  margin: 1rem 0;
  border-radius: 4px;
  border: 2px dashed #F5EFE0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  font-style: italic;
}
.photo-placeholder strong {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-style: normal;
  margin-bottom: 0.5rem;
  opacity: 0.85;
}
.photo-placeholder .caption {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-style: italic;
}
.photo-fullbleed {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Dentist preview cards ---------- */
.dentist-preview {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.dentist-card {
  background: #ffffff;
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
  border: 1px solid rgba(45, 95, 63, 0.12);
}
.dentist-card .photo-placeholder {
  margin: 0 0 1rem;
  padding: 1.5rem 1rem;
}
.dentist-card h3 { margin-bottom: 0.4rem; }

/* ---------- Walkthrough steps ---------- */
.walkthrough-step {
  margin: 1.5rem 0 2rem;
  padding-left: 0;
  position: relative;
}
.walkthrough-step .step-number {
  display: inline-block;
  background: #2D5F3F;
  color: #F5EFE0;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25em 0.75em;
  border-radius: 100px;
  margin-bottom: 0.5rem;
}
.walkthrough-step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* ---------- Anxiety section / sedation list ---------- */
.callout {
  background: #ffffff;
  border-left: 4px solid #2D5F3F;
  padding: 1.25rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.sedation-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.sedation-list li {
  padding: 1rem;
  background: #ffffff;
  border: 1px solid rgba(45, 95, 63, 0.15);
  border-radius: 4px;
  margin-bottom: 0.75rem;
}
.sedation-list li strong { color: #2D5F3F; }

/* ---------- Pull quote / review ---------- */
.pull-quote {
  background: #ffffff;
  border-left: 4px solid #2D5F3F;
  padding: 1.5rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
  font-size: 1.1rem;
  line-height: 1.5;
  font-style: italic;
}
.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-style: normal;
  color: #555;
}

/* ---------- LocalMed widget placeholder ---------- */
.widget-placeholder {
  background: #ffffff;
  border: 3px dashed #2D5F3F;
  border-radius: 6px;
  padding: 2.5rem 1.25rem;
  margin: 1.5rem 0;
  text-align: center;
  color: #2D5F3F;
  font-family: Georgia, serif;
}
.widget-placeholder strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.widget-placeholder p {
  font-size: 0.95rem;
  color: #444;
  margin: 0.5rem 0 0;
}

/* ---------- Map placeholder ---------- */
.map-placeholder {
  background: #e8e1cf;
  border: 2px solid #2D5F3F;
  border-radius: 4px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #2D5F3F;
  font-style: italic;
  padding: 1.5rem;
  margin: 1rem 0;
}

/* ---------- Hours table ---------- */
.hours-table {
  background: #ffffff;
  border-radius: 4px;
  margin: 1rem 0;
  overflow: hidden;
  border: 1px solid rgba(45, 95, 63, 0.15);
}
.hours-table th, .hours-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(45, 95, 63, 0.08);
}
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: none; }
.hours-table td:last-child { text-align: right; font-weight: 700; }

/* ---------- Address block ---------- */
.address-block {
  background: #ffffff;
  border-radius: 4px;
  padding: 1.25rem;
  margin: 1rem 0;
  border: 1px solid rgba(45, 95, 63, 0.15);
}
.address-block address {
  font-style: normal;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #2D5F3F;
  margin-bottom: 1rem;
}
.address-block p { margin: 0.75rem 0; }
.address-block p strong { color: #2D5F3F; }

/* ---------- CTA block (page-level) ---------- */
.cta-block {
  text-align: center;
  padding: 2rem 0;
}
.cta-block h2 {
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
}
.cta-block .subline {
  color: #444;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #2D5F3F;
  color: #F5EFE0;
  padding: 2rem 0 1.5rem;
  margin-top: 2rem;
  font-size: 0.95rem;
}
.site-footer a {
  color: #F5EFE0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover, .site-footer a:focus-visible { text-decoration: none; }
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.footer-block h3 {
  color: #F5EFE0;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.footer-block p { margin: 0 0 0.4rem; line-height: 1.5; }
.footer-legal {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(245, 239, 224, 0.2);
  font-size: 0.85rem;
}
.footer-legal ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0.5rem 0 0;
}
.footer-legal li { margin: 0; }

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-center { text-align: center; }
.spacer-sm { height: 1rem; }
.spacer-md { height: 1.5rem; }

/* ---------- Tablet (560px+) ---------- */
@media (min-width: 560px) {
  body { font-size: 18px; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.65rem; }
  .hero h1 { font-size: 2.2rem; }
  .btn-row { flex-direction: row; flex-wrap: wrap; }
  .btn-block { width: auto; }
  .proof-items {
    flex-direction: row;
    justify-content: space-around;
    text-align: center;
    gap: 1.5rem;
  }
  .proof-item { flex: 1; }
  .dentist-preview { flex-direction: row; gap: 1rem; }
  .dentist-preview .dentist-card { flex: 1; }
}

/* ---------- Desktop (900px+) ---------- */
@media (min-width: 900px) {
  body { font-size: 18px; }
  h1 { font-size: 2.5rem; }
  .hero h1 { font-size: 2.6rem; }
  .container { max-width: 760px; }
  section { padding: 3rem 0; }

  /* Desktop nav appears inline, hamburger hides */
  .nav-toggle { display: none; }
  .primary-nav {
    display: block !important;
    border-top: none;
    background: transparent;
    flex: 1;
  }
  .primary-nav ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    justify-content: flex-end;
  }
  .primary-nav li { margin: 0; }
  .primary-nav a {
    padding: 0.5rem 0;
    border-bottom: none;
    font-size: 1rem;
  }
  .primary-nav a:hover { color: #2D5F3F; }
  .header-inner {
    gap: 1.5rem;
  }
  .nav-phone { display: inline-block !important; }

  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    gap: 2rem;
  }
  .footer-block { flex: 1; }
}

/* ---------- Print + reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
