/* All Star Pediatric Dentistry — site styles
   Icons: Font Awesome Free (CC BY 4.0, https://fontawesome.com/license/free) */

:root {
  --teal: #19879e;
  --teal-dark: #146f82;
  --orange: #ee7641;
  --orange-dark: #d9612c;
  --sky: #3ac6f3;
  --sky-dark: #1fb2e0;
  --sky-light: #8ed9f2;
  --fb: #227bef;
  --text: #2b2b2b;
  --muted: #6e7a85;
  --white: #fff;
  /* Google Fonts (loaded in layout.html). Previous Adobe setup: see ADOBE-FONTS-BACKUP.md */
  --font-body: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --font-cond: "Sofia Sans Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-xcond: "Sofia Sans Condensed", "Sofia Sans Semi Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --frame: 8px;
  --max: 1240px;
  --gutter: clamp(16px, 3vw, 44px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--sky);
  color: var(--text);
  font: 400 18px/1.625 var(--font-body);
}

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

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

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--teal); color: #fff; padding: 8px 16px; border-radius: 4px;
}
.skip-link:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- frame ---------- */
.frame {
  margin: var(--frame);
  background: var(--white);
  min-height: calc(100vh - 2 * var(--frame));
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* ---------- typography ---------- */
h1, h2, h3, h4 { margin: 0 0 0.6em; line-height: 1.2; }
h1 { font: 700 44px/1.2 var(--font-cond); color: var(--teal); }
h2 { font: 600 32px/1.15 var(--font-cond); color: var(--teal); }
h3 { font: 600 24px/1.2 var(--font-cond); color: var(--orange); }
h4 { font: 600 20px/1.3 var(--font-cond); color: var(--teal); }
p, ul, ol { margin: 0 0 1em; }
h1 strong, h2 strong { font-weight: inherit; }
hr { border: 0; border-top: 1px solid #dfe5e8; margin: 32px 0; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 20; background: var(--white); }

.header-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo img { width: 190px; }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 24px; flex-wrap: wrap; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a {
  display: block; padding: 11px 0;
  font: 500 18px/1 var(--font-body); color: var(--teal);
}
.nav-item > a:hover, .nav-item.is-active > a { color: var(--orange); text-decoration: none; }
.sub-toggle { display: none; }

.sub {
  list-style: none; margin: 0; padding: 18px;
  position: absolute; top: 100%; left: -18px; min-width: 220px;
  background: var(--sky-light);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.sub a { display: block; padding: 6px 0; font: 500 17px/1.25 var(--font-body); color: var(--teal); white-space: nowrap; }
.sub a:hover, .sub a[aria-current] { color: var(--orange); text-decoration: none; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }

.menu-toggle {
  display: none; border: 0; background: none; color: var(--teal);
  font-size: 30px; padding: 6px; cursor: pointer; line-height: 0;
}
.menu-toggle .menu-close { display: none; }

/* secondary bar */
.header-bar {
  background: var(--sky);
  display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap;
  padding: 12px max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  font: 600 16px/1 var(--font-cond); text-transform: uppercase;
}
.header-bar ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; }
.header-bar .social { gap: 10px; }
.social a {
  display: grid; place-items: center; width: 32px; height: 32px;
  background: var(--teal); color: var(--white); border-radius: 3px; font-size: 16px;
}
.social a:hover { background: var(--teal-dark); }
.bar-links a { color: var(--text); }
.bar-links a:hover { color: var(--white); text-decoration: none; }
.bar-links .like {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--fb); color: var(--white); padding: 5px 18px; border-radius: 3px;
}
.bar-links .like:hover { background: #1563cf; }

/* ---------- layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 64px; }
.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 56px; }

.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 40px; margin-bottom: 16px; }
.col { grid-column: span var(--span, 12); min-width: 0; }

.content::after { content: ""; display: table; clear: both; }

/* images and embeds inside page content */
.image { margin: 0 0 24px; }
.image img { width: 100%; }
.image figcaption { font-size: 15px; color: var(--muted); margin-top: 6px; }
.float-right { float: right; margin: 6px 0 20px 32px; }
.float-left { float: left; margin: 6px 32px 20px 0; }
.w-1 { width: 8.33%; } .w-2 { width: 16.66%; } .w-3 { width: 25%; } .w-4 { width: 33.33%; }
.w-5 { width: 41.66%; } .w-6 { width: 50%; } .w-7 { width: 58.33%; } .w-8 { width: 66.66%; }

.video-frame { position: relative; padding-bottom: 56.25%; height: 0; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.embed iframe { width: 100%; border: 0; display: block; }
.form-embed { min-height: 400px; }

/* service icons (All Services page) */
.icon-badge { color: var(--teal); }
.icon-badge.float-left { width: 72px; margin: 4px 18px 8px 0; }
.icon-badge svg { width: 100%; height: auto; border-radius: 50%; box-shadow: 0 0 0 3px var(--sky); }
.content h2 { font: 600 22px/1.25 var(--font-cond); color: var(--orange); text-transform: uppercase; letter-spacing: .02em; }
.content h2 a { color: inherit; border-bottom: 1px solid rgba(238, 118, 65, .3); }
.content h2 a:hover { text-decoration: none; border-bottom-color: var(--orange); }
.page-all-services .content h2 { margin-top: 18px; }
.page-all-services .content > p.text-center { max-width: 740px; margin-left: auto; margin-right: auto; }
.page-all-services .content .row { margin-bottom: 32px; }

/* ---------- sidebar ---------- */
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 0; font: 400 19px/1.3 var(--font-body); color: var(--muted); letter-spacing: .01em;
}
.sidebar .icon { font-size: 13px; color: var(--muted); }
.sidebar a:hover { color: var(--teal); text-decoration: none; }
.sidebar a.is-active { color: var(--orange); font: 700 22px/1.3 var(--font-cond); }

/* ---------- buttons ---------- */
.btn-row { margin: 28px 0; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--sky); color: var(--white);
  font: 600 22px/1.1 var(--font-xcond);
  padding: 14px 28px; border-radius: 3px; border: 0;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12);
  transition: background .15s;
}
.btn:hover { background: var(--sky-dark); color: var(--white); text-decoration: none; }
.btn--large { font-size: 26px; padding: 24px 44px; }
.btn--medium { font-size: 24px; padding: 18px 34px; }
.btn--small { font-size: 18px; padding: 12px 26px; }
.btn--pill, .btn--tertiary, .btn--primary.btn--small { border-radius: 999px; box-shadow: none; }
.btn--pill.btn--medium { padding: 22px 34px; }
.btn--accent { background: var(--orange); }
.btn--accent:hover { background: var(--orange-dark); }

/* ---------- home page ---------- */
.hero {
  position: relative; display: grid; align-items: end;
  min-height: min(82vh, 760px);
  color: var(--white); text-align: center; overflow: hidden;
}
.hero-bg, .cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before, .cta::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0) 60%);
}
.hero-text { position: relative; z-index: 2; max-width: 1340px; margin: 0 auto; padding: 0 var(--gutter) 48px; }
.hero h2 {
  font: 600 38px/1 var(--font-xcond); color: var(--white); text-transform: capitalize; letter-spacing: -.5px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
.hero p { font-weight: 600; font-size: 21px; line-height: 1.6; letter-spacing: .02em; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }

.home-section .container { padding-top: 40px; padding-bottom: 40px; }
.welcome h1 { margin-top: 40px; }
.tagline { margin-bottom: 48px; }
.welcome-row { gap: 0 36px; }
.map { position: relative; padding-bottom: 63%; margin-bottom: 24px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.services {
  background: var(--teal); color: var(--white); text-align: center;
  border-top: 8px solid var(--orange); border-bottom: 8px solid var(--orange);
}
.services .container { padding-top: 72px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.service-icon {
  width: 120px; height: 120px; margin: 0 auto 26px; color: var(--teal);
  border-radius: 50%; box-shadow: 0 0 0 3px var(--sky);
}
.service-icon svg { width: 100%; height: 100%; }
.services h2 { font: 700 24px/1.2 var(--font-cond); color: var(--white); text-transform: uppercase; }
.services p { font-size: 16px; line-height: 1.6; }
.services hr { border-top-color: rgba(255, 255, 255, .15); margin: 40px 0 0; }

.doctors h1 { margin: 40px 0 48px; }
.doctor .doctor-photo { float: left; width: 190px; margin: 0 38px 12px 0; }
.doctor h3 { margin-top: 20px; }
.credentials { display: flex; align-items: center; justify-content: center; gap: 48px 120px; flex-wrap: wrap; margin: 64px 0 40px; }
.credentials img:first-child { width: 124px; }
.credentials img:last-child { width: 500px; }

.cta { position: relative; min-height: 480px; display: grid; place-items: center; text-align: center; overflow: hidden; }
.cta::before { background: rgba(0, 0, 0, .12); }
.cta-text { position: relative; z-index: 2; padding: 40px var(--gutter); }
.cta h2 {
  font: 600 26px/1.2 var(--font-cond); color: var(--white); text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4); margin-bottom: 16px;
}

/* ---------- office tour gallery ---------- */
.gallery { position: relative; max-width: 900px; margin: 24px auto; background: #f3f6f7; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: 0 0 100%; width: 100%; height: 560px; object-fit: contain; scroll-snap-align: center; }
.gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .9); color: var(--teal); font-size: 20px; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.gallery-btn:hover { background: var(--white); color: var(--orange); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-count { text-align: center; font-size: 15px; color: var(--muted); padding: 8px; }

/* ---------- appointment form ---------- */
.appt-form { max-width: 760px; }
.appt-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.appt-form legend, .appt-form label { display: block; font: 600 18px/1.3 var(--font-cond); color: var(--text); margin-bottom: 6px; padding: 0; }
.field { margin-bottom: 20px; flex: 1; min-width: 0; }
.field-row { display: flex; gap: 0 24px; flex-wrap: wrap; }
.field-row legend { width: 100%; }
.appt-form input, .appt-form textarea {
  width: 100%; font: 400 17px/1.4 var(--font-body); color: var(--text);
  padding: 10px 12px; border: 1px solid #b9c4ca; border-radius: 3px; background: #fff;
}
.appt-form input:focus, .appt-form textarea:focus { outline: 2px solid var(--sky); outline-offset: 0; border-color: var(--sky-dark); }
.appt-form [aria-invalid="true"] { border-color: #c0392b; background: #fff6f5; }
.appt-form small { display: block; font-size: 14px; font-style: italic; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.req { color: #c0392b; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.g-recaptcha { margin: 8px 0 16px; min-height: 78px; }
.form-status:empty { display: none; }
.form-status { padding: 12px 16px; border-radius: 3px; font-size: 16px; }
.form-status.is-error { background: #fdecea; color: #8a1f11; }
.form-status.is-ok { background: #e7f6ec; color: #1d5e33; }
.appt-form button[disabled] { opacity: .7; cursor: wait; }

/* ---------- footer ---------- */
.site-footer { background: var(--teal); color: var(--white); text-align: center; padding: 40px var(--gutter) 36px; }
.site-footer p { margin: 0 auto 12px; max-width: 760px; }
.site-footer a { color: rgba(255, 255, 255, .92); border-bottom: 1px solid rgba(255, 255, 255, .35); }
.site-footer a:hover { color: var(--white); text-decoration: none; border-bottom-color: var(--white); }
.site-footer .sep { margin: 0 6px; }
.site-footer .copyright { font-size: 15px; opacity: .8; margin-top: 24px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .header-bar { justify-content: center; }
  .bar-address { display: none; }
  .nav-list { gap: 6px 18px; }
  .nav-item > a { font-size: 16px; }
}

@media (max-width: 960px) {
  :root { --frame: 0px; }
  .logo img { width: 150px; }
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--white); border-top: 1px solid #e6ecef;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
    display: none; max-height: calc(100vh - 100px); overflow-y: auto;
  }
  .header-main { position: relative; }
  .nav-open .site-nav { display: block; }
  .nav-open .menu-toggle .menu-open { display: none; }
  .nav-open .menu-toggle .menu-close { display: inline; }
  .nav-list { flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px; }
  .nav-item { flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid #eef2f4; }
  .nav-item > a { padding: 14px 0; font-size: 18px; flex: 1; }
  .sub-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; background: none; color: var(--teal); font-size: 16px; cursor: pointer;
  }
  .sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
  .sub {
    position: static; flex-basis: 100%; min-width: 0; display: none;
    opacity: 1; visibility: visible; transform: none; padding: 4px 16px 12px; margin-bottom: 8px;
  }
  .has-sub:hover > .sub { display: none; }
  .has-sub.sub-open > .sub { display: block; }

  .with-sidebar { grid-template-columns: 1fr; gap: 24px; }
  .sidebar { border-top: 1px solid #e6ecef; padding-top: 16px; }

  .row { grid-template-columns: 1fr; }
  .col { grid-column: auto; }
  .service-grid { grid-template-columns: 1fr; gap: 56px; }
}

@media (max-width: 640px) {
  body { font-size: 17px; }
  h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  h3 { font-size: 21px; }
  .container { padding-top: 32px; padding-bottom: 40px; }
  .header-bar { padding: 10px 16px; gap: 10px; }
  .bar-links { justify-content: center; gap: 10px 18px; }
  .float-right, .float-left, .image.w-4, .image.w-5, .image.w-6, .video.w-6 { float: none; width: 100%; margin: 0 0 20px; }
  .icon-badge.float-left { float: left; width: 56px; margin: 0 14px 8px 0; }
  .hero { min-height: 560px; }
  .hero h2 { font-size: 30px; }
  .hero p { font-size: 17px; }
  .btn--large { font-size: 22px; padding: 18px 28px; }
  .doctor .doctor-photo { width: 130px; margin-right: 20px; }
  .credentials { gap: 32px; }
  .credentials img:last-child { width: 100%; max-width: 360px; }
  .gallery-track img { height: 340px; }
  .site-footer .sep { display: none; }
  .site-footer p a { display: inline-block; margin: 4px 0; }
}
