/* ============================================================
   specialties.css — styles ONLY for the /specialties/ page
   additions. Loaded AFTER style.css and programs.css (the
   comparison component lives in programs.css and is reused).
   Currently contains: the specialty explorer card grid.
   Reused later by individual specialty pages (/specialties/mri/
   etc.) — same component, different JSON.
   ============================================================ */

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

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

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

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

/* ---------- Card grid ---------- */
.specialty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start; /* an expanded card doesn't stretch its neighbor */
}

.specialty-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.specialty-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.specialty-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.15rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    text-align: left;
}

/* Popularity rank chip */
.specialty-rank {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-color);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    flex-shrink: 0;
}

.specialty-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.specialty-card-heading {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.specialty-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
}

.specialty-tagline {
    font-size: 0.85rem;
    color: #5a6a7a;
}

/* Kind badge — tells the reader what type of move this is */
.specialty-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.specialty-badge.cert     { background: #e2f4e9; color: #1f7a43; }
.specialty-badge.pathway  { background: #e3edfb; color: #2b5ea8; }
.specialty-badge.advanced { background: #fcf1d7; color: #9a6f0a; }

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

.specialty-card.open .specialty-chevron {
    transform: rotate(180deg);
}

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

.specialty-card.open .specialty-card-detail {
    max-height: 480px;
    border-top-color: var(--border-color);
}

/* Quick-stat chips inside the detail */
.specialty-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 1rem 1.15rem 0;
}

.specialty-stat {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
}

.specialty-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a97a5;
    margin-bottom: 0.1rem;
}

.specialty-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
}

.specialty-card-detail > p {
    margin: 0;
    padding: 0.9rem 1.15rem 1.1rem;
    font-size: 0.95rem;
    color: #4a5a6a;
}

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

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

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .specialty-grid {
        grid-template-columns: 1fr;
    }

    .specialty-card-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .specialty-tagline {
        font-size: 0.8rem;
    }

    .specialty-badge {
        font-size: 0.66rem;
    }

    .specialty-stats {
        grid-template-columns: 1fr;
    }
}
