:root {
    --primary-color: #3B82F6; /* Bright Blue */
    --primary-dark: #1D4ED8;
    --secondary-color: #10B981; /* Emerald */
    --accent-color: #F59E0B; /* Amber */
    --dark-bg: #0F172A;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    --gradient-overlay: linear-gradient(180deg, rgba(255,255,255,0) 0%, #FFFFFF 100%);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --card-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
    --radius-xl: 24px;
    --radius-lg: 16px;
    --spacing-container: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #F8FAFC;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF; /* Apple White */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    overflow: hidden;
}

#preloader::before {
    content: none; /* Removed gradient ring */
}

.loader-content {
    text-align: center;
    padding: 2rem;
    color: #1D1D1F;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.loader-headline {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: #1D1D1F;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.loader-headline .line {
    display: block;
    opacity: 0;
    animation: fade-up-line 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loader-headline .highlight {
    color: #0071E3;
    -webkit-text-fill-color: #0071E3;
    position: relative;
    white-space: nowrap;
}

.loader-subtext {
    font-size: 1.25rem;
    font-weight: 400;
    color: #86868B;
    opacity: 0;
    animation: fade-in 1s ease-out forwards;
}

@keyframes fade-up-line {
    from { opacity: 0; transform: translateY(20px); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes fade-in {
    from { opacity: 0; filter: blur(5px); }
    to { opacity: 1; filter: blur(0); }
}

/* Mobile adjustments for preloader */
@media (max-width: 768px) {
    .loader-headline {
        font-size: 2.25rem;
    }
    .loader-subtext {
        font-size: 1rem;
    }
}

@keyframes rotate-bg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile adjustments for preloader */
@media (max-width: 768px) {
    .loader-fact {
        font-size: 2rem;
    }
    .loader-text {
        font-size: 1rem;
    }
}

/* Background Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #F8FAFC;
}

.math-symbol {
    position: absolute;
    color: var(--primary-color);
    opacity: 0.1;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    user-select: none;
    animation: float-symbol 20s infinite linear;
}

@keyframes float-symbol {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.1; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
}

.malayalam-text, .malayalam-highlight {
    font-family: 'Manjari', sans-serif;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-container);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.logo {
    height: 45px;
    width: auto;
}

/* Hero Section */
.hero {
    padding-bottom: 4rem;
    position: relative;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Video Styling */
.hero-video-wrapper {
    width: 100%;
    position: relative;
    /* Full bleed on mobile */
    margin-left: calc(-1 * var(--spacing-container));
    width: calc(100% + 2 * var(--spacing-container));
    max-width: none;
    
    /* Make it look seamless */
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    
    /* Parallax effect placeholder */
    transform-style: preserve-3d;
}

.video-container {
    position: relative;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transform: scale(1.05); /* Slight zoom for parallax room */
    transition: transform 0.1s linear;
}

/* Hero Text Styling */
.hero-text {
    text-align: center;
    padding: 0 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EFF6FF;
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid #DBEAFE;
}

.badge i {
    color: var(--accent-color);
}

h1.gradient-text {
    font-size: 4rem;
    line-height: 1;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.syllabus-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.syllabus-tags span {
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid #E2E8F0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.highlight-box {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid #E2E8F0;
    margin-bottom: 2rem;
    display: inline-block;
    box-shadow: var(--card-shadow);
}

.malayalam-highlight {
    font-size: 1.25rem;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 10px;
    font-size: 1.1rem;
}

.btn-primary {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-primary:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.btn-large {
    padding: 18px 40px;
    font-size: 1.25rem;
}

/* Features Section */
.features {
    padding: 3rem 0;
    position: relative;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 Column List View for Mobile */
    gap: 1rem;
}

.feature-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid #F1F5F9;
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: flex-start;
    text-align: left;
    gap: 1rem; /* Space between icon and text */
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover);
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0; /* Prevent icon squishing */
    position: relative;
    margin-bottom: 0; /* No bottom margin for row layout */
}

.icon-wrapper::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    opacity: 0.2;
    z-index: 0;
}

.color-1 { color: #2563EB; background: #EFF6FF; }
.color-2 { color: #7C3AED; background: #F5F3FF; }
.color-3 { color: #F59E0B; background: #FFFBEB; }
.color-4 { color: #10B981; background: #ECFDF5; }

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.malayalam-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Stats Section */
.stats {
    padding: 3rem 0; /* Compact padding */
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
    margin: 0; /* Removed margin */
}

.stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem; /* Reduced gap */
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-item {
    /* Removed background and border for cleaner look */
    background: transparent;
    padding: 0.5rem;
    border-radius: 0;
    border: none;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.8);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

/* Testimonials Section */
.testimonials {
    padding: 4rem 0;
    background: #FFFFFF;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem; /* Add space below grid */
}

.testimonial-video-wrapper {
    width: 100%;
    max-width: 800px; /* Limit width on desktop */
    margin: 0 auto;
    /* Seamless design - removed radius, shadow, background */
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background: transparent;
}

.testimonial-video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.testimonial-card {
    background: #F8FAFC;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #E2E8F0;
    position: relative;
}

.quote-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    opacity: 0.2;
    margin-bottom: 1rem;
}

.review-text {
    font-size: 1.05rem;
    color: var(--text-main);
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.reviewer-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.reviewer-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: #F8FAFC;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid #E2E8F0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Outfit', sans-serif;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--text-muted);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    padding-bottom: 1.5rem;
}

.faq-answer p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0 6rem;
}

.cta-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 3rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 1px solid #F1F5F9;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--gradient-primary);
}

.cta-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: white;
    padding: 3rem 0;
    border-top: 1px solid #F1F5F9;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-logo {
    height: 35px;
    opacity: 0.8;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 2000;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: float 3s ease-in-out infinite;
}

.floating-cta:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

[data-animate] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate="slide-up"] { transform: translateY(30px); }
[data-animate="fade-in"] { opacity: 0; }
[data-animate="pop-in"] { transform: scale(0.9); }
[data-animate="scale-up"] { transform: scale(0.95); }

[data-animate].animated {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (min-width: 768px) {
    .hero-content {
        flex-direction: row-reverse;
        justify-content: space-between;
        text-align: left;
    }

    .hero-text {
        flex: 1;
        align-items: flex-start;
        text-align: left;
        padding-right: 2rem;
    }

    .hero-video-wrapper {
        flex: 1;
        width: auto;
        margin: 0;
        max-width: 550px;
        /* Remove fade mask on desktop for cleaner side-by-side */
        mask-image: none;
        -webkit-mask-image: none;
        border-radius: var(--radius-xl);
        overflow: hidden;
    }

    h1.gradient-text {
        font-size: 5rem;
    }

    .syllabus-tags {
        justify-content: flex-start;
    }

    /* Keep grid the same (2 columns) but restore larger sizing */
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .feature-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 2rem;
    }

    .icon-wrapper {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        margin-right: 0;
    }

    .feature-card h3 {
        font-size: 1.35rem;
    }

    .malayalam-text {
        font-size: 1.05rem;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
