/*
Theme Name: CGAUX National
Theme URI: https://cgaux.org
Description: United States Coast Guard Auxiliary National Site theme. Modelled after the Southeast District design at cgauxsoutheast.org/wp — dark navy header, hero banner, stats bar, mission cards, and district navigation grid. Content sourced from cgaux.org.
Version: 1.0.0
Author: Enterprise Multisite
Text Domain: cgaux-national
*/

/* ─── CSS Custom Properties (WCAG 1.4.3 validated) ─────────────────────────── */
:root {
  --color-bg-primary:        #ffffff;
  --color-bg-card:           #f8f9fa;
  --color-bg-dark:           #0a1628;
  --color-bg-navy:           #0d2045;
  --color-bg-hero:           #0a1e3d;

  --color-text-primary:      #212529;
  --color-text-secondary:    #495057;
  --color-text-heading:      #0d2045;
  --color-text-light:        #f1f3f5;
  --color-text-muted:        #6c757d;

  --color-link:              #1a3a6b;
  --color-link-hover:        #c8102e;

  --color-accent:            #c8102e;   /* USCG red */
  --color-accent-hover:      #a50d25;
  --color-gold:              #f0a500;

  --color-btn-primary-bg:    #1e4d8c;
  --color-btn-primary-text:  #ffffff;
  --color-btn-secondary-bg:  #f0f7ff;
  --color-btn-secondary-text:#0d2045;

  --color-nav-bg:            #0a1628;
  --color-nav-text:          #ffffff;
  --color-nav-hover:         #c8102e;

  --color-footer-bg:         #0d2045;
  --color-footer-text:       #f1f3f5;

  --color-readonly-bg:       #ddeeff;
  --color-readonly-text:     #0a1628;
  --color-stale-bg:          #fff8e1;
  --color-stale-text:        #343a40;

  --color-border:            #dee2e6;
  --color-shadow:            rgba(0,0,0,0.12);

  --font-sans:    'Open Sans', Arial, sans-serif;
  --font-heading: 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;

  --radius:   6px;
  --max-w:    1200px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
}

a { color: var(--color-link); text-decoration: none; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }
a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

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

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  line-height: 1.2;
}

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

/* ─── Skip Link ──────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 16px;
  font-weight: 700;
  z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { top: 0; }

/* ─── Top Bar ────────────────────────────────────────────────────────────────── */
.site-topbar {
  background: var(--color-accent);
  color: #fff;
  font-size: 12px;
  padding: 6px 0;
  position: relative;
  z-index: 99999;
}
.site-topbar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 20px;
}
.site-topbar a { color: #fff; font-weight: 600; white-space: nowrap; text-decoration: none; }
.site-topbar a:hover { text-decoration: underline; }
.site-topbar a:focus-visible { outline-color: #fff; }

/* Push topbar below WP admin bar when logged in */
.admin-bar .site-topbar { margin-top: 0; }

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-nav-bg);
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--color-shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.site-branding img {
  height: 48px;
  width: auto;
}
.site-branding__text { display: flex; flex-direction: column; }
.site-branding__name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.5px;
}
.site-branding__tagline {
  font-size: 11px;
  color: var(--color-gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ─── Primary Navigation ─────────────────────────────────────────────────────── */
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  color: var(--color-nav-text);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  outline: none;
}
.primary-nav .nav-cta {
  background: var(--color-accent);
  color: #fff;
  margin-left: 8px;
  padding: 8px 18px;
}
.primary-nav .nav-cta:hover { background: var(--color-accent-hover); }

/* ─── Hero Section ───────────────────────────────────────────────────────────── */
.site-hero {
  background: linear-gradient(135deg, var(--color-bg-hero) 0%, #1a3a6b 60%, #0d2045 100%);
  color: #fff;
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
}
.site-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");
}
.site-hero .container { position: relative; max-width: 800px; }

.hero-eyebrow {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 3px;
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.1;
}
.hero-title span { color: var(--color-gold); }
.hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,0.88);
  max-width: 620px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 3px; }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; text-decoration: none; }

/* ─── Stats Bar ──────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--color-accent);
  color: #fff;
  padding: 24px 0;
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}
.stat-item {
  padding: 8px 20px;
  border-right: 1px solid rgba(255,255,255,0.25);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ─── Section Commons ────────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-card); }
.section-dark { background: var(--color-bg-navy); color: var(--color-text-light); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-header { text-align: center; margin-bottom: 48px; }
.section-eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}
.section-dark .section-desc { color: rgba(255,255,255,0.75); }

/* ─── Mission Cards ──────────────────────────────────────────────────────────── */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.mission-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.mission-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--color-accent);
}
.mission-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px var(--color-shadow); }
.mission-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}
.mission-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text-heading);
}
.mission-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ─── Two-column content + eligibility ──────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.eligibility-list {
  list-style: none;
  margin-top: 16px;
}
.eligibility-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
}
.eligibility-list li:last-child { border-bottom: none; }
.eligibility-list .check {
  color: var(--color-accent);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── District Grid ──────────────────────────────────────────────────────────── */
.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.district-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background 0.2s;
  text-decoration: none;
  color: var(--color-text-light);
}
.district-card:hover {
  background: rgba(200,16,46,0.25);
  border-color: var(--color-accent);
  color: #fff;
  text-decoration: none;
}
.district-card:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 2px; }
.district-number {
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.district-name { font-size: 14px; font-weight: 600; line-height: 1.3; }

/* ─── Leadership Strip ───────────────────────────────────────────────────────── */
.leadership-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  text-align: center;
}
.leader-card {
  padding: 24px 16px;
}
.leader-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 3px solid var(--color-accent);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}
.leader-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.leader-card p { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── News / Announcements ───────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.news-card-body { padding: 24px; }
.news-tag {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.news-card h3 { font-size: 16px; margin-bottom: 8px; }
.news-card p { font-size: 14px; color: var(--color-text-secondary); }
.news-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 12px; }

/* ─── CTA Banner ─────────────────────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(90deg, var(--color-accent) 0%, #8b0c1f 100%);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta-banner h2 { color: #fff; font-size: clamp(24px, 4vw, 36px); margin-bottom: 12px; }
.cta-banner p { font-size: 17px; opacity: 0.9; max-width: 560px; margin: 0 auto 28px; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 14px; opacity: 0.75; margin-top: 12px; line-height: 1.7; }
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.72); font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 8px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .primary-nav { display: none; }
}
@media (max-width: 600px) {
  .stats-bar .container { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}

/* ─── Nav Dropdown ───────────────────────────────────────────────────────────── */
.nav-dropdown { position: relative; }

.nav-dropdown__trigger {
  background: none;
  border: none;
  color: var(--color-nav-text);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown__trigger:hover,
.nav-dropdown__trigger:focus-visible,
.nav-dropdown.open .nav-dropdown__trigger {
  background: var(--color-accent);
  color: #fff;
  outline: none;
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px var(--color-shadow);
  min-width: 280px;
  list-style: none;
  z-index: 200;
  padding: 6px 0;
}
.nav-dropdown.open .nav-dropdown__menu { display: block; }

.nav-dropdown__menu li[role="separator"] {
  height: 1px;
  background: var(--color-border);
  margin: 4px 0;
}

.nav-dropdown__menu a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-heading);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown__menu a:hover,
.nav-dropdown__menu a:focus-visible {
  background: var(--color-bg-card);
  color: var(--color-accent);
  text-decoration: none;
  outline: none;
}
/* "All Directorates" top link — slightly bolder */
.nav-dropdown__menu li:first-child a {
  color: var(--color-accent);
  font-weight: 700;
}

/* ─── Directorates landing page ──────────────────────────────────────────────── */
.anaco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.anaco-card {
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.anaco-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px var(--color-shadow);
  text-decoration: none;
  color: var(--color-text-primary);
}
.anaco-card:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.anaco-card__code { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--color-accent); margin-bottom: 6px; }
.anaco-card__title { font-size: 17px; font-weight: 700; font-family: var(--font-heading); color: var(--color-text-heading); margin-bottom: 8px; }
.anaco-card__desc { font-size: 13px; color: var(--color-text-secondary); line-height: 1.6; }
