/* =========================================
   1. VARIABLES & BASE RESET
   ========================================= */
:root {
    --primary: #4F46E5;        /* Modern Indigo */
    --primary-hover: #4338CA;
    --bg-color: #F8FAFC;       /* Off-white background */
    --nav-bg: #FFFFFF;
    --text-main: #0F172A;      /* Deep Slate for text */
    --text-muted: #64748B;
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
}

/* Prevent horizontal scrolling globally */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

*, *::before, *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

/* =========================================
   2. NAVIGATION BAR
   ========================================= */
.navbar {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

.login-btn {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.login-btn:hover {
    background-color: var(--border-color);
}

/* =========================================
   3. MODERN ANIMATED HERO SECTION
   ========================================= */
.hero-modern {
    background: radial-gradient(circle at top right, #1E1B4B 0%, #0F172A 100%);
    color: white;
    padding: 6rem 2rem;
    overflow: hidden;
}

.hero-container-split {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

/* Hero Left - Text & Buttons */
.hero-left {
    flex: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: rgba(79, 70, 229, 0.2);
    color: #818CF8;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(79, 70, 229, 0.4);
}

.hero-left h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.hero-left h1 .highlight {
    color: transparent;
    background: linear-gradient(90deg, #818CF8, #C084FC);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-left p {
    font-size: 1.2rem;
    color: #94A3B8;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #1E293B;
    border-color: #64748B;
}

.social-proof {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-proof p {
    margin: 0;
    font-size: 0.9rem;
    color: #CBD5E1;
}

/* Hero Right - Floating Cards */
.hero-right {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 16px;
    width: 300px;
    position: absolute;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    right: 20%;
    z-index: 2;
}

.card-2 {
    bottom: 10%;
    left: 10%;
    animation-delay: -3s;
    z-index: 1;
}

.floating-card .card-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.floating-card p {
    font-size: 0.9rem;
    color: #94A3B8;
    margin-bottom: 1.5rem;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.green {
    background: rgba(16, 185, 129, 0.2);
    color: #34D399;
}

.status-badge.blue {
    background: rgba(56, 189, 248, 0.2);
    color: #7DD3FC;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* =========================================
   4. FEATURES / STUDY CATEGORIES SECTION
   ========================================= */
.features {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-block;
}

.card-link:hover {
    text-decoration: underline;
}

/* =========================================
   5. FOOTER
   ========================================= */
footer {
    background-color: var(--text-main);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-logo span {
    color: var(--primary);
}

.footer-content p {
    color: #94A3B8;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    font-size: 0.85rem;
    color: #64748B !important;
    border-top: 1px solid #334155;
    padding-top: 2rem;
}

/* =========================================
   6. FULLY RESPONSIVE QUERIES (iPad & Mobile)
   ========================================= */

/* --- iPad / Tablets (up to 1024px) --- */
@media (max-width: 1024px) {
    .hero-container-split {
        gap: 2rem;
    }
    
    .hero-left h1 {
        font-size: 3rem; /* Scale down heading */
    }
    
    /* Shrink the floating cards to fit the iPad screen */
    .hero-right {
        transform: scale(0.85); 
        transform-origin: right center;
    }
    
    .nav-links {
        gap: 1rem;
    }
}

/* --- Small Tablets & Large Phones (up to 850px) --- */
@media (max-width: 850px) {
    .hero-container-split {
        flex-direction: column; /* Stack left and right sides */
        text-align: center;
        padding-top: 1rem;
    }
    
    .hero-left {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }
    
    .social-proof {
        justify-content: center;
    }

    .hero-right {
        display: none; /* Hide floating animations to save battery and space */
    }
}

/* --- Mobile Phones (up to 600px) --- */
@media (max-width: 600px) {
    /* Stack the navigation menu */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .login-btn {
        width: 100%;
        text-align: center;
    }

    /* Adjust Hero Padding & Text for small screens */
    .hero-modern {
        padding: 3rem 1.5rem;
    }

    .hero-left h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-left p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Stack the buttons */
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }
    
    /* Fix the search bar for mobile */
    .search-wrapper {
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        gap: 0.5rem;
        padding: 0;
    }
    
    .search-wrapper input {
        width: 100%;
        background: white;
        border-radius: 8px;
    }
    
    .search-wrapper .search-btn {
        width: 100%;
        padding: 1rem;
        border-radius: 8px;
    }

    /* Force the subjects grid into a single column */
    .grid {
        grid-template-columns: 1fr; 
    }
    
    .features {
        padding: 3rem 1.5rem;
    }
}