/* 
 * Mobile Navigation Styles
 * File: assets/css/mobile-nav.css
 * Digunakan untuk navigasi mobile yang konsisten di semua halaman
 */

/* Mobile Navigation Toggle Button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 10px;
    border-radius: 8px;
    background: white;
    border: 1px solid var(--border-color);
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Styles */
.nav-links.mobile {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 25px 30px;
    gap: 20px;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
}

.nav-links.mobile.active {
    left: 0;
}

.nav-links.mobile .nav-link {
    font-size: 1rem;
    padding: 12px 18px;
    width: 100%;
    text-align: left;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links.mobile .nav-link:hover {
    background: rgba(26, 95, 63, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Desktop vs Mobile Navigation */
.nav-links.desktop {
    display: flex;
}

.nav-links.mobile {
    display: none;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav-links.desktop {
        display: none;
    }
    
    .nav-links.mobile {
        display: flex;
    }

    .navbar .container {
        justify-content: space-between;
        align-items: center;
    }

    .nav-brand {
        font-size: 1.5rem;
        order: 0;
        flex: 1;
        text-align: left;
    }

    .mobile-toggle {
        order: 1;
        margin-left: 15px;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .nav-links.mobile {
        width: 85%;
        padding: 70px 25px 25px;
    }
}

@media (max-width: 480px) {
    .mobile-toggle {
        padding: 8px;
    }

    .mobile-toggle span {
        width: 20px;
        height: 2px;
    }

    .nav-links.mobile {
        width: 90%;
        padding: 60px 20px 20px;
        gap: 15px;
    }

    .nav-links.mobile .nav-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 360px) {
    .nav-links.mobile {
        width: 95%;
        padding: 50px 15px 15px;
        gap: 12px;
    }
}

/* Safe Area Insets untuk Notched Devices */
@supports (padding-top: env(safe-area-inset-top)) {
    .nav-links.mobile {
        padding-top: calc(60px + env(safe-area-inset-top));
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .nav-links.mobile {
        background: rgba(45, 45, 45, 0.98);
        color: #e0e0e0;
    }

    .nav-links.mobile .nav-link {
        color: #e0e0e0;
    }

    .nav-links.mobile .nav-link:hover {
        background: rgba(26, 95, 63, 0.2);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .nav-links.mobile {
        transition: none;
    }
    
    .mobile-toggle span {
        transition: none;
    }
}