/* ──────────────────────────────────────────────────────────────
   UMWEKA ACADEMY — Academic Structure Browse (public)
   Schools → Faculties → Departments → Programs → Courses
   Reuses .u-container / .pg-page-hero / .cr-grid / .cd-breadcrumb
   tokens already defined in design-system.css / programs.css /
   courses.css; only the bits unique to this feature live here.
   ────────────────────────────────────────────────────────────── */

/* ── Level filter tabs (Schools index) ─────────────────────── */
.ab-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.ab-filter-tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--dark-3);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.ab-filter-tab:hover { color: var(--text); border-color: var(--border-strong); }
.ab-filter-tab.active {
    background: var(--accent);
    color: var(--dark);
    border-color: var(--accent);
}

/* ── Card grid (used on every listing level) ───────────────── */
.ab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
@media (max-width: 1100px) { .ab-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .ab-grid { grid-template-columns: 1fr; } }

.ab-card {
    display: block;
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}
.ab-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.ab-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }

.ab-card-icon { font-size: 32px; margin-bottom: 12px; }
.ab-card-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid rgba(245,166,35,0.25);
    border-radius: 6px;
    padding: 3px 8px;
    margin-bottom: 10px;
}
.ab-card-name {
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.3;
}
.ab-card-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}
.ab-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}
.ab-card-stat  { color: var(--text-faint); }
.ab-card-arrow { color: var(--primary-light); font-weight: 600; }

/* ── Empty state ────────────────────────────────────────────── */
.ab-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.ab-empty-icon { font-size: 44px; margin-bottom: 12px; }
.ab-empty h3   { color: var(--text); margin-bottom: 6px; }

/* ── Detail page header (School / Faculty / Department / Program) ── */
.ab-detail-header {
    padding: 100px 0 36px;
    background:
        radial-gradient(ellipse 70% 50% at 50% -20%, rgba(13,110,253,0.15) 0%, transparent 70%);
    border-bottom: 1px solid var(--border);
}
.ab-detail-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 18px 0 10px;
}
.ab-detail-icon {
    font-size: 38px;
    flex-shrink: 0;
    width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center;
    background: var(--dark-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.ab-detail-title {
    font-family: var(--font-heading);
    font-size: 32px;
    color: var(--text);
    margin: 4px 0 4px;
}
.ab-detail-meta { color: var(--text-muted); font-size: 14px; }
.ab-detail-desc {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    max-width: 760px;
    margin-top: 12px;
}

/* ── Section titles ─────────────────────────────────────────── */
.ab-section-title {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--text);
    margin: 28px 0 16px;
}
.ab-semester-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 14px;
}
.ab-year-block:not(:first-child) { margin-top: 8px; }

@media (max-width: 640px) {
    .ab-detail-head    { flex-direction: column; align-items: flex-start; }
    .ab-detail-title   { font-size: 24px; }
}
