@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* --- GLOBAL STABILITY FIX (CORRECTED) --- */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important; /* Stops left-right movement only */
    position: relative;
    /* Do NOT add height: 100% here, it breaks scrolling */
}

:root {
    --primary: #0ea5e9; /* Sky Blue */
    --primary-dark: #0284c7;
    --accent: #f43f5e;
    --dark: #0f172a;
    --light: #f0f9ff;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glow: 0 0 20px rgba(14, 165, 233, 0.5);
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f8fafc;
    color: var(--dark);
    /* overflow-x: hidden is already handled in html, body above */
}



/* --- ANIMATIONS --- */
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }
@keyframes shine { 0% { left: -100%; } 100% { left: 100%; } }
@keyframes blob { 0% { transform: translate(0px, 0px) scale(1); } 33% { transform: translate(30px, -50px) scale(1.1); } 66% { transform: translate(-20px, 20px) scale(0.9); } 100% { transform: translate(0px, 0px) scale(1); } }

/* --- NAVBAR --- */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.8);
    padding: 15px 0;
    z-index: 1000;
}

.nav-link {
    font-weight: 600;
    color: var(--dark) !important;
    padding: 10px 15px !important;
    transition: 0.3s;
}

.nav-link:hover { color: var(--primary) !important; transform: translateY(-2px); }

/* Search Dropdown */
.search-container { position: relative; width: 350px; }
.search-input {
    border-radius: 50px;
    background: #f1f5f9;
    border: 2px solid transparent;
    padding: 10px 20px;
    width: 100%;
    transition: 0.3s;
}
.search-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: var(--glow);
    outline: none;
}
.search-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
    z-index: 1001;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.search-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    transition: 0.2s;
}
.search-item:hover { background: #f0f9ff; color: var(--primary); }

/* --- HERO SECTION --- */
.hero-section {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
    overflow: hidden;
}

.hero-bg-blob {
    position: absolute;
    top: -10%; right: -10%;
    width: 600px; height: 600px;
    background: linear-gradient(135deg, #0ea5e9, #a855f7);
    filter: blur(80px);
    opacity: 0.2;
    border-radius: 50%;
    animation: blob 10s infinite alternate;
    z-index: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #0ea5e9, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* --- BUTTONS --- */
.btn-sky {
    position: relative;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 35px;
    font-weight: 700;
    letter-spacing: 0.5px;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 10px 20px -5px rgba(14, 165, 233, 0.4);
}

.btn-sky::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 3s infinite;
}

.btn-sky:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 30px -5px rgba(14, 165, 233, 0.6); color: white; }

/* --- 3D CARDS (Why Choose Us) --- */
.feature-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.05);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.15);
    border-color: var(--primary);
}

.feature-icon {
    width: 60px; height: 60px;
    background: #e0f2fe;
    color: var(--primary);
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: 0.3s;
}

.feature-card:hover .feature-icon { background: var(--primary); color: white; transform: rotate(15deg); }

/* --- COURSE CARDS --- */
.course-card {
    background: white;
    border-radius: 20px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
    overflow: hidden;
}

.course-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }

.badge-float {
    position: absolute; top: 15px; left: 15px;
    background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(5px);
    color: white; padding: 5px 15px; border-radius: 30px; font-size: 0.75rem; font-weight: 700;
}

/* --- REVIEWS (3D Marquee) --- */
/* --- 1. Container 3d student review  --- */
.marquee-container {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scrollHorizontal 40s linear infinite;
    transform-style: preserve-3d;
    transform: rotateY(10deg) rotateZ(-2deg);
    
    /* Center alignment fix */
    align-items: center; 
    
    /* IMP: Padding badha di taaki ghumte waqt corners na katein */
    padding: 50px 0; 
}

/* --- 2. Screenshot ka size chhota kiya --- */
.review-screenshot {
    /* Height ko 400px se ghata kar 250px kar diya */
    max-height: 250px; 
    
    width: auto; /* Ratio maintain rahega */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 3px solid #fff;
    transition: transform 0.3s ease;
}

/* Hover effect waisa hi rakha hai */
.review-screenshot:hover {
    transform: scale(1.1) rotate(0deg); /* Hover pe seedha ho jayega */
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
@keyframes scrollHorizontal {
    to {
        transform: rotateY(10deg) rotateZ(-2deg) translateX(-50%);
    }
}

/* --- FOOTER --- */
footer {
    background: #0f172a;
    color: white;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}
.footer-blob {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    box-shadow: 0 0 50px 5px var(--primary);
}
.footer-link { color: #94a3b8; text-decoration: none; margin-bottom: 15px; display: block; transition: 0.3s; }
.footer-link:hover { color: var(--primary); transform: translateX(5px); }


/* --- COURSE IMAGE FIX (SQUARE 1:1) --- */

/* Fix for Course Cards on Home Page */
.course-card img,
.card-img-top {
    width: 100%;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: top center;
    height: auto !important; /* Overrides inline HTML styles */
}













/* --- SCREENSHOT REVIEWS (WHATSAPP CHATS) --- */
.review-screenshot {
    max-height: 400px; /* Controls height so they don't look too big */
    width: auto;       /* Auto width keeps aspect ratio intact */
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 4px solid #fff;
    transition: transform 0.3s ease;
}

.review-screenshot:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Adjust marquee speed or alignment if needed */
.marquee-container {
    align-items: center; /* Aligns images of different heights vertically centered */
    padding: 20px 0;
}

/* --- ABOUT TEACHER SECTION --- */
.teacher-blob {
    position: absolute;
    top: -20px; left: -20px;
    width: 100%; height: 100%;
    background: #e0f2fe;
    border-radius: 30px;
    z-index: 0;
    transform: rotate(-3deg);
}
.about-text p {
    margin-bottom: 15px;
}

/* --- MODAL IMAGE FIX (1:1 SQUARE) --- */
#modalImg {
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    object-position: top center;
    width: 100%;
    height: auto !important; /* Forces height to match width */
}



/* --- MOBILE RESPONSIVE FIXES (FINAL CORRECTED) --- */
@media (max-width: 768px) {

    /* 1. Section Container: Hides overflow */
    .review-section {
        overflow: hidden !important;
        width: 100%;
        position: relative;
    }

    /* 2. The Image Track */
    .marquee-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 15px;
        width: max-content;
        padding: 30px 0 !important;
        
        /* FIX: We removed '!important' here so animation can work */
        transform: translateX(0); 
        
        /* The Sliding Animation - Overrides desktop animation */
        animation: scrollMobile 20s linear infinite;
    }

    /* 3. Image Sizing */
    .review-screenshot {
        max-height: 160px;
        width: auto;
        flex-shrink: 0; /* Prevents squishing */
        border-radius: 8px;
        border: 2px solid #fff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        
        /* Reset any desktop individual transforms */
        transform: none; 
    }
    
    /* Disable hover zoom on mobile (it gets stuck on touch screens) */
    .review-screenshot:hover {
        transform: none;
    }

    /* 4. The Animation Keyframes */
    @keyframes scrollMobile {
        0% { 
            transform: translateX(0); 
        }
        100% { 
            transform: translateX(-100%); /* Slides all the way to the left */
        }
    }
}



/* --- FIXED NAVBAR ADJUSTMENT --- */
/* Since we are making the navbar 'fixed', we need to push the body down 
   so the top content doesn't get hidden behind the navbar. */
body {
    padding-top: 80px; /* Adjust this if your navbar height changes */
}

/* --- PREMIUM POPUP BANNER --- */
.premium-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    border-bottom: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.premium-modal-header::before {
    content: '';
    position: absolute;
    top: -50%; right: -50%;
    width: 200px; height: 200px;
    background: var(--primary);
    filter: blur(60px);
    opacity: 0.3;
    border-radius: 50%;
}

.offer-badge {
    background: #f43f5e;
    color: white;
    font-weight: 800;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(244, 63, 94, 0.4);
    animation: pulse 2s infinite;
}

.popup-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: start;
    gap: 10px;
    color: #475569;
    font-size: 0.95rem;
}

.popup-list li i {
    color: var(--primary);
    margin-top: 4px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- MOBILE VIEW MORE BUTTON --- */
#viewMoreBtn {
    display: none; /* Hidden by default (desktop) */
    margin: 20px auto 0;
    padding: 10px 30px;
    border-radius: 50px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 700;
    transition: 0.3s;
}

#viewMoreBtn:hover {
    background: var(--primary);
    color: white;
}

/* Show View More only on Mobile */
@media (max-width: 768px) {
    #viewMoreBtn {
        display: block; /* Logic handles visibility, but CSS allows it */
    }
}