/* ==========================================
   BITSAFRIC VISUAL LEARNING SYSTEM
   Edition: 2026
   Shared Educational Graphics
   ========================================== */

.education-page {
    --visual-green: #00E6A0;
    --visual-gold: #F5C451;
    --visual-blue: #60A5FA;
    --visual-purple: #C084FC;
    --visual-orange: #FB923C;
    --visual-red: #F87171;
}

/* EDUCATIONAL FIGURES */

.edu-figure {
    margin: 26px 0;
    padding: 20px;
    background: var(--edu-surface);
    border: 1px solid var(--edu-border);
    border-radius: 14px;
    overflow: hidden;
}

.edu-figure-heading {
    margin: 0 0 16px;
}

.edu-figure-heading h3 {
    color: #FFFFFF;
    font-size: 20px;
    line-height: 1.4;
    margin: 6px 0 10px;
}

.edu-visual-label {
    display: inline-block;
    color: var(--visual-green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.edu-figure img,
.edu-figure svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
}

.edu-figure figcaption {
    color: var(--edu-muted);
    font-size: 13px;
    line-height: 1.65;
    padding-top: 14px;
    margin-top: 14px;
    border-top: 1px solid var(--edu-border);
}

.edu-figure .edu-visual-source {
    display: block;
    font-size: 11px;
    color: var(--edu-muted);
    margin-top: 8px;
}

/* VISUAL CONTENT GRID */

.edu-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.edu-visual-card {
    min-width: 0;
    padding: 18px;
    background: var(--edu-bg);
    border: 1px solid var(--edu-border);
    border-radius: 12px;
}

.edu-visual-card h3 {
    font-size: 18px;
    margin: 10px 0;
}

.edu-visual-card p {
    color: var(--edu-muted);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 0;
}

.edu-visual-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ILLUSTRATED TIMELINES */

.edu-timeline {
    display: grid;
    gap: 0;
    margin: 22px 0;
}

.edu-timeline-item {
    position: relative;
    padding: 0 0 24px 30px;
    margin-left: 10px;
    border-left: 2px solid var(--visual-green);
}

.edu-timeline-item::before {
    content: "";
    position: absolute;
    top: 7px;
    left: -7px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--visual-green);
    box-shadow: 0 0 0 4px var(--edu-bg);
}

.edu-timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.edu-timeline-item h3 {
    margin: 0 0 8px;
}

.edu-timeline-item p {
    margin-bottom: 10px;
}

/* LEARNING GUIDE */

.edu-guide {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
    padding: 20px;
    margin: 24px 0;
    background: var(--edu-surface);
    border: 1px solid var(--edu-border);
    border-radius: 14px;
}

.edu-guide img {
    width: 90px;
    height: auto;
}

.edu-guide h3 {
    margin: 0 0 8px;
    color: var(--visual-green);
}

.edu-guide p {
    margin-bottom: 0;
}

/* LEARNING CHALLENGES */

.edu-challenge {
    margin: 24px 0;
    padding: 20px;
    background: var(--edu-surface);
    border: 1px solid var(--edu-border);
    border-left: 4px solid var(--visual-gold);
    border-radius: 12px;
}

.edu-challenge h3 {
    margin-top: 0;
    color: var(--visual-gold);
}

.edu-challenge details {
    margin-top: 14px;
    padding: 12px;
    background: var(--edu-bg);
    border-radius: 8px;
}

.edu-challenge summary {
    color: var(--visual-green);
    font-weight: 700;
    cursor: pointer;
}

.edu-challenge details[open] summary {
    margin-bottom: 12px;
}

/* VISUAL DATA BARS */

.edu-visual-meter {
    height: 14px;
    background: var(--edu-bg);
    border: 1px solid var(--edu-border);
    border-radius: 20px;
    overflow: hidden;
    margin: 10px 0;
}

.edu-visual-meter-fill {
    height: 100%;
    max-width: 100%;
    background: var(--visual-green);
    border-radius: 20px;
    transition: width 0.35s ease;
}

/* ANCHOR NAVIGATION */

.education-page .edu-article section[id] {
    scroll-margin-top: 110px;
}

.education-page summary:focus-visible {
    outline: 3px solid #75FFD0;
    outline-offset: 4px;
}

/* MOBILE RESPONSIVENESS */

@media (max-width: 600px) {

    .edu-figure {
        padding: 12px;
        margin: 20px 0;
    }

    .edu-visual-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .edu-visual-card {
        padding: 14px;
    }

    .edu-guide {
        grid-template-columns: 60px minmax(0, 1fr);
        padding: 14px;
        gap: 12px;
    }

    .edu-guide img {
        width: 60px;
    }

    .edu-challenge {
        padding: 16px;
    }

    .edu-figure-heading h3 {
        font-size: 18px;
    }
}

/* ACCESSIBLE MOTION */

@media (prefers-reduced-motion: reduce) {

    .edu-visual-meter-fill {
        transition: none;
    }
}

/* END OF BITSAFRIC VISUAL LEARNING SYSTEM */

/* BITSAFRIC VISUAL SIZE REFINEMENT */

.edu-figure {
    padding: 16px;
    margin: 22px 0;
}

.edu-figure-heading {
    margin-bottom: 12px;
}

.edu-figure img,
.edu-figure svg {
    width: 100%;
    max-width: 640px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

#visual-lesson-02 img {
    max-width: 520px;
}

/* Retain accessible headings without visual duplication */

#visual-lesson-01 .edu-figure-heading h3,
#visual-lesson-02 .edu-figure-heading h3,
#visual-lesson-03 .edu-figure-heading h3,
#visual-lesson-04 .edu-figure-heading h3 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.edu-figure figcaption {
    padding-top: 12px;
    margin-top: 12px;
}

@media (max-width: 600px) {

    .edu-figure {
        padding: 10px;
        margin: 18px 0;
    }

    .edu-figure img,
    .edu-figure svg {
        max-width: 100%;
    }

    .edu-figure figcaption {
        font-size: 12px;
    }
}

/* END OF VISUAL SIZE REFINEMENT */