* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif
}

a {
    text-decoration: none;
    color: inherit
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 16px
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    position: sticky;
    top: 0;
    z-index: 100
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #4f46e5
}

.nav a {
    margin-left: 20px;
    font-size: 14px
}

.btn-primary {
    background: #4f46e5;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 22px
}

/* Mobile */
.mobile-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #eee
}

.mobile-nav a {
    padding: 12px
}

@media(max-width:768px) {
    .desktop-nav {
        display: none
    }

    .hamburger {
        display: block
    }
}

/* ================= MODAL POPUP ================= */
/* ================= MODAL POPUP (Premium Redesign) ================= */
.notice-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    /* Deep blurred backend */
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.notice-modal {
    background: #ffffff;
    max-width: 480px;
    width: 90%;
    border-radius: 24px;
    /* Soft large radius */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Bouncy spring effect */
    display: flex;
    flex-direction: column;
}

.notice-img-wrapper {
    width: 100%;
    height: 220px;
    background: #f1f5f9;
    position: relative;
}

.notice-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notice-content {
    padding: 30px;
    text-align: center;
}

.notice-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.notice-content p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

.notice-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    color: #0f172a;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notice-close:hover {
    transform: scale(1.1) rotate(90deg);
    background: #fff;
    color: #ef4444;
    /* Red on hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(40px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.notice-modal h3 {
    margin-bottom: 8px;
    font-size: 20px
}

.notice-modal p {
    color: #555;
    font-size: 14px
}

.notice-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 24px;
    border: none;
    background: none;
    cursor: pointer;
}

@keyframes scaleIn {
    from {
        transform: scale(.9);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

/* ==========================================================================
   Modern UI Framework - EduNova 2.0
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Preloader
   -------------------------------------------------------------------------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #0f172a;
    /* primary color */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #f97316;
    /* secondary color */
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

.loader-text {
    color: white;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 14px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

/* --------------------------------------------------------------------------
   2. Magnetic Hamburger Button
   -------------------------------------------------------------------------- */
.magnetic-wrap {
    position: fixed;
    /* Fixed relative to viewport */
    top: 25px;
    /* Align with header elements */
    right: 20px;
    /* Align with container padding */
    z-index: 10001;
    /* Higher than menu overlay (10000) */
    display: none;
    /* Hidden by default, shown on mobile via media query */
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

@media (max-width: 768px) {
    .magnetic-wrap {
        display: flex;
    }
}

.hamburger-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    transition: transform 0.3s ease;
    border: 1px solid rgba(15, 23, 42, 0.1);
    /* light border */
}

.hamburger-btn:hover {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.2);
}

.burger-icon {
    position: relative;
    width: 24px;
    height: 14px;
}

.burger-line {
    position: absolute;
    height: 2px;
    width: 100%;
    background: #0f172a;
    transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.burger-line:first-child {
    top: 0;
}

.burger-line:last-child {
    bottom: 0;
}

/* Active State (X shape) */
.is-active .burger-line:first-child {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.is-active .burger-line:last-child {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   3. Full Screen Menu Overlay (Redesigned for Reliability)
   -------------------------------------------------------------------------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: #0f172a;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-20px);
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-link {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 15px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
}

.menu-overlay.open .menu-link {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays */
.menu-overlay.open .menu-link:nth-child(1) {
    transition-delay: 0.1s;
}

.menu-overlay.open .menu-link:nth-child(2) {
    transition-delay: 0.2s;
}

.menu-overlay.open .menu-link:nth-child(3) {
    transition-delay: 0.3s;
}

.menu-overlay.open .menu-link:nth-child(4) {
    transition-delay: 0.4s;
}

.menu-overlay.open .menu-link:nth-child(5) {
    transition-delay: 0.5s;
}

.menu-link:hover {
    color: #f97316;
    letter-spacing: 2px;
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Prevent horizontal scroll */
html,
body {
    overflow-x: hidden;
    width: 100%;
}


/* Ensure Magnetic Button stays on top of overlay */
.magnetic-wrap {
    z-index: 10001 !important;
    /* Higher than menu-overlay (10000) */
    position: relative;
    /* Ensure it has a position so z-index works. 
       Note: It's inside header. Header needs to not trap it or be high enough.
       Header is z-50. This fixed/relative context might be tricky.
       The magnetic-wrap is inside header, menu-overlay is in footer.
       Fixed element (header) z-50 vs Fixed element (overlay) z-10000.
       The header needs to be higher or the button needs to be moved/fixed separately.
       
       Let's try making the header z-index higher than overlay when menu is open? 
       No, header background would cover overlay.
       
       Better: Make .magnetic-wrap fixed position when active?
       Or move styling to ensure it pops up.
    */
}

/* We will handle the z-index boost in JS or here if possible. 
   Since .magnetic-wrap is inside .fixed header z-50, it cannot escape z-50 context purely by z-index if the parent has stacking context.
   However, we can make the .magnetic-wrap position: fixed itself on mobile.
*/
@media (max-width: 768px) {
    .magnetic-wrap {
        position: fixed;
        right: 20px;
        top: 20px;
        /* match header padding */
        z-index: 10001;
    }
}

/* Fix Close Button Visibility */
.magnetic-wrap.is-active .burger-line,
.burger-icon.is-active .burger-line {
    background: #ffffff !important;
}