/* =========================================================================
   Gallardo Chiropractic — stylesheet
   Hand-written, no framework build step. Mobile-first.
   Palette (deep navy + warm gold) is a PLACEHOLDER pending a real brand kit.
   Round 2: premium polish pass — typography rhythm, photo treatment,
   card/button craft, hero variation, tasteful micro-interactions.
   ========================================================================= */

:root {
  /* --- Placeholder brand palette: deep navy + warm gold accent --- */
  --c-primary:        #13314F; /* deep navy — trust, premium */
  --c-primary-dark:   #0A2038;
  --c-primary-tint:   #E8ECF2;
  --c-secondary:      #0F3B36; /* deep teal — grounding */
  --c-secondary-dark: #0A2B27;
  --c-accent:         #C79A3C; /* warm gold — used sparingly */
  --c-accent-dark:    #A67D25;
  --c-accent-on-dark: #E4C77E; /* lighter gold for text on dark fields (AA) */
  --c-eyebrow: #7A5B14; /* dark bronze-gold — AA on light backgrounds */

  --c-bg:      #FAF9F6; /* soft warm-neutral off-white */
  --c-bg-rgb:  250, 249, 246;
  --c-surface: #FFFFFF;
  --c-surface-alt: #F1F0EA;
  --c-ink:     #1F2430; /* near-black, cool undertone */
  --c-muted:   #5C6472;
  --c-line:    #E3E1D9;
  --c-line-strong: #D3D0C4;

  --c-focus:   #13314F;

  --font-display: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
  --maxw-prose: 68ch;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Cool, navy-tinted elevation system */
  --shadow-xs: 0 1px 2px rgba(19, 49, 79, .06);
  --shadow-sm: 0 1px 2px rgba(19, 49, 79, .06), 0 3px 10px -4px rgba(19, 49, 79, .12);
  --shadow-md: 0 10px 30px -10px rgba(19, 49, 79, .22);
  --shadow-lg: 0 24px 60px -20px rgba(19, 49, 79, .32);

  --ring: 0 0 0 3px rgba(19, 49, 79, .18);

  /* Spacing rhythm */
  --space-section: clamp(3rem, 7vw, 5.75rem);
  --flow: 1.1rem;

  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem; /* sticky-header offset for #anchor jumps */
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-bg);
  overflow-x: clip;
  line-height: 1.62;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--c-secondary); text-underline-offset: 2px; transition: color .15s var(--ease); }
a:hover { color: var(--c-primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.14;
  margin: 0 0 .5em;
  color: var(--c-ink);
  font-weight: 700;
  letter-spacing: -0.014em;
}
h2, h3, h4 { text-wrap: balance; }
h1 { font-size: clamp(1.95rem, 1.3rem + 2.9vw, 3.1rem); text-wrap: pretty; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.3rem); }
h3 { font-size: clamp(1.18rem, 1.05rem + .6vw, 1.4rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
p { text-wrap: pretty; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin: .4rem 0; }
strong { font-weight: 650; }
:where(h1, h2, h3)[id] { scroll-margin-top: 5.5rem; }
@media (min-width: 900px) {
  html { scroll-padding-top: 9.5rem; }
  :where(h1, h2, h3)[id] { scroll-margin-top: 9.5rem; }
}

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-secondary);
  color: #fff;
  padding: .75rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; top: 0; color: #fff; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}
.section { padding-block: var(--space-section); }
.section--tint { background: var(--c-surface-alt); }
.section--dark {
  background:
    radial-gradient(700px 300px at 100% 0, rgba(199, 154, 60, .14), transparent 60%),
    var(--c-secondary);
  color: #E8EFED;
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--c-accent-on-dark); }
.section--dark .eyebrow { color: var(--c-accent-on-dark); }

.lead {
  font-size: clamp(1.08rem, 1rem + .4vw, 1.22rem);
  color: var(--c-muted);
  max-width: 58ch;
  line-height: 1.55;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--c-eyebrow);
  font-family: var(--font-display);
  margin: 0 0 .9rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 2px;
  background: currentColor;
  flex: none;
  opacity: .8;
}
.text-center { text-align: center; }
.text-center .eyebrow { justify-content: center; }
.measure { max-width: var(--maxw-prose); }
.mx-auto { margin-inline: auto; }

.grid { display: grid; gap: 1.35rem; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
  .grid { gap: 1.6rem; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--c-primary);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  padding: .95rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  background: var(--btn-bg);
  color: var(--btn-fg);
  transition: transform .12s var(--ease), background-color .16s var(--ease),
              box-shadow .16s var(--ease), border-color .16s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn--primary { --btn-bg: var(--c-primary); box-shadow: var(--shadow-sm); }
.btn--primary:hover { --btn-bg: var(--c-primary-dark); }
.btn--secondary { --btn-bg: var(--c-secondary); }
.btn--secondary:hover { --btn-bg: var(--c-secondary-dark); }
.btn--ghost {
  background: transparent;
  border-color: var(--c-line-strong);
  color: var(--c-primary);
}
.btn--ghost:hover {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.btn--lg { padding: 1.1rem 1.85rem; font-size: 1.06rem; }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(var(--c-bg-rgb), .82);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 6px 24px -18px rgba(19, 49, 79, .5);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: .7rem;
}
@media (min-width: 900px) {
  /* let the nav breathe past the 1120 content width */
  .site-header .container.site-header__bar { max-width: 1240px; }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--c-ink);
  text-decoration: none;
  line-height: 1.1;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #fff;
  flex: none;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(19, 49, 79, .08), var(--shadow-xs);
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand small { display: block; font-weight: 500; font-size: .72rem; color: var(--c-muted); letter-spacing: .01em; white-space: nowrap; }
@media (max-width: 400px) {
  .brand { font-size: 1rem; }
  .brand small { display: none; }
}

.header-actions { display: flex; align-items: center; gap: .55rem; }

.lang-switch {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .88rem;
  padding: .5rem .85rem;
  border: 1.5px solid var(--c-line-strong);
  border-radius: var(--radius-pill);
  background: var(--c-surface);
  color: var(--c-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.lang-switch:hover { border-color: var(--c-primary); background: var(--c-primary-tint); color: var(--c-primary); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--c-surface);
  border: 1.5px solid var(--c-line-strong);
  border-radius: var(--radius-pill);
  padding: .55rem .9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  color: var(--c-ink);
}
.nav-toggle__bars { width: 18px; height: 2px; background: currentColor; position: relative; display: block; border-radius: 2px; }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s var(--ease), top .2s var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: block;
  padding: .85rem .25rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line);
}
.primary-nav a[aria-current="page"] { color: var(--c-primary); }

.header-cta { display: none; }
.header-phone {
  display: none;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-primary);
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { text-decoration: underline; }
@media (min-width: 900px) { .header-phone { display: inline-flex; } }

@media (max-width: 899px) {
  .site-header__bar { flex-wrap: wrap; }
  .primary-nav { display: none; order: 5; flex-basis: 100%; width: 100%; padding-bottom: 1rem; }
  .primary-nav.is-open { display: block; animation: navSlide .22s var(--ease); }
  .primary-nav > ul { display: block; }
  .primary-nav .btn { margin-top: .85rem; width: 100%; }
}
@keyframes navSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-header__bar { flex-wrap: wrap; }
  .primary-nav { order: 3; flex-basis: 100%; }
  .primary-nav > ul {
    display: flex;
    align-items: center;
    gap: .1rem;
    flex-wrap: wrap;
    row-gap: .35rem;
    margin-top: .15rem;
    font-size: .95rem;
  }
  .primary-nav > ul > li { flex: none; }
  .primary-nav a,
  .nav-dropdown__btn {
    border-bottom: 0;
    padding: .5rem .62rem;
    border-radius: 8px;
    position: relative;
    white-space: nowrap;
    transition: background-color .15s var(--ease), color .15s var(--ease);
  }
  .primary-nav > ul > li > a:hover { background: var(--c-primary-tint); color: var(--c-primary); }
  .primary-nav > ul > li > a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: .62rem; right: .62rem; bottom: .12rem;
    height: 2px;
    background: var(--c-accent);
    border-radius: 2px;
  }
  .primary-nav .btn { display: none; }
  .header-cta { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background:
    radial-gradient(760px 380px at 82% -12%, rgba(199, 154, 60, .16), transparent 60%),
    radial-gradient(680px 420px at 0% 0%, rgba(19, 49, 79, .07), transparent 55%),
    linear-gradient(180deg, var(--c-primary-tint), var(--c-bg) 78%);
  padding-block: clamp(2.75rem, 7vw, 5.25rem);
  border-bottom: 1px solid var(--c-line);
}
.hero__grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.08fr .92fr; gap: 3rem; } }
.hero h1 { margin-bottom: .35em; }
.hero .lead { color: var(--c-ink); opacity: .82; max-width: 46ch; }
.hero__badges { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.4rem 0 1.6rem; padding: 0; list-style: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--radius-pill);
  padding: .42rem .9rem .42rem .8rem;
  font-size: .84rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--c-primary);
  box-shadow: var(--shadow-xs);
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  flex: none;
}

/* Hero photo — consistent "matted portrait" treatment for the real headshots */
.hero__media {
  position: relative;
  display: flex;
  justify-content: center;
}
@media (min-width: 900px) { .hero__media { justify-content: flex-end; } }
.hero__media::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(78%, 320px);
  aspect-ratio: 1;
  right: -6%;
  top: -8%;
  background: radial-gradient(circle at 30% 30%, rgba(199, 154, 60, .35), transparent 70%);
  filter: blur(6px);
}
.hero-photo {
  width: 100%;
  max-width: clamp(240px, 40vw, 400px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  background: var(--c-surface-alt);
  padding: 8px;                       /* white mat */
  box-shadow:
    inset 0 0 0 1px rgba(19, 49, 79, .06),
    var(--shadow-lg);
  filter: saturate(.94) contrast(1.03);
}

/* Paired doctor portraits (homepage "meet the doctors") */
.doctor-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}
@media (min-width: 900px) { .doctor-stack { margin-inline: auto 0; } }
.doctor-stack figure { margin: 0; }
.doctor-stack .hero-photo { max-width: 100%; box-shadow: inset 0 0 0 1px rgba(19, 49, 79, .06), var(--shadow-md); }
.doctor-stack figure:nth-child(2) .hero-photo { margin-top: clamp(.75rem, 3vw, 1.75rem); }
.doctor-stack figcaption {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  color: var(--c-muted);
  margin-top: .55rem;
  text-align: center;
  line-height: 1.3;
}

/* Feature hero — used on the primary conversion page (auto accident) */
.hero--feature {
  background:
    radial-gradient(820px 460px at 88% -20%, rgba(199, 154, 60, .22), transparent 58%),
    linear-gradient(180deg, #13314F, #102a44);
  color: #E7EEF6;
  border-bottom-color: rgba(255, 255, 255, .1);
}
.hero--feature h1,
.hero--feature h2,
.hero--feature h3,
.hero--feature h4 { color: #fff; }
.hero--feature p,
.hero--feature .lead { color: #CFDCEA; opacity: 1; }
.hero--feature .eyebrow { color: #EBD9AE; }
.hero--feature .pill {
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .2);
  color: #E7EEF6;
  box-shadow: none;
}
.hero--feature .btn--primary { --btn-bg: var(--c-accent); color: var(--c-primary-dark); }
.hero--feature .btn--primary:hover { --btn-bg: var(--c-accent-on-dark); }
.hero--feature .btn--secondary { --btn-bg: #fff; color: var(--c-primary); }
.hero--feature .btn--secondary:hover { --btn-bg: var(--c-primary-tint); }
.hero--feature .hero-photo { background: rgba(255, 255, 255, .92); }

/* Care hero — neck / back / services: cooler, calmer entry */
.hero--care {
  background:
    radial-gradient(680px 360px at 12% -10%, rgba(15, 59, 54, .12), transparent 60%),
    linear-gradient(180deg, #EBF0EE, var(--c-bg) 80%);
}

/* Plain hero — content-forward pages that lead with text only */
.hero--plain {
  background: linear-gradient(180deg, var(--c-surface-alt), var(--c-bg) 90%);
}

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; }
.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--c-primary-tint);
  color: var(--c-primary);
  border: 1px solid rgba(19, 49, 79, .1);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.card--link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.card--link:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--c-line-strong);
  color: inherit;
}
.card--link:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.card--link .more {
  color: var(--c-primary);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: .92rem;
  display: inline-flex;
  gap: .35rem;
  transition: gap .18s var(--ease);
}
.card--link:hover .more { gap: .6rem; }

/* ---------- Media / photo placeholders ---------- */
.photo-ph {
  display: grid;
  place-items: center;
  text-align: center;
  gap: .35rem;
  aspect-ratio: 3 / 4;
  max-width: clamp(240px, 40vw, 400px);
  margin-inline: auto;
  border-radius: var(--radius);
  border: 2px dashed var(--c-line-strong);
  background:
    linear-gradient(180deg, rgba(19, 49, 79, .03), transparent),
    var(--c-surface-alt);
  color: var(--c-primary);
  font-family: var(--font-display);
  font-weight: 600;
  padding: 1.25rem;
}
.photo-ph span { font-weight: 500; font-size: .85rem; color: var(--c-muted); }
.avatar-ph {
  width: 92px; height: 92px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--c-secondary), #16514a);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.avatar-photo {
  width: 92px; height: 92px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  flex: none;
  padding: 3px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(19, 49, 79, .1), var(--shadow-sm);
  filter: saturate(.94) contrast(1.03);
}

/* ---------- Info / callouts ---------- */
.callout {
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--c-accent);
  background: var(--c-surface);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.35rem;
  box-shadow: var(--shadow-xs);
}
.callout--note { border-left-color: var(--c-secondary); }
.placeholder-tag {
  display: inline-block;
  background: #FBF1D8;
  border: 1px dashed var(--c-accent-dark);
  color: #6F5310;
  font-size: .82rem;
  font-weight: 600;
  padding: .1rem .5rem;
  border-radius: 6px;
  font-family: var(--font-body);
}

/* ---------- Hours table ---------- */
.hours { width: 100%; border-collapse: collapse; max-width: 440px; }
.hours th, .hours td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--c-line); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours th { font-family: var(--font-display); font-weight: 600; }
.section--dark .hours th, .section--dark .hours td { border-color: rgba(255, 255, 255, .16); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 1.15rem; }
.form-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: .4rem;
}
.form-field .req { color: var(--c-accent-dark); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font: inherit;
  color: #1F2937;
  padding: .8rem .9rem;
  border: 1.5px solid var(--c-line-strong);
  border-radius: var(--radius-sm);
  background: var(--c-surface);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: #767676; opacity: 1; }
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--c-primary);
  outline: none;
  box-shadow: var(--ring);
}
.form-field .optional-tag { color: var(--c-muted); font-weight: 500; }
.form-note { font-size: .9rem; color: var(--c-muted); }
.form-status {
  margin-top: 1rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--c-primary-tint);
  border: 1px solid rgba(19, 49, 79, .12);
  font-weight: 600;
  display: none;
}
.form-status.is-visible { display: block; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: .1rem 1.15rem;
  margin-bottom: .65rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.faq details:hover { border-color: var(--c-line-strong); }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: var(--c-line-strong); }
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  padding: .95rem 2rem .95rem 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: .1rem;
  top: 50%;
  width: .68rem; height: .68rem;
  border-right: 2px solid var(--c-primary);
  border-bottom: 2px solid var(--c-primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details[open] summary { border-bottom: 1px solid var(--c-line); }
.faq details > p { padding: .85rem 0 .3rem; margin-bottom: .6rem; color: var(--c-muted); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 1.4rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: -.1rem;
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--c-primary), #1c4570);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.steps li::after {
  content: "";
  position: absolute;
  left: 1.2rem; top: 2.6rem; bottom: -1rem;
  width: 2px;
  background: var(--c-line);
}
.steps li:last-child::after { display: none; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(520px 260px at 90% 120%, rgba(199, 154, 60, .28), transparent 60%),
    linear-gradient(135deg, var(--c-primary), var(--c-secondary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 3.25rem);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #DCE6F1; }
.cta-band .btn--primary { --btn-bg: #fff; color: var(--c-primary); }
.cta-band .btn--primary:hover { --btn-bg: var(--c-primary-tint); }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.cta-band .btn--ghost:hover { background: #fff; color: var(--c-primary); border-color: #fff; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .88rem; color: var(--c-muted); padding-top: 1.15rem; }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.breadcrumb li::after { content: "/"; margin-left: .4rem; color: var(--c-line-strong); }
.breadcrumb li:last-child { color: var(--c-ink); font-weight: 600; }
.breadcrumb li:last-child::after { content: ""; }

/* ---------- Footer ---------- */
.site-footer {
  background:
    radial-gradient(600px 240px at 100% 0, rgba(199, 154, 60, .1), transparent 60%),
    var(--c-secondary-dark);
  color: #CBD8D5;
  padding-block: 3.25rem 6.5rem;
  font-size: .95rem;
  border-top: 3px solid var(--c-accent);
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2, .site-footer h3 {
  color: #fff;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: .75rem;
}
.footer-grid { display: grid; gap: 2.25rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: .38rem 0; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .14);
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  color: #93A8A4;
  font-size: .84rem;
}
.footer-bottom p { margin-bottom: .3rem; }

/* ---------- Sticky mobile call button ---------- */
.sticky-call {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: flex;
  gap: .55rem;
  padding: .6rem;
  padding-bottom: max(.6rem, env(safe-area-inset-bottom));
  background: rgba(var(--c-bg-rgb), .96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--c-line);
  box-shadow: 0 -8px 28px -12px rgba(19, 49, 79, .35);
}
.sticky-call .btn {
  flex: 1;
  padding-inline: .6rem;
  font-size: clamp(.82rem, 3.5vw, .95rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: none;
}
.sticky-call .btn:hover { transform: none; box-shadow: var(--shadow-sm); }
@media (min-width: 900px) {
  .sticky-call { display: none; }
  .site-footer { padding-bottom: 3.25rem; }
}

/* ---------- Utilities ---------- */
.stack > * + * { margin-top: var(--flow); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Anchor-target highlight for the service sections linked from the homepage */
@keyframes targetFlash {
  from { background: var(--c-primary-tint); box-shadow: 0 0 0 6px var(--c-primary-tint); }
  to   { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
.card:target { animation: targetFlash 1.6s var(--ease); border-radius: var(--radius); }
:where(h2, h3):target { animation: targetFlash 1.6s var(--ease); border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn:hover, .card--link:hover, .tech-card:hover { transform: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* =========================================================================
   ROUND 3 ADDITIONS — Spanish-first restructure
   Dropdown nav · red language switch · technology cards · photo galleries
   · Latino-community footer · reveal-on-scroll. Palette/typography unchanged.
   ========================================================================= */

:root {
  --c-lang: #C0392B;       /* red accent — used ONLY for the language switch */
  --c-lang-dark: #A5342A;
}

/* ---------- Red language switch ---------- */
.lang-switch--alt {
  background: var(--c-lang);
  border-color: var(--c-lang);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}
.lang-switch--alt:hover {
  background: var(--c-lang-dark);
  border-color: var(--c-lang-dark);
  color: #fff;
}
.lang-switch--alt:focus-visible { outline-color: var(--c-lang); }

/* ---------- Dropdown navigation ---------- */
.nav-dropdown__btn {
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-ink);
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  width: 100%;
  text-align: left;
}
.nav-dropdown__btn[data-active="true"] { color: var(--c-primary); }
.nav-dropdown__caret {
  width: .5rem; height: .5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s var(--ease);
  flex: none;
}
.primary-nav .nav-dropdown {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}
.primary-nav .nav-dropdown a { font-weight: 500; }

@media (max-width: 899px) {
  .nav-dropdown__btn {
    padding: .85rem .25rem;
    border-bottom: 1px solid var(--c-line);
    justify-content: space-between;
  }
  .primary-nav .nav-dropdown {
    display: none;
    flex-direction: column;
    padding: .25rem 0 .5rem .9rem;
    border-left: 2px solid var(--c-primary-tint);
    margin: .25rem 0 .5rem;
  }
  .has-dropdown.is-open .nav-dropdown { display: flex; }
  .has-dropdown.is-open .nav-dropdown__caret { transform: translateY(1px) rotate(225deg); }
}

@media (min-width: 900px) {
  .has-dropdown { position: relative; }
  .nav-dropdown__btn:hover { background: var(--c-primary-tint); color: var(--c-primary); }
  /* invisible hover bridge so the pointer can cross the gap to the panel */
  .has-dropdown > .nav-dropdown__btn::after {
    content: "";
    position: absolute;
    left: 0; right: -1rem; top: 100%;
    height: .7rem;
  }
  .primary-nav .nav-dropdown {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    min-width: 15.5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: .4rem;
    z-index: 60;
    /* premium open/close */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(.98);
    transform-origin: top left;
    transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
  }
  .primary-nav .nav-dropdown::before {
    content: "";
    position: absolute;
    top: -6px; left: 1.4rem;
    width: 12px; height: 12px;
    background: var(--c-surface);
    border-left: 1px solid var(--c-line);
    border-top: 1px solid var(--c-line);
    transform: rotate(45deg);
  }
  .has-dropdown:hover > .nav-dropdown,
  .has-dropdown:focus-within > .nav-dropdown,
  .has-dropdown.is-open > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
  }
  .has-dropdown:hover > .nav-dropdown__btn .nav-dropdown__caret,
  .has-dropdown:focus-within > .nav-dropdown__btn .nav-dropdown__caret,
  .has-dropdown.is-open > .nav-dropdown__btn .nav-dropdown__caret { transform: translateY(1px) rotate(225deg); }
  .primary-nav .nav-dropdown a {
    display: block;
    padding: .55rem .7rem;
    border-radius: 6px;
    border-bottom: 0;
    white-space: nowrap;
  }
  .primary-nav .nav-dropdown a:hover { background: var(--c-primary-tint); }
}

/* ---------- Portrait / photo frames (reuse the matted treatment) ---------- */
.hero-figure img,
.photo-frame img {
  width: 100%;
  border-radius: var(--radius);
  background: var(--c-surface-alt);
  padding: 8px;
  box-shadow: inset 0 0 0 1px rgba(19, 49, 79, .06), var(--shadow-lg);
  filter: saturate(.96) contrast(1.02);
}
.hero-figure img { max-width: clamp(240px, 40vw, 400px); aspect-ratio: 3 / 4; object-fit: cover; object-position: top center; margin-inline: auto; }
.photo-frame img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center; }
@media (min-width: 900px) { .hero__media .hero-figure img { margin-inline: auto 0; } }

/* doctor-stack portraits: keep both figures identical regardless of source crop */
.doctor-stack .hero-photo { padding: 0; background: none; box-shadow: none; border-radius: 0; }
.doctor-stack .hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  background: var(--c-surface-alt);
  padding: 7px;
  box-shadow: inset 0 0 0 1px rgba(19, 49, 79, .06), var(--shadow-md);
  filter: saturate(.96) contrast(1.02);
}

/* ---------- Technology cards (compact preview thumbnails) ---------- */
.tech-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, 1fr);   /* two per row, including on phones */
  max-width: 880px;
}
@media (max-width: 359px) { .tech-grid { grid-template-columns: 1fr; } }
@media (min-width: 1024px) { .tech-grid { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; } }
.tech-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.tech-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--c-line-strong); color: inherit; }
.tech-card:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.tech-card__media { display: block; }
.tech-card__media img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  object-position: center;
  background: var(--c-surface-alt);
}
@media (min-width: 1024px) { .tech-card__media img { height: 92px; } }
.tech-card__body { padding: .75rem .8rem .9rem; display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.tech-card__body h3 { margin: 0; font-size: .95rem; }
.tech-card__body p { font-size: .85rem; line-height: 1.4; }
.tech-card__body .more { margin-top: auto; padding-top: .2rem; font-size: .85rem; }

/* ---------- Photo gallery ---------- */
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery--pair { grid-template-columns: repeat(2, 1fr); max-width: 460px; }
.gallery__item {
  margin: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  background: var(--c-surface-alt);
  display: block;
}
.gallery__item figcaption {
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-muted);
  padding: .55rem .7rem .65rem;
}

/* ---------- Team cards ---------- */
.team-card { display: flex; gap: 1.25rem; align-items: flex-start; }
.team-card__photo { flex: none; width: 108px; }
.team-card__photo img {
  width: 108px; height: 132px;
  object-fit: cover; object-position: top center;
  border-radius: var(--radius-sm);
  background: var(--c-surface-alt);
  box-shadow: 0 0 0 1px rgba(19, 49, 79, .1), var(--shadow-sm);
}
@media (max-width: 520px) {
  .team-card { flex-direction: column; }
  .team-card__photo, .team-card__photo img { width: 120px; height: auto; }
  .team-card__photo img { aspect-ratio: 5 / 6; }
}

/* ---------- Latino-community message (footer) ---------- */
.footer-community {
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, .16);
  text-align: center;
}
.footer-community__lead {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-accent-on-dark);
  margin: 0 0 .35rem;
}
.footer-community__msg {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 1rem + .6vw, 1.35rem);
  color: #fff;
  margin: 0 auto .9rem;
  max-width: 34ch;
  line-height: 1.35;
}
.flag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .5rem .6rem;
}
.flag-row img {
  display: block;
  width: auto;
  height: 22px;
  flex: none;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25);
}
@media (min-width: 900px) {
  .flag-row img { height: 26px; }
}

/* ---------- Latino-community message (homepage band) ---------- */
.community-band {
  text-align: center;
  color: #EAF1EF;
  background:
    radial-gradient(680px 320px at 85% -30%, rgba(199, 154, 60, .18), transparent 60%),
    linear-gradient(155deg, #0F3B36, #13314F);
}
.community-band .container { max-width: 780px; }
.community-band .flag-row { margin-bottom: 1.1rem; }
.community-band .flag-row img {
  height: 24px; width: auto; border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), var(--shadow-sm);
}
@media (min-width: 900px) {
  .community-band .flag-row img { height: 28px; }
}
.community-band .eyebrow { color: var(--c-accent-on-dark); justify-content: center; }
.community-band h2 { color: #fff; }
.community-band .lead { color: #D3E1DE; opacity: 1; max-width: 52ch; }
.community-band .btn-row { margin-top: 1.5rem; }
.community-band .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.community-band .btn--ghost:hover { background: #fff; color: var(--c-primary); border-color: #fff; }

/* ---------- Reveal on scroll (opt-in, JS-gated) ---------- */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

/* FAQ answer wrapper (generator wraps <p> in a <div>) */
.faq details > div > p { padding: .85rem 0 .3rem; margin-bottom: .6rem; color: var(--c-muted); }

/* =========================================================================
   ROUND 4 ADDITIONS — real logo · click-to-expand image lightbox
   ========================================================================= */

/* zoomable image trigger (equipment hero photos, clinic gallery) */
.zoom-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  position: relative;
  border-radius: var(--radius);
}
.zoom-trigger > picture,
.zoom-trigger > picture img { display: block; width: 100%; }
.zoom-trigger:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }
.zoom-trigger__hint {
  position: absolute;
  right: .6rem; bottom: .6rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(19, 49, 79, .82);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .16s var(--ease), transform .16s var(--ease);
  pointer-events: none;
}
.zoom-trigger:hover .zoom-trigger__hint,
.zoom-trigger:focus-visible .zoom-trigger__hint { opacity: 1; transform: scale(1); }
.gallery__item .zoom-trigger { border-radius: 0; }

/* Arrival guide (Contact page) — full, uncropped diagram at a readable width */
.arrival-guide { margin: 1.25rem 0 0; max-width: 900px; }
.arrival-guide .zoom-trigger {
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.arrival-guide figcaption { margin-top: .5rem; }

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(12, 22, 38, .86);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s var(--ease), visibility .18s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: min(100%, 1100px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--c-surface);
  transform: scale(.96);
  transition: transform .18s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close {
  position: absolute;
  top: max(.75rem, env(safe-area-inset-top));
  right: max(.75rem, env(safe-area-inset-right));
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
body.lightbox-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lightbox, .lightbox__img, .zoom-trigger__hint { transition: none; }
  .lightbox__img { transform: none; }
}
