/*
Theme Name: Nueva Esperanza Medical Clinic
Description: Website for Nueva Esperanza Medical Clinic, 1704 W. Manchester Ave., Los Angeles. No analytics, tracking, forms, or third-party requests.
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nueva-esperanza
*/

@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }

:root {
  --teal: #0f5c63;
  --teal-deep: #0a4248;
  --teal-tint: #e4eff0;
  --paper: #fbf8f3;
  --white: #ffffff;
  --ink: #2b2f33;
  --ink-soft: #545b61;
  --green: #6f9f7c;
  --green-tint: #edf3ee;
  --line: #e2ddd4;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", system-ui, Arial, sans-serif;
  --wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); font-size: 1.125rem; line-height: 1.65; color: var(--ink); background: var(--paper); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--teal-deep); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; color: #fff; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--teal-deep); line-height: 1.18; margin: 0 0 .55em; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.5rem); letter-spacing: -0.012em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); letter-spacing: -0.008em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; max-width: 64ch; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; font: 700 1.06rem/1.2 var(--sans); padding: .95rem 1.4rem; min-height: 52px; border-radius: 10px; text-decoration: none; border: 2px solid transparent; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); color: #fff; }
.btn-secondary { background: var(--white); color: var(--teal-deep); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal-tint); color: var(--teal-deep); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-brand { text-align: center; padding: 1.4rem 1rem 1rem; }
.brand { display: inline-block; }
.brand img { height: 180px; width: auto; margin: 0 auto; }
.header-nav { border-top: 1px solid var(--line); }
.header-nav-row { display: flex; align-items: center; justify-content: center; gap: 1rem 2.5rem; flex-wrap: wrap; padding: .6rem 0; }
.main-nav ul { list-style: none; display: flex; gap: 2rem; margin: 0; padding: 0; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; padding: .4rem 0; }
.main-nav a:hover { color: var(--teal); text-decoration: underline; }
.header-phone { padding: .6rem 1.1rem; min-height: 46px; font-size: 1.02rem; }

/* Hero */
.hero { background: var(--paper); padding: clamp(2.75rem, 6vw, 4.75rem) 0; text-align: center; }
.hero h1 { max-width: 20ch; margin-inline: auto; }
.hero-lead { font-size: 1.25rem; color: var(--ink-soft); margin-inline: auto; max-width: 58ch; }
.hero .actions { justify-content: center; margin-top: 1.75rem; }
.spanish { display: inline-flex; align-items: center; gap: .6rem; margin: 1.75rem auto 0; padding: .6rem 1.2rem; background: var(--green-tint); border: 1px solid #cfe0d3; border-radius: 10px; font-size: 1.15rem; max-width: none; }
.spanish strong { color: var(--teal-deep); font-size: 1.3rem; }

/* Facts band */
.facts { background: var(--teal-deep); color: #fff; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 1.35rem 1.2rem; display: flex; gap: .8rem; align-items: flex-start; }
.fact + .fact { border-left: 1px solid rgba(255,255,255,.2); }
.fact svg { width: 24px; height: 24px; flex: none; color: #a9d0b3; margin-top: 3px; }
.fact-label { display: block; font-size: .95rem; color: #c5dcdf; }
.fact a, .fact .fact-value { color: #fff; font-weight: 700; text-decoration: none; }
.fact a:hover { text-decoration: underline; color: #fff; }

/* Sections */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section-white { background: var(--white); }
.section-tint { background: var(--green-tint); }
.section-intro { max-width: 680px; margin-bottom: 2.25rem; }
.section-intro p { color: var(--ink-soft); font-size: 1.15rem; }

/* Services overview */
.svc-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.svc-index a { display: flex; gap: .9rem; align-items: center; height: 100%; padding: 1.15rem 1.2rem; background: var(--white); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.svc-index a:hover { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-deep); }
.svc-index svg { width: 34px; height: 34px; flex: none; color: var(--teal); }

/* Service detail */
.service { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.service-head svg { width: 46px; height: 46px; color: var(--teal); margin-bottom: .9rem; }
.service-head p { font-size: 1.15rem; }
.service-list { list-style: none; margin: 0 0 1.75rem; padding: 0; border-top: 2px solid var(--teal); }
.service-list li { padding: .8rem 0 .8rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.service-list li::before { content: ""; position: absolute; left: .2rem; top: 1.15rem; width: .85rem; height: .45rem; border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }
.service-cta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; color: var(--ink-soft); font-size: 1rem; }

/* About */
.about-head { max-width: 760px; margin: 0 auto 2.75rem; text-align: center; }
.about-head p { font-size: 1.2rem; color: var(--ink-soft); margin-inline: auto; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--teal); }
.pillar { padding: 1.75rem 1.4rem 0 0; }
.pillar + .pillar { padding-left: 1.4rem; border-left: 1px solid var(--line); }
.pillar svg { width: 38px; height: 38px; color: var(--teal); margin-bottom: .8rem; }
.pillar p { color: var(--ink-soft); font-size: 1.05rem; }

/* Provider */
.provider-heading { text-align: center; }
.provider { display: flex; gap: 2rem; align-items: flex-start; max-width: 820px; margin: 1.5rem auto 0; }
.provider-photo { width: 180px; height: 180px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 4px solid var(--green-tint); }
.provider-name { font-size: 1.45rem; margin-bottom: .2em; }
.provider-title { color: var(--green); font-weight: 700; color: #4f7f5b; }

/* Visit */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.details { list-style: none; margin: 0 0 2rem; padding: 0; }
.details li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.details li:first-child { border-top: 1px solid var(--line); }
.details .label { display: block; font-size: 1rem; color: var(--ink-soft); }
.details .value, .details a { font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.details a:hover { color: var(--teal); }
.details small { display: block; font-size: .98rem; color: var(--ink-soft); margin-top: .25rem; font-weight: 400; }
.visit-card { background: var(--teal-tint); border-radius: 14px; padding: clamp(1.6rem, 4vw, 2.4rem); align-self: start; }
.visit-card .actions .btn { flex: 1 1 220px; }

/* Plain pages */
.page-body { max-width: 760px; }
.page-body h2 { margin-top: 1.6em; }

/* Footer */
.site-footer { background: var(--teal-deep); color: #d9e7e8; padding: 2.75rem 0 3rem; font-size: 1rem; }
.site-footer a { color: #fff; }
.emergency { border-left: 4px solid #a9d0b3; background: rgba(255,255,255,.07); padding: .85rem 1rem; color: #fff; font-weight: 700; max-width: none; margin-bottom: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.5rem; }
.footer-links li { margin-bottom: .45rem; break-inside: avoid; }
.footer-name { color: #fff; font-weight: 700; }

/* Mobile action bar */
.mobile-bar { display: none; }

@media (max-width: 960px) {
  .main-nav ul { gap: 1.1rem; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.2); }
  .svc-index { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr 1fr; border-top: 0; }
  .pillar, .pillar + .pillar { padding: 1.5rem 1.25rem 1rem 0; border-left: 0; border-top: 2px solid var(--teal); }
}
@media (max-width: 820px) {
  body { font-size: 1.0625rem; }
  .brand img { height: 110px; }
  .header-brand { padding: 1rem 1rem .75rem; }
  .header-phone { display: none; }
  .main-nav { width: 100%; overflow-x: auto; }
  .main-nav ul { gap: .2rem 1.3rem; justify-content: center; flex-wrap: wrap; padding: .1rem .25rem; }
  .main-nav a { white-space: nowrap; }
  .service, .visit, .footer-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; border-top: 0; }
  .pillar, .pillar + .pillar { padding: 1.4rem 0; border-left: 0; border-top: 1px solid var(--line); }
  .pillar:first-child { border-top: 2px solid var(--teal); }
  .provider { flex-direction: column; align-items: center; text-align: center; gap: 1.25rem; }
  .provider-photo { width: 150px; height: 150px; }
  .provider p { margin-inline: auto; }
  .spanish { display: block; }
  .spanish strong { display: block; }
  .hero .actions .btn { flex: 1 1 100%; }
  .svc-index { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 7.5rem; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--white); border-top: 1px solid var(--line); padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -4px 16px rgba(10,66,72,.12); }
  .mobile-bar .btn { padding: .8rem .5rem; }
}
@media (max-width: 480px) {
  .facts-grid { grid-template-columns: 1fr; }
  .fact + .fact { border-left: 0; border-top: 1px solid rgba(255,255,255,.2); }
  .footer-links { columns: 1; }
}
