@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@600;700&family=Work+Sans:wght@500;600&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   LAYER 1: RAW PALETTE — USWDS-aligned system tokens
   Source: USWDS blue-warm + red-warm + gold families
   ============================================================ */
:root {
  --color-navy-90:     #07182E;
  --color-navy-80:     #0A2240;
  --color-navy-70:     #0D3260;
  --color-navy-60:     #1A4A8A;
  --color-red-50:      #B22234;  /* Old Glory Red — Pantone 193C equivalent */
  --color-red-60:      #8C1A28;
  --color-gold-50:     #C5A028;  /* Military Gold — WCAG AA on navy: 5.45:1 ✅ */
  --color-gold-40:     #D4B440;
  --color-slate-30:    #1E293B;
  --color-slate-10:    #F0F2F5;  /* Military clipboard tone */
}

/* ============================================================
   LAYER 2: SEMANTIC TOKENS — mapped from raw palette
   ============================================================ */
:root {
  --primary:           var(--color-navy-80);
  --primary-light:     var(--color-navy-70);
  --primary-dark:      var(--color-navy-90);
  --secondary:         var(--color-red-50);
  --secondary-hover:   var(--color-red-60);
  --accent:            var(--color-gold-50);
  --accent-hover:      var(--color-gold-40);
  --text-main:         var(--color-slate-30);
  --text-light:        #64748B;
  --text-inverse:      #FFFFFF;
  --bg-main:           #FFFFFF;
  --bg-alt:            var(--color-slate-10);
  --bg-dark:           var(--color-navy-90);
  --overlay:           rgba(7, 24, 46, 0.65);

  /* Typography */
  --font-heading:  'Oswald', sans-serif;
  --font-ui:       'Work Sans', sans-serif;
  --font-body:     'Inter', sans-serif;

  /* Layout */
  --container-width: 1200px;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 2.5rem;   /* Mobile-first: reduced from 3.5rem */

  /* Radii / Shadows — heavier for military weight */
  --radius: 8px;
  --shadow:       0 6px 20px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.18);
}

@media (min-width: 768px) {
  :root {
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;   /* Desktop restored */
  }
}

/* ============================================================
   RESET
   ============================================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TYPOGRAPHY SYSTEM
   Oswald for h1-h3 (proclamation layer)
   Work Sans for h4-h6 + UI elements (institutional layer)
   Inter for body (legibility layer)
   ============================================================ */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  line-height: 1.15;
  margin-bottom: 1rem;
  text-wrap: balance;
}

h4, h5, h6 {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  text-wrap: pretty;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary);
}

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

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section {
  padding: var(--spacing-xl) 0;
}

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

/* Section Dark — deep navy gradient with CSS star texture */
.section-dark {
  background: linear-gradient(160deg, var(--color-navy-90) 0%, var(--color-navy-80) 100%);
  color: var(--text-inverse);
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: '★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  font-size: 0.55rem;
  letter-spacing: 1.6rem;
  line-height: 2.8rem;
  color: rgba(255, 255, 255, 0.04);
  pointer-events: none;
  word-break: break-all;
  padding: 1rem;
  z-index: 0;
}

.section-dark > * {
  position: relative;
  z-index: 1;
}

.section-dark h2, .section-dark h3, .section-dark h4 {
  color: var(--text-inverse);
}

.text-center {
  text-align: center;
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 { grid-template-columns: repeat(1, 1fr); }
.grid-3 { grid-template-columns: repeat(1, 1fr); }
.grid-4 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   BUTTONS
   Primary  = Military Gold bg + navy text (WCAG 5.45:1 ✅)
   Secondary = White border/text (hero/dark bg only)
   Outline  = Crimson border/text, fills on hover
   Ghost    = Footer low-priority actions
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.25s ease,
              box-shadow 0.25s ease,
              color 0.25s ease;
  text-transform: uppercase;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: var(--primary);
  box-shadow: 0 4px 24px rgba(197, 160, 40, 0.55);
}

.btn-secondary {
  background-color: transparent;
  border: 2px solid var(--text-inverse);
  color: var(--text-inverse);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-inverse);
}

/* Crimson on White: 4.63:1 ✅ AA — enforce min font-size 1rem */
.btn-outline {
  background-color: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.btn-outline:hover {
  background-color: var(--secondary);
  color: var(--text-inverse);
}

.btn-ghost {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--text-inverse);
}

/* ============================================================
   TOP CREDENTIAL BAR
   Mirrors MilitaryOneSource narrow institutional strip pattern
   ============================================================ */
.top-credential-bar {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  padding: 0.4rem 0;
  text-align: center;
}

.top-credential-bar .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.top-credential-bar span {
  white-space: nowrap;
}

.top-credential-bar .sep {
  color: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   HEADER & NAV — Dark Command Bar
   ============================================================ */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--primary);
  border-bottom: 2px solid var(--secondary);
  z-index: 1000;
  padding: 0.85rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-inverse);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

/* Dropdown styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.dropdown-toggle.active {
  color: var(--accent);
}

.dropdown-toggle::after {
  content: "▼";
  font-size: 0.6em;
  transition: transform 0.2s;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background-color: var(--color-navy-70);
  border-top: 2px solid var(--secondary);
  border-radius: 0 0 var(--radius) var(--radius);
  min-width: 210px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  padding: 0.5rem 0;
  z-index: 1001;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dropdown:hover .dropdown-menu,
.dropdown.touch-active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  display: block;
  color: rgba(255, 255, 255, 0.8);
  transition: background-color 0.2s, color 0.2s;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-inverse);
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .mobile-menu-btn { display: none !important; } /* !important guards against mobile layer overrides */
}

/* Mobile Nav Overlay */
.mobile-nav {
  position: fixed;
  top: 60px;
  left: 0;
  width: 100%;
  background-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  flex-direction: column;
  gap: 1.5rem;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 999;
  border-top: 2px solid var(--secondary);
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav a {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--accent);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-inverse);
  text-align: center;
}

.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translateX(-50%) translateY(-50%);
  z-index: -2;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay);
  z-index: -1;
}

.hero-content {
  max-width: 820px;
  padding: 0 1rem;
}

/* Gold pill trust-line — service ribbon badge */
.hero .trust-line {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 0.3rem 1.1rem;
}

.hero h1 {
  font-size: 2.5rem;
  color: var(--text-inverse);
  margin-bottom: 1.5rem;
  /* Gold underline pseudo-element via wrapper */
}

.hero h1::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 4rem; }
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  opacity: 0.92;
  line-height: 1.65;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Hero stat strip — social proof adjacent to CTA */
.hero-stats-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.hero-stats-strip .stat-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-stats-strip .stat-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
}

.hero-mini-trust {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.82rem;
  opacity: 0.75;
  font-family: var(--font-ui);
}

@media (min-width: 768px) {
  .hero-mini-trust {
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
  }
}

/* ============================================================
   PAGE HERO (Inner pages)
   Military insignia gradient + citation ribbon rule
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--color-navy-90) 0%, var(--color-navy-70) 60%, var(--color-navy-80) 100%);
  color: var(--text-inverse);
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero.has-video {
  background: none;
}

.page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(16, 24, 32, 0.85) 0%, rgba(16, 24, 32, 0.6) 60%, rgba(16, 24, 32, 0.8) 100%);
  z-index: -1;
}

.page-hero > .container {
  position: relative;
  z-index: 1;
}


/* Unit citation ribbon: red-gold-red gradient rule at bottom */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--secondary) 15%,
    var(--accent) 50%,
    var(--secondary) 85%,
    transparent 100%
  );
}

.page-hero h1 {
  color: var(--text-inverse);
  font-size: 2.5rem;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.88);
}

@media (min-width: 768px) {
  .page-hero { padding: 6rem 0 4rem; }
  .page-hero h1 { font-size: 3.5rem; }
}

/* ============================================================
   TRUST BAR — Credential Panel (MilitaryOneSource pattern)
   ============================================================ */
.trust-bar {
  background-color: var(--primary);
  color: var(--text-inverse);
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.trust-bar-grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  overflow: hidden;
}

.trust-badge {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 1rem;
  border-left: 2px solid rgba(178, 34, 52, 0.6);
  white-space: nowrap;
}

.trust-badge:first-child {
  border-left: none;
}

.trust-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .trust-bar-grid {
    justify-content: space-between;
  }
}

/* ============================================================
   CARDS — Crimson top-ribbon (military medal bar device)
   ============================================================ */
.card {
  background-color: var(--bg-main);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--secondary);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  contain: layout style;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  background: linear-gradient(135deg, #fff 0%, #f4f6f8 100%);
}

@media (min-width: 768px) {
  .card { padding: 2rem; }
}

.card-icon {
  font-size: 2.5rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.02em;
  text-transform: none;
}

/* ============================================================
   TESTIMONIAL CARDS
   MOS→Job format per Reddit r/Veterans feedback
   ============================================================ */
.testimonial-strip {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .testimonial-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.testimonial-card {
  background-color: var(--bg-main);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.testimonial-card .quote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  font-style: italic;
  margin-bottom: 0;
}

.testimonial-card .quote::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 0;
  vertical-align: -0.6rem;
  margin-right: 0.15rem;
}

.testimonial-card .source {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-top: 1px solid #E2E8F0;
  padding-top: 0.75rem;
}

.testimonial-card .source strong {
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
}

.testimonial-card .source span {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 3rem 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-num {
  width: 44px;
  height: 44px;
  background-color: var(--primary);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .timeline {
    flex-direction: row;
    justify-content: space-between;
    position: relative;
  }

  .timeline::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 50%, var(--secondary) 100%);
    z-index: 0;
    opacity: 0.4;
  }

  .timeline-step {
    position: relative;
    z-index: 2;
    flex: 1;
    align-items: center;
    text-align: center;
  }
}

/* ============================================================
   ACCORDIONS
   ============================================================ */
.accordion {
  margin-bottom: 1rem;
  border: 1px solid #D1D9E0;
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-header {
  background-color: var(--bg-main);
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--primary);
  transition: background-color 0.3s;
}

.accordion-header:hover {
  background-color: var(--bg-alt);
}

.accordion-icon {
  transition: transform 0.3s;
  color: var(--secondary);
}

.accordion.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease;
  background-color: var(--bg-main);
}

.accordion.active .accordion-body {
  padding: 1.5rem;
  max-height: 1000px;
  border-top: 1px solid #E2E8F0;
}

/* ============================================================
   FOOTER — Honor Roll Treatment
   ============================================================ */
footer {
  background: linear-gradient(180deg, var(--color-navy-80) 0%, var(--primary-dark) 100%);
  color: rgba(255, 255, 255, 0.7);
  padding: 0 0 2rem;
  border-top: 4px solid var(--accent);   /* Gold honor rule — top medal bar */
}

footer .container > * {
  padding-top: 4rem;
}

footer .container > .footer-bottom {
  padding-top: 0;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
  }
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-inverse);
  margin-bottom: 1rem;
  display: block;
}

footer h4 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

footer ul {
  list-style: none;
}

footer ul li {
  margin-bottom: 0.75rem;
}

footer a {
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-body);
  transition: color 0.2s;
}

footer a:hover {
  color: var(--accent);
}

/* Footer credential badge pills */
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.badge-pill {
  display: inline-block;
  border: 1px solid rgba(197, 160, 40, 0.45);
  color: rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  padding: 0.2rem 0.85rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-family: var(--font-ui);
}

/* ============================================================
   MODAL GLOBAL INFRASTRUCTURE
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(7, 24, 46, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background-color: var(--bg-main);
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius);
  border-top: 4px solid var(--secondary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  padding: 2.5rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-container {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  font-weight: 300;
  color: var(--text-light);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: var(--secondary);
}

.modal-header {
  margin-bottom: 2rem;
}

.modal-header h2 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.modal-phone {
  background-color: var(--bg-alt);
  padding: 1rem;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 2rem;
  border-left: 3px solid var(--accent);
}

.modal-phone p {
  margin: 0 0 0.25rem 0;
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: var(--font-ui);
}

.modal-phone a {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

/* Modal Form */
.modal-container .form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.modal-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.03em;
}

.modal-container input,
.modal-container select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #D1D9E0;
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.modal-container input:focus,
.modal-container select:focus {
  outline: none;
  border-color: var(--primary);
}

.modal-success-state {
  text-align: center;
  padding: 2rem 0;
  display: none;
}

.modal-success-state .icon {
  font-size: 4rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ============================================================
   HELPERS
   ============================================================ */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.section-header {
  margin-bottom: 2rem;
  max-width: 800px;
}

@media (min-width: 768px) {
  .section-header { margin-bottom: 3rem; }
}

.section-header h2 {
  font-size: 2rem;
}

@media (min-width: 768px) {
  .section-header h2 { font-size: 2.5rem; }
}

.flex-col {
  display: flex;
  flex-direction: column;
}
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Skill tag chips (Program page) — updated with navy bg */
.skill-tag {
  background: rgba(10, 34, 64, 0.08);
  color: var(--primary);
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-weight: 500;
  font-family: var(--font-ui);
}

/* ============================================================
   MOBILE OPTIMIZATION LAYER
   Sources: WCAG 2.1, USWDS, web.dev, MDN, Smashing Magazine
   Techniques: clamp() fluid type, dvh, touch targets 44px+,
   coarse-pointer detection, overflow containment
   ============================================================ */

/* ── 1. FLUID TYPOGRAPHY — clamp() replaces static breakpoint jumps ── */
h1 {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.5rem);
}
h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
}

/* Override static hero h1 — fluid from 1.8rem (360px) to 4rem (1200px) */
.hero h1 {
  font-size: clamp(1.8rem, 4.5vw + 0.5rem, 4rem);
}

/* Override page-hero h1 */
.page-hero h1 {
  font-size: clamp(1.6rem, 4vw + 0.5rem, 3.5rem);
}

/* Section header h2 fluid */
.section-header h2 {
  font-size: clamp(1.35rem, 3vw + 0.5rem, 2.5rem);
}

/* ── 2. HERO — dvh fix (100vh breaks on mobile Safari with dynamic toolbar) ── */
.hero {
  /* Fallback for browsers without dvh support */
  min-height: 80vh;
  /* Modern: dynamic viewport height — adjusts as address bar shows/hides */
  min-height: 80dvh;
}

/* On mobile, reduce hero height to leave room for content without scrolling */
@media (max-width: 767px) {
  .hero {
    min-height: 90dvh;
    align-items: flex-end;
    padding-bottom: 3rem;
  }
  .hero-content {
    padding: 0 1.25rem;
    text-align: center;
  }
  .hero p {
    font-size: 1rem;
    line-height: 1.6;
  }
}

/* ── 3. TOP CREDENTIAL BAR — hide separators + allow horizontal scroll on tiny screens ── */
@media (max-width: 479px) {
  .top-credential-bar {
    display: none; /* Below 480px: too narrow, info shown in trust bar below hero */
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .top-credential-bar .container {
    gap: 0.5rem;
    justify-content: center;
  }
  .top-credential-bar .sep {
    display: none; /* Hide separators — items wrap cleanly without them */
  }
  .top-credential-bar span {
    white-space: normal;
    text-align: center;
  }
}

/* ── 4. TRUST BAR — scrollable on mobile, prevent overflow ── */
@media (max-width: 767px) {
  .trust-bar {
    padding: 0.4rem 0;
  }
  .trust-bar-grid {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox */
    justify-content: flex-start;
    padding: 0 1rem;
    gap: 0;
  }
  .trust-bar-grid::-webkit-scrollbar {
    display: none;                /* Chrome/Safari */
  }
  .trust-badge {
    padding: 0.25rem 0.9rem;
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    flex-shrink: 0;               /* Prevent badges from shrinking = no clip */
    white-space: nowrap;
  }
}

/* ── 5. MOBILE HAMBURGER — minimum 44×44px touch target (WCAG 2.5.5) ── */
/* Scoped to mobile only — must not override display:none at 768px+ */
@media (max-width: 767px) {
  .mobile-menu-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
  }
}

/* ── 6. MOBILE NAV — full-height, scrollable, correct top offset ── */
@media (max-width: 767px) {
  .mobile-nav {
    /* Offset = credential bar (hidden <480px) + header height (~58px) */
    top: 58px;
    max-height: calc(100dvh - 58px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem 1.25rem;
    gap: 0;
  }
  .mobile-nav a {
    /* Minimum 44px touch target per WCAG 2.5.5 */
    padding: 0.75rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 1rem;
  }
  .mobile-nav a:last-child {
    border-bottom: none;
    margin-top: 1rem;
    justify-content: center;
  }
}

/* ── 7. BUTTONS — full-width stacked on mobile for easy tapping ── */
@media (max-width: 479px) {
  .hero-btns {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0 0.5rem;           /* slight inset so buttons don't touch edges */
  }
  .hero-btns .btn {
    width: 100%;
    padding: 0.9rem 1rem;    /* Taller touch target */
    font-size: 0.9rem;
    box-sizing: border-box;
  }
  /* General button minimum touch target */
  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ── 8. HERO STAT STRIP — hide separators when they wrap ── */
@media (max-width: 600px) {
  .hero-stats-strip {
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
  }
  .hero-stats-strip .stat-sep {
    display: none;
  }
}

/* ── 9. SECTION PADDING — reduce large inline paddings on mobile ── */
@media (max-width: 767px) {
  /* Catch hardcoded 6rem padding sections (CTA sections in index.html) */
  .section[style*="padding: 6rem"],
  section[style*="padding: 6rem"] {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  /* Page hero: reduce excessive top/bottom space */
  .page-hero {
    padding: 2.5rem 0 2rem;
  }
  /* Timeline margin */
  .timeline {
    margin: 1.5rem 0;
    gap: 1.25rem;
  }
  /* Testimonial card padding */
  .testimonial-card {
    padding: 1.25rem;
  }
  /* Card padding mobile */
  .card {
    padding: 1.25rem;
  }
}

/* ── 10. FOOTER — 2-column grid on medium mobile, single col below 480px ── */
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;  /* Single column on mobile */
    gap: 1.5rem;
  }
  footer .container > * {
    padding-top: 2.5rem;
  }
  .footer-bottom {
    font-size: 0.75rem;
    padding-top: 1.5rem !important;
  }
}

@media (min-width: 480px) and (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;  /* 2-col on larger phones */
  }
}

/* ── 11. MODAL — full-screen on mobile ── */
@media (max-width: 767px) {
  .modal-container {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    border-radius: 0;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
  }
  .modal-overlay {
    align-items: flex-end;    /* Sheet slides up from bottom */
  }
  .modal-overlay.active .modal-container {
    transform: translateY(0);
  }
}

/* ── 12. ACCORDION — larger touch targets on mobile ── */
@media (max-width: 767px) {
  .accordion-header {
    padding: 1rem 1.25rem;
    min-height: 52px;
  }
  .accordion-body.active,
  .accordion.active .accordion-body {
    padding: 1rem 1.25rem 1.25rem;
  }
}

/* ── 13. GRID GAPS — tighter on mobile to reclaim vertical space ── */
@media (max-width: 767px) {
  .grid {
    gap: 1rem;
  }
}

/* ── 14. COARSE POINTER — enhance all interactive elements for touch ─── */
/* Targets touchscreen devices regardless of screen size (tablets, phones)  */
@media (any-pointer: coarse) {
  .btn {
    min-height: 44px;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
  }
  .accordion-header {
    min-height: 52px;
  }
  .dropdown-menu a {
    padding: 0.85rem 1.5rem;
    min-height: 44px;
  }
  /* Increase nav link tap area */
  .mobile-nav a {
    padding: 0.8rem 0;
    min-height: 44px;
  }
}

/* ── 15. OVERFLOW SAFETY — prevent horizontal scroll on all screens ── */
/* overflow-x: hidden on html/body stops page-level horizontal scroll.         */
/* DO NOT set overflow on .container — it clips position:absolute dropdowns.   */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Explicitly allow dropdowns to escape nav bounds — must be overflow:visible */
.nav-container {
  overflow: visible;
}

/* ── 16. IMAGES — ensure hero background doesn't cause layout shift ── */
.hero-video-bg {
  will-change: transform;   /* GPU layer — prevents repaint on scroll */
}
