/* ========================================
   MOBILE MENU - Synalogic
   Override default mobile styles
   ======================================== */

   @media screen and (max-width: 768px) {
    /* Ensure header is visible */
    header {
        background-color: #FFFFFF !important;
    }

    /* Mobile menu button - hamburger icon */
    button.mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        z-index: 1001;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        padding: 10px;
        position: relative;
    }

    button.mobile-menu-btn span {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 24px;
        height: 3px;
        background-color: #0D1B2A !important;
        background: #0D1B2A !important;
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    /* Hamburger to X animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Mobile navigation - slide in from right */
    nav {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 30px 40px;
        gap: 0;
        box-shadow: -5px 0 30px rgba(13, 27, 42, 0.15);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    nav.mobile-open {
        right: 0;
    }

    nav > a {
        width: 100%;
        padding: 16px 0;
        border-bottom: 1px solid #E2E8F0;
        font-size: 1rem;
        color: #0D1B2A;
    }

    nav > a:hover,
    nav > a.active {
        color: #1B9AAA;
    }

    nav > a.nav-cta {
        margin-top: 20px;
        text-align: center;
        border-bottom: none;
        background-color: #1B9AAA;
        color: #FFFFFF !important;
        padding: 12px 24px;
        border-radius: 4px;
    }

    /* Mobile dropdown */
    .nav-dropdown {
        width: 100%;
        border-bottom: 1px solid #E2E8F0;
    }

    .nav-dropdown > a {
        width: 100%;
        padding: 16px 0;
        font-size: 1rem;
        color: #0D1B2A;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-dropdown > a::after {
        border-top-color: #0D1B2A;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .nav-dropdown.open .dropdown-menu {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
    }

    .nav-dropdown.open > a::after {
        transform: rotate(180deg);
    }

    .dropdown-menu-inner {
        box-shadow: none;
        border: none;
        padding: 0 0 10px 15px;
        background: transparent;
        min-width: auto;
    }

    .dropdown-item {
        padding: 10px 0;
        font-size: 0.9rem;
    }

    .dropdown-item small {
        font-size: 0.75rem;
    }

    /* Prevent body scroll when menu open */
    body.menu-open {
        overflow: hidden;
    }

    /* Overlay behind menu */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(13, 27, 42, 0.5);
        z-index: 999;
    }
}