/* ============================================================================
   HireTheVeterans.com — Main Stylesheet
   Design System: Navy (#1B2A4A), Red (#C0392B), Blue (#2C5F8A)
   Fonts: Barlow, Barlow Condensed, Source Serif 4
   ============================================================================ */

/* === CSS Variables === */
:root {
    /* Core Palette */
    --navy: #1B2A4A;
    --navy-deep: #0F1D36;
    --navy-light: #2C3E6B;
    --navy-pale: #E8ECF2;
    --red: #C0392B;
    --red-hover: #D94435;
    --red-dark: #962D23;
    --red-pale: #FBF0EF;
    --blue: #2C5F8A;
    --blue-light: #3B7ABD;
    --blue-hover: #245174;
    --blue-pale: #EAF0F7;
    --white: #FFFFFF;
    --off-white: #F7F8FA;
    --cream: #FAFBFC;
    --star: #D4A017;
    --star-pale: #FDF8E8;

    /* Text */
    --text-dark: #1A1A2E;
    --text-body: #3A3A4A;
    --text-muted: #4F5D6F;
    --text-light: #637085;

    /* Borders & Surfaces */
    --border: #DDE2E8;
    --border-light: #EEF0F3;
    --surface: #FFFFFF;
    --surface-alt: #F7F8FA;

    /* Status */
    --success: #27AE60;
    --success-pale: #EDF9F0;
    --warning: #F39C12;
    --warning-pale: #FEF5E7;
    --error: #E74C3C;
    --error-pale: #FDEDEB;
    --info: #3498DB;
    --info-pale: #EBF5FB;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 29, 54, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 29, 54, 0.08);
    --shadow-lg: 0 8px 30px rgba(15, 29, 54, 0.12);
    --shadow-xl: 0 16px 48px rgba(15, 29, 54, 0.16);

    /* Layout */
    --max-width: 1200px;
    --header-height: 120px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s var(--ease);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Barlow', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-body);
    background: var(--off-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.nav-active {
    overflow: hidden;
}

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

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition);
}

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

/* === Skip Navigation (Accessibility) === */
.skip-nav {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 9999;
    padding: 12px 24px;
    background: var(--navy);
    color: var(--white);
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    transition: top 0.2s;
}

.skip-nav:focus {
    top: 0;
    color: var(--white);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

.serif {
    font-family: 'Source Serif 4', serif;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

/* === Flash Messages === */
.flash-message {
    padding: 14px 24px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    position: relative;
    z-index: 500;
}

.flash-success { background: var(--success-pale); color: #1E7E34; border-bottom: 2px solid var(--success); }
.flash-error { background: var(--error-pale); color: #C0392B; border-bottom: 2px solid var(--error); }
.flash-warning { background: var(--warning-pale); color: #856404; border-bottom: 2px solid var(--warning); }
.flash-info { background: var(--info-pale); color: #21618C; border-bottom: 2px solid var(--info); }

/* === Header === */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--red) 0%, var(--red) 50%, var(--blue) 50%, var(--blue) 100%);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

/* === Navigation === */
.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
    margin-right: 16px;
}

.nav-link {
    display: block;
    padding: 8px 14px;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    letter-spacing: 0.2px;
}

.nav-link:hover {
    color: var(--navy);
    background: var(--navy-pale);
}

.nav-link.active {
    color: var(--navy);
    background: var(--navy-pale);
    font-weight: 700;
}

.nav-highlight {
    background: var(--red);
    color: var(--white) !important;
    font-weight: 700;
}

.nav-highlight:hover {
    background: var(--red-hover);
    color: var(--white) !important;
}

/* Nav Actions (right side) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Country Toggle */
.country-toggle {
    margin-right: 4px;
}

.country-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.country-switch:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-pale);
}

.flag-icon {
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.country-label {
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* User Dropdown */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-body);
    transition: all var(--transition);
}

.user-menu-toggle:hover {
    border-color: var(--navy);
    background: var(--navy-pale);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.chevron {
    transition: transform var(--transition);
}

.user-menu-toggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s var(--ease);
    z-index: 1001;
}

.user-dropdown.dropdown-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-body);
    text-decoration: none;
    transition: background var(--transition);
}

.dropdown-item:hover {
    background: var(--surface-alt);
    color: var(--navy);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

.dropdown-logout {
    color: var(--red);
}

.dropdown-logout:hover {
    background: var(--red-pale);
    color: var(--red-dark);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 6px;
    flex-direction: column;
    justify-content: space-between;
}

.nav-toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--red-hover);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

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

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

.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}

.btn-nav-login {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.btn-nav-login:hover {
    border-color: var(--navy);
    background: var(--navy-pale);
    color: var(--navy);
}

.btn-nav-register {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    background: var(--red);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.btn-nav-register:hover {
    background: var(--red-hover);
    color: var(--white);
}

.btn-nav-employer {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    background: var(--blue);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.btn-nav-employer:hover {
    background: var(--blue-hover);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* === Cookie Consent Banner === */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--navy-deep);
    border-top: 3px solid var(--blue);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    animation: slideUp 0.4s var(--ease) forwards;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.cookie-text {
    flex: 1;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    line-height: 1.5;
}

.cookie-text strong {
    display: block;
    color: var(--white);
    font-size: 14px;
    margin-bottom: 4px;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-cookie-accept {
    padding: 10px 20px;
    background: var(--blue);
    color: var(--white);
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition);
}

.btn-cookie-accept:hover {
    background: var(--blue-light);
}

.btn-cookie-essential {
    padding: 10px 20px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-cookie-essential:hover {
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
}

.cookie-policy-link {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    text-decoration: underline;
}

.cookie-policy-link:hover {
    color: var(--white);
}

/* === Veteran Owned Bar === */
.veteran-owned-bar {
    background: var(--navy);
    text-align: center;
    padding: 14px 32px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--white);
}

.vo-star {
    color: var(--star);
    font-size: 12px;
    margin: 0 8px;
}

/* === Crisis Strip === */
.crisis-strip {
    background: var(--red-dark);
    padding: 12px 32px;
    text-align: center;
}

.crisis-strip-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.crisis-strip-item {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

.crisis-strip-item strong {
    color: var(--white);
}

.crisis-num {
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.5px;
}

.crisis-strip-divider {
    color: rgba(255,255,255,0.3);
    font-size: 14px;
}

/* === Footer === */
.site-footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.6);
    position: relative;
}

.footer-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--red) 0%, var(--red) 50%, var(--blue) 50%, var(--blue) 100%);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 32px 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 14px;
    opacity: 0.9;
}

.footer-about {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.5);
    max-width: 280px;
}

.footer-heading {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--red);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-legal a {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
}

.footer-legal a:hover {
    color: rgba(255,255,255,0.7);
}

.footer-dot {
    margin: 0 8px;
    color: rgba(255,255,255,0.15);
}

.footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

.footer-attribution {
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}

.footer-attribution a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-weight: 600;
}

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

/* === Cards (shared pattern) === */
.card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
}

.card-red-bar {
    height: 4px;
    background: var(--red);
}

.card-blue-bar {
    height: 4px;
    background: var(--blue);
}

.card-body {
    padding: 24px;
}

/* === Section Headers === */
.section-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--red);
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.section-sub {
    font-family: 'Source Serif 4', serif;
    font-size: 17px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === Forms (shared) === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    color: var(--text-dark);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-pale);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--error);
    margin-top: 4px;
}

/* === Container === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    h1 { font-size: 32px; }
    h2 { font-size: 26px; }
    .section-title { font-size: 28px; }

    .header-inner {
        padding: 0 16px;
    }

    .logo-img {
        height: 44px;
    }

    /* Mobile Nav Toggle — show */
    .nav-toggle {
        display: flex;
    }

    /* Mobile Nav */
    .site-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 24px 24px;
        box-shadow: var(--shadow-xl);
        transition: right 0.3s var(--ease);
        z-index: 999;
    }

    .site-nav.nav-open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        width: 100%;
        margin-right: 0;
        margin-bottom: 24px;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .btn-nav-login,
    .btn-nav-register,
    .btn-nav-employer {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .country-toggle {
        margin-right: 0;
        width: 100%;
    }

    .country-switch {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }

    /* Hamburger animation */
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Cookie */
    .cookie-inner {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-cookie-accept,
    .btn-cookie-essential {
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

    .footer-inner {
        padding: 32px 16px 24px;
    }

    /* Crisis strip */
    .crisis-strip-inner {
        flex-direction: column;
        gap: 4px;
    }

    .crisis-strip-divider {
        display: none;
    }

    /* Container */
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 28px; }
    .section-title { font-size: 24px; }
    .user-menu-name { display: none; }
}
