/* 1. FONT IMPORTS (EMprint) */
@font-face {
    font-family: 'EMprint';
    src: url('../../fonts/EMprint-Regular.woff2?v=2') format('woff2'),
         url('../../fonts/EMprint-Regular.woff?v=2') format('woff');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'EMprint';
    src: url('../../fonts/EMprint-Semibold.woff2') format('woff2'),
         url('../../fonts/EMprint-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'EMprint';
    src: url('../../fonts/EMprint-Bold.woff2') format('woff2'),
         url('../../fonts/EMprint-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

/* 2. CSS RESET & GLOBAL VARIABLES */
:root {
    --primary-blue: #001450; 
    --secondary-blue: #0C479D;
    --text-dark: #222222;
    --text-gray: #5A5A5A; 
    --white: #ffffff;
    --red-brand: #FE000C;
    --light-bg: #F8F8F8;
    --border-color: #dcdcdc;
    --border-light: #e0e0e0;
    --light-blue-bg: #eef4fc;
    /* Side gutter: 5% on smaller screens, caps content at 1200px on wide screens */
    --page-gutter: max(5%, calc((100% - 1200px) / 2));
    --font-family: 'EMprint', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Keeps an SAE grade like 5W-30 from breaking at the hyphen */
.nowrap {
    white-space: nowrap;
}

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

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.5;
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button, input, select, textarea {
    font-family: inherit;
}

h2 {
    font-size: 32px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.section-subtext {
    color: var(--text-gray);
    margin-bottom: 32px;
    font-size: 16px;
    font-weight: normal;
}

/* Small uppercase label above section headings */
.section-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* 3. GLOBAL BUTTONS */
.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 11px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #001540;
}

.btn-outline {
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 11px 24px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}

.btn-white {
    background-color: var(--white);
    color: var(--primary-blue);
    padding: 13px 29px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    width: fit-content;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-white:hover {
    background-color: #f0f0f0;
}

/* 4. HEADER / NAVBAR */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px var(--page-gutter);
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-container img {
    height: 40px;
    object-fit: contain;
}

.logo-divider {
    color: #cccccc;
    font-size: 24px;
    font-weight: 300;
}

/* Main Nav List */
.desktop-nav > ul {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.desktop-nav > ul > li {
    position: relative;
    padding: 16px 0;
}

.desktop-nav > ul > li > a {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* =========================================
   DROPDOWN MENU STYLES (CUSTOM BORDERS)
   ========================================= */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -20px; 
    width: 380px; 
    background-color: var(--white);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); 
    border: 1px solid #b3b3b3; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 200;
    padding: 16px; 
}

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

.dropdown-header {
    font-size: 12px; 
    font-weight: 600;
    color: var(--text-gray);
    padding: 0 0 12px 0; 
    border-bottom: 1px solid var(--border-color); 
}

.dropdown-divider {
    display: none; 
}

ul.dropdown-list {
    display: block !important; 
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.dropdown-list li {
    display: block !important;
    padding: 0 0 0 0;
}

ul.dropdown-list li:first-child {
    border-bottom: 1px solid var(--border-color);
}

ul.dropdown-list li a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 16px 19px; 
    color: #001f5b; 
    font-weight: bold; 
    font-size: 16px; 
    transition: color 0.2s;
    width: 100%;
}

ul.dropdown-list li:last-child a {
    padding-bottom: 0; 
}

ul.dropdown-list li a:hover {
    color: var(--red-brand);
}

ul.dropdown-list li a .arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

ul.dropdown-list li a:hover .arrow svg path {
    stroke: var(--red-brand);
}

ul.dropdown-list li a:hover .arrow {
    transform: translateX(5px);
}

.desktop-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.mobile-actions {
    display: none;
    align-items: center;
    gap: 8px;
}

.menu-toggle,
.mobile-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle:focus-visible,
.mobile-menu-close:focus-visible {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

/* Full-screen mobile menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding: 16px var(--page-gutter) calc(32px + env(safe-area-inset-bottom));
    background-color: var(--white);
    overflow-y: auto;
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.mobile-menu-cta {
    align-self: flex-start;
    margin-bottom: 16px;
}

.mobile-menu-links {
    list-style: none;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    min-height: 56px;
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-blue);
}

.mobile-menu-allied {
    align-self: center;
    height: 48px;
    margin-top: 32px;
    object-fit: contain;
}

body.menu-open {
    overflow: hidden;
}

/* 5. FOOTER */
footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    padding: 64px var(--page-gutter);
    flex-wrap: wrap;
    gap: 32px;
}

.footer-logo-col {
    max-width: 300px;
}

.footer-logo-col img {
    height: 40px;
    margin-bottom: 16px;
}

.footer-logo-col p {
    font-size: 14px;
    color: var(--text-gray);
}

.footer-links {
    display: flex;
    gap: 64px;
}

.footer-col h4 {
    color: var(--primary-blue);
    margin-bottom: 16px;
    font-size: 14px;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col ul li a {
    color: var(--text-gray);
    font-size: 14px;
}

.footer-bottom {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 24px var(--page-gutter);
    display: flex;
    gap: 32px;
    font-size: 13px;
}

.footer-bottom a {
    color: #d0d0d0;
}

/* 6. GLOBAL RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .desktop-nav, .desktop-actions {
        display: none;
    }
    .mobile-actions {
        display: flex;
    }
    .logo-container img {
        height: 30px;
    }
    
    .footer-top {
        flex-direction: column;
    }
    .footer-links {
        flex-wrap: wrap;
        gap: 32px;
    }

    /* 44px minimum tap targets on mobile */
    .btn-primary,
    .btn-outline,
    .btn-white {
        min-height: 44px;
    }
    .footer-col ul li {
        margin-bottom: 0;
    }
    .footer-col ul li a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
    .footer-bottom a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* Header CTA only where it fits beside the logos; it is always in the menu */
@media (max-width: 559px) {
    .mobile-cta {
        display: none;
    }
}