/* ==========================================================================
   XJMU /programs page (Phase 4) — depends on design-system.css tokens.
   ========================================================================== */

/* ---------- hero ---------- */
.prog-hero {
    background: linear-gradient(90deg, rgba(9,28,50,.92) 0%, rgba(9,28,50,.62) 55%, rgba(9,28,50,.38) 100%), url('../images/campus4.webp') center/cover no-repeat;
    color: #fff;
    min-height: clamp(260px, 34vw, 360px);
    display: flex; align-items: center;
    padding: clamp(2.5rem, 6vw, 4rem) 0;
    text-align: left;
}
.prog-hero h1 { color:#fff; font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 800; margin: .3rem 0 .8rem; }
.prog-hero p { color:#c3d2e6; max-width: 640px; margin: 0; font-size: 1.08rem; line-height: 1.65; }

/* ---------- breadcrumb ---------- */
.prog-crumb { font-size:.85rem; color: var(--ds-muted); padding: 1rem 0 0; }
.prog-crumb a { color: var(--ds-navy); text-decoration: none; }
.prog-crumb a:hover { text-decoration: underline; }

/* ---------- filters ---------- */
.prog-filters {
    display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center;
    margin-bottom: 2rem;
}
.filter-btn {
    padding: .6rem 1.3rem;
    border: 1px solid var(--ds-line);
    background: #fff; color: var(--ds-navy);
    font-family: var(--ds-font-body); font-weight: 600; font-size: .93rem;
    border-radius: var(--ds-r-md) !important;
    cursor: pointer; transition: var(--ds-t);
}
.filter-btn:hover { border-color: var(--ds-navy); background: var(--ds-navy-050); }
.filter-btn.active { background: var(--ds-navy); color: #fff; border-color: var(--ds-navy); }

/* ---------- table ---------- */
.prog-table-wrap {
    border: 1px solid var(--ds-line);
    border-radius: var(--ds-r-lg) !important;
    overflow: hidden;
    box-shadow: var(--ds-shadow-sm);
    background: #fff;
}
.prog-table { width: 100%; border-collapse: collapse; }
.prog-table thead th {
    background: var(--ds-navy); color: #fff;
    font-size: .78rem; letter-spacing: .05em; text-transform: uppercase;
    font-weight: 700; text-align: left; padding: .95rem 1.1rem;
}
.prog-table td {
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--ds-line);
    font-size: .94rem; color: var(--ds-body); vertical-align: top;
}
.prog-table tbody tr:last-child td { border-bottom: 0; }
.prog-table tbody tr:hover { background: var(--ds-bg-soft); }
.program-name { font-weight: 700; color: var(--ds-ink); display: block; }
.program-name-cell .text-muted { font-size: .84rem; margin-top: .15rem; }
.tuition-cell { font-weight: 700; color: var(--ds-ink); white-space: nowrap; }

.btn-apply-table {
    display: inline-block;
    background: var(--ds-red); color: #fff !important;
    font-weight: 600; font-size: .85rem;
    padding: .45rem 1.05rem;
    border-radius: var(--ds-r-md) !important;
    text-decoration: none !important; white-space: nowrap;
    transition: var(--ds-t);
}
.btn-apply-table:hover { background: var(--ds-red-600); }

/* ---------- responsive: stack the table into cards on small screens ---------- */
@media (max-width: 768px) {
    .prog-table thead { display: none; }
    .prog-table, .prog-table tbody, .prog-table tr, .prog-table td { display: block; width: 100%; }
    .prog-table tr {
        border: 1px solid var(--ds-line);
        border-radius: var(--ds-r-md) !important;
        margin-bottom: .85rem; padding: .35rem .25rem;
    }
    .prog-table-wrap { border: 0; box-shadow: none; background: transparent; overflow: visible; }
    .prog-table td {
        border-bottom: 1px dashed var(--ds-line);
        display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
        padding: .6rem .9rem; text-align: right;
    }
    .prog-table tr td:last-child { border-bottom: 0; }
    .prog-table td::before {
        content: attr(data-label);
        font-weight: 700; color: var(--ds-muted);
        text-transform: uppercase; font-size: .72rem; letter-spacing: .04em;
        text-align: left; flex: 0 0 auto;
    }
    .program-name-cell { text-align: left; flex-direction: column; align-items: flex-start; }
}
