/* ============================
   NAVBAR
============================ */
.studyexpo-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: transparent;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.studyexpo-navbar.scrolled {
    background: rgba(16, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.navbar-brand h2 {
    color: #f5c542;
    font-size: 24px;
    margin: 0;
}

.navbar-links {
    display: flex;
    align-items: center;
    /* ensures vertical alignment */
    gap: 25px;
}

.navbar-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.navbar-links a:hover {
    color: #f5c542;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f5c542;
    transition: width 0.3s ease;
}

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

/* Mobile Hamburger */
.navbar-toggle {
    display: none;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(245, 197, 66, 0.15), rgba(59, 130, 246, 0.1));
    border: 2px solid rgba(245, 197, 66, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.navbar-toggle:hover {
    background: linear-gradient(135deg, rgba(245, 197, 66, 0.25), rgba(59, 130, 246, 0.15));
    border-color: #f5c542;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(245, 197, 66, 0.3);
}

.navbar-toggle:active {
    transform: scale(0.95);
}

.navbar-close {
    display: none;
    /* hidden by default */
}


.btn-highlight {
    position: relative;
    background: #f5c542;
    color: #111 !important;
    font-weight: 700;
    padding: 16px 36px;
    /* more padding for better balance */
    border-radius: 12px;
    overflow: hidden;
    /* contain shine inside */
    animation: pulseGlow 2.5s infinite;
}

/* Glow animation */
@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0px rgba(245, 197, 66, 0.6);
    }

    50% {
        box-shadow: 0 0 20px rgba(245, 197, 66, 0.9);
    }

    100% {
        box-shadow: 0 0 0px rgba(245, 197, 66, 0.6);
    }
}

/* Shine sweep */
.btn-highlight::after {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    /* start just outside left */
    width: 50%;
    /* streak width */
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 255, 255, 0.6),
            transparent);
    animation: shineSweep 3s infinite;
}

/* Adjusted sweep so it ends just outside right edge */
@keyframes shineSweep {
    0% {
        left: -50%;
    }

    100% {
        left: 100%;
    }
}


/* ============================
   RESPONSIVE NAVBAR
============================ */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 16px;
    }

    .navbar-close {
        display: block;
        /* show only on mobile */
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(239, 68, 68, 0.1);
        border: 2px solid rgba(239, 68, 68, 0.3);
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .navbar-close:hover {
        background: rgba(239, 68, 68, 0.2);
        border-color: #ef4444;
    }

    .navbar-close i {
        font-size: 20px;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        /* full width */
        background: linear-gradient(180deg, rgba(11, 18, 36, 0.98) 0%, rgba(5, 15, 35, 0.98) 100%);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 70px 24px 24px 24px;
        gap: 20px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 998;
        overflow-y: auto;
        border-left: 1px solid rgba(245, 197, 66, 0.1);
    }

    .navbar-links.active {
        right: 0;
    }

    /* Enhanced mobile link styles */
    .navbar-links a {
        padding: 14px 20px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: all 0.3s ease;
        font-size: 16px;
    }

    .navbar-links a:hover {
        background: rgba(245, 197, 66, 0.1);
        border-color: rgba(245, 197, 66, 0.3);
        transform: translateX(4px);
    }

    .navbar-links a::after {
        display: none;
    }

    .navbar-links a:hover::before {
        content: '→';
        position: absolute;
        left: -20px;
        color: #f5c542;
        font-size: 18px;
    }

    .navbar-toggle {
        display: flex;
    }
}

/* Language Switcher */
.language-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #f5c542;
}

.lang-btn i:first-child {
    color: #f5c542;
}

.lang-btn i:last-child {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.3s;
}

.language-dropdown:hover .lang-btn i:last-child {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    visibility: hidden;
    opacity: 0;
    display: block;
    /* Use visibility/opacity for transition */
}

.lang-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lang-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-menu button:hover {
    background: rgba(245, 197, 66, 0.1);
    color: #f5c542;
}

.lang-menu button.active {
    color: #f5c542;
    background: rgba(245, 197, 66, 0.05);
}

@media (max-width: 768px) {
    .language-dropdown {
        width: 100%;
    }

    .lang-btn {
        width: 100%;
        justify-content: space-between;
        padding: 12px 20px;
    }

    .lang-menu {
        position: static;
        width: 100%;
        margin-top: 10px;
        background: rgba(255, 255, 255, 0.03);
    }

    .language-dropdown:hover .lang-menu {
        display: block;
    }
}