/* Mobile Navigation Styles */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #00ffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.98);
        border-left: 1px solid rgba(0, 255, 255, 0.2);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 30px;
        gap: 25px;
        transition: right 0.3s ease;
        overflow-y: auto;
        display: flex !important;
    }

    .nav-links.mobile-menu-open {
        right: 0;
    }

    .nav-links a,
    .nav-links button {
        width: 100%;
        text-align: left;
        font-size: 1.1rem;
        padding: 12px 0;
        border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    }

    .nav-links .logout-btn {
        margin-top: 20px;
        width: 100%;
        text-align: center;
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-links {
        gap: 20px;
        font-size: 0.9rem;
    }

    .portal-header {
        padding: 0 30px;
    }
}

/* ==========================================================================
   RTL Mobile Navigation Support
   ========================================================================== */

/* RTL Mobile Menu Toggle Position */
body.rtl .mobile-menu-toggle {
    order: -1;
}

/* RTL Mobile Nav Panel - Slides from left instead of right */
@media (max-width: 768px) {
    body.rtl .nav-links {
        right: auto;
        left: -100%;
        border-left: none;
        border-right: 1px solid rgba(0, 255, 255, 0.2);
    }

    body.rtl .nav-links.mobile-menu-open {
        left: 0;
        right: auto;
    }

    body.rtl .nav-links a,
    body.rtl .nav-links button {
        text-align: right;
    }

    /* RTL Mobile Menu Toggle Animation - Mirror for RTL */
    body.rtl .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-8px, 8px);
    }

    body.rtl .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-7px, -7px);
    }

    /* RTL Language Selector in Mobile */
    body.rtl .language-selector {
        order: 0;
    }

    body.rtl .language-dropdown {
        left: 0;
        right: auto;
    }
}
