/* ============================================================
   certification.css — styles ONLY for the /certification/ page
   additions. Loaded AFTER style.css and programs.css (the
   comparison component lives in programs.css and is reused here).
   Currently contains: the interactive exam-breakdown component.
   ============================================================ */

.exam-section {
    padding: 4rem 0;
    background: #fff;
}

.exam-section .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.exam-section h2 {
    text-align: center;
    margin-bottom: 0.75rem;
}

.exam-section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 0.75rem;
    color: #5a6a7a;
}

.exam-total {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.exam-total:empty {
    display: none;
}

/* ---------- One bar per exam content area ---------- */
.exam-bar-item {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.exam-bar-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Clickable header row */
.exam-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.25rem 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    text-align: left;
}

.exam-bar-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
}

.exam-bar-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.exam-bar-chevron {
    color: #8a97a5;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.exam-bar-item.open .exam-bar-chevron {
    transform: rotate(180deg);
}

/* The proportional bar itself */
.exam-bar-track {
    height: 12px;
    background: #e8ecf0;
    border-radius: 999px;
    margin: 0 1.25rem 1rem;
    overflow: hidden;
}

.exam-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 999px;
    width: 0;
    transition: width 0.8s ease;
}

/* Fills animate to their width once the page class is added by JS */
.exam-bars-ready .exam-bar-fill {
    width: var(--bar-width);
}

/* Expandable topic list */
.exam-bar-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: #fff;
    border-top: 1px solid transparent;
}

.exam-bar-item.open .exam-bar-detail {
    max-height: 400px;
    border-top-color: var(--border-color);
}

.exam-bar-detail ul {
    margin: 0;
    padding: 1rem 1.25rem 1rem 2.5rem;
}

.exam-bar-detail li {
    margin-bottom: 0.4rem;
    font-size: 0.98rem;
    color: #2c3e50;
}

.exam-bar-detail li:last-child {
    margin-bottom: 0;
}

/* Caveat / tip note under the whole component */
.exam-note {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.95rem;
    color: #5a6a7a;
}

.exam-note:empty {
    display: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .exam-bar-header {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .exam-bar-count {
        font-size: 0.82rem;
    }
}
