/* ==========================================================================
   American Legion Hair & Matthews Post 32 — Hope Mills, NC
   Colors follow the official American Legion brand palette:
   - Legion Blue  #1B3D6D  (PANTONE 654C) — primary
   - Legion Red   #D72131  (PANTONE 186C) — calls-to-action / accents
   - Emblem Gold  #F2A900  — used sparingly, echoes the emblem
   Typefaces approximate the Legion brand fonts (Proxima Nova + Metronic Slab)
   with free webfonts: Roboto Slab for headings, Source Sans 3 for body text.
   Accessibility: WCAG AA contrast, visible keyboard focus, skip link,
   underlined text links, comfortable reading width.
   ========================================================================== */

/* ---- Design tokens: change a color here, it changes everywhere ---- */
:root {
  --blue: #1B3D6D;
  --blue-dark: #122A4C;
  --red: #D72131;
  --red-dark: #A8121F;
  --gold: #F2A900;
  --text: #36404a;
  --text-dark: #16263f;
  --border: #d8dee5;
  --bg-alt: #f1f4f8;
  --footer-bg: #122A4C;
  --content-width: 1120px;
  --reading-width: 860px;
  --font-heading: 'Roboto Slab', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  line-height: 1.25;
  margin: 1.4em 0 0.5em;
}

h1 { font-size: 38px; margin-top: 0; }
h2 { font-size: 28px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

p { margin: 0 0 1em; }

a { color: var(--blue); }
a:hover { color: var(--red); }

/* Keyboard users get a clear, high-contrast focus ring */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

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

ul { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

/* Center page content and keep it from getting too wide */
.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Text-heavy pages use a narrower column — long lines are hard to read */
.content .container { max-width: var(--reading-width); }

/* ---- Skip link: first thing keyboard users reach; invisible until focused ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: #ffffff;
  padding: 12px 20px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: #ffffff; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--red);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 13px 30px;
  border-radius: 3px;
  text-decoration: none;
}
.btn:hover { background: var(--red-dark); color: #ffffff; }
.btn--blue { background: var(--blue); }
.btn--blue:hover { background: var(--blue-dark); }
.btn--outline {
  background: transparent;
  border: 2px solid #ffffff;
  padding: 11px 28px;
}
.btn--outline:hover { background: #ffffff; color: var(--blue); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ==========================================================================
   HEADER & NAVIGATION
   White header with emblem + post name, Legion-blue menu bar below.
   Desktop: drop-downs on hover/keyboard focus. Mobile: hamburger (pure CSS).
   ========================================================================== */
.site-header { background: #ffffff; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 100px;
  gap: 12px;
}

.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo img { width: 70px; height: 70px; object-fit: contain; }
.logo .org-name {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.15;
  display: block;
}
.logo .org-dept {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 3px;
}
.logo:hover .org-name { color: var(--blue); }

/* Legion-blue menu bar */
.site-nav { background: var(--blue); width: 100%; }
.site-nav > ul {
  list-style: none;
  margin: 0 auto;
  padding: 0 20px;
  max-width: var(--content-width);
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}
.site-nav li { margin: 0; position: relative; }
.site-nav a {
  display: block;
  padding: 15px 16px;
  font-size: 15.5px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}
.site-nav > ul > li > a:hover,
.site-nav > ul > li:hover > a { background: var(--blue-dark); }

/* Drop-down menus */
.site-nav li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  min-width: 240px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  z-index: 50;
  list-style: none;
  padding: 0;
}
.site-nav li:hover > ul,
.site-nav li:focus-within > ul { display: block; }
.site-nav li ul a {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 400;
  color: var(--text-dark);
}
.site-nav li ul a:hover { background: var(--bg-alt); color: var(--blue); }
.site-nav li ul li:last-child a { border-bottom: none; }

.site-nav .nav-cta a { background: var(--red); }
.site-nav .nav-cta a:hover { background: var(--red-dark); }

/* Hamburger: visually hidden checkbox that stays keyboard-reachable */
.nav-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nav-toggle-label { display: none; cursor: pointer; padding: 12px; }
.nav-toggle:focus-visible + .nav-toggle-label { outline: 3px solid var(--gold); outline-offset: 2px; }
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block; width: 26px; height: 3px;
  background: var(--blue); border-radius: 2px; position: relative; content: '';
}
.nav-toggle-label span::before { position: absolute; top: -8px; }
.nav-toggle-label span::after  { position: absolute; top: 8px; }

@media (max-width: 940px) {
  .nav-toggle-label { display: block; }
  .site-nav { display: none; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding: 0; }
  .site-nav a { border-top: 1px solid rgba(255,255,255,0.15); }
  .site-nav li ul {
    display: block; position: static; border: none; box-shadow: none;
    min-width: 0; background: var(--blue-dark);
  }
  .site-nav li ul a { color: #ffffff; border-bottom: none; padding-left: 34px; }
  .site-nav li ul a:hover { background: var(--blue); color: #ffffff; }
}

/* ==========================================================================
   HERO (home page banner)
   ========================================================================== */
.hero {
  position: relative;
  background:
    linear-gradient(rgba(18,42,76,0.82), rgba(18,42,76,0.88)),
    url('../images/WarPaint.jpg') center / cover no-repeat;
  color: #ffffff;
  text-align: center;
}
.hero-inner { padding: 96px 20px; }
.hero .emblem { width: 96px; height: 96px; margin: 0 auto 20px; }
.hero h1 { color: #ffffff; font-size: 44px; max-width: 860px; margin: 0 auto 8px; }
.hero .tagline {
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 20px;
  letter-spacing: 1px;
  margin: 0 auto 18px;
}
.hero p { font-size: 20px; max-width: 680px; margin: 0 auto 30px; color: #e8eef5; }
@media (max-width: 600px) {
  .hero-inner { padding: 60px 16px; }
  .hero h1 { font-size: 30px; }
  .hero p, .hero .tagline { font-size: 17px; }
}

/* ---- Page title bar (interior pages) ---- */
.page-title { background: var(--blue); border-bottom: 4px solid var(--red); padding: 36px 0; }
.page-title h1 { margin: 0; color: #ffffff; }

/* ---- Sections ---- */
.section { padding: 60px 0; }
.section--alt { background: var(--bg-alt); }
.section--blue { background: var(--blue); color: #ffffff; }
.section--blue h2 { color: #ffffff; }
.section--blue .lead { color: #e8eef5; }
.section-heading { text-align: center; margin-bottom: 38px; }
.section-heading h2 { margin-top: 0; }
.section-heading::after {
  content: ""; display: block; width: 60px; height: 3px;
  background: var(--red); margin: 14px auto 0;
}

/* ---- Card grid ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  padding: 28px;
}
.card h3 { margin-top: 0; color: var(--blue); }
.card.center { text-align: center; }

/* ---- Quick-facts strip ---- */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }
.facts div { padding: 28px 24px; border-right: 1px solid rgba(255,255,255,0.18); }
.facts div:last-child { border-right: none; }
.facts h3 { color: #ffffff; margin: 0 0 6px; font-size: 19px; }
.facts p { margin: 0; color: #e8eef5; }
@media (max-width: 700px) { .facts div { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.18); } }

/* ---- Feature rows: image beside text, stacking on phones ---- */
.feature {
  display: grid; grid-template-columns: 1fr 1.4fr;
  gap: 36px; align-items: center; padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.feature:last-child { border-bottom: none; }
.feature img { border-radius: 4px; width: 100%; }
.feature h2, .feature h3 { margin-top: 0; }
@media (max-width: 700px) { .feature { grid-template-columns: 1fr; } }

/* ---- Content page helpers ---- */
.content { padding: 48px 0; }
.content h2 {
  color: var(--blue);
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
  margin-top: 1.8em;
}
.content a { text-decoration: underline; }
.lead { font-size: 20px; color: var(--text-dark); }

/* Two-column listing on wide screens (officer lists, schedules) */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; }
@media (max-width: 700px) { .cols-2 { grid-template-columns: 1fr; } }

.person { margin-bottom: 18px; }
.person strong { display: block; color: var(--text-dark); }
.person span { display: block; font-size: 15px; }
.person a { font-size: 15px; }

/* Schedule list */
.schedule { list-style: none; padding: 0; margin: 0; }
.schedule li {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.schedule .when { font-weight: 700; color: var(--blue); min-width: 210px; }

/* Document list */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.doc-list a { font-weight: 600; }
.doc-list .meta { display: block; font-size: 14px; color: #6b7682; }

/* ---- Notice box ---- */
.notice {
  background: var(--bg-alt);
  border-left: 4px solid var(--blue);
  padding: 18px 22px;
  margin: 24px 0;
}
.notice--gold { border-left-color: var(--gold); }

/* Marks info likely out of date / not recovered */
.missing-file { color: #6b6b6b; }
.missing-file::after { content: " (file not recovered)"; font-size: 0.85em; font-style: italic; }

/* Responsive embeds (Google calendar / maps) */
.embed { position: relative; padding-bottom: 75%; height: 0; overflow: hidden; border: 1px solid var(--border); }
.embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--footer-bg);
  color: #cdd7e3;
  font-size: 15.5px;
  margin-top: 56px;
  border-top: 4px solid var(--red);
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 36px;
  padding: 44px 0 40px;
}
.site-footer h4 { color: #ffffff; margin-top: 0; font-size: 19px; }
.site-footer a { color: #ffffff; text-decoration: underline; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding: 16px 0;
  text-align: center;
  font-size: 14px;
  color: #aab8c8;
}

/* Respect users who turn off animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Print cleanly */
@media print {
  .site-nav, .nav-toggle-label, .skip-link, .btn { display: none; }
  .page-title { background: none; border-bottom: 2px solid #000; }
  .page-title h1 { color: #000; }
}
