/* =========================================================================
   Departments & Tuition Fees
   ========================================================================= */

.fees-hero.page-hero {
    padding-top: calc(var(--header-h) + 36px);
    padding-bottom: 22px;
}
.fees-hero .page-hero__title {
    font-size: clamp(1.7rem, 3.2vw, 2.35rem);
    margin: 6px 0 8px;
}
.fees-hero .page-hero__lead {
    font-size: 0.98rem;
    max-width: 52ch;
    margin: 0;
}
.fees-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
    gap: 22px;
    align-items: end;
}
.fees-hero__note {
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(227, 6, 19, 0.06);
    border: 1px solid rgba(227, 6, 19, 0.14);
}
.fees-hero__note strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #c53a42;
}
.fees-hero__note p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.fees-section.section {
    padding-top: clamp(18px, 3vw, 32px);
    padding-bottom: clamp(40px, 6vw, 72px);
}

.fees-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}
.fees-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(160px, 0.7fr) minmax(140px, 0.6fr) auto;
    gap: 12px;
    align-items: end;
}
.fees-search {
    position: relative;
    display: flex;
    align-items: center;
}
.fees-search svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    pointer-events: none;
}
.fees-search input,
.fees-select select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 0.94rem;
    box-shadow: var(--shadow-md);
}
.fees-search input { padding-left: 42px; }
.fees-search input:focus,
.fees-select select:focus {
    outline: none;
    border-color: rgba(227, 6, 19, 0.4);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}
.fees-select {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}
.fees-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.fees-table-wrap {
    overflow: auto;
    max-height: min(70vh, 720px);
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-md);
    opacity: 1;
    transform: none;
}
.fees-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}
.fees-table th,
.fees-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.fees-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.fees-table tbody tr:hover { background: rgba(227, 6, 19, 0.03); }
.fees-table tbody tr.is-hidden { display: none; }
.fees-table__program {
    font-weight: 600;
    color: var(--text);
}
.fees-table__fee {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.fees-table__fee.is-struck {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    text-decoration-color: rgba(18, 24, 38, 0.45);
    color: var(--text-dim);
}
.fees-table__discount {
    color: #c53a42;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fees-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--surface-2);
    color: var(--text-muted);
}
.fees-badge--bachelor { background: rgba(227, 6, 19, 0.1); color: #c53a42; }
.fees-badge--associate { background: rgba(37, 99, 235, 0.1); color: #1d4ed8; }
.fees-badge--master { background: rgba(5, 150, 105, 0.1); color: #047857; }
.fees-badge--phd { background: rgba(124, 58, 237, 0.1); color: #6d28d9; }

.fees-empty {
    text-align: center;
    padding: 40px 18px;
    margin-top: 16px;
    border: 1px dashed var(--border-strong);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
}
.fees-empty strong {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-head);
}
.fees-empty p {
    color: var(--text-muted);
    margin-bottom: 14px;
}

.fees-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding: 22px 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.08), rgba(227, 6, 19, 0.02));
    border: 1px solid rgba(227, 6, 19, 0.14);
}
.fees-cta h2 {
    font-size: 1.35rem;
    margin-bottom: 4px;
}
.fees-cta p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}
.fees-cta__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .fees-hero__inner { grid-template-columns: 1fr; }
    .fees-filters { grid-template-columns: 1fr 1fr; }
    .fees-search { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .fees-filters { grid-template-columns: 1fr; }
    .fees-cta { padding: 18px; }
    .fees-cta__actions { width: 100%; }
    .fees-cta__actions .btn { flex: 1; justify-content: center; }
}
