/* Premium Navigation Styles */
#main-header { 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
#main-header.scrolled { 
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px -1px rgba(0,0,0,0.05);
    padding: 0.5rem 0;
}

/* Mega Menu */
.mega-menu {
    position: fixed;
    top: 80px; /* height of header */
    left: 0;
    width: 100vw;
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-top: 1px solid #F3F4F6;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 40;
    padding: 3rem 0;
}
#main-header.scrolled .mega-menu {
    top: 64px; /* adjusted for scrolled height */
}
.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mega-menu-column h4 {
    font-size: 0.75rem;
    font-weight: 900;
    color: #2563EB;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #EFF6FF;
    padding-bottom: 0.75rem;
}
.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 1rem;
    transition: all 0.2s ease;
}
.mega-menu-item:hover {
    background: #F9FAFB;
    transform: translateX(5px);
}
.mega-menu-thumb {
    width: 60px;
    height: 45px;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}
.mega-menu-link {
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
    line-height: 1.2;
}
.mega-menu-item:hover .mega-menu-link {
    color: #2563EB;
}

/* ========================================
   MOBILE MENU - SIMPLE & BULLETPROOF
   ======================================== */

#mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: #ffffff;
    z-index: 45;
    display: none;
}

#mobile-menu.active {
    display: block;
}

/* Scrollable container - this is KEY */
.mobile-menu-scroll {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
    padding-bottom: 100px; /* Extra space at bottom for safety */
}

/* Lock body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Top-level nav links (About, How It Works, Contact) */
.mobile-nav-link {
    display: block;
    font-size: 1.125rem;
    font-weight: 800;
    color: #1F2937;
    padding: 1rem 0;
    border-bottom: 1px solid #E5E7EB;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Programs toggle button - same style as nav links */
.mobile-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 1.125rem;
    font-weight: 800;
    color: #1F2937;
    padding: 1rem 0;
    border: none;
    border-bottom: 1px solid #E5E7EB;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-align: left;
}

.mobile-accordion-toggle .chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.mobile-accordion-toggle.open .chevron {
    transform: rotate(180deg);
}

/* Main accordion content (Programs container) - HIDDEN BY DEFAULT */
.mobile-accordion-content {
    display: none;
    padding-left: 0.5rem;
}

.mobile-accordion-content.open {
    display: block;
}

/* Sub-section containers (High School, College, Career sections) */
.mobile-accordion-section {
    border-bottom: 1px solid #F3F4F6;
    padding: 0.5rem 0;
}

/* Sub-toggle buttons (High School, College, Career) */
.mobile-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4B5563;
    padding: 0.75rem 0;
    border: none;
    background: transparent;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    text-align: left;
}

.mobile-sub-toggle .chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.mobile-sub-toggle.open .chevron {
    transform: rotate(180deg);
}

/* Sub-list (the actual program links) - HIDDEN BY DEFAULT */
.mobile-sub-list {
    display: none;
    padding: 0.25rem 0 0.5rem 1rem;
}

.mobile-sub-list.open {
    display: block;
}

/* Individual program links */
.mobile-mega-item {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    padding: 0.6rem 0;
    border-bottom: 1px solid #F9FAFB;
}

.mobile-mega-item:last-child {
    border-bottom: none;
}

.mobile-mega-item:hover,
.mobile-mega-item:active {
    color: #2563EB;
}

/* Hide course images on mobile for program pages */
@media (max-width: 768px) {
    .course-image {
        display: none;
    }
}

/* ========================================
   CART MODAL
   ======================================== */

#cart-modal-main {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 1.5rem;
}
#cart-modal-main.active {
    display: flex;
}
#cart-modal-main .cart-modal-panel {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
}
#cart-modal-main .cart-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}
#cart-modal-main .cart-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}
#cart-modal-main .cart-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
#cart-modal-main .cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #F3F4F6;
}
#cart-modal-main .cart-item:last-child {
    border-bottom: none;
}
#cart-modal-main .cart-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
}
#cart-modal-main .cart-remove {
    color: #EF4444;
    font-weight: 700;
    cursor: pointer;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    letter-spacing: -0.01em;
}
.btn-primary {
    background: #2563EB;
    color: white;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
}
.btn-primary:hover {
    background: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
}
.btn-white {
    background: white;
    color: #2563EB;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
.btn-white:hover {
    background: #F9FAFB;
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.15);
}
