/* ==========================================================================
   WebSocialTraffic - 100% Mobile Responsive Navigation Menu Stylesheet
   File Location: css/menu.css
   Pure CSS - Standalone, Zero External Dependencies
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET & BASE CONTAINER
   -------------------------------------------------------------------------- */
.wst-main-nav,
.wst-main-nav * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   2. DESKTOP NAVIGATION BAR (>= 1024px)
   -------------------------------------------------------------------------- */
.wst-main-nav {
    display: none;
}

@media (min-width: 1024px) {
    .wst-main-nav {
        display: flex;
        align-items: center;
    }

    .wst-nav-menu {
        display: flex;
        align-items: center;
        gap: 1.5rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .wst-nav-menu > li {
        position: relative;
        list-style: none;
        margin: 0;
        padding: 1.5rem 0;
    }

    .wst-nav-menu > li > a {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        color: #334155;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        padding: 0.35rem 0.6rem;
        border-radius: 0.5rem;
        transition: color 0.15s ease, background-color 0.15s ease;
        line-height: 1.25;
    }

    .wst-nav-menu > li > a:hover,
    .wst-nav-menu > li:hover > a,
    .wst-nav-menu > li.current-menu-item > a {
        color: #2563eb;
        background-color: #eff6ff;
    }

    .wst-nav-menu > li.wst-highlight-training > a {
        color: #1d4ed8;
    }

    .wst-nav-menu > li.wst-highlight-job > a {
        color: #ea580c;
    }

    /* Caret indicator icon */
    .wst-caret {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease;
    }

    .wst-nav-menu > li:hover > a .wst-caret {
        transform: rotate(180deg);
    }

    /* Desktop Dropdown Submenu */
    .wst-nav-menu .sub-menu {
        position: absolute;
        top: calc(100% - 0.25rem);
        left: 0;
        min-width: 16rem;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 0.75rem;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
        padding: 0.5rem 0;
        list-style: none;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
        z-index: 100;
    }

    /* Show dropdown on hover or focus-within */
    .wst-nav-menu > li:hover > .sub-menu,
    .wst-nav-menu > li:focus-within > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .wst-nav-menu .sub-menu li {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .wst-nav-menu .sub-menu li a {
        display: block;
        padding: 0.55rem 1rem;
        font-size: 0.8125rem;
        font-weight: 500;
        color: #1e293b;
        text-decoration: none;
        transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    }

    .wst-nav-menu .sub-menu li a:hover,
    .wst-nav-menu .sub-menu li a:focus {
        background-color: #f1f5f9;
        color: #2563eb;
        padding-left: 1.25rem;
    }

    /* Desktop Contact Button Item */
    .wst-nav-menu .wst-nav-contact-btn {
        background: #2563eb;
        color: #ffffff !important;
        padding: 0.5rem 1rem !important;
        border-radius: 0.5rem;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        font-weight: 700 !important;
    }

    .wst-nav-menu .wst-nav-contact-btn:hover {
        background: #1d4ed8 !important;
        color: #ffffff !important;
    }
}

/* --------------------------------------------------------------------------
   3. MOBILE HAMBURGER BUTTON (< 1024px)
   -------------------------------------------------------------------------- */
.wst-hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    cursor: pointer;
    outline: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

@media (min-width: 1024px) {
    .wst-hamburger-btn {
        display: none !important;
    }
}

.wst-hamburger-btn:hover,
.wst-hamburger-btn:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Animated 3-line hamburger box */
.wst-hamburger-box {
    position: relative;
    display: inline-block;
    width: 22px;
    height: 16px;
}

.wst-hamburger-inner,
.wst-hamburger-inner::before,
.wst-hamburger-inner::after {
    position: absolute;
    width: 22px;
    height: 2.5px;
    background-color: #0f172a;
    border-radius: 3px;
    transition: transform 0.25s ease, top 0.25s ease, opacity 0.25s ease;
}

.wst-hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.wst-hamburger-inner::before {
    content: '';
    top: -7px;
}

.wst-hamburger-inner::after {
    content: '';
    top: 7px;
}

/* Transformed Hamburger 'X' state */
.wst-hamburger-btn.wst-is-active .wst-hamburger-inner {
    background-color: transparent !important;
}

.wst-hamburger-btn.wst-is-active .wst-hamburger-inner::before {
    top: 0;
    transform: rotate(45deg);
    background-color: #2563eb;
}

.wst-hamburger-btn.wst-is-active .wst-hamburger-inner::after {
    top: 0;
    transform: rotate(-45deg);
    background-color: #2563eb;
}

/* --------------------------------------------------------------------------
   4. MOBILE OFF-CANVAS DRAWER (< 1024px)
   -------------------------------------------------------------------------- */
.wst-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 86vw;
    max-width: 22rem;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.wst-mobile-drawer.wst-is-active {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .wst-mobile-drawer {
        display: none !important;
    }
}

/* Drawer Header */
.wst-mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
    flex-shrink: 0;
}

.wst-mobile-drawer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wst-brand-badge {
    width: 2rem;
    height: 2rem;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wst-brand-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.wst-text-accent {
    color: #ea580c;
}

.wst-drawer-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #64748b;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wst-drawer-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Drawer Body (Scrollable) */
.wst-mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Mobile Nav List */
.wst-mobile-nav-wrap {
    width: 100%;
}

.wst-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.wst-mobile-nav-list > li {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.wst-mobile-nav-list > li:hover {
    border-color: #cbd5e1;
}

.wst-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    flex: 1;
}

.wst-mobile-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Submenu Accordion Toggle Chevron Button */
.wst-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: transform 0.25s ease, color 0.15s ease;
}

.wst-submenu-toggle:hover {
    color: #2563eb;
}

.wst-arrow-icon {
    transition: transform 0.25s ease;
}

/* When submenu is expanded */
.wst-mobile-nav-list li.wst-open > .wst-mobile-item-row .wst-arrow-icon,
.wst-mobile-nav-list li.wst-open > a .wst-caret {
    transform: rotate(180deg);
}

.wst-mobile-nav-list li.wst-open {
    border-color: #93c5fd;
    background: #f8fafc;
}

/* Mobile Accordion Submenu Links */
.wst-mobile-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem 0.5rem 1rem;
    display: none;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.wst-mobile-nav-list li.wst-open > .sub-menu {
    display: block;
    animation: wstDrawerFade 0.2s ease forwards;
}

@keyframes wstDrawerFade {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wst-mobile-nav-list .sub-menu li {
    list-style: none;
    margin: 0;
}

.wst-mobile-nav-list .sub-menu li a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.wst-mobile-nav-list .sub-menu li a:hover {
    background: #ffffff;
    color: #2563eb;
}

/* Mobile Drawer Footer Actions */
.wst-mobile-drawer-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wst-mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.wst-mobile-cta-btn:active {
    transform: scale(0.98);
}

.wst-btn-blue {
    background: #2563eb;
    color: #ffffff;
}

.wst-btn-blue:hover {
    background: #1d4ed8;
}

.wst-btn-orange {
    background: #ea580c;
    color: #ffffff;
}

.wst-btn-orange:hover {
    background: #c2410c;
}

/* --------------------------------------------------------------------------
   5. BACKDROP OVERLAY
   -------------------------------------------------------------------------- */
.wst-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wst-menu-backdrop.wst-is-active {
    opacity: 1;
    visibility: visible;
}

/* --------------------------------------------------------------------------
   6. BODY LOCK WHEN DRAWER IS OPEN
   -------------------------------------------------------------------------- */
body.wst-menu-locked {
    overflow: hidden !important;
    touch-action: none;
}
