/* Pediatric Therapy Specialists — rebuild
   Brand colors carried over from existing site (green/blue/purple from logo),
   fonts carried over (Zilla Slab headings, Roboto body) for visual continuity. */

:root {
  --green: #5cb64a;
  --green-dark: #3d7931; /* was #388e3c: 4.12:1 on white, fails AA for the text it colors */
  --blue: #00579e;
  --purple: #7a2c97;
  /* --green (logo #5cb64a) is only 2.55:1 under white text. Same hue/saturation, darkened until it
     clears WCAG AA 4.5:1 on white (5.28), cream (5.02) and the green tint (4.51). Use for any green
     that carries text, icons, borders or state; keep --green for decoration only. */
  --green-a11y: #3d7931;
  --green-a11y-hover: #326328; /* 7.12:1 with white */
  --ink: #1f2a24;
  --ink-soft: #425047;
  --cream: #f7faf7;
  --white: #ffffff;
  --border: #e1e8e2;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(31, 42, 36, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 42, 36, 0.12);
  --max: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Roboto", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Zilla Slab", Georgia, serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--green-dark); }

p { margin: 0 0 1em; color: var(--ink-soft); }

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

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-block;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-family: "Roboto", sans-serif;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-primary {
  background: var(--green-a11y);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.35);
}
.btn-primary:hover { background: var(--green-a11y-hover); }

.btn-outline {
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green-a11y);
}
.btn-outline:hover { background: var(--green-a11y); color: var(--white); }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}
.logo img { height: 42px; width: auto; }
/* Hide the name where it doesn't fit: phones (wraps to 3 lines, pushed the hamburger off-screen) and narrow desktops (collided with the nav links). The logo's alt text carries the name. */
@media (max-width: 700px), (min-width: 881px) and (max-width: 1150px) { .logo-text { display: none; } }
@media (max-width: 380px) { .nav-cta .btn { padding: 0.6em 1em; white-space: nowrap; } }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--green-dark); text-decoration: none; }
/* Current page: underline persists regardless of hover, unlike plain :hover */
.nav-links a.nav-active,
.nav-links a.nav-active:hover {
  color: var(--green-dark);
  text-decoration: underline 3px var(--green-a11y);
  text-underline-offset: 8px;
}
.dropdown-menu li a.nav-active { background: var(--cream); text-underline-offset: 5px; }

.nav-links .dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  padding: 18px 8px 8px;
  min-width: 200px;
  list-style: none;
  margin: 0; /* the top 10px of padding bridges the hover gap; a margin there would break :hover */
}
/* Visible box starts below the 10px hover bridge */
.dropdown-menu::before {
  content: "";
  position: absolute;
  inset: 10px 0 0;
  z-index: -1;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border-radius: 10px;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 500;
}
.dropdown-menu li a:hover { background: var(--cream); text-decoration: none; }

.nav-cta { display: flex; align-items: center; gap: 14px; }

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 24px;
    gap: 14px;
    box-shadow: var(--shadow-lg);
  }
  .dropdown-menu { position: static; display: none; padding: 8px 8px 8px 12px; margin-top: 10px; }
  .dropdown-menu::before { display: none; }
  .dropdown.open .dropdown-menu { display: block; }
}

/* ===== Hero ===== */
.hero {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, var(--cream) 0%, var(--white) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
}
.hero-eyebrow {
  display: inline-block;
  background: rgba(76, 175, 80, 0.12);
  color: var(--green-dark);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hero-image-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-image-grid .circle-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.hero-image-grid .circle {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  width: 100%;
  height: auto;
}
@media (max-width: 600px) {
  .hero-image-grid { grid-template-columns: 1fr; }
  .hero-image-grid .tall { height: auto; }
  .hero-image-grid .circle-row { flex-direction: row; justify-content: center; gap: 10px; }
  .hero-image-grid .circle-row .circle { width: 72px; height: 72px; flex: 0 0 auto; }
}

/* ===== Banner (hiring etc.) ===== */
.banner {
  background: var(--green-a11y);
  color: var(--white);
  padding: 18px 0;
}
.banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.banner h2 { color: var(--white); margin: 0; font-size: 1.25rem; }
.banner .btn-outline { color: var(--white); border-color: var(--white); }
.banner .btn-outline:hover { background: var(--white); color: var(--green-dark); }

/* ===== Section ===== */
.section { padding: 64px 0; }
.section-alt { background: var(--cream); }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.service-card > i svg, .social-row svg { display: block; } /* inline SVG icons; display:block drops the inline baseline gap */
.service-card > i {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(76, 175, 80, 0.12);
  color: var(--green-dark);
  font-size: 28px;
  margin-bottom: 12px;
}
@media (max-width: 600px) {
  .service-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
  .service-card { padding: 16px; }
  .service-card h3 { font-size: 1rem; }
}

.insurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.insurance-grid li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}
.insurance-grid img {
  max-height: 44px;
  max-width: min(150px, 100%);
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.2s, opacity 0.2s;
}
.insurance-grid li:hover img { filter: none; opacity: 1; }
.insurance-grid li span { font-size: 0.8rem; color: var(--ink-soft); }

.cta-box {
  background: linear-gradient(135deg, var(--green-a11y) 0%, var(--blue) 55%, var(--purple) 100%);
  border-radius: 20px;
  padding: 48px;
  color: var(--white);
  text-align: center;
}
.cta-box h2, .cta-box p { color: var(--white); }
.cta-box .btn-primary { background: var(--white); color: var(--green-dark); box-shadow: none; }
.cta-box .btn-primary:hover { background: var(--cream); }

.testimonial {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.testimonial blockquote {
  font-family: "Zilla Slab", serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 16px;
}
.testimonial cite {
  font-weight: 700;
  color: var(--green-dark);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.step:last-child { border-bottom: none; }
.step::before {
  content: counter(step);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-a11y);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 880px) { .location-grid { grid-template-columns: 1fr; } }
.location-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.location-card iframe { width: 100%; height: 260px; border: 0; display: block; }
.location-body { padding: 24px; }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.95rem; }
.hours-table td { padding: 4px 0; color: var(--ink-soft); }
.hours-table td:last-child { text-align: right; font-weight: 600; color: var(--ink); }

.owner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 32px 0;
}
@media (max-width: 880px) { .owner-grid { grid-template-columns: 1fr; } }
.owner-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.owner-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center top; /* keep faces in frame on portrait photos */
  display: block;
}
.owner-body { padding: 24px; }
.owner-title {
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 2px 0 14px;
}
.owner-float {
  float: right;
  width: 260px;
  margin: 0 0 20px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 600px) { .owner-float { float: none; width: 100%; margin: 0 0 20px; } }

.logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.logo-strip img { height: 56px; width: auto; object-fit: contain; }
.logo-strip-lg { opacity: 1; gap: 24px 40px; }
.logo-strip-lg img { height: 220px; max-width: min(100%, 280px); mix-blend-mode: multiply; } /* multiply hides the award JPEGs' white backgrounds */
@media (max-width: 600px) { .logo-strip-lg { gap: 20px; } .logo-strip-lg img { height: 130px; max-width: 150px; } }

/* ===== Footer ===== */
.site-footer {
  background: var(--ink);
  color: #cfe0d2;
  padding: 48px 0 28px;
  margin-top: 48px;
}
.site-footer a { color: #cfe0d2; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: var(--white); }
/* .hours-table's default colors are for light cards (Contact); its time column was var(--ink), the same as this background */
.site-footer .hours-table td { color: #9fb3a3; }
.site-footer .hours-table td:last-child { color: #cfe0d2; }
.social-row { display: flex; gap: 14px; }
.social-row a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.social-row a:hover { background: rgba(255,255,255,0.18); text-decoration: none; transform: translateY(-2px); }

/* Variant for use on light backgrounds (e.g. the Home "Connect With Us" section) */
.social-row-light a {
  background: var(--white);
  color: var(--green-dark);
  box-shadow: var(--shadow);
}
.social-row-light a:hover { background: var(--green-a11y); color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  color: #9fb3a3;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-date { font-size: 0.8rem; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: 12px; }
.blog-card .btn-outline { margin-top: auto; align-self: flex-start; padding: 0.5em 1.2em; font-size: 0.85rem; }
.category-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.category-pill {
  background: var(--white); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font: 600 0.82rem "Roboto", system-ui, sans-serif; color: var(--ink-soft);
  cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.category-pill:hover { background: rgba(76, 175, 80, 0.12); border-color: var(--green-a11y); color: var(--green-dark); }
.category-pill:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* darker than --green-dark so white 13px text clears WCAG AA (5.1:1) */
.category-pill.is-active { background: #2e7d32; border-color: #2e7d32; color: var(--white); }
.category-pill.is-active:hover { background: #1b5e20; border-color: #1b5e20; color: var(--white); }
.blog-card[hidden] { display: none; }
.blog-empty { text-align: center; color: var(--ink-soft); padding: 48px 0; margin: 0; }
.post-body { max-width: 720px; margin: 0 auto; min-width: 0; }
.post-body p { color: var(--ink); }
.post-body h3 { margin-top: 1.6em; }
.post-meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 24px; }
.post-content img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin: 8px 0 28px; }

/* Blog card thumbnails */
.blog-card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.blog-card-img-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--cream); color: var(--green); font-family: "Zilla Slab", serif; font-weight: 700; font-size: 2rem;
}

/* Post page: article + right sidebar (categories, recent posts) */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.post-sidebar { border-left: 1px solid var(--border); padding-left: 32px; position: sticky; top: 100px; }
.post-sidebar h4 { margin: 0 0 12px; }
.post-sidebar ul { list-style: none; margin: 0 0 32px; padding: 0; }
.sidebar-categories li { padding: 6px 12px; border-radius: 8px; color: var(--ink-soft); font-size: 0.92rem; }
.sidebar-categories li.current { background: var(--cream); color: var(--green-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--green-a11y); }
.recent-posts li + li { margin-top: 16px; }
.recent-posts a { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; color: var(--ink); }
.recent-posts a:hover { text-decoration: none; color: var(--green-dark); }
.recent-posts img, .recent-noimg { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--cream); display: block; }
.recent-title { display: block; font-weight: 600; font-size: 0.9rem; line-height: 1.35; }
.recent-date { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
@media (max-width: 880px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { border-left: 0; padding-left: 0; border-top: 1px solid var(--border); padding-top: 32px; position: static; }
}

/* Scroll reveal (progressive enhancement — see js/main.js) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Click-to-load chat bubble (every page; injected by main.js) */
.chat-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.chat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 14px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--green-a11y);
  color: var(--white);
  font: 600 0.95rem "Roboto", system-ui, sans-serif;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.chat-toggle svg { width: 1.4rem; height: 1.4rem; }
.chat-close svg { width: 20px; height: 20px; display: block; margin: auto; }
.chat-toggle:hover { background: var(--green-a11y-hover); transform: translateY(-1px); }
.chat-toggle:focus-visible, .chat-close:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.chat-close:focus-visible { outline-color: var(--white); } /* --blue is 1.79:1 on the --green-dark header; white is 5.28:1 */
.chat-bubble.open .chat-toggle { display: none; }
.chat-panel {
  width: 360px;
  height: 520px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }
.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 18px;
  background: var(--green-dark);
  color: var(--white);
  font-family: "Zilla Slab", serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.chat-close {
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}
.hero-eyebrow--contact {
  white-space: nowrap;
  letter-spacing: normal;
  text-transform: none;
  font-size: clamp(0.62rem, 2.6vw, 0.8rem);
  max-width: 100%;
}
.hero-eyebrow--contact a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.hero-eyebrow--contact a:hover { color: var(--green-a11y); }
.chat-close:hover { background: rgba(255, 255, 255, 0.15); }
.chat-panel-body { flex: 1; }
.chat-panel-body iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 600px) {
  .chat-bubble { right: 12px; bottom: 12px; left: 12px; }
  .chat-panel { width: 100%; height: calc(100vh - 24px); height: calc(100dvh - 24px); }
}
