/* =========================================================
   JMAGC BULLETPROOF COMMON CSS (WITH HAMBURGER MENU)
   ========================================================= */

/* --- 1. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 2. HEADER --- */
.site-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    flex-wrap: wrap; /* Allows the menu to drop below the logo on mobile */
}

.logo-img {
    height: 65px !important;
    width: auto;
}

/* Hamburger Button (Hidden on Desktop) */
.menu-toggle {
    display: none;
    font-size: 2rem;
    color: #002244;
    cursor: pointer;
    user-select: none;
}

/* --- 3. DESKTOP NAVIGATION (Screens 992px and above) --- */
@media (min-width: 992px) {
    .main-nav { display: block !important; }
    
    .main-nav > ul {
        display: flex !important;
        flex-direction: row !important;
        list-style: none !important;
        gap: 20px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .main-nav > ul > li { position: relative !important; display: block !important; }

    .main-nav > ul > li > a {
        text-decoration: none !important;
        color: #002244;
        font-weight: bold;
        font-size: 0.95rem;
        padding: 20px 5px;
        display: block;
        white-space: nowrap;
    }

    .main-nav > ul > li > a:hover,
    .main-nav > ul > li > a.active { color: #d9232d; }

    /* THE DROPDOWN */
    .dropdown {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        background-color: #ffffff !important;
        min-width: 260px !important;
        box-shadow: 0 8px 15px rgba(0,0,0,0.1) !important;
        border-top: 3px solid #d9232d !important;
        display: none !important;
        flex-direction: column !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .has-dropdown:hover .dropdown { display: flex !important; }

    .dropdown li { width: 100% !important; display: block !important; }

    .dropdown li a {
        padding: 12px 20px !important;
        display: block !important;
        border-bottom: none !important; 
        text-decoration: none !important;
        text-align: left !important;
        font-size: 0.9rem !important;
        color: #333 !important;
        white-space: normal !important;
    }

    .dropdown li a:hover { background-color: #f9f9f9 !important; color: #d9232d !important; }
}

/* --- 4. MOBILE NAVIGATION (Screens below 992px) --- */
@media (max-width: 991px) {
    .site-header { position: static !important; top: auto !important; }

    .header-container {
        padding: 10px 15px !important;
    }

    /* Show the Hamburger Button */
    .menu-toggle { display: block; }

    /* Hide the menu by default on mobile */
    .main-nav {
        display: none; 
        width: 100% !important;
        margin-top: 15px;
    }

    /* This class is added by JavaScript when the button is clicked */
    .main-nav.active {
        display: block !important;
    }

    .main-nav > ul {
        display: flex !important;
        flex-direction: column !important;
        list-style: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .main-nav > ul > li { width: 100% !important; border-bottom: 1px solid #eee !important; }

    .main-nav > ul > li > a {
        text-decoration: none !important;
        color: #002244 !important;
        font-weight: bold !important;
        padding: 15px !important;
        display: block !important;
        text-align: left !important;
    }

    /* Mobile Dropdown */
    .dropdown {
        display: none !important;
        flex-direction: column !important;
        background-color: #f9f9f9 !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .has-dropdown:hover .dropdown { display: flex !important; }

    .dropdown li { width: 100% !important; }

    .dropdown li a {
        display: block !important;
        text-align: left !important;
        font-size: 0.9rem !important;
        padding: 12px 12px 12px 30px !important; /* Indented for sub-menu */
        background-color: #f1f1f1 !important;
        color: #555 !important;
        border-bottom: none !important; 
        text-decoration: none !important;
    }
}

/* --- 5. FOOTER --- */
.site-footer {
    background-color: #002244;
    color: #ffffff;
    padding: 30px 0;
    text-align: center;
    width: 100%;
    margin-top: auto;
}