/* --- NAVBAR MODERN --- */
.navbar {
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    color: #5F9AEA;
    min-height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 50%;
}

.nav-title-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.title-top {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #5F9AEA;
}

.title-bottom {
    font-size: 0.85rem;
    font-weight: 400;
    color: #64748b;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 5px;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links li {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    padding: 10px 15px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
}

/* --- ANIMASI GARIS BAWAH --- */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 5px;
    left: 50%;
    background-color: #5F9AEA;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 70%;
}

.nav-links a:hover {
    color: #5F9AEA;
}

/* --- MENU AKTIF --- */
.active-nav {
    color: #5F9AEA !important;
    font-weight: 700 !important;
}

.active-nav::after {
    content: '';
    position: absolute;
    width: 70% !important;
    height: 3px;
    bottom: 0;
    left: 50%;
    background-color: #5F9AEA;
    transform: translateX(-50%);
}

/* --- DROPDOWN --- */
.nav-links li {
    position: relative;
}

.nav-links li:last-child .dropdown-menu {
    left: auto;
    right: 0;
}

.nav-links .fa-chevron-down {
    font-size: 0.8rem;
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
}

/* --- DROPDOWN MENU (PC & HP SEMBUNYI NYATU) --- */
.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    background: white;
    min-width: 220px;
    list-style: none;
    padding: 10px 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
}

/* TAMPIL SAAT HOVER (PC) ATAU SAAT KLIK/SENTUH (HP) */
.dropdown:hover .dropdown-menu,
.dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    top: 100%;
}

.dropdown-menu li a {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333 !important;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu li a i {
    width: 25px;
    text-align: center;
    color: #5F9AEA;
    font-size: 1.1rem;
}

.dropdown-menu li a:hover {
    background: #f8fafc;
    color: #5F9AEA !important;
    padding-left: 30px;
}

/* ANIMASI IKON PANAH BERPUTAR */
.dropdown:hover .fa-chevron-down,
.dropdown.show .fa-chevron-down {
    transform: rotate(180deg);
}


/* --- RESPONSIVE --- */
@media (max-width: 1100px) {
    .navbar {
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }
    .nav-brand {
        max-width: 100%;
        margin-bottom: 10px;
    }
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        width: 100%;
    }
    .nav-links a {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    /* --- PERBAIKAN DROPDOWN KHUSUS DI HP --- */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) translateY(10px);
        min-width: 180px;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    /* SINKRONISASI POSISI RESPONSIVE DI HP SAAT HOVER ATAU SHOW AKTIF */
    .dropdown:hover .dropdown-menu,
    .dropdown.show .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }
    
    /* Alternatif pengaman khusus untuk item dropdown di layar sangat kecil (< 360px) */
    @media (max-width: 360px) {
        .dropdown-menu {
            min-width: 150px;
        }
        .dropdown-menu li a {
            padding: 10px 12px;
            font-size: 0.85rem;
        }
    }
}