/* ===== VICMEF — Victory Christian Medical Foundation =====
   Design tokens: deep teal (trust) + warm gold (hope/light) + cream (warmth)
   Type: Lora (headings, warm serif) + Inter (body, clean sans) */

:root {
  --teal-deep: #1B4B4A;
  --teal: #1C4E80;
  --gold: #E8B95A;
  --gold-deep: #D9A441;
  --cream: #FAF7F0;
  --cream-dark: #F0EAD9;
  --ink: #1F2A2A;
  --ink-soft: #4A5758;
  --white: #FFFFFF;
  --radius: 14px;
  --max-w: 1180px;
  --shadow: 0 10px 30px rgba(27, 75, 74, 0.10);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--cream);
  color-scheme: light; /* Prevents Android/browser "force dark" from auto-inverting our custom palette */
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Lora', Georgia, serif;
  color: var(--teal-deep);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.3rem; }

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

a { color: var(--teal); text-decoration: none; }

img { max-width: 100%; display: block; }

ul, ol { padding-left: 0; }

/* Consistent, visible keyboard focus everywhere (accessibility) */
a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link for keyboard/screen-reader users */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--teal-deep);
  color: var(--cream);
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 300;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

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

/* ===== Header / Nav ===== */
header.site-header {
  background: var(--cream);
  border-bottom: 1px solid rgba(27, 75, 74, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.25s ease;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: padding 0.25s ease;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 0;
  transition: padding 0.25s ease;
}

.logo-full {
  height: 150px;
  width: auto;
  display: block;
  flex-shrink: 0;
  transition: height 0.25s ease;
}

.logo-tagline {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--teal-deep);
  white-space: nowrap;
  transition: opacity 0.2s ease, max-height 0.25s ease, margin 0.25s ease;
}

/* Once the user scrolls, shrink the sticky header so it stops
   eating up the viewport — otherwise the tall logo stays pinned
   at full size and covers a big chunk of the screen while scrolling. */
header.site-header.scrolled {
  box-shadow: 0 4px 16px rgba(27, 75, 74, 0.10);
}

header.site-header.scrolled .nav-inner {
  padding-top: 4px;
  padding-bottom: 4px;
}

header.site-header.scrolled .logo {
  padding: 4px 0;
}

header.site-header.scrolled .logo-full {
  height: 48px;
}

header.site-header.scrolled .logo-tagline {
  opacity: 0;
  max-height: 0;
  margin: 0;
  overflow: hidden;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

nav.main-nav a {
  color: var(--ink);
  font-size: 0.93rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--teal-deep);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal-deep);
  margin: 5px 0;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.btn:hover { transform: translateY(-1px); }

.btn-gold {
  background-color: var(--gold);
  color: var(--teal-deep);
  border-color: var(--gold);
}
.btn-gold:hover { box-shadow: 0 6px 20px rgba(232, 185, 90, 0.4); background-color: var(--gold-deep); }

/* For use on light/cream backgrounds */
.btn-teal-outline {
  background-color: transparent;
  border-color: var(--teal);
  color: var(--teal-deep);
}
.btn-teal-outline:hover { background-color: var(--teal-deep); color: var(--cream); border-color: var(--teal-deep); }

/* For use on dark teal backgrounds */
.btn-outline {
  background-color: transparent;
  border-color: var(--cream);
  color: var(--cream);
}
.btn-outline:hover { background-color: rgba(250, 247, 240, 0.15); }

/* ===== Hero ===== */
.hero {
  padding: 64px 0 20px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 14px;
  display: inline-block;
}

.hero p.lead {
  font-size: 1.08rem;
  max-width: 46ch;
}

.hero-3d {
  width: 100%;
  height: 340px;
}

/* ===== Sections ===== */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--white);
}

.section-teal {
  background: linear-gradient(160deg, var(--teal-deep), var(--teal));
  color: var(--cream);
}
.section-teal h2, .section-teal h3, .section-teal .eyebrow { color: var(--cream); }
.section-teal p { color: rgba(250, 247, 240, 0.85); }

.section-header {
  max-width: 620px;
  margin: 0 0 44px;
}

/* ===== Stat row ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-num {
  font-family: 'Lora', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--teal-deep);
  font-weight: 600;
}

.section-teal .stat-num { color: var(--gold); }

.stat-label {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

.section-teal .stat-label { color: rgba(250, 247, 240, 0.75); }

/* ===== Cards ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(27, 75, 74, 0.16);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--gold-deep);
  flex-shrink: 0;
}

.card h3 { margin-bottom: 10px; }
.card p { margin: 0; font-size: 0.95rem; }

/* Four-column variant for the About page's guiding principles */
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Compact card variant used for dense service lists */
.card-compact {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
}
.card-compact .card-icon { margin-bottom: 0; }
.card-compact h3 { font-size: 1.08rem; margin-bottom: 6px; }
.card-compact p { font-size: 0.9rem; }

/* ===== Photos ===== */
.photo {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
}

/* ===== Contact quick actions ===== */
.contact-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}

.contact-block {
  margin-bottom: 22px;
}
.contact-block strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.contact-block a { color: var(--teal-deep); font-weight: 500; }
.contact-block a:hover { text-decoration: underline; }

.hours-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--cream-dark);
  color: var(--teal-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Embedded map */
.map-frame {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: none;
  width: 100%;
  height: 100%;
  min-height: 340px;
}

/* ===== Scroll reveal (respects reduced-motion) ===== */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  [data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Two-col layout ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* ===== List ===== */
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.check-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 14px;
  color: var(--ink-soft);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
}
.section-teal .check-list li { color: rgba(250, 247, 240, 0.9); }

/* ===== Footer ===== */
footer.site-footer {
  background: var(--teal-deep);
  color: var(--cream);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(250, 247, 240, 0.15);
}

.footer-grid h4 {
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}

footer.site-footer a { color: rgba(250, 247, 240, 0.85); }
footer.site-footer p { color: rgba(250, 247, 240, 0.7); font-size: 0.92rem; }

.footer-nav ul { list-style: none; padding: 0; margin: 0; }
.footer-nav li { margin-bottom: 10px; }

.footer-bottom {
  padding-top: 20px;
  font-size: 0.82rem;
  color: rgba(250, 247, 240, 0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  nav.main-nav ul { gap: 16px; }
  nav.main-nav a { font-size: 0.88rem; }
}

@media (max-width: 640px) {
  .logo-full { height: 92px; }
  .logo-tagline { font-size: 0.72rem; }
  header.site-header.scrolled .logo-full { height: 40px; }
}

@media (max-width: 700px) {
  .card-grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero-inner, .two-col { grid-template-columns: 1fr; }
  .hero-3d { order: -1; height: 260px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  nav.main-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: 78%;
    max-width: 320px;
    background: var(--cream);
    box-shadow: -8px 0 30px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    padding: 90px 30px;
    z-index: 200;
    overflow-y: auto;
  }
  nav.main-nav.open { transform: translateX(0); }
  nav.main-nav ul { flex-direction: column; gap: 22px; }
  nav.main-nav a { font-size: 1rem; }
  .nav-toggle { display: block; }

  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(27, 75, 74, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 150;
  }
  .nav-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .hero-3d { height: 150px; }
}
