/* ============================================================
   Boys Town Fire & Rescue — Shared Stylesheet
   WCAG 2.2 Level AA Compliant
   ============================================================ */

/* ── Custom Properties ───────────────────────────────────── */
:root {
  --color-navy:        #1a2e4a;   /* nav/footer bg */
  --color-navy-dark:   #0f1d30;   /* hover states */
  --color-red:         #b71c1c;   /* accent/headings (6.5:1 on white) */
  --color-red-dark:    #7f1414;   /* hover on red */
  --color-blue-link:   #0a5191;   /* body links (7.4:1 on white) */
  --color-blue-hover:  #083d70;
  --color-text:        #1c1c1e;   /* body text (17:1 on white) */
  --color-text-muted:  #4a4a4e;   /* secondary text (9.3:1 on white) */
  --color-bg:          #ffffff;
  --color-bg-alt:      #f2f5f8;
  --color-border:      #c8d0da;
  --color-focus:       #005fcc;   /* focus ring */
  --color-nav-text:    #ffffff;

  --font-base: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.12);
  --transition: 0.2s ease;

  --max-width: 1100px;
  --nav-height: 64px;
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;                /* respects user font size preference */
}

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* WCAG 1.4.12 — text spacing must not cause loss of content */
p, li, dt, dd {
  max-width: 75ch;
}

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

/* ── Skip Navigation — WCAG 2.4.1 ───────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--color-focus);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: top var(--transition);
}
.skip-link:focus {
  top: 0;
}

/* ── Focus Styles — WCAG 2.4.7, 2.4.11 ──────────────────── */
:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Remove default focus ring only when focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-navy);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--color-blue-link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--color-blue-hover);
  text-decoration-thickness: 2px;
}

/* ── Layout Utilities ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 3.5rem;
}
.section--alt {
  background-color: var(--color-bg-alt);
}

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

/* ── Header & Navigation ─────────────────────────────────── */
.site-header {
  background-color: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
  gap: 1rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.site-logo__text {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.site-logo__text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  opacity: 0.85;
}
.site-logo__img {
  height:85px;
}

/* Primary Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex-wrap: wrap;
}

.primary-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-nav-text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  min-height: 44px;           /* WCAG 2.5.8 target size */
  transition: background-color var(--transition);
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background-color: rgba(255,255,255,0.15);
}
.primary-nav a[aria-current="page"] {
  border-bottom: 2px solid #ffffff;
}

/* Social icon links in info strip */
.info-social {
  gap: 0.75rem;
}
.info-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  text-decoration: none;
}
.info-social a:hover {
  opacity: 0.85;
}
.info-social img {
  flex-shrink: 0;
}

/* Mobile nav toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.7);
  color: #ffffff;
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background-color var(--transition);
}
.nav-toggle:hover {
  background-color: rgba(255,255,255,0.15);
}

/* ── Hero / Page Banner ──────────────────────────────────── */
.page-hero {
  background-color: var(--color-navy);
  color: #ffffff;
  padding-block: 4rem;
  text-align: center;
}
.page-hero h1 {
  color: #ffffff;
  margin-bottom: 0.75rem;
}
.page-hero .hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  max-width: 60ch;
  margin-inline: auto;
}

/* Home hero */
.home-hero {
  background: linear-gradient(160deg, var(--color-navy) 60%, #24415f 100%);
  color: #ffffff;
  padding-block: 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.home-hero h1 {
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.home-hero .hero-tagline {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.hero-values {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
}
.hero-values li {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 2rem;
  padding: 0.4rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
}

/* ── Cards & Grids ───────────────────────────────────────── */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 {
  color: var(--color-navy);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-red);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ── Info strip ──────────────────────────────────────────── */
.info-strip {
  background: var(--color-red);
  color: #ffffff;
  padding-block: 1rem;
}
.info-strip .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.info-strip a {
  color: #ffffff;
  font-weight: 600;
  text-decoration-color: rgba(255,255,255,0.6);
}
.info-strip a:hover {
  text-decoration-color: #ffffff;
}
.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.info-item svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* ── Staff Directory ─────────────────────────────────────── */
.staff-section {
  margin-bottom: 2.5rem;
}
.staff-section h2 {
  color: var(--color-navy);
  border-bottom: 3px solid var(--color-red);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 1rem;
}
.staff-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-navy);
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
}
.staff-card--command {
  border-left-color: var(--color-red);
}
.staff-card__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-navy);
}
.staff-card__title {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

/* ── Contact Section ─────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}
.contact-details {
  list-style: none;
}
.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-block: 0.625rem;
  border-bottom: 1px solid var(--color-border);
  max-width: none;
}
.contact-details li:last-child {
  border-bottom: none;
}
.contact-details svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--color-red);
}
.contact-details strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 0.1rem;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--color-border);
  height: 320px;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}

/* ── Enrollment Notice ───────────────────────────────────── */
.notice {
  background-color: #fff8e1;
  border-left: 4px solid #f9a825;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}
.notice p {
  color: #4a3800;
}
.notice strong {
  color: #3a2c00;
}

/* ── CTA Button ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;           /* WCAG 2.5.8 */
  transition: background-color var(--transition), color var(--transition);
}
.btn--primary {
  background-color: var(--color-red);
  color: #ffffff;
  border: 2px solid transparent;
}
.btn--primary:hover {
  background-color: var(--color-red-dark);
  color: #ffffff;
}
.btn--outline {
  background-color: transparent;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}
.btn--outline:hover {
  background-color: var(--color-navy);
  color: #ffffff;
}

/* ── Section Headings ────────────────────────────────────── */
.section-heading {
  margin-bottom: 0.5rem;
}
.section-lead {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 65ch;
}

/* ── Photo placeholder ───────────────────────────────────── */
.photo-block {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
  border: 2px solid var(--color-border);
}
.photo-block figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-style: italic;
}
.photo-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a2e4a 0%, #2d5281 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
}
.photo-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.6;
  margin: 0 auto;
}

/* Two-column split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 700px) {
  .split { grid-template-columns: 1fr; }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background-color: var(--color-navy);
  color: rgba(255,255,255,0.85);
  padding-block: 2.5rem;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}
.footer-brand:hover { text-decoration: underline; }
.footer-address {
  font-size: 0.875rem;
  line-height: 1.7;
  font-style: normal;
}
.footer-address a {
  color: rgba(255,255,255,0.85);
}
.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.footer-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  text-decoration: none;
}
.footer-nav a:hover { text-decoration: underline; color: #ffffff; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.825rem;
  color: rgba(255,255,255,0.6);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom a {
  color: rgba(255,255,255,0.75);
}
.footer-bottom a:hover { color: #ffffff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    right: 0px;
    position: absolute;
    margin-right: 10px;
  }
  #primary-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-navy-dark);
    padding: 0.75rem;
    gap: 0.25rem;
  }
  #primary-nav.is-open {
    display: flex;
    position: absolute;
    right: 0px;
    top: 100px;
  }
  .header-inner {
    flex-wrap: wrap;
    padding-block: 0.5rem;
  }
  .primary-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .primary-nav a {
    width: 100%;
  }
  .info-strip .container {
    flex-direction: column;
    gap: 0.75rem;
  }
  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .section { padding-block: 2.5rem; }
  .home-hero { padding-block: 3rem; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .site-header,
  .skip-link,
  .nav-toggle,
  .info-strip { display: none; }
  body { color: #000; background: #fff; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
