/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 0;
    background: transparent;
    transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

/* All pages except home: solid white header */
.header.header-solid {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Home page: keep header transparent, scroll JS adds .scrolled */
.home-page .header.header-solid {
    background: transparent;
    box-shadow: none;
}

.home-page .header.header-solid.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 12px 0;
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 56px;
    width: auto;
    display: block;
}

/* Nav */
.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: #1c1d1f;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
    cursor: pointer;
}

.nav-link:hover {
    color: #f49e0d;
}

.nav-link.active {
    color: #f49e0d;
    font-weight: 700;
}

.nav-link.dropdown {
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    cursor: pointer;
}

.nav-link.dropdown .arrow {
    font-size: 10px;
    transition: transform 0.3s;
}

.nav-link.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.nav-link.dropdown .small-screen-arrow{
    display: none;
} 

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    background: #292929;
    min-width: 200px;
    border-radius: 12px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); */
    padding: 15px 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;

}

.nav-link.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 14px 16px;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: #3a3a3a;
    color: #f49e0d;
}

/* Enrol Button */
.nav-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.btn-enroll {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f49e0d;
    color: #1c1d1f;
    padding: 14px 48px 14px 18px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s, padding 0.3s;
    position: relative;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: 40px;
    min-width: 130px;
}

.btn-enroll:hover {
    background: #ffd946;
    padding: 14px 33px;
}

.btn-enroll:hover .arrow-circle {
    display: none;
}

.btn-enroll .arrow-circle {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: absolute;
    right: 1px;
    top: 50%;
    transform: translateY(-50%);
    color: #1c1d1f;
    border: 2px solid #f49e0d;
}

/* menu icons */
#icon-close{
    display: none;
}
header .container.header-inner .menu-icon{
    display: none;
}

#icon-menu{
    width: 100%;
    height: 100%;
}
#icon-close{
    width: 26px;
    height: 26px;
}


@media (min-width: 769px) {
    .dropdown-menu {
        height: 455px;
        overflow-y: scroll;
    }
    /* Scrollbar width */
    .dropdown-menu::-webkit-scrollbar {
        width: 8px;
    }

    /* Scrollbar track */
    .dropdown-menu::-webkit-scrollbar-track {
        background-color: #292929;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
    }

    /* Scrollbar thumb */
    .dropdown-menu::-webkit-scrollbar-thumb {
        background-color: #f49e0d;
        border-radius: 12px;
        border: 1px solid #292929;
    }

    /* Hover effect */
    .dropdown-menu::-webkit-scrollbar-thumb:hover {
        background-color: #f5b444;
    }
}

@media (max-width: 768px) {
    header.header {
        box-shadow: none;
        padding-top: 20px;
        padding-bottom: 0px;
        background-color: white;
    }
    .home-page .header.header-solid.scrolled{
        background-color: white;
    }
    .header.header-solid.scrolled,
    .header.header-solid, 
    .home-page .header.header-solid{
        padding-top: 10px;             
        padding-bottom: 0px;
        background-color: white;
    }
    header .container.header-inner {
        display: flex;
        flex-direction: row;
        padding: 0 12px;
    }
    .header .container.header-inner .logo-link{
       width: 27%;
    }    
    .header .container.header-inner .logo-link .logo-img{
       width: 100%;
       height: auto;
    }    
    header .container.header-inner .menu-icon{
        display: flex;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
    }
    header .container.header-inner .nav-group{
        position: absolute;
        top: 65px;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: white;
        gap: 30px;
        padding: 30px 20px;
        transform: scale(0);
        transition: 
            transform 0.3s ease,
            opacity 0.3s ease,
            background-color 0.3s ease;

        transform-origin: top right;
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    header .container.header-inner .nav-group.active{
        display: flex;
        flex-direction: column;

        transform: scale(1);
        opacity: 1;

        pointer-events: auto;
        animation: nav-expand 0.1s linear;
    }
    .nav-group.closed{
        animation: nav-shrink 0.1s linear;
    }
    header .container.header-inner .nav-group .nav{
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0px;
    }
    header .container.header-inner .nav-group .nav a{
        padding: 15px 0px;
        width: 100%;
        border-bottom: solid 1px #1c1d1f1b;
    }
    header .container.header-inner .nav-group .nav .nav-link.dropdown{
        padding: 13px 0px;
        width: 100%;
        flex-wrap: wrap;
        border-bottom: solid 1px #1c1d1f1b;
    }
    .nav-link.dropdown .dropdown-menu{
        width: 100%;
        padding-bottom: 0px;
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        height: 260px;
        overflow-y: scroll;
        /* overflow-x: hidden; */
    }
    .nav-link.dropdown .small-screen-arrow{
        display: inline-block;
    } 
    .nav-group .nav .nav-link.dropdown .dropdown-menu a:before{
        content: ">";
        margin-right: 10px;
        font-size: large;
    }
    .nav-group .nav .nav-link.dropdown .dropdown-menu a:hover {
        background: none;
    }
    .nav-group .nav .nav-link.dropdown .dropdown-menu a{
        color: #1C1D1F;
    }
    .header.header-solid .nav-group .btn-enroll{
        border-radius: 10px;
        color: #FBF8E8;
        padding: 16px 33px;
        margin-left: -62%;
    }
    .header.header-solid .nav-group .btn-enroll span{
        display: block;
        text-align: center;
        color: #FBF8E8;
        font-family: Inter;
        font-size: 18px;
        font-weight: 600;
        letter-spacing: -0.36px;
    }
    .header.header-solid .nav-group .btn-enroll .arrow-circle{
        display:none
    }
    .nav-link.dropdown .arrow {
        display: none;
    }
}

/* Media queries for extra small screens */
@media (max-width: 400px) {
    .header.header-solid .nav-group .btn-enroll span {
        font-size: 16px;
    }
    .header.header-solid .nav-group .btn-enroll{
        padding: 12px 23px;
        margin-left: -62%;
    }
    header .container.header-inner .nav-group .nav a {
        padding: 13px 0px;
        font-size: 14px;
    }
    .header .container.header-inner .nav-group{
        padding-top: 20px;
    }
}



.dropdown-menu.show {
    display: block;
}

/* Ensure dropdown menu is styled properly for small screens */
@media (max-width: 768px) {
    .dropdown-menu {
        width: 100%;
        left: 0;
        right: 0;
    }
    /* Dropdown menu styles for small screens */
    .dropdown-menu {
        display: none;
        position: absolute;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding: 10px;
        border-radius: 4px;
    }
    header .container.header-inner .nav-group .nav a:last-child{
        border-bottom: none;
    }
}

/* Animations */
@keyframes nav-expand{
    0%{
        transform: scale(0);
        opacity: 0.3;
        background-color: #f49f0d36;
    }

    60%{
        transform: scale(0.7);
        opacity: 0.8;
        background-color: #f49f0d36;
    }

    95%{
        background-color: #f49f0d36;
    }

    100%{
        transform: scale(1);
        opacity: 1;
        background-color: white;
    }
}

@keyframes nav-shrink{
    0%{
        transform: scale(1);
        opacity: 1;
        background-color: white;
    }

    40%{
        background-color: #f49f0d36;
    }

    100%{
        transform: scale(0);
        opacity: 0.2;
        background-color: #f49f0d36;
    }
}