/* ===========================
   Sunny Smile Dental Styles
   =========================== */

/* --- Base + Design tokens --- */
:root {
  --bg: #ffffff;
  --text: #0f172a; /* slate-900 */
  --muted: #475569; /* slate-600 */
  --brand: #0ea5e9; /* sky-500 */
  --brand-ink: #0c4a6e; /* sky-900 */
  --surface: #f8fafc; /* slate-50 */
  --ring: rgba(14,165,233,.35);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: var(--bg);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial;
  scroll-behavior: smooth;
}

img { max-width: 100%; display: block; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Layout helpers --- */
.container { width: min(1120px, 92%); margin-inline: auto; }
.section { padding: 72px 0; }
.section--alt { background: var(--surface); }
.section__head { margin-bottom: 28px; }
.section__head h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); margin: 0 0 8px; }
.section__head p { color: var(--muted); margin: 0; }

/* --- Accessibility --- */
.skip-link {
  position: absolute; left: -1000px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 8px; top: 8px; width: auto; height: auto;
  background: #fff; border: 2px solid var(--brand); padding: 6px 10px; border-radius: 8px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.9);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid #e2e8f0;
  z-index: 10;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 0;
}
.logo {
  display: flex; gap: 10px; align-items: center;
  color: var(--text); font-weight: 700;
}
.nav__toggle { display: none; }
.nav__list {
  display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; align-items: center;
}
.nav__list a {
  padding: 8px 10px; border-radius: 12px;
}
.nav__list a:hover {
  background: #eff6ff; text-decoration: none;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: var(--brand);
  color: white;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
  cursor: pointer;
  transition: background .2s ease;
}
.btn:hover { filter: brightness(.95); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn--sm { padding: 8px 12px; font-size: 0.9rem; }

/* --- Hero --- */
.hero {
  padding: 56px 0 24px;
  background: radial-gradient(1200px 300px at 50% -60px, #e0f2fe, transparent);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 32px;
  align-items: center;
}
.hero__copy h1 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin: 0 0 10px;
}
.hero__copy p {
  color: var(--muted);
  margin: 0 0 16px;
}
.hero__cta {
  display: flex; gap: 12px; margin: 14px 0 16px;
}
.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  padding: 0; margin: 10px 0 0;
  list-style: none;
  color: var(--brand-ink);
  font-weight: 600;
}
.hero__img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
}

/* --- Cards --- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(2,6,23,.04);
}
.card h3 { margin: 0 0 6px; }

/* --- Doctor Section --- */
.doc {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 28px;
  align-items: center;
}
.doc__photo {
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(2,6,23,.1);
}
.ticks { margin: 10px 0 18px; padding-left: 18px; }
.ticks li { margin: 6px 0; }

/* --- Testimonials --- */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}
.quote {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}
.quote blockquote { margin: 0 0 8px; font-weight: 600; }

/* --- Contact --- */
.contact {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 28px;
  align-items: start;
}
.contact__card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(2,6,23,.04);
}
.form__row {
  display: flex; flex-direction: column; gap: 6px; margin: 10px 0;
}
.form__row input,
.form__row select,
.form__row textarea {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  outline: none;
}
.form__row input:focus,
.form__row select:focus,
.form__row textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}
.form__row--check {
  flex-direction: row;
  gap: 10px;
  align-items: center;
}
.form__msg { margin-top: 8px; color: var(--brand-ink); }
.hp { position: absolute; left: -10000px; }
.map {
  width: 100%;
  min-height: 300px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(2,6,23,.04);
}
.info h3 { margin: 0 0 6px; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid #e2e8f0;
  padding: 16px 0;
  background: white;
}
.footer__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav {
  display: flex; gap: 12px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

/* The background overlay (darkens the screen) */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* The actual popup box */
.modal-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Helper class to show the modal */
.modal-overlay.show {
  display: flex;
}

/* --- Responsive Design --- */
@media (max-width: 960px) {
  .hero__grid,
  .cards,
  .doc,
  .quotes,
  .contact { grid-template-columns: 1fr; }

  .nav__toggle {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
  }
  .nav__list {
    display: none;
    position: absolute;
    right: 4%;
    top: 60px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    width: 220px;
    flex-direction: column;
  }
  .nav__list.show { display: flex; }
}
