/* class-9/styles.css - Design System for Maharashtra Board Class 9 */

:root {
    --c9-primary: #0284c7;
    --c9-primary-dark: #0369a1;
    --c9-surface: #ffffff;
    --c9-bg: #f8fafc;
    --c9-border: #e2e8f0;
    --c9-text-main: #0f172a;
    --c9-text-muted: #64748b;
    --c9-radius: 1rem;
    --c9-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --c9-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

/* Hero Section */
.c9-hero {
    border-radius: var(--c9-radius);
    padding: clamp(1.75rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.5rem);
    color: #ffffff;
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
    position: relative;
    overflow: hidden;
}
.c9-hero h1 {
    font-weight: 800;
    line-height: 1.3;
    font-size: clamp(1.5rem, 3.5vw, 2.3rem);
}
.c9-hero p {
    color: #e2e8f0;
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Subject Grid & Cards */
.c9-subject-card {
    background: var(--c9-surface);
    border: 1px solid var(--c9-border);
    border-radius: var(--c9-radius);
    padding: 1.5rem;
    box-shadow: var(--c9-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.c9-subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--c9-shadow-hover);
    border-color: #cbd5e1;
}
.c9-subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--theme-color, #0284c7);
}
.c9-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
    background: var(--theme-color, #0284c7);
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Chapter List Items */
.c9-chapter-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.c9-chapter-item {
    background: #ffffff;
    border: 1px solid var(--c9-border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--c9-text-main);
}
.c9-chapter-item:hover {
    background: #f8fafc;
    border-color: var(--c9-primary);
    transform: translateX(4px);
    color: var(--c9-primary);
}
.c9-chapter-item .ch-number {
    font-weight: 800;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}
.c9-chapter-item:hover .ch-number {
    background: var(--c9-primary);
    color: #ffffff;
}

/* Chapter Detail View Components */
.c9-section-block {
    background: #ffffff;
    border: 1px solid var(--c9-border);
    border-radius: var(--c9-radius);
    padding: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 2rem;
    box-shadow: var(--c9-shadow);
}
.c9-section-title {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

/* Educational Formula & Concept Boxes */
.c9-formula-box {
    background: #f0fdf4;
    border-left: 5px solid #22c55e;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.25rem 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #14532d;
}
.c9-concept-box {
    background: #eff6ff;
    border-left: 5px solid #3b82f6;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.25rem 0;
    line-height: 1.7;
    color: #1e3a8a;
}
.c9-tip-box {
    background: #fffbeb;
    border-left: 5px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin: 1.25rem 0;
    line-height: 1.7;
    color: #78350f;
}

/* Question & Answer Cards */
.c9-qa-item {
    border: 1px solid var(--c9-border);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    overflow: hidden;
    background: #ffffff;
}
.c9-qa-question {
    padding: 1rem 1.25rem;
    background: #f8fafc;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    color: #1e293b;
}
.c9-qa-question:hover {
    background: #f1f5f9;
}
.c9-qa-answer {
    padding: 1.25rem;
    border-top: 1px solid var(--c9-border);
    line-height: 1.7;
    color: #334155;
}

/* Interactive MCQ Quiz */
.c9-quiz-card {
    background: #ffffff;
    border: 1px solid var(--c9-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.2s ease;
}
.c9-quiz-q {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
    margin-bottom: 0.75rem;
}
.c9-opt-label {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #ffffff;
}
.c9-opt-label:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.c9-opt-label input[type="radio"] {
    margin-right: 0.75rem;
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #0284c7;
}
.c9-opt-correct {
    background: #dcfce7 !important;
    border-color: #22c55e !important;
    color: #14532d !important;
    font-weight: 600;
}
.c9-opt-wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #7f1d1d !important;
}
.c9-quiz-feedback {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

/* Original SVG Diagram Container */
.c9-diagram-box {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--c9-radius);
    margin: 1.5rem 0;
}
.c9-diagram-box svg {
    max-width: 100%;
    height: auto;
    display: inline-block;
}
.c9-diagram-caption {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 0.75rem;
}

/* AdSense Compliant Banner Slot (Reserved space, no layout shift) */
.c9-ad-slot {
    min-height: 90px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 2rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Table of Contents Floating/Sticky Bar */
.c9-toc-nav {
    background: #ffffff;
    border: 1px solid var(--c9-border);
    border-radius: var(--c9-radius);
    padding: 1.25rem;
    margin-bottom: 2rem;
}
.c9-toc-nav a {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    margin: 0.2rem;
    border-radius: 2rem;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.c9-toc-nav a:hover {
    background: var(--c9-primary);
    color: #ffffff;
}

/* Print Stylesheet */
@media print {
    body { font-size: 12pt; background: #ffffff !important; color: #000000 !important; }
    header, footer, nav, .c9-ad-slot, .btn, .c9-quiz-card button, .c9-toc-nav { display: none !important; }
    .c9-section-block, .c9-qa-item, .c9-formula-box { border: 1px solid #ccc !important; box-shadow: none !important; break-inside: avoid; }
    .c9-qa-answer { display: block !important; }
    a { text-decoration: none !important; color: #000000 !important; }
}
