/* =========================================================
1. NAVLINK HOVER EFFECT (Underlined on hover)
========================================================= */
.navbar-nav .nav-link {
    position: relative;
    padding-bottom: 6px;
}
.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0%;
    height: 3px;
    background-color: #f8d100;
    transform: translateX(-50%);
    transition: .3s ease;
}
.navbar-nav .nav-link:hover::after {
    width: 90%;
}



/* =========================================================
2. MEGA DROPDOWN CORE STYLE (Container, position, layout)
========================================================= */
.mega-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;

    /* mulai sebagai tirai tertutup */
    height: 0;
    overflow: hidden;

    background: #0e1d45;
    transition: height .55s cubic-bezier(.25,.46,.45,.94);
    z-index: 9999 !important;
}

/* Saat terbuka — tirai penuh ke bawah */
.mega-container.show {
    height: 100vh;   /* FULL SAMPAI BAWAH */
}

/* isi dropdown */
.mega-inner {
    width: 85%;
    margin: auto;
    padding-top: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .4s ease .15s,
                transform .4s ease .15s;
}

/* muncul perlahan saat show */
.mega-container.show .mega-inner {
    opacity: 1;
    transform: translateY(0);
}





/* =========================================================
3. MEGA DROPDOWN INNER GRID & LINKS
========================================================= */
.mega-inner {
    width: 85%;
    margin: auto;
    color: white;
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(200px, 1fr));
    column-gap: 20px;  /* jarak antar kolom */
    row-gap: 25px;     /* jarak antar baris */
}

.mega-title {
    color: #dbb704;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 18px;
}

.mega-col a {
    color: #dcdcdc;
    display: block;
    padding: 4px 0;
    font-size: 17px;
    transition: .2s;
}
.mega-col a:hover {
    color: white;
    transform: translateX(5px);
}



/* =========================================================
4. PER-KOLOM FADE + SLIDE ANIMATION (Stagger)
========================================================= */
.mega-col {
    opacity: 0;
    transform: translateY(15px);
    transition:
        opacity .35s ease,
        transform .35s ease;
}

/* Stagger delay */
.mega-container.show .mega-col:nth-child(1) {
    transition-delay: .10s;
}
.mega-container.show .mega-col:nth-child(2) {
    transition-delay: .18s;
}
.mega-container.show .mega-col:nth-child(3) {
    transition-delay: .26s;
}

/* active state */
.mega-container.show .mega-col {
    opacity: 1;
    transform: translateY(0);
}



/* =========================================================
5. ICON BUTTON (Hamburger → Close animation)
========================================================= */
.mega-icon-btn {
    width: 32px;
    height: 34px;
    border: 0.5px solid #ffffff;
    background: transparent;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: .3s ease;
}

.icon-line {
    width: 18px;
    height: 2.4px;
    background: #ffffff;
    transition: .3s ease;
}

/* Transform hamburger to X */
.mega-icon-btn.active .line1 {
    transform: translateY(7px) rotate(45deg);
}
.mega-icon-btn.active .line2 {
    opacity: 0;
}
.mega-icon-btn.active .line3 {
    transform: translateY(-7px) rotate(-45deg);
}

.mega-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}



/* =========================================================
6. LAYERING FIX (Topbar > Header > Mega Dropdown)
========================================================= */
header.header-fp {
    position: relative;
    z-index: 20;
}

.topbar {
    position: relative;
    z-index: 30;
}

.mega-container {
    z-index: 9999 !important;
}

.header-fp {
    margin-top: 0px !important; /* Tempelkan header ke topbar */
}
