/* ================================================================
   Charus Educational World — Shared Stylesheet
   Palette: Indigo (primary) + Coral (accent) + Teal (secondary)
   Fonts:   Poppins (headings) + Inter (body)
   ================================================================ */

/* --- 1. Design tokens --------------------------------------------- */
:root {
    /* Brand colors */
    --indigo-900: #312e81;
    --indigo-700: #4338ca;
    --indigo-600: #6366f1;
    --indigo-400: #818cf8;
    --indigo-100: #e0e7ff;

    --coral-600: #ea580c;
    --coral-500: #f97316;
    --coral-400: #fb923c;
    --coral-100: #ffedd5;

    --teal-600: #0891b2;
    --teal-500: #06b6d4;
    --teal-400: #22d3ee;
    --teal-100: #cffafe;

    --success: #10b981;
    --success-dark: #059669;

    /* Neutrals */
    --slate-900: #0f172a;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-100: #f1f5f9;
    --slate-50:  #f8fafc;
    --white:     #ffffff;

    /* Surfaces */
    --bg:           #f8fafc;
    --bg-soft:      #eef2ff;
    --card-bg:      rgba(255, 255, 255, 0.78);
    --card-border:  rgba(255, 255, 255, 0.55);
    --card-shadow:  0 10px 30px rgba(49, 46, 129, 0.08);
    --card-shadow-hover: 0 20px 45px rgba(67, 56, 202, 0.18);

    /* Typography */
    --font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Layout */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 22px;
    --container: 1200px;

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t-fast: 180ms;
    --t-med:  300ms;
}

/* --- 2. Reset + base ----------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--slate-900);
    line-height: 1.65;
    background:
        radial-gradient(1200px 600px at 10% -10%, var(--indigo-100) 0%, transparent 60%),
        radial-gradient(900px 500px at 110% 10%, var(--coral-100) 0%, transparent 55%),
        radial-gradient(1000px 600px at 50% 110%, var(--teal-100) 0%, transparent 60%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--indigo-900);
    letter-spacing: -0.02em;
}

a { color: var(--indigo-700); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--coral-500); }

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

:focus-visible {
    outline: 3px solid var(--indigo-400);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* --- 3. Header + navigation ---------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    background: linear-gradient(135deg, var(--indigo-700), var(--coral-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 6px 18px rgba(67, 56, 202, 0.25);
    flex-shrink: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item { position: relative; }

.nav-item > a,
.nav-item > button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--slate-700);
    font-weight: 500;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 10px;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.nav-item > a:hover,
.nav-item > button:hover,
.nav-item.is-open > button {
    background: var(--indigo-100);
    color: var(--indigo-700);
}

.nav-item > a.is-active { color: var(--indigo-700); background: var(--indigo-100); }

.caret {
    font-size: 10px;
    transition: transform var(--t-fast) var(--ease);
}
.nav-item.is-open .caret { transform: rotate(180deg); }

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
}

.nav-item.is-open .dropdown,
.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--slate-700);
    font-size: 14px;
    font-weight: 500;
}

.dropdown a:hover {
    background: var(--indigo-100);
    color: var(--indigo-700);
}

.hamburger {
    display: none;
    width: 42px; height: 42px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: var(--indigo-700);
}
.hamburger:hover { background: var(--indigo-100); }
.hamburger svg { width: 22px; height: 22px; }

/* --- 4. Hero -------------------------------------------------------- */
.hero {
    position: relative;
    padding: 90px 24px 110px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 20% 30%, rgba(99,102,241,0.25), transparent 60%),
        radial-gradient(500px 280px at 80% 70%, rgba(249,115,22,0.18), transparent 60%);
    z-index: -1;
}

.hero .eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(99,102,241,0.12);
    color: var(--indigo-700);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 54px);
    max-width: 900px;
    margin: 0 auto 18px;
}

.hero h1 .accent {
    background: linear-gradient(135deg, var(--coral-500), var(--indigo-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lede {
    max-width: 720px;
    margin: 0 auto 32px;
    font-size: 18px;
    color: var(--slate-700);
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- 5. Buttons ----------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.btn-primary {
    background: linear-gradient(135deg, var(--indigo-700), var(--indigo-600));
    color: #fff;
    box-shadow: 0 10px 25px rgba(67, 56, 202, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(67, 56, 202, 0.45);
    color: #fff;
}

.btn-coral {
    background: linear-gradient(135deg, var(--coral-500), var(--coral-600));
    color: #fff;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}
.btn-coral:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.45);
    color: #fff;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.7);
    color: var(--indigo-700);
    border: 1px solid rgba(99, 102, 241, 0.25);
    backdrop-filter: blur(8px);
}
.btn-ghost:hover {
    background: #fff;
    transform: translateY(-2px);
    color: var(--indigo-700);
}

.btn-download {
    background: linear-gradient(135deg, var(--success), var(--success-dark));
    color: #fff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.32);
}
.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.42);
    color: #fff;
}

.btn-sm { padding: 8px 16px; font-size: 14px; border-radius: 10px; }

/* --- 6. Section + section titles ----------------------------------- */
.section { padding: 60px 0; }
.section-tight { padding: 40px 0; }

.section-head {
    text-align: center;
    margin-bottom: 44px;
}
.section-head .eyebrow {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--coral-100);
    color: var(--coral-600);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section-head h2 {
    font-size: clamp(26px, 3.4vw, 38px);
    margin-bottom: 10px;
}
.section-head p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--slate-500);
}

/* --- 7. Glass card -------------------------------------------------- */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--card-shadow);
    transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease), border-color var(--t-med) var(--ease);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(99, 102, 241, 0.3);
}

.card .icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 26px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--indigo-100), var(--coral-100));
    color: var(--indigo-700);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.card p {
    color: var(--slate-500);
    font-size: 15px;
    margin-bottom: 16px;
}

.card .card-cta {
    color: var(--coral-500);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.card .card-cta::after {
    content: '→';
    transition: transform var(--t-fast) var(--ease);
}
.card:hover .card-cta::after { transform: translateX(4px); }

/* Variants */
.card.card-coral .icon { background: linear-gradient(135deg, var(--coral-100), var(--coral-400)); color: var(--coral-600); }
.card.card-teal .icon  { background: linear-gradient(135deg, var(--teal-100),  var(--teal-400));  color: var(--teal-600); }
.card.card-indigo .icon { background: linear-gradient(135deg, var(--indigo-100), var(--indigo-400)); color: var(--indigo-700); }

/* --- 8. Grids ------------------------------------------------------- */
.grid {
    display: grid;
    gap: 24px;
}
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }

/* --- 9. Subject chips ---------------------------------------------- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--indigo-100);
    color: var(--indigo-700);
}
.chip.coral { background: var(--coral-100); color: var(--coral-600); }
.chip.teal  { background: var(--teal-100);  color: var(--teal-600); }

/* --- 10. Class banner / breadcrumb --------------------------------- */
.page-banner {
    padding: 60px 24px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-banner .badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--indigo-700), var(--coral-500));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

.page-banner h1 {
    font-size: clamp(30px, 4.4vw, 44px);
    margin-bottom: 12px;
}

.page-banner p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--slate-700);
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: var(--slate-500);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--slate-700); }
.breadcrumb a:hover { color: var(--coral-500); }
.breadcrumb .sep { color: var(--slate-300); }

/* --- 11. Tabs ------------------------------------------------------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.12);
    padding: 6px;
    border-radius: 14px;
    margin: 0 auto 32px;
    max-width: max-content;
    backdrop-filter: blur(8px);
}

.tab-btn {
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    color: var(--slate-500);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.tab-btn:hover { color: var(--indigo-700); }
.tab-btn.is-active {
    background: linear-gradient(135deg, var(--indigo-700), var(--indigo-600));
    color: #fff;
    box-shadow: 0 6px 18px rgba(67, 56, 202, 0.3);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeUp .35s var(--ease); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- 12. PDF preview ------------------------------------------------ */
.pdf-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid rgba(99, 102, 241, 0.14);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
    display: flex;
    flex-direction: column;
}

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

.pdf-preview {
    position: relative;
    height: 280px;
    background: var(--slate-100);
    overflow: hidden;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.pdf-preview iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.pdf-preview .pdf-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--slate-500);
    font-size: 14px;
    background: linear-gradient(135deg, var(--indigo-100), var(--coral-100));
}

.pdf-preview .pdf-placeholder .pdf-emoji {
    font-size: 56px;
    margin-bottom: 8px;
    display: inline-block;
    transition: transform var(--t-fast) var(--ease);
}

.pdf-preview .pdf-placeholder.tap-preview {
    cursor: pointer;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.pdf-preview .pdf-placeholder.tap-preview:hover {
    background: linear-gradient(135deg, var(--indigo-700), var(--coral-500));
    color: #fff;
}
.pdf-preview .pdf-placeholder.tap-preview:hover .pdf-emoji {
    transform: scale(1.15);
}

.pdf-meta {
    padding: 18px 20px 20px;
}

.pdf-meta h4 {
    font-size: 17px;
    color: var(--indigo-900);
    margin-bottom: 4px;
}

.pdf-meta .src {
    font-size: 12px;
    color: var(--slate-500);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- 13. Video grid ------------------------------------------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.video-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(99, 102, 241, 0.1);
    cursor: pointer;
    transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
    display: flex;
    flex-direction: column;
}

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

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--indigo-600), var(--coral-500));
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb .play-btn {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.25);
    color: #fff;
    transition: background var(--t-fast) var(--ease);
}

.video-card:hover .play-btn { background: rgba(15, 23, 42, 0.45); }

.play-btn-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    place-items: center;
    color: var(--coral-500);
    font-size: 24px;
    transition: transform var(--t-fast) var(--ease);
}

.video-card:hover .play-btn-circle { transform: scale(1.1); }

.video-meta { padding: 16px 18px 18px; }

.video-meta h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--indigo-900);
}

.video-meta .meta-row {
    font-size: 12px;
    color: var(--slate-500);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.video-placeholder-tag {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--coral-600);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.04em;
}

/* --- 14. Lightbox modal -------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 2000;
    animation: fadeIn .25s var(--ease);
}
.modal.is-open { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: #fff;
    border-radius: var(--radius);
    max-width: 960px;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
    z-index: 1;
    transition: background var(--t-fast);
}
.modal-close:hover { background: rgba(0,0,0,0.85); }

.modal-video {
    position: relative;
    aspect-ratio: 16 / 9;
}
.modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- 15. Search bar ------------------------------------------------- */
.search-wrap {
    max-width: 540px;
    margin: 0 auto 32px;
    position: relative;
}

.search-wrap input {
    width: 100%;
    padding: 14px 18px 14px 46px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    font-family: inherit;
    font-size: 15px;
    color: var(--slate-900);
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.search-wrap input:focus {
    outline: none;
    border-color: var(--indigo-600);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}
.search-wrap::before {
    content: '🔍';
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.6;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 28px;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-700);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.filter-btn:hover { color: var(--indigo-700); }
.filter-btn.is-active {
    background: var(--indigo-700);
    color: #fff;
    border-color: var(--indigo-700);
}

/* --- 16. Footer ----------------------------------------------------- */
.site-footer {
    margin-top: 80px;
    padding: 50px 24px 30px;
    background: linear-gradient(135deg, var(--indigo-900), var(--indigo-700));
    color: rgba(255,255,255,0.85);
    position: relative;
}

.footer-grid {
    max-width: var(--container);
    margin: 0 auto 32px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
}

.site-footer h5 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-footer ul {
    list-style: none;
    display: grid;
    gap: 8px;
}
.site-footer a {
    color: rgba(255,255,255,0.75);
    font-size: 14px;
}
.site-footer a:hover { color: var(--coral-400); }

.footer-tagline {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-top: 12px;
    max-width: 280px;
}

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

/* --- 17. Back to top ----------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--indigo-700), var(--coral-500));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 18px;
    box-shadow: 0 10px 30px rgba(67, 56, 202, 0.4);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-fast) var(--ease), visibility var(--t-fast), transform var(--t-fast) var(--ease);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover { transform: translateY(-3px); color: #fff; }

/* --- 18. Subject grid (class pages) -------------------------------- */
.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 0 auto 40px;
    max-width: 900px;
}

.subject-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: var(--radius);
    padding: 22px 18px;
    text-align: center;
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
                background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
    text-decoration: none;
    cursor: pointer;
    /* reset browser button default styles */
    font-family: inherit;
    font-size: inherit;
    display: block;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

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

.subject-card.is-active {
    background: var(--indigo-600);
    border-color: var(--indigo-600);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.subject-card.is-active .ico,
.subject-card.is-active .label {
    color: #fff;
}

.subject-card .ico {
    font-size: 30px;
    display: block;
    margin-bottom: 8px;
}

.subject-card .label {
    font-weight: 600;
    color: var(--indigo-900);
    font-size: 14px;
}

/* --- 19. Class navigator pills ------------------------------------- */
.class-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 4px 12px;
    margin: 0 auto 30px;
    max-width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.class-pill {
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(99, 102, 241, 0.18);
    font-weight: 600;
    font-size: 14px;
    color: var(--slate-700);
    text-decoration: none;
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
    white-space: nowrap;
}

.class-pill:hover {
    background: var(--indigo-100);
    color: var(--indigo-700);
    border-color: var(--indigo-400);
}

.class-pill.is-active {
    background: linear-gradient(135deg, var(--indigo-700), var(--indigo-600));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(67, 56, 202, 0.3);
}

/* --- 20. Animations on scroll -------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 21. Responsive ------------------------------------------------- */
@media (max-width: 960px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hamburger { display: inline-flex; }
    .nav-menu {
        position: fixed;
        top: 70px;
        right: 16px;
        left: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        background: #fff;
        padding: 14px;
        border-radius: var(--radius);
        border: 1px solid rgba(99, 102, 241, 0.18);
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
    }
    .nav-menu.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-item { width: 100%; }
    .nav-item > a,
    .nav-item > button {
        width: 100%;
        justify-content: space-between;
    }
    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--slate-50);
        padding: 4px;
        margin-top: 4px;
        display: none;
    }
    .nav-item.is-open .dropdown { display: block; }
    .nav-item:hover .dropdown { display: none; }
    .nav-item.is-open .dropdown { display: block; }

    .hero { padding: 60px 20px 80px; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 44px 0; }
}

@media (max-width: 480px) {
    .nav-container { padding: 12px 16px; }
    .container { padding: 0 16px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }

    /* Subject grid: 3 compact columns on small phones */
    .subject-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .subject-card {
        padding: 14px 8px;
    }
    .subject-card .ico { font-size: 22px; }
    .subject-card .label { font-size: 11px; }

    /* Class pills: tighter on small screens */
    .class-pill { padding: 6px 12px; font-size: 12px; }

    /* PDF card preview shorter on mobile */
    .pdf-preview { height: 180px; }

    /* Video grid: single column */
    .video-grid { grid-template-columns: 1fr; }

    /* Tabs: wrap and shrink */
    .tabs { gap: 4px; }
    .tab-btn { padding: 8px 12px; font-size: 13px; }
}

/* ============================================================
   ====== 20. Strategy-guide additions (v5) ===================
   Breaking news ticker, quick-access tiles, community CTA,
   newsletter form, legal-prose pages.
   ============================================================ */

/* --- 20a. Breaking news ticker ------------------------------ */
.news-ticker {
    background: linear-gradient(90deg, var(--indigo-700), var(--coral-500));
    color: #fff;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.news-ticker-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.news-ticker-label {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.4px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.news-ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.news-ticker-items {
    display: inline-flex;
    gap: 40px;
    white-space: nowrap;
    animation: ticker-scroll 35s linear infinite;
}

.news-ticker-items a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: opacity var(--t-fast) var(--ease);
}

.news-ticker-items a:hover { opacity: 0.85; text-decoration: underline; }

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Pause on hover so users can read */
.news-ticker:hover .news-ticker-items {
    animation-play-state: paused;
}

@media (max-width: 640px) {
    .news-ticker-inner { gap: 10px; padding: 0 12px; }
    .news-ticker-label { font-size: 11px; padding: 3px 8px; }
    .news-ticker-items a { font-size: 13px; }
}

/* --- 20b. Quick access tiles -------------------------------- */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.quick-tile {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.quick-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.quick-tile .qa-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(244,114,114,0.12));
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-tile h4 {
    font-family: var(--font-heading);
    color: var(--indigo-900);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.quick-tile p {
    margin: 0;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.4;
}

/* --- 20c. Community CTA (Telegram / WhatsApp) -------------- */
.community-cta {
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(244,114,114,0.06));
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
}

.community-cta h3 {
    font-family: var(--font-heading);
    color: var(--indigo-900);
    font-size: 24px;
    margin: 0 0 10px;
}

.community-cta p {
    color: var(--slate-500);
    margin: 0 auto 22px;
    max-width: 560px;
}

.community-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-telegram {
    background: #229ED9;
    color: #fff;
}

.btn-telegram:hover {
    background: #1c87b8;
    color: #fff;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.btn-whatsapp:hover {
    background: #1ebd5b;
    color: #fff;
}

/* --- 20d. Newsletter signup -------------------------------- */
.newsletter-form {
    display: flex;
    gap: 8px;
    max-width: 440px;
    margin: 16px auto 0;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--indigo-600);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

@media (max-width: 480px) {
    .newsletter-form { flex-direction: column; }
}

/* --- 20e. Legal pages (Privacy, Disclaimer, Terms) -------- */
.legal-prose h2 {
    font-family: var(--font-heading);
    color: var(--indigo-900);
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
}

.legal-prose h2:first-of-type {
    margin-top: 0;
}

.legal-prose p,
.legal-prose ul,
.legal-prose ol {
    color: var(--slate-700, #334155);
    line-height: 1.7;
    margin: 0 0 14px;
    font-size: 15px;
}

.legal-prose ul,
.legal-prose ol {
    padding-left: 24px;
}

.legal-prose li {
    margin-bottom: 6px;
}

.legal-prose a {
    color: var(--indigo-600);
    text-decoration: underline;
}

.legal-prose strong {
    color: var(--indigo-900);
}

/* --- 20f. Section-head left-align variant (used on Updates pages headings) --- */
.section-head[style*="text-align:left"] h2,
.section-head[style*="text-align:left"] p {
    text-align: left;
}

/* ============================================================
   ====== 21. Study material (Notes + Worksheet Answers) =====
   Two-column list section, screenshot-style arrow links.
   Sits ABOVE textbooks on every class page.
   ============================================================ */
.study-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 28px;
}

@media (max-width: 760px) {
    .study-columns { grid-template-columns: 1fr; }
}

.study-col {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.14);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.study-col-head {
    background: linear-gradient(135deg, var(--indigo-600), var(--indigo-700));
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    padding: 14px 18px;
    letter-spacing: 0.2px;
}

/* Second column gets the coral header (matches screenshot's two-tone look) */
.study-col:nth-child(2) .study-col-head {
    background: linear-gradient(135deg, var(--coral-500), var(--coral-600));
}

.study-list {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.study-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--indigo-900);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border-bottom: 1px dashed rgba(99, 102, 241, 0.18);
    transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.study-list .study-link:last-child { border-bottom: none; }

.study-link .study-arrow {
    color: var(--coral-500);
    font-weight: 800;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.study-link .study-text { flex: 1; }

.study-link .study-go {
    color: var(--teal-600);
    font-weight: 700;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity var(--t-fast) var(--ease);
}

.study-link:not(.is-placeholder) { cursor: pointer; }

.study-link:not(.is-placeholder):hover {
    background: rgba(99, 102, 241, 0.07);
    color: var(--indigo-700);
}

.study-link:not(.is-placeholder):hover .study-go { opacity: 1; }

.study-link.is-placeholder {
    color: var(--slate-500);
    cursor: default;
}

.study-link.is-placeholder .study-arrow { color: rgba(148, 163, 184, 0.7); }

.study-soon {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(148, 163, 184, 0.18);
    color: var(--slate-500);
    padding: 2px 9px;
    border-radius: 20px;
    flex-shrink: 0;
}

.study-empty {
    padding: 18px;
    color: var(--slate-500);
    font-size: 14px;
}

/* ============================================================
   ====== 22. Homepage "Browse by Class" grid ================
   ============================================================ */
.class-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 28px;
}

@media (max-width: 720px) { .class-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .class-grid { grid-template-columns: repeat(2, 1fr); } }

.class-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 14px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.14);
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--indigo-900);
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

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

.class-tile .cn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--indigo-600), var(--indigo-700));
    box-shadow: 0 6px 16px rgba(67, 56, 202, 0.28);
}

.class-tile.middle .cn {
    background: linear-gradient(135deg, var(--teal-500), var(--teal-600));
    box-shadow: 0 6px 16px rgba(8, 145, 178, 0.28);
}

.class-tile.high .cn {
    background: linear-gradient(135deg, var(--coral-400), var(--coral-600));
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.28);
}

.class-tile .cl {
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}

