/* ====================
   HEADER & NAVBAR
   ==================== */
.top-bar {
    background-color: #0a2540;
    color: var(--white);
    font-size: 0.875rem;
    padding: 6px 0;
}

.top-bar .text-right {
    text-align: right;
}

.navbar {
    background-color: var(--primary-blue);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: normal;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* Dropdown */
.dropdown-wrapper {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    color: var(--text-dark);
    list-style: none;
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-wrapper:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    transition: all 0.2s ease-in-out;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--light-blue);
}

/* Hamburger Icon */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.hamburger .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.is-active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.is-active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.is-active .bar:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* Responsive Header Mobile */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links { 
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-blue);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
        z-index: 999;
        gap: 0;
    }

    .nav-links.active {
        max-height: 600px;
        padding: 16px 0;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li {
        text-align: center;
        padding: 12px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.15);
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 12px;
        border-radius: 6px;
    }
    
    .dropdown-menu a {
        color: var(--white);
        padding: 12px 16px;
    }

    .dropdown-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--white);
    }

    .dropdown-wrapper:hover .dropdown-menu {
        display: block;
    }
    
    .nav-container {
        padding: 16px 16px;
    }

    .logo {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .logo-link {
        gap: 8px;
    }

    .logo-img {
        height: 30px;
    }
}

/* ====================
   MODAL / POP-UP LOGIN
   ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    
    /* Tambahan efek blur background jika browser mendukung (Premium UI) */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 320px;
    position: relative;
    transform: translateY(-20px); 
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1; /* Mencegah ikon X tergeser ke bawah */
}

.close-modal:hover {
    color: var(--text-dark);
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 16px;
}

.modal-content .login-note {
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Class pembantu untuk mengunci scroll background saat modal aktif */
.body-no-scroll {
    overflow: hidden;
}