/* === HEADER USER === */
.header-user {
    font-family: 'Nunito', sans-serif;
    background: #0d6efd;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    margin-bottom: 0rem; /* jarak bawah header ke konten */
}



.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo teks */
.logo-text a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}
.logo-text span {
    color: #ffc107; /* aksen kuning */
}
.logo-text a:hover {
    color: #e0f7fa;
}

/* Navigasi */
.nav-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-user ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}
.nav-user ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.2s ease;
}
.nav-user ul li a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Search form */
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-form input {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 4px;
    outline: none;
}
.search-form button {
    background: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.search-form button i {
    color: #159cff;
    font-size: 1rem;
}
.search-form button:hover {
    transform: rotate(10deg);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    gap: 5px;
}
.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.4s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-user {
        position: fixed; /* lebih stabil daripada absolute */
        top: 0;
        right: 0;
        height: 100vh; /* penuh layar */
        background: #0d6efd;
        flex-direction: column;
        align-items: flex-start;
        width: 240px;
        padding: 2rem 1rem;
        transform: translateX(100%);
        transition: transform 0.35s ease-in-out;
        box-shadow: -4px 0 8px rgba(0,0,0,0.15);
    }
    .nav-user.show {
        transform: translateX(0);
    }

    .nav-user ul {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .nav-user ul li {
        width: 100%;
    }
    .nav-user ul li a {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 6px;
    }

    .search-form {
        width: 100%;
        margin-top: 1.5rem;
        flex-direction: row;
    }
    .search-form input {
        flex: 1;
        width: 100%;
    }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1100; /* agar selalu di atas menu */
    }

    /* Hamburger animasi jadi X */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
}

