/* ============================================
   🌿 NAVBAR MODERN & PROFESIONAL
   ============================================ */
.navbar {
    background-color: #146A0E;
    position: relative;
    z-index: 100;
    padding: 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ===== Flex Container ===== */
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    margin: 0 auto;
    max-width: 1370px; /* batas maksimal */
    width: 100%;
}

/* ===== Menu Utama ===== */
.navbar .ul {
    display: flex;
    flex: 1; /* biar ul mengisi seluruh container */
    justify-content: space-between; /* item tersebar merata */
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 28px;
    transition: all 0.4s ease;
}

.navbar .ul a {
    color: #fff;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.navbar .ul a:hover {
    color: #CAF8BF;
    transform: translateY(-2px);
}

.navbar .ul a.active {
    color: #CAF8BF;
    font-weight: 600;
}

/* ===== Dropdown ===== */
.dropdown {
    position: relative; /* sudah ada */
}

.dropdown-content {
    position: absolute;
    top: 100%;       /* tepat di bawah link */
    left: 0;         /* mulai dari sisi kiri parent dropdown */
    transform: none; /* hilangkan translateX */
    background-color: #146A0E;
    min-width: 200px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 50;
}

.dropdown-content a {
    display: block;
    padding: 12px 18px;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    transition: background 0.3s ease, padding-left 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #0f580c;
    padding-left: 22px;
}

/* Aktif saat JS menambahkan class .active */
.dropdown.active .dropdown-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===== Hamburger Modern Elegan ===== */
.menu-toggle {
    display: none;
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s ease;
}

/* Garis-garis hamburger */
.menu-toggle span {
    background: #fff;
    border-radius: 2px;
    position: absolute;
    height: 3px;
    width: 100%;
    left: 0;
    transition: all 0.4s ease;
}

/* Posisi setiap garis */
.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

/* Saat aktif (jadi X) */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* Hover efek halus */
.menu-toggle:hover span { background: #CAF8BF; }

/* ============================================
   🌿 RESPONSIVE STYLING
   ============================================ */
@media (max-width: 768px) {
    .navbar { padding: 10px 18px; }

    .menu-toggle { display: block; }

    .navbar .ul {
        flex-direction: column;
        align-items: flex-start;
        background-color: #146A0E;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 20px 24px;
        gap: 15px;
        display: flex;
        opacity: 0;
        transform: translateY(-15px);
        pointer-events: none;
        visibility: hidden;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.4s ease;
    }

    .navbar .ul.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        visibility: visible;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: #0f580c;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        transition: none;
        width: 100%;
        margin-top: 5px;
    }

    .dropdown-content a {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 10px 16px;
    }
}
