/* ================= GLOBAL RESETS ================= */
.sm-header-wrapper {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
    z-index: 999999;
    line-height: 1.4;
}
.sm-header-wrapper * { box-sizing: border-box; }
.sm-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; width: 100%; }

/* FORCE HIDE THEME HEADERS */
header.site-header, #masthead, .site-header, .elementor-location-header, .ast-main-header-wrap, .hfeed > header {
    display: none !important;
}

/* ================= DESKTOP LAYOUT (Min-Width: 993px) ================= */
@media (min-width: 993px) {
    /* Hide Mobile Elements */
    .sm-mobile-search-wrapper, .sm-hamburger { display: none !important; }

    /* 1. Orange Bar */
    .sm-top-bar {
        background-color: #f37021;
        color: #fff;
        height: 44px;
        display: flex; align-items: center;
    }
    .sm-flex-between { display: flex; justify-content: space-between; align-items: center; width: 100%; }

    .sm-top-links ul { list-style: none; margin: 0; padding: 0; display: flex; }
    .sm-top-links ul li a { color: #fff; text-decoration: none; padding: 0 15px; border-right: 1px solid rgba(255,255,255,0.4); font-size: 13px; font-weight: 600; }
    .sm-top-links ul li:last-child a { border: none; }

    /* Desktop Search (Top Right) */
    .sm-desktop-search { display: block; }
    .sm-search-form { position: relative; display: flex; align-items: center; }
    .sm-search-input {
        background: #002266; border: 1px solid #002266;
        border-radius: 20px; color: #fff;
        padding: 5px 35px 5px 15px;
        font-size: 13px; width: 260px; outline: none; transition: 0.3s;
    }
    .sm-search-input:focus { background: #003399; }
    .sm-search-input::placeholder { color: #ccc; opacity: 1; }
    .sm-search-btn { position: absolute; right: 5px; background: none; border: none; color: #fff; cursor: pointer; }

    /* 2. Blue Logo Row */
    .sm-logo-row {
        background: linear-gradient(90deg, #302b85 0%, #151552 100%);
        padding: 15px 0;
    }
    .sm-site-branding img { display: block; width: auto; /* Height controlled by PHP */ }
    .sm-site-title { color: #fff; font-size: 32px; margin: 0; font-weight: bold; }

    /* 3. Menu Row (Tabs) */
    .sm-menu-row { background: #001a4d; border-top: 1px solid rgba(255,255,255,0.15); }
    .sm-main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
    .sm-main-nav ul li a {
        display: block; color: #fff; text-decoration: none;
        padding: 14px 22px; font-weight: 700; font-size: 15px;
        border-right: 1px solid rgba(255,255,255,0.1);
        text-transform: uppercase; transition: background 0.2s;
    }
    .sm-main-nav ul li a:hover { background: #f37021; }
}

/* ================= MOBILE LAYOUT (Max-Width: 992px) ================= */
@media (max-width: 992px) {
    /* Hide Desktop Elements */
    .sm-top-links, .sm-desktop-search { display: none !important; }

    /* 1. Orange Border Only */
    .sm-top-bar {
        height: 5px;
        background-color: #f37021;
        overflow: hidden;
    }

    /* 2. Logo Row (Flex: Logo Left, Search Right) */
    .sm-logo-row {
        background: linear-gradient(90deg, #302b85 0%, #151552 100%);
        padding: 10px 0;
    }
    .sm-logo-flex {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;
    }

    /* Mobile Logo Size */
    .sm-site-branding img { height: 40px !important; width: auto; }
    .sm-site-title { font-size: 22px; margin: 0; color: #fff; }

    /* Mobile Search (Block Visible) */
    .sm-mobile-search-wrapper {
        display: block;
        flex-grow: 1; /* Take remaining space */
        max-width: 240px;
    }
    .sm-search-form.mobile-mode { position: relative; width: 100%; display: flex; }
    .sm-search-input.mobile-mode {
        width: 100%;
        background: #0d1b3e; /* Dark matching bg */
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 20px;
        color: #fff;
        padding: 8px 35px 8px 12px;
        font-size: 13px;
        height: 38px;
        outline: none;
    }
    .sm-search-btn.mobile-mode {
        position: absolute; right: 10px; top: 0; bottom: 0;
        background: none; border: none; color: #fff;
    }

    /* 3. Menu Row (Hamburger + Scrollable) */
    .sm-menu-row {
        background: #001a4d;
        border-top: 1px solid rgba(255,255,255,0.1);
        height: 46px; /* Fixed height for touch targets */
    }
    .sm-menu-flex { display: flex; align-items: center; height: 100%; overflow: hidden; }

    /* Hamburger Icon (3-line pure CSS) */
    .sm-hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 50px;
        height: 100%;
        padding-left: 10px;
        border-right: 1px solid rgba(255,255,255,0.1);
        cursor: pointer;
        flex-shrink: 0;
    }

    .sm-hamburger span {
        display: block;
        width: 22px;
        height: 3px;
        background: #333;
        border-radius: 2px;
    }

    /* Scrollable Horizontal Menu */
    .sm-main-nav {
        flex-grow: 1;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        height: 100%;
    }
    .sm-main-nav ul {
        list-style: none; margin: 0; padding: 0;
        display: flex; flex-wrap: nowrap; height: 100%;
    }
    .sm-main-nav ul li a {
        display: flex; align-items: center;
        color: #fff; text-decoration: none;
        padding: 0 15px; height: 100%;
        font-size: 14px; font-weight: 500;
        border-right: 1px solid rgba(255,255,255,0.1);
    }
}

/* ================= SHARED STATES ROW ================= */
.sm-states-row {
    background: #fff;
    border-bottom: 2px solid #e5e5e5;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.sm-states-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.sm-states-nav ul li a {
    display: block; color: #333; text-decoration: none;
    padding: 10px 15px; font-size: 14px; font-weight: 500;
    transition: color 0.2s;
}
.sm-states-nav ul li a:hover { color: #f37021; }

/* Hide Scrollbars Cleanly */
.sm-main-nav::-webkit-scrollbar, .sm-states-row::-webkit-scrollbar { display: none; }

/* MOBILE SLIDE MENU */
.sm-mobile-menu-panel {
    position: fixed;
    top: 0;
    left: -100%;  /* hide initially */
    width: 75%;
    height: 100vh;
    background: #001a4d;
    color: #fff;
    z-index: 99999999;
    padding: 20px;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sm-mobile-menu-panel.active {
    left: 0;
}

.sm-mobile-menu-close {
    font-size: 24px;
    margin-bottom: 20px;
    cursor: pointer;
    color: #fff;
}

.sm-mobile-menu-wrapper ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sm-mobile-menu-wrapper ul li a {
    color: #fff;
    padding: 12px 0;
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 16px;
    text-decoration: none;
}