/* ===================================== */
/* MOBILE MENU STYLES - AGGRESSIVE FIX  */
/* CekJurnal - Perpustakaan Polines     */
/* Version: 2.4 - Force Override        */
/* ===================================== */

:root {
    --polines-navy: #003366;
    --polines-blue: #004080;
    --polines-gold: #FDB515;
    --polines-yellow: #FFD700;
    --polines-dark: #002244;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #003366 !important;
    background-color: #003366 !important;
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    display: none;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.mobile-header.header-sticky,
.mobile-header.scrolled,
.mobile-header.background-header,
header.mobile-header.background-header,
.background-header.mobile-header {
    background: #003366 !important;
    background-color: #003366 !important;
    height: auto !important;
    padding: 15px 20px !important;
}

.mobile-header::before,
.mobile-header::after {
    display: none !important;
}

.mobile-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    max-width: 150px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--polines-gold);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* ===== SIDE MENU ===== */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--polines-navy);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.side-menu.active {
    right: 0;
}

.menu-header {
    background: var(--polines-dark);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.menu-header h3 {
    color: var(--polines-gold);
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.menu-close {
    background: none;
    border: none;
    color: var(--polines-gold);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease;
}

.menu-close:hover {
    transform: rotate(90deg);
}

.menu-close:active {
    transform: scale(0.95) rotate(90deg);
}

/* ===== MENU LIST ===== */
.menu-list {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.menu-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-list li:last-child {
    border-bottom: none;
}

/* ===== MENU LINK STYLES - FORCE RESET ALL ===== */
/* Reset semua link ke state default */
.menu-list a,
.menu-list li a,
.menu-list > li > a,
a.menu-list,
.side-menu .menu-list a,
.side-menu ul.menu-list li a,
nav.side-menu .menu-list a {
    display: block !important;
    padding: 18px 25px !important;
    color: white !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: normal !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-left: 3px solid transparent !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
}

/* Hover state - ALL links */
.menu-list a:hover,
.menu-list li a:hover,
.side-menu .menu-list a:hover {
    background: rgba(253, 181, 21, 0.1) !important;
    background-color: rgba(253, 181, 21, 0.1) !important;
    color: var(--polines-gold) !important;
    padding-left: 35px !important;
    border-left: 3px solid transparent !important;
}

/* Active state - ONLY with .active class */
.menu-list a.active,
.menu-list li a.active,
.side-menu .menu-list a.active,
a.active[data-page],
.menu-list a[class*="active"] {
    background: rgba(253, 181, 21, 0.15) !important;
    background-color: rgba(253, 181, 21, 0.15) !important;
    color: var(--polines-gold) !important;
    padding-left: 35px !important;
    border-left: 3px solid var(--polines-gold) !important;
    font-weight: 600 !important;
}

/* NOT active - explicitly NOT active */
.menu-list a:not(.active),
.menu-list li a:not(.active),
.side-menu .menu-list a:not(.active) {
    background: transparent !important;
    background-color: transparent !important;
    color: white !important;
    font-weight: normal !important;
    border-left: 3px solid transparent !important;
}

/* Icon styling */
.menu-list a i,
.menu-list li a i {
    margin-right: 10px !important;
    width: 20px !important;
    text-align: center !important;
    transition: transform 0.3s ease !important;
    color: inherit !important;
}

.menu-list a:hover i,
.menu-list a.active i {
    transform: scale(1.1);
}

/* ===== SPECIFIC LINK OVERRIDES - REMOVE ALL SPECIAL STYLING ===== */
/* Pastikan tidak ada link yang punya styling khusus */
.menu-list a[href*="jurnal-match"],
.menu-list a[href="jurnal-match.html"],
.menu-list a[data-page="jurnal-match"],
.menu-list a[href*="index"],
.menu-list a[href="index.html"],
.menu-list a[data-page="index"] {
    background: transparent !important;
    background-color: transparent !important;
    color: white !important;
    font-weight: normal !important;
    border-left: 3px solid transparent !important;
    padding: 18px 25px !important;
}

/* Hover untuk link specific */
.menu-list a[href*="jurnal-match"]:hover,
.menu-list a[data-page="jurnal-match"]:hover,
.menu-list a[href*="index"]:hover,
.menu-list a[data-page="index"]:hover {
    background: rgba(253, 181, 21, 0.1) !important;
    background-color: rgba(253, 181, 21, 0.1) !important;
    color: var(--polines-gold) !important;
    padding-left: 35px !important;
}

/* Active ONLY when class active is present */
.menu-list a[href*="jurnal-match"].active,
.menu-list a[data-page="jurnal-match"].active {
    background: rgba(253, 181, 21, 0.15) !important;
    background-color: rgba(253, 181, 21, 0.15) !important;
    color: var(--polines-gold) !important;
    padding-left: 35px !important;
    border-left: 3px solid var(--polines-gold) !important;
    font-weight: 600 !important;
}

.menu-list a[href*="index"].active,
.menu-list a[data-page="index"].active {
    background: rgba(253, 181, 21, 0.15) !important;
    background-color: rgba(253, 181, 21, 0.15) !important;
    color: var(--polines-gold) !important;
    padding-left: 35px !important;
    border-left: 3px solid var(--polines-gold) !important;
    font-weight: 600 !important;
}

/* ===== MENU OVERLAY ===== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 991px) {
    .mobile-header {
        display: flex;
    }
    
    .header-area {
        display: none !important;
    }
    
    body {
        padding-top: 65px;
    }
}

@media screen and (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }
    
    .side-menu {
        display: none !important;
    }
    
    .menu-overlay {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
}

@media screen and (max-width: 375px) {
    .side-menu {
        width: 85%;
    }
    
    .menu-list a {
        font-size: 14px !important;
        padding: 16px 20px !important;
    }
    
    .menu-list a:hover,
    .menu-list a.active {
        padding-left: 30px !important;
    }
}

/* ===== SCROLLBAR ===== */
.side-menu::-webkit-scrollbar {
    width: 6px;
}

.side-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.side-menu::-webkit-scrollbar-thumb {
    background: rgba(253, 181, 21, 0.3);
    border-radius: 3px;
}

.side-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(253, 181, 21, 0.5);
}

/* ===== ACCESSIBILITY ===== */
* {
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:focus,
.menu-close:focus {
    outline: 2px solid var(--polines-gold);
    outline-offset: 2px;
}

.menu-list a:focus {
    outline: 2px solid var(--polines-gold);
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    .side-menu,
    .menu-overlay,
    .menu-list a,
    .menu-toggle,
    .menu-close {
        transition: none;
    }
}

/* ===== PRINT ===== */
@media print {
    .mobile-header,
    .side-menu,
    .menu-overlay {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
}

/* ===================================== */
/* END OF MOBILE MENU STYLES            */
/* ===================================== */