/* =============================================
   AMAC Navigation Prototype - Option C
   Mega Menu Navigation
   Tailwind-Inspired Design Token System
   ============================================= */

/* -----------------------------------------
   1. TAILWIND-INSPIRED DESIGN TOKENS
   ----------------------------------------- */
:root {
    /* ===== FONT FAMILY (per amac_brand.txt) ===== */
    --font-serif: "Merriweather", Georgia, serif;
    --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-base: var(--font-sans);  /* Alias for backwards compatibility */

    /* ===== SPACING SCALE (4px base unit) ===== */
    --space-0: 0;
    --space-px: 1px;
    --space-0-5: 0.125rem;   /* 2px */
    --space-1: 0.25rem;      /* 4px */
    --space-1-5: 0.375rem;   /* 6px */
    --space-2: 0.5rem;       /* 8px */
    --space-2-5: 0.625rem;   /* 10px */
    --space-3: 0.75rem;      /* 12px */
    --space-3-5: 0.875rem;   /* 14px */
    --space-4: 1rem;         /* 16px */
    --space-5: 1.25rem;      /* 20px */
    --space-6: 1.5rem;       /* 24px */
    --space-7: 1.75rem;      /* 28px */
    --space-8: 2rem;         /* 32px */
    --space-9: 2.25rem;      /* 36px */
    --space-10: 2.5rem;      /* 40px */
    --space-11: 2.75rem;     /* 44px */
    --space-12: 3rem;        /* 48px */
    --space-14: 3.5rem;      /* 56px */
    --space-16: 4rem;        /* 64px */
    --space-20: 5rem;        /* 80px */
    --space-24: 6rem;        /* 96px */
    --space-28: 7rem;        /* 112px */
    --space-32: 8rem;        /* 128px */

    /* ===== TYPOGRAPHY SCALE (per amac_brand.txt) ===== */
    --text-xs: 0.75rem;      /* 12px - fine print */
    --text-sm: 0.875rem;     /* 14px - small text, labels */
    --text-base: 1rem;       /* 16px - nav items minimum */
    --text-lg: 1.125rem;     /* 18px - body text (brand standard) */
    --text-xl: 1.25rem;      /* 20px - callouts, stressed text */
    --text-2xl: 1.5rem;      /* 24px - small headings */
    --text-3xl: 1.75rem;     /* 28px - H3 subsection */
    --text-4xl: 2.25rem;     /* 36px - H2 section */
    --text-5xl: 3rem;        /* 48px - H1 hero */

    /* Line Heights (optimized for 50+ readability) */
    --leading-none: 1;
    --leading-tight: 1.2;       /* headings per brand */
    --leading-snug: 1.375;
    --leading-normal: 1.5;      /* minimum for body per brand */
    --leading-relaxed: 1.625;   /* preferred for body */
    --leading-loose: 2;

    /* Font Weights (AMAC Brand: 400/600/700) */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Letter Spacing (improved for uppercase readability) */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.05em;    /* uppercase text standard per brand */
    --tracking-wider: 0.075em;  /* small uppercase labels */
    --tracking-widest: 0.1em;

    /* ===== COLOR PALETTE ===== */

    /* Liberty Blue Scale (Primary Brand Color) */
    --blue-50: #e6eef8;
    --blue-100: #ccddf1;
    --blue-200: #99bbe3;
    --blue-300: #6699d5;
    --blue-400: #3377c7;
    --blue-500: #0055b9;
    --blue-600: #004694;
    --blue-700: #003870;
    --blue-800: #002a4b;
    --blue-900: #002868;  /* Liberty Blue - Primary */
    --blue-950: #001a44;

    /* Patriot Red Scale (Secondary Brand Color) */
    --red-50: #fce8ec;
    --red-100: #f9d1d9;
    --red-200: #f3a3b3;
    --red-300: #ed758d;
    --red-400: #e74767;
    --red-500: #e11941;
    --red-600: #e21d37;  /* AMAC Logo Red - Primary */
    --red-700: #990826;
    --red-800: #73061d;
    --red-900: #4d0413;
    --red-950: #26020a;

    /* Constitution Gold Scale (Accent Color) */
    --gold-50: #faf6f0;
    --gold-100: #f5ede1;
    --gold-200: #ebdbc3;
    --gold-300: #e1c9a5;
    --gold-400: #d7b787;
    --gold-500: #C49A6C;  /* Constitution Gold - Primary */
    --gold-600: #b08656;
    --gold-700: #8c6b45;
    --gold-800: #685033;
    --gold-900: #443522;
    --gold-950: #221a11;

    /* Slate Blue Scale (Supporting Color) */
    --slate-50: #f0f4f8;
    --slate-100: #e1e9f1;
    --slate-200: #c3d3e3;
    --slate-300: #a5bdd5;
    --slate-400: #87a7c7;
    --slate-500: #4A6FA5;  /* Slate Blue - Primary */
    --slate-600: #3b5984;
    --slate-700: #2c4363;
    --slate-800: #1e2d42;
    --slate-900: #0f1721;
    --slate-950: #080b11;

    /* Neutral Gray Scale */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;

    /* Semantic Color Tokens */
    --color-liberty-blue: var(--blue-900);
    --color-patriot-red: var(--red-600);
    --color-constitution-gold: var(--gold-500);
    --color-slate-blue: var(--slate-500);
    --color-white: #FFFFFF;
    --color-cream: #F8F7F2;
    --color-charcoal: #333333;
    --color-text: #333333;
    --color-bg: #FFFFFF;
    --color-border: #cccccc;
    --color-link: #cc3366;
    --color-link-hover: #333366;

    /* ===== SHADOWS ===== */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    --shadow-none: 0 0 #0000;

    /* ===== BORDER RADIUS ===== */
    --radius-none: 0;
    --radius-sm: 0.125rem;   /* 2px */
    --radius: 0.25rem;       /* 4px */
    --radius-md: 0.375rem;   /* 6px */
    --radius-lg: 0.5rem;     /* 8px */
    --radius-xl: 0.75rem;    /* 12px */
    --radius-2xl: 1rem;      /* 16px */
    --radius-3xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;

    /* ===== TRANSITIONS ===== */
    --duration-75: 75ms;
    --duration-100: 100ms;
    --duration-150: 150ms;
    --duration-200: 200ms;
    --duration-300: 300ms;
    --duration-500: 500ms;
    --duration-700: 700ms;
    --duration-1000: 1000ms;

    --ease-linear: linear;
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

    /* ===== RING (Focus Outlines) ===== */
    --ring-color: var(--gold-500);
    --ring-offset-width: 2px;
    --ring-offset-color: var(--color-white);
    --ring-width: 3px;

    /* ===== Z-INDEX SCALE ===== */
    --z-0: 0;
    --z-10: 10;
    --z-20: 20;
    --z-30: 30;
    --z-40: 40;
    --z-50: 50;
    --z-auto: auto;

    /* ===== COMPONENT-SPECIFIC TOKENS ===== */
    --nav-height-upper: 36px;      /* Compact utility bar */
    --nav-height-main: 80px;       /* Substantial primary nav (enterprise standard) */
    --nav-height-mobile-tab: 64px;
    --container-width: 1280px;
    --nav-padding-desktop: 48px;   /* Generous horizontal padding */
}

/* -----------------------------------------
   2. RESET & BASE STYLES
   ----------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-lg);           /* 18px - AMAC brand standard for body */
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed); /* 1.625 - optimized for 50+ readability */
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-width: 100%;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--duration-150) var(--ease-in-out);
}

a:focus-visible {
    outline: var(--ring-width) solid var(--ring-color);
    outline-offset: var(--ring-offset-width);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

button:focus-visible {
    outline: var(--ring-width) solid var(--ring-color);
    outline-offset: var(--ring-offset-width);
}

ul {
    list-style: none;
}

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

/* -----------------------------------------
   3. UTILITY CLASSES
   ----------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transition-all {
    transition-property: all;
    transition-timing-function: var(--ease-in-out);
    transition-duration: var(--duration-150);
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: var(--ease-in-out);
    transition-duration: var(--duration-150);
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: var(--ease-in-out);
    transition-duration: var(--duration-150);
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--space-5);
    width: 100%;
}

/* -----------------------------------------
   4. SKIP LINK (Accessibility)
   ----------------------------------------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-liberty-blue);
    color: var(--color-white);
    padding: var(--space-3) var(--space-6);
    font-weight: var(--font-semibold);
    z-index: 9999;
    border-radius: 0 0 var(--radius) var(--radius);
    transition: top var(--duration-200) var(--ease-out);
}

.skip-link:focus {
    top: 0;
}

/* -----------------------------------------
   5. PROMO STRIP (Membership CTA)
   Thin, attention-grabbing, converts visitors
   ----------------------------------------- */
.promo-strip {
    background-color: var(--color-liberty-blue);
    padding: var(--space-2) 0;
    text-align: center;
    position: relative;
    z-index: calc(var(--z-50) + 2);
}

.promo-strip .container {
    padding-inline: var(--nav-padding-desktop);
    max-width: 100%;
}

.promo-text {
    color: var(--color-white);
    font-size: 13px;
    font-weight: var(--font-normal);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.promo-text strong {
    font-weight: var(--font-bold);
    color: var(--gold-300);
}

.promo-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--color-white);
    font-weight: var(--font-semibold);
    background-color: var(--color-patriot-red);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    margin-left: var(--space-2);
    transition: all var(--duration-150) var(--ease-in-out);
}

.promo-cta:hover {
    background-color: var(--red-700);
    transform: translateX(2px);
}

.promo-arrow {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform var(--duration-150) var(--ease-in-out);
}

.promo-cta:hover .promo-arrow {
    transform: translateX(2px);
}

/* -----------------------------------------
   6. UPPER UTILITY NAV (Enterprise Dark Bar)
   Professional, compact, clearly secondary
   ----------------------------------------- */
.upper-nav {
    background-color: #1a1a1a;  /* Near-black for authority */
    height: var(--nav-height-upper);
    position: relative;
    z-index: calc(var(--z-50) + 1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.upper-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding-inline: var(--nav-padding-desktop);
    max-width: 100%;
}

.upper-nav-group {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.upper-nav a,
.upper-nav button {
    color: rgba(255,255,255,0.85);
    font-size: 13px;               /* Smaller, clearly utility */
    font-weight: var(--font-medium);
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-1) 0;
    transition: color var(--duration-150) var(--ease-in-out);
}

.upper-nav a:hover,
.upper-nav button:hover {
    color: var(--color-white);
}

/* Separator between utility items */
/* Utility bar label and separator */
.utility-label {
    color: rgba(255,255,255,0.75);  /* Improved contrast (#2) */
    font-size: 13px;
    font-weight: var(--font-medium);
    letter-spacing: 0.3px;
    margin-right: var(--space-2);
}

.utility-separator {
    color: rgba(255,255,255,0.2);  /* Lighter separators (#6) */
    margin: 0 var(--space-2);
}

/* Visual divider between left and right groups (#3) */
.upper-nav-left {
    gap: var(--space-1);
    padding-right: var(--space-6);
    border-right: 1px solid rgba(255,255,255,0.15);
    margin-right: var(--space-2);
}

/* External link with persistent icon (#1) */
.external-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.external-link::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M14 3h7v7h-2V6.41L8.41 17 7 15.59 17.59 5H14V3zM5 5h7V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7H5V5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.4;
    transition: opacity var(--duration-150) var(--ease-in-out);
}

.external-link:hover::after {
    opacity: 1;
}

.icon-external,
.icon-search {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.7;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
}

.search-text {
    display: none;  /* Icon only in utility bar for cleaner look */
}

.login-link {
    opacity: 0.9;
}

/* Join AMAC Button (Primary CTA - enhanced prominence #4) */
.btn-join {
    background-color: var(--color-patriot-red);
    color: var(--color-white) !important;
    padding: var(--space-2) var(--space-5) !important;  /* Slightly larger */
    border-radius: var(--radius);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    font-size: var(--text-xs);
    letter-spacing: var(--tracking-wide);
    transition: all var(--duration-150) var(--ease-in-out);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.2), var(--shadow-sm);  /* Subtle border glow */
}

.btn-join:hover {
    background-color: var(--red-950);
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(226, 29, 55, 0.4), var(--shadow-md);  /* Red glow on hover */
    color: var(--color-white) !important;
}

/* -----------------------------------------
   6. MAIN HEADER NAV (Enterprise Primary Nav)
   Substantial, authoritative, professional
   ----------------------------------------- */
.main-header {
    background-color: var(--color-white);
    height: var(--nav-height-main);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);  /* Subtle, professional shadow */
    position: sticky;
    top: 0;
    z-index: var(--z-50);
    border-bottom: 1px solid var(--gray-200);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding-inline: var(--nav-padding-desktop);
    max-width: none;  /* Full width with padding */
}

/* Logo - Commands attention */
.brand-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: opacity var(--duration-150) var(--ease-in-out);
}

.brand-logo:hover {
    opacity: 0.85;
}

.brand-logo-img {
    width: 130px;   /* Larger for authority */
    height: auto;
}

/* Navigation List - 4 items only */
.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-1);  /* Tighter, controlled spacing */
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

/* Nav Links - Authority Typography (4-item mega menu nav) */
.nav-link {
    font-size: 15px;               /* Professional size */
    font-weight: var(--font-medium);  /* 500 - not light, not heavy */
    letter-spacing: 0.3px;
    color: #1a1a1a;                /* Near-black for authority */
    padding: var(--space-2) var(--space-5);
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    border-bottom: 3px solid transparent;
    transition: color var(--duration-200) var(--ease-in-out),
                border-color var(--duration-200) var(--ease-in-out);
    min-height: var(--space-11);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-liberty-blue);
}

.chevron {
    width: 16px;
    height: 16px;
    fill: currentColor;
    opacity: 0.5;   /* Subtle, not prominent */
    transition: transform var(--duration-200) var(--ease-out),
                opacity var(--duration-200) var(--ease-out);
}

.nav-link:hover .chevron {
    opacity: 0.7;
}

/* Rotate chevron when dropdown is expanded (via aria-expanded) */
.nav-link[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
    opacity: 0.7;
}

/* Visual affordance that nav items with dropdowns are clickable */
.nav-link[aria-haspopup="true"] {
    cursor: pointer;
}

/* Active/expanded state - subtle underline */
.nav-link[aria-expanded="true"],
.nav-link.active {
    color: var(--color-liberty-blue);
    border-bottom-color: var(--color-liberty-blue);
}

/* -----------------------------------------
   7. REGULAR DROPDOWN (About) - Enterprise Style
   ----------------------------------------- */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-white);
    min-width: 220px;
    border: 1px solid #e5e5e5;
    border-top: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);  /* Professional shadow */
    border-radius: 0 0 var(--radius) var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity var(--duration-150) var(--ease-out),
                transform var(--duration-150) var(--ease-out),
                visibility var(--duration-150) var(--ease-out);
    pointer-events: none;
    padding: var(--space-2) 0;
}

/* Align last nav item dropdown to right edge to prevent cutoff */
.nav-item:last-child .dropdown {
    left: auto;
    right: 0;
}

/* Show dropdown via aria-expanded (works with click AND hover via JS) */
.nav-link[aria-expanded="true"] + .dropdown,
.nav-item:focus-within .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown a {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-5);
    color: var(--color-charcoal);
    font-size: 14px;
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    transition: background-color var(--duration-150) var(--ease-in-out),
                color var(--duration-150) var(--ease-in-out);
}

.dropdown a:hover,
.dropdown a:focus {
    background-color: var(--gray-50);
    color: var(--color-liberty-blue);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--gray-100);
    margin: var(--space-2) var(--space-4);
}

/* -----------------------------------------
   8. MEGA MENU (Enterprise Style)
   ----------------------------------------- */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: var(--color-white);
    width: 800px;
    max-width: calc(100vw - 48px);  /* Account for page padding */
    border: 1px solid #e5e5e5;
    border-top: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);  /* Professional shadow */
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-150) var(--ease-out),
                transform var(--duration-150) var(--ease-out),
                visibility var(--duration-150) var(--ease-out);
    pointer-events: none;
}

/* Center mega menus relative to viewport, not nav item */
.nav-item.has-mega-menu .mega-menu {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    top: calc(var(--nav-height-upper) + var(--nav-height-main));
}

/* Show mega menu via aria-expanded (works with click AND hover via JS) */
.nav-item.has-mega-menu .nav-link[aria-expanded="true"] + .mega-menu,
.nav-item.has-mega-menu:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
    padding: var(--space-5);
}

.mega-column {
    /* Column styles */
}

.mega-column-featured {
    /* Featured column (e.g., Medicare) */
}

.mega-column-title {
    display: flex;
    align-items: center;
    gap: var(--space-1-5);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-slate-blue);
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-1-5);
    border-bottom: 2px solid var(--gray-200);
}

.mega-icon {
    width: var(--space-4);
    height: var(--space-4);
    fill: var(--color-constitution-gold);
}

.mega-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mega-links a {
    display: flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    color: var(--color-charcoal);
    font-size: var(--text-sm);
    line-height: var(--leading-tight);
    min-height: var(--space-8);       /* 32px - compact */
    border-radius: var(--radius);
    transition: all var(--duration-150) var(--ease-in-out);
}

.mega-links a:hover {
    background-color: var(--color-cream);
    color: var(--color-liberty-blue);
    padding-left: var(--space-4);
}

.mega-links .featured-action {
    color: var(--color-patriot-red);
    font-weight: var(--font-semibold);
}

/* Mega Menu Footer (Featured CTA) */
.mega-footer {
    background-color: var(--color-cream);
    padding: var(--space-3) var(--space-5);
    border-top: 1px solid var(--gray-200);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.mega-footer-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.mega-cta {
    display: block;
    padding: var(--space-2-5) var(--space-3);
    background-color: var(--color-white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: all var(--duration-150) var(--ease-in-out);
}

.mega-cta:hover {
    border-color: var(--color-constitution-gold);
    box-shadow: var(--shadow-md);
}

.mega-cta-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-patriot-red);
    background-color: var(--red-50);
    padding: var(--space-0-5) var(--space-1-5);
    border-radius: var(--radius);
    margin-bottom: var(--space-1);
}

.mega-cta-action {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-liberty-blue);
    margin-top: var(--space-1);
}

/* Mega CTA with Image */
.mega-cta-with-image {
    display: flex;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
}

.mega-cta-image {
    width: 80px;
    height: 64px;      /* Fixed height for consistency */
    object-fit: cover;
    flex-shrink: 0;
}

.mega-cta-content {
    padding: var(--space-2-5) var(--space-3);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mega-cta-secondary {
    background-color: transparent;
}

.mega-cta-action-red {
    background-color: var(--color-patriot-red);
    color: var(--color-white);
    border-color: var(--color-patriot-red);
}

.mega-cta-action-red .mega-cta-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

.mega-cta-action-red .mega-cta-action {
    color: var(--color-white);
}

.mega-cta-action-red:hover {
    background-color: var(--red-700);
    border-color: var(--red-700);
}

/* -----------------------------------------
   8b. SEARCH MEGA MENU
   Premium search experience with quick actions
   ----------------------------------------- */
.nav-item-search {
    margin-left: auto;
}

.nav-link-search {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.nav-link-search .search-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.mega-menu-search {
    width: 500px;
    right: 0;
    left: auto;
}

.mega-menu-search .mega-menu-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    padding: var(--space-6);
}

/* Search Input */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: var(--space-4);
    width: 20px;
    height: 20px;
    fill: var(--gray-400);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) var(--space-12);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background-color: var(--gray-50);
    transition: all var(--duration-150) var(--ease-in-out);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-liberty-blue);
    background-color: var(--color-white);
    box-shadow: 0 0 0 3px rgba(0, 40, 104, 0.1);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-shortcut {
    position: absolute;
    right: var(--space-3);
    padding: var(--space-1) var(--space-2);
    font-size: 11px;
    font-family: var(--font-sans);
    font-weight: var(--font-medium);
    color: var(--gray-400);
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
}

/* Section Titles */
.search-section-title {
    font-size: 11px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--gray-500);
    margin-bottom: var(--space-3);
}

/* Quick Search Pills */
.search-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.search-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1-5);
    padding: var(--space-2) var(--space-3);
    font-size: 13px;
    font-weight: var(--font-medium);
    color: var(--color-liberty-blue);
    background-color: var(--blue-50);
    border-radius: var(--radius-full);
    transition: all var(--duration-150) var(--ease-in-out);
}

.search-pill svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: 0.7;
}

.search-pill:hover {
    background-color: var(--color-liberty-blue);
    color: var(--color-white);
}

.search-pill:hover svg {
    opacity: 1;
}

/* Popular Searches */
.search-popular-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.search-popular-list li a {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: 14px;
    color: var(--color-charcoal);
    border-radius: var(--radius);
    transition: all var(--duration-150) var(--ease-in-out);
}

.search-popular-list li a:hover {
    background-color: var(--gray-50);
    color: var(--color-liberty-blue);
}

/* Search Footer */
.search-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-6);
    background-color: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.search-tip {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 12px;
    color: var(--gray-500);
}

.search-tip kbd {
    padding: var(--space-0-5) var(--space-1-5);
    font-size: 11px;
    font-family: var(--font-sans);
    background-color: var(--color-white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.mega-cta-link {
    font-size: 13px;
    font-weight: var(--font-semibold);
    color: var(--color-liberty-blue);
}

.mega-cta-link:hover {
    text-decoration: underline;
}

/* -----------------------------------------
   9. MOBILE MENU TOGGLE
   ----------------------------------------- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: var(--space-12);
    height: var(--space-12);
    gap: var(--space-1);
}

.hamburger-line {
    width: var(--space-6);
    height: var(--space-0-5);
    background-color: var(--color-liberty-blue);
    border-radius: var(--radius-full);
    transition: all var(--duration-150) var(--ease-in-out);
}

/* -----------------------------------------
   10. MOBILE NAVIGATION DRAWER
   ----------------------------------------- */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: calc(var(--z-50) + 48);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-200) var(--ease-out);
}

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

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--color-white);
    z-index: calc(var(--z-50) + 49);
    box-shadow: var(--shadow-2xl);
    transition: right var(--duration-200) var(--ease-out);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--gray-200);
    background-color: var(--color-liberty-blue);
}

.mobile-nav-title {
    font-weight: var(--font-bold);
    font-size: var(--text-lg);
    color: var(--color-white);
}

.mobile-nav-close {
    width: var(--space-11);
    height: var(--space-11);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
}

.mobile-nav-close svg {
    width: var(--space-6);
    height: var(--space-6);
    fill: currentColor;
}

.mobile-nav-list {
    padding: var(--space-4) 0;
}

.mobile-nav-list a {
    display: flex;
    align-items: center;
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-liberty-blue);
    border-bottom: 1px solid var(--gray-200);
    min-height: var(--space-14);  /* 56px - generous touch target for seniors */
    transition: background-color var(--duration-150) var(--ease-in-out);
}

.mobile-nav-list a:hover {
    background-color: var(--color-cream);
}

.mobile-nav-divider {
    height: 1px;
    background-color: var(--gray-200);
    margin: var(--space-4) 0;
}

.mobile-join-btn {
    background-color: var(--color-patriot-red) !important;
    color: var(--color-white) !important;
    margin: var(--space-4) var(--space-6);
    border-radius: var(--radius);
    text-align: center;
}

/* -----------------------------------------
   11. MOBILE BOTTOM TAB BAR (4 items)
   ----------------------------------------- */
.mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height-mobile-tab);
    background-color: var(--color-white);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    z-index: var(--z-50);
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    min-width: var(--space-20);
    min-height: var(--space-14);  /* 56px - generous touch target for seniors */
    color: var(--gray-600);       /* improved contrast */
    transition: color var(--duration-150) var(--ease-in-out);
}

.tab-item:hover,
.tab-item:focus,
.tab-item.active {
    color: var(--color-patriot-red);
}

.tab-icon {
    width: var(--space-6);
    height: var(--space-6);
    fill: currentColor;
}

.tab-label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-tight);
}

/* -----------------------------------------
   12. HERO SECTION
   ----------------------------------------- */
.hero-section {
    position: relative;
    color: var(--color-white);
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 40, 104, 0.85) 0%, rgba(0, 26, 77, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: var(--z-10);
    text-align: center;
    padding: var(--space-20) var(--space-5);
}

.hero-title {
    font-family: var(--font-serif);      /* Merriweather for headlines */
    font-size: var(--text-5xl);          /* 48px - H1 hero per brand */
    font-weight: var(--font-bold);       /* 700 - per brand serif weights */
    line-height: var(--leading-tight);   /* 1.2 for headings */
    margin-bottom: var(--space-4);
    color: var(--color-white);
}

.hero-subtitle {
    font-size: var(--text-xl);
    max-width: 600px;
    margin: 0 auto var(--space-8);
    opacity: 0.95;
    line-height: var(--leading-relaxed);
}

.hero-ctas {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    border-radius: var(--radius);
    transition: all var(--duration-150) var(--ease-in-out);
    min-height: var(--space-11);
}

.btn-primary {
    background-color: var(--color-patriot-red);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--red-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-liberty-blue);
}

/* -----------------------------------------
   13. PROTOTYPE INFO SECTION
   ----------------------------------------- */
.prototype-info {
    padding: var(--space-16) 0;
    background-color: var(--color-white);
}

.info-card {
    background-color: var(--color-cream);
    padding: var(--space-10);
    border-radius: var(--radius-lg);
    border-left: var(--space-1) solid var(--color-constitution-gold);
}

.info-card h2 {
    font-family: var(--font-serif);      /* Merriweather for headlines */
    font-size: var(--text-4xl);          /* 36px - H2 section per brand */
    font-weight: var(--font-bold);       /* 700 - per brand */
    line-height: var(--leading-tight);
    color: var(--color-liberty-blue);
    margin-bottom: var(--space-4);
}

.info-card h3 {
    font-family: var(--font-serif);  /* Merriweather for headlines */
    font-size: var(--text-3xl);      /* 28px - H3 subsection per brand */
    font-weight: var(--font-bold);   /* 700 - per brand */
    color: var(--color-liberty-blue);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.info-card p {
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

.info-card ul {
    list-style: disc;
    padding-left: var(--space-6);
}

.info-card li {
    margin-bottom: var(--space-2);
}

/* -----------------------------------------
   14. SCROLL TEST SECTION
   ----------------------------------------- */
.scroll-test {
    padding: var(--space-16) 0;
}

.scroll-test h2 {
    font-family: var(--font-serif);  /* Merriweather for headlines */
    font-size: var(--text-4xl);      /* 36px - H2 section per brand */
    font-weight: var(--font-bold);   /* 700 - per brand */
    line-height: var(--leading-tight);
    color: var(--color-liberty-blue);
    margin-bottom: var(--space-4);
}

.placeholder-content {
    display: grid;
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.placeholder-block {
    height: 200px;
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    border-radius: var(--radius-lg);
}

/* -----------------------------------------
   15. FOOTER - Split Two-Panel Footer
   ----------------------------------------- */
.site-footer {
    margin-top: var(--space-16);
}

/* Split Panels */
.footer-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.footer-panel {
    padding: var(--space-12) var(--space-10);
}

.footer-panel-newsletter {
    background: linear-gradient(135deg, var(--color-constitution-gold) 0%, var(--gold-600) 100%);
}

.footer-panel-connect {
    background: linear-gradient(135deg, var(--color-liberty-blue) 0%, var(--blue-950) 100%);
}

.panel-content {
    max-width: 400px;
}

.footer-panel-newsletter .panel-content {
    margin-left: auto;
}

.footer-panel-connect .panel-content {
    margin-right: auto;
}

.panel-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-2);
}

.footer-panel-newsletter .panel-title {
    color: var(--color-liberty-blue);
}

.footer-panel-connect .panel-title {
    color: var(--color-white);
}

.panel-subtitle {
    font-size: var(--text-base);
    margin-bottom: var(--space-5);
}

.footer-panel-newsletter .panel-subtitle {
    color: var(--blue-800);
}

/* Newsletter Form */
.newsletter-form .form-row {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.newsletter-form input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    border: 2px solid transparent;
    border-radius: var(--radius);
    background-color: var(--color-white);
    color: var(--color-charcoal);
    transition: all var(--duration-150) var(--ease-in-out);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--color-liberty-blue);
}

.newsletter-form input::placeholder {
    color: var(--gray-500);  /* improved contrast for placeholder text */
}

.btn-subscribe {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    color: var(--color-white);
    background-color: var(--color-liberty-blue);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--duration-150) var(--ease-in-out);
    white-space: nowrap;
}

.btn-subscribe:hover {
    background-color: var(--blue-950);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Connect Panel */
.footer-panel-connect .social-icons {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.footer-panel-connect .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--space-12);
    height: var(--space-12);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--color-white);
    transition: all var(--duration-150) var(--ease-in-out);
}

.footer-panel-connect .social-icons a:hover {
    background-color: var(--color-constitution-gold);
    color: var(--color-liberty-blue);
    transform: translateY(-3px);
}

.footer-panel-connect .social-icons svg {
    width: var(--space-6);
    height: var(--space-6);
}

.contact-link a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-constitution-gold);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    transition: color var(--duration-150) var(--ease-in-out);
}

.contact-link a:hover {
    color: var(--color-white);
}

.contact-link svg {
    width: var(--space-5);
    height: var(--space-5);
}

/* Main Footer */
.footer-main {
    background-color: var(--gray-900);
    padding: var(--space-12) 0;
}

.footer-main-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-12);
}

.footer-brand {
    flex: 1;
    max-width: 400px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: var(--space-4);
}

.footer-logo img {
    width: 140px;
    height: auto;
}

.footer-mission {
    color: var(--gray-300);  /* improved contrast for seniors */
    font-size: var(--text-base);  /* larger text for readability */
    line-height: var(--leading-relaxed);
}

.footer-links-grid {
    display: flex;
    gap: var(--space-16);
}

.footer-link-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-link-group h4 {
    color: var(--color-constitution-gold);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-2);
}

.footer-link-group a {
    color: var(--gray-300);  /* improved contrast */
    font-size: var(--text-base);  /* larger for readability */
    transition: color var(--duration-150) var(--ease-in-out);
}

.footer-link-group a:hover {
    color: var(--color-white);
}

/* Footer Bottom */
.footer-bottom {
    background-color: var(--gray-950);
    padding: var(--space-4) 0;
}

.footer-bottom-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.copyright {
    color: var(--gray-400);  /* improved contrast */
    font-size: var(--text-sm);
}

.footer-legal {
    display: flex;
    gap: var(--space-6);
}

.footer-legal a {
    color: var(--gray-400);  /* improved contrast */
    font-size: var(--text-sm);
    transition: color var(--duration-150) var(--ease-in-out);
}

.footer-legal a:hover {
    color: var(--color-white);
}

/* -----------------------------------------
   16. RESPONSIVE STYLES
   ----------------------------------------- */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .mega-menu {
        width: 95vw;
    }

    .mega-menu-inner {
        gap: var(--space-5);
        padding: var(--space-6);
    }

    .nav-link {
        padding: 0 var(--space-3);
        font-size: var(--text-base);
    }

    .brand-logo-img {
        width: 90px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .nav-list {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-tab-bar {
        display: flex;
    }

    .upper-nav-left {
        display: none;
    }

    .search-text {
        display: none;
    }

    .main-header {
        height: var(--space-16);
    }

    .brand-logo-img {
        width: 80px;
    }

    /* Hero adjustments */
    .hero-section {
        min-height: 400px;
    }

    .hero-content {
        padding: var(--space-12) var(--space-5) var(--space-32);
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-subtitle {
        font-size: var(--text-lg);
    }

    main {
        padding-bottom: calc(var(--nav-height-mobile-tab) + var(--space-5));
    }

    .info-card {
        padding: var(--space-6);
    }

    /* Footer responsive */
    .footer-panels {
        grid-template-columns: 1fr;
    }

    .footer-panel {
        padding: var(--space-8) var(--space-5);
    }

    .panel-content {
        max-width: 100%;
        margin: 0;
    }

    .newsletter-form .form-row {
        flex-direction: column;
    }

    .footer-panel-connect .social-icons {
        justify-content: center;
    }

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

    .footer-main-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-links-grid {
        justify-content: center;
        gap: var(--space-10);
    }

    .footer-link-group {
        align-items: center;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}

/* -----------------------------------------
   17. PRINT STYLES
   ----------------------------------------- */
@media print {
    .upper-nav,
    .main-header,
    .mobile-tab-bar,
    .mobile-nav,
    .mobile-nav-overlay {
        display: none !important;
    }
}
