/*
 * AI Video Academy – Clean Light Theme
 * Works smoothly on Mobile & Desktop
 */

/* ─── Override body for light theme when #m-home active ─── */
body:has(#m-home) {
    background: #f8fafc !important;
    color: #0f172a;
}

body:has(#m-home) .site-header {
    background: rgba(255, 255, 255, 0.94) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #e2e8f0 !important;
    border: none;
    border-radius: 0;
    width: 100%;
    margin: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 12px 20px;
}

body:has(#m-home) .site-header .brand,
body:has(#m-home) .site-header .brand span {
    color: #0f172a !important;
    font-weight: 800;
}

body:has(#m-home) .brand-mark {
    background: linear-gradient(135deg, #2563eb, #3b82f6) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
}

body:has(#m-home) .desktop-nav {
    color: #475569 !important;
}

body:has(#m-home) .desktop-nav a:hover {
    color: #2563eb !important;
}

body:has(#m-home) .desktop-nav .js-login-open {
    color: #fff !important;
    background: #2563eb !important;
    border: 1px solid #1d4ed8 !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

body:has(#m-home) .notice-ticker {
    background: #eff6ff;
    color: #1d4ed8;
    border-bottom: 1px solid #dbeafe;
}

body:has(#m-home) .site-footer {
    background: #f1f5f9;
    color: #475569;
    border-top: 1px solid #e2e8f0;
}

body:has(#m-home) .site-footer h3 { color: #0f172a; }
body:has(#m-home) .site-footer a { color: #475569; }
body:has(#m-home) .site-footer a:hover { color: #2563eb; }
body:has(#m-home) .footer-bottom { border-top-color: #e2e8f0; color: #64748b; }
body:has(#m-home) .mobile-bottom-nav { display: none !important; }
body:has(#m-home) .whatsapp-float { bottom: 85px; }

/* ─── Animations ─── */
@keyframes m-fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes m-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes m-shimmerBg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes m-glowPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5); }
}

/* ─── Page Shell ─── */
.m-page {
    background: #f8fafc;
    color: #0f172a;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 14px;
    padding-bottom: 80px;
}

.m-page *, .m-bnav * {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.m-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ─── Heading ─── */
.m-heading {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
}

.m-heading-bar {
    width: 4px;
    height: 18px;
    border-radius: 99px;
    background: linear-gradient(180deg, #2563eb, #3b82f6);
    flex-shrink: 0;
}

/* ═══════════════════════
   ANIMATED BOOK NOW BANNER / PATTI
   ═══════════════════════ */
.m-book-banner {
    padding: 0 0 18px;
}

.m-book-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777, #2563eb);
    background-size: 300% 300%;
    animation: m-shimmerBg 6s linear infinite;
    border-radius: 14px;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
    transition: transform 0.15s ease;
}

.m-book-strip:hover {
    transform: translateY(-2px);
}

.m-book-spark {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.m-book-text {
    flex: 1;
    min-width: 0;
}

.m-book-text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
}

.m-book-text span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-book-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background: #ffffff;
    color: #1e40af;
    font-size: 0.78rem;
    font-weight: 800;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: m-glowPulse 2s ease-in-out infinite;
}

/* ═══════════════════════
   COMPACT FEATURED COURSES
   ═══════════════════════ */
.m-courses {
    padding: 0 0 24px;
}

.m-course-grid {
    display: grid;
    gap: 14px;
}

.m-ccard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.m-ccard:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.m-ccard-img {
    position: relative;
    max-height: 180px;
    overflow: hidden;
}

.m-ccard-img img {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 180px;
    object-fit: cover;
    display: block;
    background: #f1f5f9;
}

.m-ccard-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: #1e40af;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 100px;
    border: 1px solid #dbeafe;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.m-ccard-body {
    padding: 12px 14px 14px;
}

.m-ccard-body h3 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

.m-ccard-body p {
    margin: 0 0 10px;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.m-ccard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

.m-ccard-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #2563eb;
}

.m-btn-enroll {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    background: #2563eb;
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transition: background-color 0.15s ease, transform 0.12s ease;
}

.m-btn-enroll:hover { background: #1d4ed8; transform: translateY(-1px); }
.m-btn-enroll:active { transform: scale(0.96); }

/* ═══════════════════════
   EMPTY STATE
   ═══════════════════════ */
.m-empty {
    padding: 32px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-align: center;
}

.m-empty-icon { font-size: 2.2rem; margin-bottom: 10px; }
.m-empty h3 { margin: 0 0 4px; font-weight: 800; color: #0f172a; font-size: 1rem; }
.m-empty p { margin: 0 0 14px; color: #64748b; font-size: 0.82rem; }

/* ═══════════════════════
   CTA CARD
   ═══════════════════════ */
.m-cta {
    padding: 0 0 24px;
}

.m-cta-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.m-cta-icon { font-size: 1.5rem; flex-shrink: 0; }

.m-cta-body { flex: 1; min-width: 0; }

.m-cta-body strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
}

.m-cta-body p {
    margin: 1px 0 0;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.35;
}

.m-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    font-size: 1.1rem;
    text-decoration: none !important;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: m-pulse 2.5s ease-in-out infinite;
}

/* ═══════════════════════
   STATS SECTION (MOVED TO BOTTOM)
   ═══════════════════════ */
.m-stats {
    padding: 0 0 24px;
}

.m-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.m-stat {
    padding: 10px 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.m-stat strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1.2;
}

.m-stat span {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 2px;
}

/* ═══════════════════════
   COMPACT SLIDER
   ═══════════════════════ */
.m-slider-sec {
    padding: 0 0 24px;
}

.m-slider-sec .home-slider {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.m-slider-sec .home-slider-track {
    aspect-ratio: 16 / 7;
    min-height: 130px;
    max-height: 200px;
}

.m-slider-sec .home-slide img {
    object-fit: cover;
}

.m-slider-sec .home-slide-content {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #e2e8f0;
    color: #0f172a;
    padding: 8px 12px;
    border-radius: 8px;
    width: min(280px, calc(100% - 20px));
    left: 10px;
    bottom: 10px;
}

.m-slider-sec .home-slide-content h3 {
    font-size: 0.88rem;
    margin: 3px 0 2px;
    color: #0f172a;
}

.m-slider-sec .home-slide-content p {
    font-size: 0.72rem;
    margin: 0 0 6px;
    color: #475569;
}

.m-slider-sec .home-slide-content .badge {
    font-size: 0.62rem;
    padding: 2px 6px;
    background: #dbeafe;
    color: #1e40af;
}

.m-slider-sec .home-slide-content .btn {
    min-height: 28px;
    padding: 0 10px;
    font-size: 0.72rem;
    min-width: 90px;
    background: #2563eb !important;
    color: #fff !important;
}

.m-slider-sec .slider-arrow {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
}

.m-slider-sec .slider-dots button {
    width: 6px;
    height: 6px;
}

/* ═══════════════════════
   LIGHT MOBILE BOTTOM NAV
   ═══════════════════════ */
.m-bnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e2e8f0;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.m-bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 0;
    text-decoration: none !important;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: color 0.15s ease;
}

.m-bnav-item svg {
    width: 20px;
    height: 20px;
    transition: transform 0.15s ease;
}

.m-bnav-item:hover { color: #0f172a; }

.m-bnav-active {
    color: #2563eb !important;
}

.m-bnav-active svg {
    transform: translateY(-1px);
}

/* ─── Animations ─── */
.m-stat { animation: m-fadeUp 0.35s ease both; }
.m-stat:nth-child(1) { animation-delay: 0s; }
.m-stat:nth-child(2) { animation-delay: 0.04s; }
.m-stat:nth-child(3) { animation-delay: 0.08s; }
.m-stat:nth-child(4) { animation-delay: 0.12s; }

.m-ccard { animation: m-fadeUp 0.4s ease both; }
.m-ccard:nth-child(1) { animation-delay: 0.04s; }
.m-ccard:nth-child(2) { animation-delay: 0.08s; }
.m-ccard:nth-child(3) { animation-delay: 0.12s; }

/* ══════════════════════════════════════
   DESKTOP RESPONSIVE (720px+)
   ══════════════════════════════════════ */
@media (min-width: 720px) {
    .m-container { padding: 0 28px; }

    .m-stat strong { font-size: 1.2rem; }
    .m-stat span { font-size: 0.68rem; }

    .m-heading { font-size: 1.2rem; }
    .m-course-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

    .m-bnav { display: none; }
    .m-page { padding-bottom: 0; }
    body:has(#m-home) .whatsapp-float { bottom: 20px; }

    .m-slider-sec .home-slider-track {
        aspect-ratio: 16 / 5;
        max-height: 240px;
    }
}

/* ══════════════════════════════════════
   LARGE DESKTOP (960px+)
   ══════════════════════════════════════ */
@media (min-width: 960px) {
    .m-course-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .m-stat strong { font-size: 1.35rem; }

    .m-slider-sec .home-slider-track {
        aspect-ratio: 16 / 4.5;
        max-height: 260px;
    }
}
