/* =============================================================
   JEROME CARTER MD — MAIN STYLESHEET
   Core Web Vitals optimized: no unused rules, no CLS sources,
   explicit sizes everywhere, font-display:swap, no layout shifts
   ============================================================= */

/* ---- 1. CSS CUSTOM PROPERTIES (Design Tokens) -------------- */
:root {
  --color-navy:       #062f65;
  --color-navy-dark:  #031e42;
  --color-navy-90:    rgba(6, 47, 101, 0.90);
  --color-navy-70:    rgba(6, 47, 101, 0.70);
  --color-white:      #ffffff;
  --color-off-white:  #f7f8fa;
  --color-text:       #222222;
  --color-text-mid:   #444444;
  --color-text-light: #666666;
  --color-border:     #e2e4e8;
  --color-link:       #062f65;

  --font-primary: 'Montserrat', Arial, sans-serif;

  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;

  --fs-xs:   0.75rem;   /* 12px */
  --fs-sm:   0.875rem;  /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md:   1.0625rem; /* 17px */
  --fs-lg:   1.125rem;  /* 18px */
  --fs-xl:   1.25rem;   /* 20px */
  --fs-2xl:  1.5rem;    /* 24px */
  --fs-3xl:  1.875rem;  /* 30px */
  --fs-4xl:  2.25rem;   /* 36px */
  --fs-5xl:  2.75rem;   /* 44px */

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  --radius-sm: 3px;
  --radius:    5px;
  --radius-lg: 8px;

  --transition: 0.2s ease;

  --container-max: 1200px;
  --container-pad: clamp(1rem, 4vw, 2rem);

  --header-top-h: 44px;
  --header-nav-h: 68px;
  --header-total-h: calc(var(--header-top-h) + var(--header-nav-h));
}

/* ---- 2. RESET / BASE ---------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-primary);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
  /* Prevent CLS from scrollbar appearing */
  scrollbar-gutter: stable;
}

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

/* Prevent CLS from images without dimensions */
img {
  height: auto;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover { opacity: 0.85; }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--color-navy);
}

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* ---- 3. LAYOUT UTILITIES ------------------------------------ */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container--narrow {
  max-width: 860px;
}

.section-pad {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-pad--sm {
  padding-top: var(--space-10);
  padding-bottom: var(--space-10);
}

.text-center { text-align: center; }
.text-white  { color: var(--color-white); }

/* ---- 4. TYPOGRAPHY ------------------------------------------ */
.section-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
}

.section-title {
  font-size: clamp(var(--fs-3xl), 4vw, var(--fs-4xl));
  font-weight: var(--fw-bold);
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.section-title--white {
  color: var(--color-white);
}

.section-intro {
  font-size: var(--fs-lg);
  color: var(--color-text-mid);
  max-width: 640px;
  line-height: 1.75;
}

/* ---- 5. BUTTONS --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75em 1.75em;
  font-family: var(--font-primary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  line-height: 1;
  /* Prevent CLS from button reflow */
  white-space: nowrap;
}

.btn--navy {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

.btn--navy:hover {
  background-color: var(--color-navy-dark);
  border-color: var(--color-navy-dark);
  color: var(--color-white);
  opacity: 1;
}

.btn--outline-white {
  background-color: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn--outline-white:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
  opacity: 1;
}

.btn--lg {
  font-size: var(--fs-base);
  padding: 0.875em 2.25em;
}

/* ---- 6. TOP BAR -------------------------------------------- */
.site-topbar {
  background-color: var(--color-navy);
  color: var(--color-white);
  height: var(--header-top-h);
  display: flex;
  align-items: center;
  /* CLS prevention: fixed height declared */
}

.site-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
}

.site-topbar__address,
.site-topbar__phone {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-white);
  text-decoration: none;
}

.site-topbar__address svg,
.site-topbar__phone svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
}

.site-topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-topbar__phone {
  font-weight: var(--fw-semibold);
}

.site-topbar__phone-label {
  font-size: var(--fs-xs);
  opacity: 0.8;
  margin-right: var(--space-1);
}

.site-topbar__stars {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--color-white);
}

.site-topbar__stars-label {
  font-weight: var(--fw-semibold);
  letter-spacing: 0.05em;
}

.star-links {
  display: flex;
  gap: 2px;
}

.star-links a {
  color: #ffd700;
  font-size: 14px;
  line-height: 1;
}

.star-links a:hover { opacity: 0.8; }

/* ---- 7. SITE HEADER & NAVIGATION --------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--color-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  /* CLS prevention: set explicit height context */
}

.site-header__nav {
  height: var(--header-nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

/* Logo — explicit size reservation prevents CLS */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
  /* Reserve space: prevents layout shift when logo image loads */
  min-width: 200px;
}

.site-logo__img {
  width: auto;
  height: 52px;
  /* width/height set inline in PHP template for LCP */
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-logo__name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-logo__tagline {
  font-size: 10px;
  color: var(--color-text-mid);
  line-height: 1.3;
}

/* Primary Navigation */
.primary-nav {
  display: flex;
  align-items: center;
}

.primary-nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.primary-nav__menu li {
  position: relative;
}

.primary-nav__menu > li > a {
  display: block;
  padding: var(--space-3) var(--space-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
}

.primary-nav__menu > li > a:hover,
.primary-nav__menu > li.current-menu-item > a,
.primary-nav__menu > li.current-menu-ancestor > a {
  color: var(--color-navy-dark);
  opacity: 1;
}

/* Dropdown */
.primary-nav__menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background-color: var(--color-white);
  border-top: 3px solid var(--color-navy);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 100;
}

.primary-nav__menu li:hover > .sub-menu,
.primary-nav__menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-nav__menu .sub-menu a {
  display: block;
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-sm);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition), color var(--transition);
}

.primary-nav__menu .sub-menu li:last-child a {
  border-bottom: none;
}

.primary-nav__menu .sub-menu a:hover {
  background-color: var(--color-off-white);
  color: var(--color-navy);
  opacity: 1;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  /* Prevent CLS: set explicit size */
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- 8. FLOATING SOCIAL SIDEBAR ----------------------------- */
.social-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-sidebar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--color-navy);
  color: var(--color-white);
  text-decoration: none;
  transition: background-color var(--transition);
}

.social-sidebar__link:hover {
  background-color: var(--color-navy-dark);
  opacity: 1;
  color: var(--color-white);
}

.social-sidebar__link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---- 9. PAGE BANNER (inner pages) --------------------------- */
.page-banner {
  background-color: var(--color-navy);
  padding: var(--space-8) 0;
  /* Explicit height prevents CLS */
}

.page-banner__title {
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl));
  font-weight: var(--fw-bold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

.page-banner--with-image {
  position: relative;
  background-color: var(--color-navy);
  min-height: 160px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.page-banner__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.25;
}

.page-banner__content {
  position: relative;
  z-index: 1;
}

/* ---- 10. HERO SECTION --------------------------------------- */
.hero {
  position: relative;
  min-height: min(620px, 85vh);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-navy); /* fallback while image loads */
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  /* LCP candidate — do NOT lazy-load */
}

/* Left overlay for text readability */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(6, 47, 101, 0.85) 0%,
    rgba(6, 47, 101, 0.65) 40%,
    rgba(6, 47, 101, 0.15) 70%,
    transparent 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: var(--space-24) 0;
}

.hero__title {
  font-size: clamp(var(--fs-3xl), 5vw, var(--fs-5xl));
  font-weight: var(--fw-bold);
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: var(--space-5);
}

.hero__subtitle {
  font-size: var(--fs-lg);
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--space-8);
  line-height: 1.65;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ---- 11. APPOINTMENT CTA BANNER ----------------------------- */
.cta-banner {
  background-color: var(--color-navy);
  padding: var(--space-8) 0;
}

.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.cta-banner__text {}

.cta-banner__title {
  font-size: clamp(var(--fs-xl), 3vw, var(--fs-3xl));
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.cta-banner__sub {
  font-size: var(--fs-base);
  color: rgba(255,255,255,0.85);
  margin-bottom: 0;
}

/* ---- 12. WELCOME / ABOUT SPLIT ----------------------------- */
.welcome-split {
  background-color: var(--color-white);
}

.welcome-split__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 480px;
}

.welcome-split__image-col {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.welcome-split__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-split__image-cta {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  white-space: nowrap;
}

.welcome-split__text-col {
  padding: var(--space-12) var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-split__text-col .section-title {
  margin-bottom: var(--space-6);
}

.welcome-split__text-col p {
  font-size: var(--fs-base);
  color: var(--color-text-mid);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

/* ---- 13. SERVICES GRID ------------------------------------- */
.services-grid {
  background-color: var(--color-off-white);
}

.services-grid__header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.services-grid__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  /* CLS: set min-height to reserve space */
}

.service-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-card:hover .service-card__bg {
  transform: scale(1.04);
}

.service-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--color-navy) 0%, var(--color-navy-70) 40%, transparent 75%);
}

.service-card__content {
  position: relative;
  z-index: 1;
  padding: var(--space-5);
  width: 100%;
}

.service-card__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin-bottom: var(--space-2);
}

.service-card__desc {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Placeholder card bg when no image */
.service-card--no-img {
  background-color: var(--color-navy);
}

/* ---- 14. INSURANCE SECTION ---------------------------------- */
.insurance-section {
  background-color: var(--color-white);
}

.insurance-section__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.insurance-section__text {}

.insurance-section__text .section-title {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.insurance-section__logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  align-items: center;
}

.insurance-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-height: 60px;
  /* Reserve space to prevent CLS */
}

.insurance-logo img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

/* Text-only insurance fallback */
.insurance-logo--text {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  text-align: center;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---- 15. TESTIMONIALS -------------------------------------- */
.testimonials {
  position: relative;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 520px;
}

.testimonials__image-col {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.testimonials__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonials__image-overlay {
  position: absolute;
  inset: 0;
  background-color: var(--color-navy-70);
}

.testimonials__content-col {
  background-color: var(--color-navy);
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.testimonials__heading {
  font-size: clamp(var(--fs-2xl), 3vw, var(--fs-4xl));
  font-weight: var(--fw-bold);
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: var(--space-8);
}

.testimonials__heading span {
  display: block;
}

/* Testimonial slider */
.testimonial-slider {
  position: relative;
  /* CLS: set min-height so swapping slides doesn't shift layout */
  min-height: 220px;
}

.testimonial-item {
  display: none;
  animation: fadeInSlide 0.4s ease;
}

.testimonial-item.is-active {
  display: block;
}

@keyframes fadeInSlide {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.testimonial-item__text {
  font-size: var(--fs-base);
  color: rgba(255,255,255,0.9);
  line-height: 1.8;
  margin-bottom: var(--space-4);
  font-style: italic;
}

.testimonial-item__hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-bottom: var(--space-4);
}

.testimonial-item__author {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin-bottom: 0;
}

.testimonial-dots {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  background-color: transparent;
  cursor: pointer;
  padding: 0;
  transition: background-color var(--transition), border-color var(--transition);
}

.testimonial-dot.is-active {
  background-color: var(--color-white);
  border-color: var(--color-white);
}

/* ---- 16. FOOTER -------------------------------------------- */
.site-footer {
  position: relative;
  background-color: var(--color-navy);
  overflow: hidden;
}

.site-footer__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
}

.site-footer__main {
  position: relative;
  z-index: 1;
  padding: var(--space-16) 0 var(--space-12);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: var(--space-10);
}

.footer-col__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid rgba(255,255,255,0.2);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.85);
}

.footer-contact-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: currentColor;
  margin-top: 2px;
  opacity: 0.7;
}

.footer-contact-item a {
  color: rgba(255,255,255,0.85);
}

.footer-contact-item a:hover {
  color: var(--color-white);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background-color: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--color-white);
  transition: background-color var(--transition);
}

.footer-social__link:hover {
  background-color: rgba(255,255,255,0.2);
  opacity: 1;
  color: var(--color-white);
}

.footer-social__link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

/* Hours table */
.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table tr:not(:last-child) td {
  padding-bottom: var(--space-2);
}

.hours-table td {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.85);
  vertical-align: top;
}

.hours-table td:first-child {
  font-weight: var(--fw-semibold);
  padding-right: var(--space-4);
  white-space: nowrap;
}

.hours-note {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-3);
  margin-bottom: 0;
}

/* Footer Contact Form */
.footer-form {}

.footer-form .form-group {
  margin-bottom: var(--space-3);
}

.footer-form label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}

.footer-form input,
.footer-form textarea {
  width: 100%;
  padding: 0.6em 0.9em;
  font-size: var(--fs-sm);
  background-color: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: var(--color-white);
  transition: border-color var(--transition), background-color var(--transition);
  /* CLS: set explicit height */
  min-height: 38px;
}

.footer-form textarea {
  min-height: 90px;
  resize: vertical;
}

.footer-form input::placeholder,
.footer-form textarea::placeholder {
  color: rgba(255,255,255,0.4);
}

.footer-form input:focus,
.footer-form textarea:focus {
  outline: none;
  border-color: rgba(255,255,255,0.5);
  background-color: rgba(255,255,255,0.12);
}

.footer-form .form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.footer-form .form-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-form .form-consent p {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-bottom: 0;
}

.footer-form .btn {
  width: 100%;
}

/* Footer bottom bar */
.site-footer__bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: var(--space-5) 0;
}

.site-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-footer__copyright {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
  margin-bottom: 0;
}

.site-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.site-footer__legal-links a {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.site-footer__legal-links a:hover {
  color: var(--color-white);
}

/* ---- 17. INNER PAGE LAYOUTS -------------------------------- */

/* Content + Sidebar wrapper */
.content-area {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}

.content-area--full {
  /* No sidebar */
}

/* Two-column page layout */
.page-layout-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.page-layout-split__image-col {
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.page-layout-split__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-layout-split__text-col {
  padding: var(--space-12);
}

/* Services conditions list */
.conditions-list {
  columns: 2;
  column-gap: var(--space-6);
  margin-top: var(--space-5);
}

.conditions-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-base);
  color: var(--color-text-mid);
  margin-bottom: var(--space-3);
  break-inside: avoid;
}

.conditions-list li::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background-color: var(--color-navy);
  border-radius: 3px;
  /* checkmark via clip-path or background-image */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M6.5 11.5L3 8l1.4-1.4 2.1 2.1 4.1-4.1L12 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}

.conditions-list li a {
  color: var(--color-text-mid);
  text-decoration: none;
}

.conditions-list li a:hover {
  color: var(--color-navy);
}

/* ---- 18. CONTACT PAGE -------------------------------------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

.contact-info-block {
  margin-bottom: var(--space-6);
}

.contact-info-block__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--fs-base);
  color: var(--color-text-mid);
}

.contact-info-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: var(--color-navy);
  margin-top: 2px;
}

.contact-info-item a {
  color: var(--color-text-mid);
}

.contact-info-item a:hover {
  color: var(--color-navy);
}

/* Contact form */
.contact-form {}

.contact-form .form-group {
  margin-bottom: var(--space-4);
}

.contact-form label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  margin-bottom: var(--space-1);
}

.contact-form .required-star {
  color: #c0392b;
  margin-left: 2px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.65em 0.9em;
  font-size: var(--fs-base);
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition);
  /* CLS: explicit height */
  min-height: 42px;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-navy);
}

.contact-form .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.contact-form .form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.contact-form .form-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-form .form-consent label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: 0;
}

.form-disclaimer {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  background-color: var(--color-off-white);
  border-left: 3px solid var(--color-border);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-6);
  line-height: 1.6;
}

/* Map container — explicit height prevents CLS */
.map-container {
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: var(--radius);
  /* Reserve space before map loads */
  background-color: var(--color-off-white);
  border: 1px solid var(--color-border);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Hours block in contact */
.hours-block {
  background-color: var(--color-off-white);
  border-left: 4px solid var(--color-navy);
  padding: var(--space-5) var(--space-6);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: var(--space-6);
}

.hours-block__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
}

/* ---- 19. APPOINTMENTS PAGE --------------------------------- */
.appt-layout {
  max-width: 800px;
  margin: 0 auto;
}

.appt-intro {
  margin-bottom: var(--space-8);
}

/* ---- 20. TESTIMONIALS PAGE --------------------------------- */
.testimonials-grid-page {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.testimonial-card {
  background-color: var(--color-off-white);
  border-left: 4px solid var(--color-navy);
  padding: var(--space-6);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.testimonial-card__text {
  font-size: var(--fs-base);
  color: var(--color-text-mid);
  line-height: 1.8;
  font-style: italic;
  margin-bottom: var(--space-4);
}

.testimonial-card__author {
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  margin-bottom: 0;
}

/* ---- 21. BLOG / ARCHIVE ------------------------------------ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow var(--transition);
}

.post-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  opacity: 1;
}

/* CLS: reserve space for post thumbnail */
.post-card__thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--color-off-white);
  overflow: hidden;
}

.post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__meta {
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  margin-bottom: var(--space-2);
}

.post-card__title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--color-navy);
  line-height: 1.3;
  margin-bottom: var(--space-3);
}

.post-card__excerpt {
  font-size: var(--fs-sm);
  color: var(--color-text-mid);
  line-height: 1.7;
  flex: 1;
  margin-bottom: var(--space-4);
}

.post-card__link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: auto;
}

/* Single post */
.single-post-content {
  max-width: 780px;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.single-post-content p {
  font-size: var(--fs-md);
  color: var(--color-text-mid);
  line-height: 1.85;
}

.single-post-content ul,
.single-post-content ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
  list-style: initial;
}

.single-post-content li {
  font-size: var(--fs-md);
  color: var(--color-text-mid);
  line-height: 1.8;
  margin-bottom: var(--space-2);
}

/* ---- 22. PAGINATION ---------------------------------------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition);
}

.pagination .current,
.pagination a:hover {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
  opacity: 1;
}

/* ---- 23. ACCESSIBILITY ------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -1;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  z-index: 9999;
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- 24. RESPONSIVE ---------------------------------------- */
@media (max-width: 1024px) {
  .services-grid__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .welcome-split__text-col {
    padding: var(--space-8);
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__grid > :last-child {
    grid-column: 1 / -1;
  }

  .testimonials__content-col {
    padding: var(--space-8);
  }
}

@media (max-width: 768px) {
  :root {
    --header-top-h: auto;
    --header-nav-h: 60px;
    --header-total-h: auto;
  }

  .site-topbar {
    height: auto;
    padding: var(--space-2) 0;
  }

  .site-topbar__address {
    display: none;
  }

  .site-topbar__stars {
    display: none;
  }

  .primary-nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .primary-nav__menu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) 0;
  }

  .primary-nav__menu > li > a {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-navy);
  }

  .primary-nav__menu .sub-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid var(--color-navy);
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    margin-left: var(--space-6);
  }

  .primary-nav__menu li.is-open > .sub-menu {
    display: block;
  }

  .nav-toggle {
    display: flex;
  }

  .hero__content {
    padding: var(--space-16) 0;
  }

  .hero__title {
    font-size: var(--fs-3xl);
  }

  .cta-banner__inner {
    flex-direction: column;
    text-align: center;
  }

  .welcome-split__grid {
    grid-template-columns: 1fr;
  }

  .welcome-split__image-col {
    min-height: 280px;
  }

  .welcome-split__text-col {
    padding: var(--space-8) var(--space-6);
  }

  .services-grid__grid {
    grid-template-columns: 1fr;
  }

  .insurance-section__grid {
    grid-template-columns: 1fr;
  }

  .insurance-section__logos {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
  }

  .testimonials__image-col {
    min-height: 200px;
  }

  .testimonials__content-col {
    padding: var(--space-8) var(--space-6);
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .page-layout-split {
    grid-template-columns: 1fr;
  }

  .page-layout-split__image-col {
    min-height: 240px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-form .form-row-2 {
    grid-template-columns: 1fr;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .testimonials-grid-page {
    grid-template-columns: 1fr;
  }

  .conditions-list {
    columns: 1;
  }

  .social-sidebar {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-footer__bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .site-footer__legal-links {
    justify-content: center;
  }
}

/* ---- 25. PRINT -------------------------------------------- */
@media print {
  .site-header, .site-footer, .social-sidebar, .cta-banner { display: none; }
  body { font-size: 12pt; color: #000; }
}

/* ---- 26. WP CORE GUTENBERG OVERRIDES ---------------------- */
.wp-block-button__link {
  background-color: var(--color-navy) !important;
  color: var(--color-white) !important;
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-primary) !important;
  font-weight: var(--fw-semibold) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

.has-navy-background-color { background-color: var(--color-navy) !important; }
.has-navy-color { color: var(--color-navy) !important; }

.wp-block-image img {
  height: auto; /* prevent CLS */
}

/* Entry content spacing */
.entry-content > * + * {
  margin-top: var(--space-4);
}

.entry-content h2 { font-size: clamp(var(--fs-2xl), 3vw, var(--fs-3xl)); }
.entry-content h3 { font-size: clamp(var(--fs-xl), 2.5vw, var(--fs-2xl)); }
.entry-content h4 { font-size: var(--fs-xl); }

.entry-content ul,
.entry-content ol {
  padding-left: var(--space-6);
  list-style: initial;
}

.entry-content ul li,
.entry-content ol li {
  margin-bottom: var(--space-2);
  line-height: 1.75;
}
