/* ============================================================
   ACADEMY GLOBAL STYLESHEET (CONSOLIDATED)
   Includes: Variables, Reset, Navbar, Hero, Grids,
             Classes, Subjects, and Chapter/MCQ Logic.
   ============================================================ */

:root {
    --bg: #0a0a0f;
    --surface: #111118;
    --card: #16161f;
    --border: #2a2a38;
    --border-soft: rgba(255, 255, 255, 0.05);
    --accent: #6c63ff;
    --accent2: #ff6b6b;
    --accent3: #00d4aa;
    --text: #e8e8f0;
    --muted: #7a7a95;
    --white: #ffffff;
}

/* ── RESET ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0f172a;
    /* Hero background preference */
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
    padding-top: 80px;
    line-height: 1.6;
}

/* ── NAVBAR ── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 70px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
}

.logo-text {
    font-weight: 700;
    font-size: 17px;
    color: var(--white);
}

.logo-text span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-cta {
    background: var(--accent);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
}

.nav-cta:hover {
    background: #5a52e8;
}

/* ── HERO SECTION (Welcome Page) ── */
.hero {
    position: relative;
    padding: 120px 20px 80px;
    text-align: center;
    overflow: hidden;
}

.hero h1 {
    font-size: 56px;
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    line-height: 1.2;
}

.highlight {
    color: #38bdf8;
}

.hero-sub {
    max-width: 700px;
    margin: 20px auto;
    font-size: 18px;
    opacity: 0.8;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #334155;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.hero-actions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Hero Glow Effects */
.hero-glow,
.hero-glow2 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: #38bdf8;
    filter: blur(150px);
    opacity: 0.2;
    pointer-events: none;
}

.hero-glow {
    top: -100px;
    left: -100px;
}

.hero-glow2 {
    bottom: -100px;
    right: -100px;
}

/* ── LAYOUT & CONTAINERS ── */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 100px 40px 40px;
    /* Standardized padding for fixed nav */
}

section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: auto;
}

/* ── GRIDS & CARDS (Welcome, Classes, Subjects) ── */
.grid,
.classes-grid,
.subjects-grid,
.features-grid {
    display: grid;
    gap: 20px;
    margin-top: 30px;
}

.grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.classes-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.subjects-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.class-card,
.subject-card,
.feature-card {
    background: #16161f;
    border: 1px solid #2a2a38;
    padding: 25px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    transition: 0.3s;
    display: block;
}

.card:hover,
.class-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: #1e293b;
}

/* ── TEXTBOOK CONTENT WRAPPER (Notes & NCERT) ── */
.text-content-wrapper {
    background: var(--surface);
    padding: 40px;
    border-radius: 12px;
    line-height: 1.8;
    color: var(--text);
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.section-block {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 30px;
}

.section-block:last-child {
    border-bottom: none;
}

.section-block h2 {
    color: var(--white);
    font-size: 22px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-block p {
    font-size: 16px;
    white-space: pre-line;
    color: var(--muted);
}

/* ── TABS & BUTTONS ── */
.tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 1px solid var(--border);
}

.tabs button {
    padding: 10px 15px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tabs button.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-primary {
    background: #38bdf8;
    color: #000;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    border: none;
}

.btn-secondary {
    border: 1px solid #475569;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
}

/* ── MCQ STYLING ── */
.mcq-container p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--white);
    display: block;
}

.mcq-option {
    padding: 12px 15px;
    margin-top: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
}

.mcq-option:hover {
    border-color: var(--accent3);
    transform: translateX(4px);
}

.mcq-option.correct {
    background: var(--accent3) !important;
    color: var(--bg) !important;
    border-color: var(--accent3) !important;
    font-weight: bold;
}

.mcq-option.incorrect {
    background: var(--accent2) !important;
    color: var(--white) !important;
    border-color: var(--accent2) !important;
}

/* ── STATS & TAGS ── */
.stats-strip {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
}

.sub-tag {
    font-size: 12px;
    background: #0f172a;
    padding: 4px 8px;
    border-radius: 6px;
}

/* ── FOOTER ── */
footer {
    padding: 30px;
    text-align: center;
    border-top: 1px solid #1e293b;
    margin-top: 40px;
}

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 900px) {
    nav {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .container {
        padding: 80px 20px 20px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .stats-strip {
        flex-direction: column;
        gap: 20px;
    }

    .feature-card.big {
        grid-column: span 1;
    }

    .text-content-wrapper {
        padding: 20px;
    }
}