/* Course list page — pairs with mg-page-hero.css and terms-legal.css */

.mg-course-list-page {
    --cl-ink: #1c1917;
    --cl-muted: #57534e;
    --cl-line: #e7e5e4;
    --cl-text: 1.5rem;
    --cl-heading-sm: 1.35rem;
    font-size: var(--cl-text);
    color: var(--cl-ink);
}

.mg-course-list-page .mg-terms-intro {
    margin-bottom: 2.75rem;
}

.mg-course-sections {
    display: grid;
    gap: 0;
}

.mg-course-section {
    scroll-margin-top: 1.5rem;
}

.mg-course-section:not(:first-child) {
    margin-top: 3.5rem;
    padding-top: 3.5rem;
    border-top: 1px solid rgba(231, 229, 228, 0.9);
}

.mg-course-section-head {
    margin-bottom: 1.75rem;
    padding: 1.35rem 1.5rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #faf5ff 0%, #fff7ed 100%);
    border: 1px solid rgba(124, 58, 237, 0.14);
    border-left: 5px solid #7c3aed;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.06);
}

.mg-course-section-head h2 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #5b21b6;
}

.mg-course-section-head p {
    margin: 0;
    max-width: 42rem;
    font-size: var(--cl-text);
    line-height: 1.6;
    color: var(--cl-muted);
}

.mg-course-tile-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (min-width: 576px) {
    .mg-course-tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .mg-course-tile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.mg-course-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 6.25rem;
    padding: 1.15rem 1.25rem;
    border-radius: 18px;
    border: 1px solid var(--cl-line);
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(28, 25, 23, 0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mg-course-tile:hover {
    color: inherit;
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.22);
    box-shadow: 0 14px 32px rgba(124, 58, 237, 0.12);
}

.mg-course-tile-icon {
    flex-shrink: 0;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.65rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.mg-course-tile-icon--specialist {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #6d28d9;
}

.mg-course-tile-icon--methods {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.mg-course-tile-icon--general {
    background: linear-gradient(135deg, #ccfbf1, #99f6e4);
    color: #0f766e;
}

.mg-course-tile-icon--essential {
    background: linear-gradient(135deg, #ffedd5, #fed7aa);
    color: #c2410c;
}

.mg-course-tile-icon--primary {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #be185d;
}

.mg-course-tile-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.mg-course-tile-year {
    display: block;
    margin-bottom: 0.15rem;
    font-size: var(--cl-heading-sm);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #7c3aed;
}

.mg-course-tile-copy strong {
    display: block;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--cl-ink);
}

.mg-course-tile-meta {
    display: block;
    margin-top: 0.2rem;
    font-size: var(--cl-text);
    color: var(--cl-muted);
}

.mg-course-tile-arrow {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
    font-size: 1.2rem;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.mg-course-tile:hover .mg-course-tile-arrow {
    background: #7c3aed;
    color: #fff;
    transform: translateX(2px);
}

.mg-course-list-cta {
    margin-top: 3.5rem;
    padding: 1.5rem 1.4rem;
    border-radius: 20px;
    text-align: center;
    background: linear-gradient(135deg, #fff7ed, #faf5ff);
    border: 1px solid rgba(124, 58, 237, 0.14);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.07);
}

.mg-course-list-cta h3 {
    margin: 0 0 0.5rem;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--cl-ink);
}

.mg-course-list-cta p {
    margin: 0 auto 1rem;
    max-width: 36rem;
    font-size: var(--cl-text);
    line-height: 1.6;
    color: var(--cl-muted);
}
