/* ==========================================================================
   New Family Dental Clinic — stylesheet
   Design language: warm paper ground + Mithila (Madhubani) line-art motifs,
   used as borders/dividers, paired with a clinical peacock-green accent.
   ========================================================================== */

:root {
  /* Color tokens */
  --ink: #2b2140;          /* deep indigo-aubergine — headings, line art */
  --ink-soft: #5b5266;     /* muted body text */
  --paper: #f6eedd;        /* warm unbleached-paper background */
  --paper-card: #fffaf0;   /* slightly lighter card surface */
  --vermillion: #c1442d;   /* sindoor red accent */
  --turmeric: #d89b33;     /* mustard accent */
  --peacock: #2f6e5e;      /* peacock-green — trust / CTA */
  --peacock-dark: #234f43;
  --line: rgba(43, 33, 64, 0.14);

  /* Type */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  --radius: 14px;
  --shadow: 0 12px 30px rgba(43, 33, 64, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--vermillion);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.6em;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

section { padding: 4.5rem 0; }
.section-tight { padding: 2.5rem 0; }

/* --------------------------- Mithila border strip ------------------------ */
/* A tiled zig-zag + dot motif echoing the fish-scale borders common in
   Madhubani painting. Used as a signature divider throughout the site. */
.mithila-border {
  height: 16px;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='16'%3E%3Cpolyline points='0,16 10,2 20,16 30,2 40,16' fill='none' stroke='%232b2140' stroke-width='2'/%3E%3Ccircle cx='10' cy='9' r='1.6' fill='%23c1442d'/%3E%3Ccircle cx='30' cy='9' r='1.6' fill='%23d89b33'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 40px 16px;
  opacity: 0.9;
}
.mithila-border.flip { transform: scaleY(-1); }

/* ------------------------------- Header ---------------------------------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
header.site-header.scrolled { box-shadow: 0 6px 20px rgba(43,33,64,0.08); }

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.brand-mark {
  width: 42px; height: 42px; flex: none;
}
.brand-text .name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  display: block;
}
.brand-text .tag {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--peacock-dark);
  text-transform: uppercase;
}

nav.main-nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}
nav.main-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  position: relative;
  padding: 0.25rem 0;
}
nav.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--vermillion);
  transition: width 0.2s ease;
}
nav.main-nav a:hover::after,
nav.main-nav a[aria-current="page"]::after { width: 100%; }
nav.main-nav a[aria-current="page"] { color: var(--vermillion); }

.header-actions { display: flex; align-items: center; gap: 1rem; }
.call-chip {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  color: var(--peacock-dark);
}

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; margin: 5px 0;
  background: var(--ink); transition: 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------- Buttons --------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--peacock); color: #fff; box-shadow: 0 10px 22px rgba(47,110,94,0.28); }
.btn-primary:hover { background: var(--peacock-dark); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { border-color: var(--vermillion); color: var(--vermillion); }
.btn-block { width: 100%; justify-content: center; }

/* -------------------------------- Hero ------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.hero-motif {
  position: absolute;
  right: -60px;
  top: -40px;
  width: 420px;
  opacity: 0.14;
  color: var(--ink);
  pointer-events: none;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--peacock-dark);
  display: block;
}
.hero-stats .stat span { font-size: 0.82rem; color: var(--ink-soft); }

.hero-cta { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.hero-art {
  background: var(--paper-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  border: 1px solid var(--line);
}
.hero-art img { border-radius: 10px; }
.hero-art .caption {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.9rem;
}
.hero-art .caption b { font-family: var(--font-display); }
.hero-art .caption span { font-size: 0.82rem; color: var(--ink-soft); }

/* ------------------------------- Cards ------------------------------------ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(47,110,94,0.1);
  color: var(--peacock-dark);
  margin-bottom: 1rem;
}
.card .icon svg { width: 24px; height: 24px; }

.section-head { max-width: 640px; margin: 0 auto 2.6rem; text-align: center; }
.section-head.left { margin: 0 0 2.6rem; text-align: left; }

.tone-alt { background: var(--paper-card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ------------------------------ Doctor block ------------------------------ */
.doctor-block {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: center;
}
.doctor-photo {
  background: var(--paper-card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.credential-list li {
  display: flex; gap: 0.6rem; margin-bottom: 0.6rem; color: var(--ink-soft);
}
.credential-list li::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 0.5em; flex: none;
  background: var(--vermillion);
}

/* ------------------------------ Testimonials ------------------------------ */
.quote-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.quote-card .stars { color: var(--turmeric); letter-spacing: 2px; margin-bottom: 0.6rem; }
.quote-card .who { font-weight: 600; margin-top: 0.8rem; color: var(--ink); }

/* -------------------------------- Forms ------------------------------------ */
.form-field { margin-bottom: 1.1rem; }
.form-field label {
  display: block; font-size: 0.85rem; font-weight: 600;
  margin-bottom: 0.4rem; color: var(--ink);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--peacock);
  box-shadow: 0 0 0 3px rgba(47,110,94,0.15);
}
.form-field .error-msg {
  display: none;
  color: var(--vermillion);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}
.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea { border-color: var(--vermillion); }
.form-field.invalid .error-msg { display: block; }

.form-success {
  display: none;
  background: rgba(47,110,94,0.12);
  border: 1px solid var(--peacock);
  color: var(--peacock-dark);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  font-weight: 600;
}
.form-success.show { display: block; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

/* -------------------------------- FAQ -------------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 1.2rem 0;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.faq-q .plus { transition: transform 0.2s ease; font-size: 1.3rem; color: var(--vermillion); }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item.open .faq-a { max-height: 240px; }
.faq-a p { padding-bottom: 1.1rem; }

/* -------------------------------- CTA band ---------------------------------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 20px;
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.75); margin: 0; }

/* -------------------------------- Footer ------------------------------------ */
footer.site-footer { background: var(--ink); color: rgba(255,255,255,0.8); padding-top: 3.5rem; }
footer.site-footer a { text-decoration: none; color: rgba(255,255,255,0.8); }
footer.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-grid li { margin-bottom: 0.6rem; }
.footer-brand p { color: rgba(255,255,255,0.65); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.2rem 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* -------------------------------- Page hero (inner pages) -------------------- */
.page-hero {
  padding: 3.2rem 0 2.4rem;
  text-align: center;
}
.page-hero p { max-width: 560px; margin: 0 auto; }

/* -------------------------------- Map / contact ------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.info-row {
  display: flex; gap: 1rem; margin-bottom: 1.5rem;
}
.info-row .icon {
  width: 42px; height: 42px; flex: none;
  border-radius: 10px;
  background: rgba(193,68,45,0.1);
  color: var(--vermillion);
  display: flex; align-items: center; justify-content: center;
}
.info-row .icon svg { width: 20px; height: 20px; }
.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.map-frame iframe { width: 100%; height: 320px; border: 0; display: block; }

/* -------------------------------- Utilities ----------------------------------- */
.back-to-top {
  position: fixed;
  right: 1.4rem; bottom: 1.4rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--peacock);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  box-shadow: 0 8px 20px rgba(47,110,94,0.35);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); }

/* ------------------------------- Responsive ------------------------------------ */
@media (max-width: 900px) {
  .hero-grid, .doctor-block, .contact-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  nav.main-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  nav.main-nav.open { max-height: 320px; }
  nav.main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 0 1rem;
  }
  nav.main-nav ul li { width: 100%; }
  nav.main-nav a { display: block; padding: 0.8rem 5%; }
  .call-chip span { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 3rem 0; }
}