/* ===========================
   COLOR VARIABLES
   =========================== */
:root {
    --primary-green: #46c32d;
    --primary-red: #e1140a;
    --primary-blue: #3d91e7;
    --primary-yellow: #ffd000;
}


/* ===========================
   FONT
   =========================== */
body {
    font-family: 'Poppins', sans-serif;
}


/* ===========================
   NAVBAR CONTAINER
   =========================== */
.navbar {
    position: relative;
    z-index: 1000;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    min-height: 70px;
    font-size: 0.95rem;
    font-weight: 600;
    overflow: visible;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}


/* ===========================
   NAVBAR BACKGROUND
   =========================== */
.navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    z-index: -1;
    border-radius: 0 0 0px 0px;
}

.navbar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
    border-radius: 0 0 0px 0px;
}

/* ===========================
   NAVBAR SCROLL EFFECT
   =========================== */
.navbar {
    transition: all 0.4s ease, opacity 0.4s ease;
}

.navbar-hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.navbar-fixed {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    opacity: 1;
    transform: translateY(0);
    animation: fadeDownSmooth 0.4s ease forwards;
}

/* Efek fade-down saat muncul */
@keyframes fadeDownSmooth {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   NAVBAR BRAND
   =========================== */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #fff !important;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-yellow) 0%, var(--primary-green) 100%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar-brand:hover::after {
    width: 100%;
}

.navbar-brand:hover {
    transform: scale(1.05);
}


/* ===========================
   NAV LINKS
   =========================== */
.navbar-nav .nav-link {
    font-weight: 600;
    margin-left: 0.5rem;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
    position: relative;
    border-radius: 8px;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-yellow);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-yellow) !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    width: 80%;
}


/* ===========================
   DROPDOWN
   =========================== */
.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: fadeDown 0.3s ease;
    z-index: 9999 !important;
    position: absolute;
    background: white;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    color: #1a202c;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dropdown-item:hover::before,
.dropdown-item.active::before {
    transform: scaleY(1);
}

.dropdown-item:hover,
.dropdown-item.active {
    background: linear-gradient(to right, rgba(61, 145, 231, 0.1), transparent);
    color: var(--primary-blue) !important;
    padding-left: 2rem;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 2px solid #f0f0f0;
}


/* ===========================
   TOGGLER (Mobile)
   =========================== */
.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 208, 0, 0.3);
    border-color: var(--primary-yellow);
}

.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-yellow);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-width='3' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}


/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===========================
   OVERFLOW FIX
   =========================== */
.card, .container, .row, section {
    overflow: visible !important;
}


/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 991px) {
    .navbar {
        border-radius: 0 0 12px 12px;
    }

    .navbar-nav {
        padding: 1rem 0;
    }

    .navbar-nav .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem;
    }

    .dropdown-menu {
        border-radius: 8px;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        background: rgba(255, 255, 255, 0.95);
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }
}

/* Pencaraian */
.navbar .form-control {
    border-radius: 20px;
    padding-left: 12px;
}

.navbar .btn {
    border-radius: 20px;
}
