/* BLR64 shared look: navigation, footer, and the brochure pages. */

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #131b2e;
    --bg-tertiary: #1e293b;
    --border-subtle: #2d3748;
    --accent-gold: #f59e0b;
    --accent-green: #10b981;
    --accent-blue: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg: #0b0f19;
    --bg-surface: #131b2e;
    --bg-surface2: #1e293b;
    --bg-hover: #243044;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --text: #f8fafc;
    --text-dim: #64748b;
    --border: #2d3748;
    --radius: 14px;
    --shadow: rgba(0, 0, 0, 0.35);
    --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 400;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(59, 130, 246, 0.16), transparent 55%),
        radial-gradient(900px 400px at 100% 0%, rgba(16, 185, 129, 0.08), transparent 50%),
        var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
p { color: var(--text-muted); }

/* ── Navigation ─────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--nav-h);
    padding: 10px 22px;
    background: rgba(11, 15, 25, 0.82);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.brand:hover { color: var(--text-main); }
.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(160deg, #1e293b, #0f172a);
    border: 1px solid var(--border-subtle);
    color: var(--accent-gold);
}
.brand-name { font-size: 1.15rem; }
.live-pill {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #052e1c;
    background: var(--accent-green);
    border-radius: 999px;
    padding: 3px 7px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.drawer-top { display: none; }
.nav-links > a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}
.nav-links > a:hover,
.nav-links > a[aria-current="page"] { color: var(--text-main); }
.nav-pills { display: flex; gap: 8px; margin-left: 8px; }
.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-subtle);
    background: rgba(19, 27, 46, 0.8);
    color: var(--text-main);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}
.pill:hover { color: var(--text-main); border-color: var(--accent-blue); }
.pill-solid {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}
.pill-solid:hover { color: white; background: #2563eb; }
.hamburger {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-secondary);
    cursor: pointer;
    padding: 0;
}
.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text-main);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 30;
}
.nav-overlay.open { display: block; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    margin-top: 48px;
    padding: 40px 22px 28px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(19, 27, 46, 0.65);
}
.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 28px;
}
.site-footer h2 {
    font-size: 0.95rem;
    margin: 0 0 10px;
    color: var(--text-main);
}
.site-footer p, .site-footer a { font-size: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 6px 0; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-main); }
.footer-note {
    max-width: 1100px;
    margin: 22px auto 0;
    font-size: 0.78rem;
    color: var(--text-dim);
}
.ip-credit {
    max-width: 1100px;
    margin: 22px auto 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.ip-credit a { color: var(--text-muted); text-decoration: underline; }
.ip-credit a:hover { color: var(--text-main); }
.wa-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    background: #128c4a;
    color: white !important;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
}

/* ── Brochure layout ────────────────────────────────────── */
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 22px 8px; }
.hero { text-align: center; padding: 54px 22px 28px; max-width: 920px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: 12px 0; }
.hero .highlight { color: var(--accent-gold); }
.tagline { font-size: 1.08rem; max-width: 680px; margin: 0 auto 22px; }
.hero-actions, .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-cta, .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 650;
    font-weight: 600;
}
.btn-cta { background: var(--accent-blue); color: white; }
.btn-cta:hover { color: white; background: #2563eb; }
.btn-outline { border: 1px solid var(--border-subtle); color: var(--text-main); background: rgba(19, 27, 46, 0.6); }
.btn-outline:hover { color: var(--text-main); border-color: var(--accent-blue); }

.stats {
    max-width: 1100px;
    margin: 10px auto 8px;
    padding: 0 22px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.stat {
    background: rgba(19, 27, 46, 0.72);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(8px);
}
.stat strong { display: block; color: var(--text-main); font-size: 1.05rem; }
.stat span { color: var(--text-muted); font-size: 0.85rem; }

.section-head { margin-bottom: 14px; }
.section-head h2 { margin: 0 0 6px; }
.live-dot, .pulse {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--accent-green);
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.card-grid, .features, .values-grid, .live-grid, .articles-grid, .lessons-grid, .steps, .contact-cards {
    display: grid;
    gap: 14px;
}
.features, .values-grid, .live-grid, .articles-grid, .lessons-grid { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.steps { grid-template-columns: repeat(3, 1fr); }
.contact-cards { grid-template-columns: repeat(2, 1fr); }

.feature-card, .value-card, .live-card, .article-card, .lesson-card, .story-card, .parents-section,
.gotd-card, .faq-item, .contact-card, .step, .glass {
    background: rgba(19, 27, 46, 0.78);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 18px;
    backdrop-filter: blur(10px);
}
.feature-card, .value-card, .live-card, .article-card, .lesson-card, .step {
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.feature-card:hover, .value-card:hover, .live-card:hover, .article-card:hover, .lesson-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.65);
}
.article-card, .lesson-card { cursor: pointer; }
.feature-card h3, .value-card h3, .live-card h3, .article-card h3, .lesson-card h3 { margin: 8px 0; font-size: 1.05rem; }
.icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-tertiary); color: var(--accent-gold); }

.live-card-header, .live-badge, .category-badge, .gotd-category, .level-badge, .game-tag, .age-tag, .tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.live-badge, .category-badge, .gotd-category, .level-badge, .game-tag, .age-tag, .tech-tag, .theme-badge {
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 650;
    font-weight: 600;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}
.live-badge { color: #052e1c; background: var(--accent-green); border-color: transparent; }
.live-badge.soon { color: #1c1405; background: var(--accent-gold, #f59e0b); }
.watch-link, .gotd-play-link { display: inline-flex; margin-top: 10px; font-weight: 600; }
.live-empty, .empty-state, .loading { text-align: center; color: var(--text-muted); padding: 28px 12px; }
.gotd-players { display: flex; justify-content: center; gap: 10px; font-weight: 700; color: var(--text-main); flex-wrap: wrap; }
.gotd-result { text-align: center; color: var(--accent-gold); font-weight: 700; margin: 6px 0; }
.gotd-footer { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.age-tags, .tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.age-tag { color: var(--text-main); }
.step-num {
    width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--accent-blue); color: white; font-weight: 700;
}
.stats .num, .highlight-stat .num { font-size: 1.4rem; font-weight: 700; color: var(--text-main); }
.highlights {
    max-width: 1100px; margin: 8px auto; padding: 0 22px;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.highlight-stat {
    background: rgba(19, 27, 46, 0.72);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
}
.highlight-stat .label { display: block; color: var(--text-muted); font-size: 0.85rem; }
.coverage-list { padding-left: 0; list-style: none; }
.coverage-list li { margin: 8px 0; color: var(--text-main); }
.faq-item h3 { margin: 0 0 6px; font-size: 1rem; }
.page-header { max-width: 900px; margin: 0 auto; padding: 36px 22px 8px; }
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.filter-bar, .level-filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 22px 18px; max-width: 1100px; margin: 0 auto; }
.filter-btn, .level-pill {
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    font-size: 0.88rem;
}
.filter-btn.active, .level-pill.active { background: var(--accent-blue); color: white; border-color: var(--accent-blue); }
.articles-section, .article-detail, .container { max-width: 1100px; margin: 0 auto; padding: 0 22px 24px; }
.article-detail { display: none; }
.article-detail.active { display: block; }
.lesson-detail { display: none; }
.lesson-detail.active { display: block; }
.lesson-list-view.hidden { display: none; }
.article-card .intro, .lesson-desc, .game-commentary, .annotation-text, .intro-text { color: var(--text-muted); }
.article-card .meta, .lesson-count, .game-event { color: var(--text-dim); font-size: 0.85rem; display: flex; gap: 12px; flex-wrap: wrap; }
.page-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.page-nav-btn, .nav-btn, .quiz-submit, .gtm-btn, .back-btn {
    border: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    color: var(--text-main);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font: inherit;
}
.page-dot, .position-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block; margin: 0 3px;
    background: var(--border-subtle); cursor: pointer;
}
.page-dot.active, .position-dot.active { background: var(--accent-gold); }
.position-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 0; }
.position-dots { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.position-content { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
.position-content .board-container,
.gtm-board,
.game-board-wrap {
    background: #0f172a;
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 8px;
    min-width: 0;
    max-width: 100%;
}
.gtm-board > div { max-width: 100%; }
.quiz-section, .gtm-panel, .teaching-area {
    background: rgba(19, 27, 46, 0.78);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 16px;
}
.quiz-input, .gtm-move-input input {
    width: 100%;
    min-width: 0;
    background: var(--bg-primary);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
}
.gtm-move-input input, .quiz-input-row .quiz-input { width: auto; flex: 1 1 140px; }
.quiz-input-row, .gtm-move-input, .gtm-controls { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.quiz-result { display: none; margin-top: 10px; border-radius: 10px; padding: 10px; }
.quiz-result.correct { display: block; background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.quiz-result.wrong { display: block; background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.quiz-reveal { margin-top: 8px; }
.gtm-container { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 14px; }
.gtm-score { color: var(--accent-gold); font-weight: 700; margin: 8px 0; }
.gtm-status { color: var(--text-muted); margin-bottom: 8px; }
.level-beginner { color: var(--accent-green); }
.level-intermediate { color: var(--accent-gold); }
.level-advanced { color: #fca5a5; }
.level-rated { color: #c4b5fd; }
.toc-list { padding-left: 18px; }
.toc-item { color: var(--text-main); }
.whatsapp-float {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.whatsapp-float:hover { color: white; }
.cta-banner { text-align: center; padding: 28px 22px 48px; }
.lesson-header, .toc-section { margin-bottom: 14px; }

@media (max-width: 860px) {
    .footer-grid, .stats, .highlights, .steps, .contact-cards, .gtm-container, .position-content {
        grid-template-columns: 1fr;
    }
    .site-nav {
        backdrop-filter: none;
        background: #0b0f19;
    }
    .hamburger { display: inline-block; position: relative; z-index: 10000; }
    .nav-overlay { z-index: 9998; background: rgba(0, 0, 0, 0.6); }
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(300px, 80vw);
        height: auto;
        margin: 0;
        padding: 20px;
        background: #0f172a;
        border-left: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.7);
        z-index: 9999;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
        overflow: auto;
        flex-wrap: nowrap;
    }
    .nav-links.open { display: flex; }
    .drawer-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }
    .drawer-brand {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: #f8fafc;
        font-weight: 700;
        font-size: 18px;
    }
    .drawer-close {
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 8px;
        background: #1e293b;
        color: #f8fafc;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }
    .nav-links > a {
        font-size: 16px;
        font-weight: 600;
        color: #f8fafc;
        padding: 12px 16px;
        border-radius: 8px;
        border-bottom: 0;
    }
    .nav-links > a:hover,
    .nav-links > a[aria-current="page"] {
        background: #1e293b;
        color: #f8fafc;
    }
    .nav-pills {
        flex-direction: column;
        margin: auto 0 0;
        width: 100%;
        gap: 8px;
    }
    .pill { justify-content: center; min-height: 44px; }
}
@media (max-height: 640px) and (max-width: 700px) {
    .site-nav { min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
}

@media (max-width: 430px) {
    .site-nav, .wrap, .hero, .page-header, .articles-section, .container { padding-left: 14px; padding-right: 14px; }
    .tagline, .section-head p, .article-card .meta, .lesson-count { color: #cbd5e1; }
    .filter-btn, .level-pill, .btn-cta, .btn-outline, .pill { min-height: 44px; }
    .hero { padding-top: 28px; }
    .hero h1 { font-size: 1.85rem; }
    .stat, .feature-card, .live-card { padding: 14px; }
}

/* Phone boards: a fixed pixel board must shrink to the screen and stay square. */
@media (max-width: 640px) {
    .gtm-board > div,
    .gtm-board .board,
    .game-board-wrap .board,
    .board-container .board,
    .position-content .board {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1;
    }
    .gtm-board cg-board,
    .gtm-board .cg-wrap,
    .game-board-wrap cg-board,
    .game-board-wrap .cg-wrap,
    .board-container cg-board,
    .board-container .cg-wrap,
    .position-content cg-board,
    .position-content .cg-wrap {
        width: 100% !important;
        height: 100% !important;
    }
    input, select, textarea { font-size: 16px; }
    .hero-actions .btn-cta,
    .hero-actions .btn-outline,
    .cta-row .btn-cta,
    .cta-row .btn-outline { min-height: 44px; }
}
