/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    height: 40px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.5s ease;
}

nav ul li a:hover {
    color: #0056b3;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 6px;
}

.nav-menu a.active {
    color: #1e40ff;
    font-weight: 700;
}

.nav-menu a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: #1e40ff;
}

.lang-switch a {
    color: #000;
    text-decoration: none;
    font-weight: 400;
}

.lang-switch a.active {
    color: #0056b3;        /* active color */
    font-weight: 600;   /* highlight active */
    transition: all 0.5s ease;
}

.lang-switch a:hover {
    text-decoration: none;
}

/* Burger icon */
.burger {
    display: none; /* tampil hanya di mobile */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #1e40ff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Burger open animation */
.burger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}


/* ================== Responsive ================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {

    /* Header */
    .navbar-container {
        padding: 0 15px;
    }

    nav ul {
        gap: 12px;
    }

    nav ul li a {
        font-size: 13px;
    }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {

    /* Header */
    .navbar-container {
        flex-direction: row;           
        justify-content: space-between; /* logo kiri, burger kanan */
        align-items: center;           
        padding: 0 15px;
        position: relative;            /* penting untuk absolute nav */
    }

    /* Burger button */
    .burger {
        display: flex;                 /* tampil di mobile */
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 22px;
        cursor: pointer;
        z-index: 1001;
    }

    .burger span {
        display: block;
        height: 3px;
        width: 100%;
        background: #1e40ff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .burger.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .burger.open span:nth-child(2) {
        opacity: 0;
    }
    .burger.open span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Nav Menu */
    nav {
        position: absolute;           /* agar muncul di bawah header */
        top: 100%;                    /* tepat di bawah header */
        left: 0;
        width: 100%;
        background: #fff;
        display: none;                /* default hidden */
        flex-direction: column;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 20px;
        z-index: 999;
        margin-top: 10px;
    }

    nav.active {
        display: flex;                /* muncul saat burger diklik */
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 14px;
    }

    .logo img {
        height: 35px;
    }
}