/* ============================================================
   TRANG DANH SÁCH ĐỘI NGŨ (/page/doi-ngu-giang-vien, /page/doi-ngu-tro-giang)
   Đồng bộ nền kem + serif với trang chi tiết giảng viên. Prefix .tl-*
   ============================================================ */

.tl {
    --tl-cream: #FBEEDF;
    --tl-cream-deep: #F3E0C4;
    --tl-cream-line: #E0C9A2;
    --tl-serif: "Times New Roman", "Noto Serif", "Liberation Serif", serif;
    --tl-body: #4A4A4A;
}

/* ── HERO ────────────────────────────────────────────────── */
.tl-hero {
    position: relative;
    background: linear-gradient(160deg, #FDF4E9 0%, var(--tl-cream) 55%, #F5E3C8 100%);
    padding: 26px 0 46px;
    overflow: hidden;
}
.tl-hero__pattern {
    position: absolute; inset: 0; width: 100%; height: 100%;
    color: var(--tl-cream-line); opacity: .55; pointer-events: none;
}
.tl-hero__pattern .tl-dots circle { fill: currentColor; opacity: .7; }
.tl-hero__pattern .tl-line { stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tl-hero__inner { position: relative; z-index: 1; }

.tl-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: #8a7657; margin-bottom: 26px; }
.tl-crumb a { color: var(--c-navy); text-decoration: none; font-weight: 600; transition: color .2s; }
.tl-crumb a:hover { color: var(--c-red); }
.tl-crumb [aria-current] { color: var(--c-red-dark); font-weight: 700; }

.tl-eyebrow {
    display: inline-block; color: var(--c-red-dark);
    font-size: 13px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 10px;
}
.tl-h1 {
    font-family: var(--tl-serif);
    font-size: clamp(30px, 3.4vw, 46px); line-height: 1.18;
    color: var(--c-navy); font-weight: 700; margin: 0 0 14px;
}
.tl-rule { display: block; width: 76px; height: 5px; border-radius: 3px; background: var(--c-red); margin-bottom: 16px; }
.tl-lead { font-size: 16px; line-height: 1.7; color: var(--tl-body); max-width: 640px; margin: 0 0 22px; }

.tl-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; padding: 0; }
.tl-stats li {
    display: grid; gap: 2px; min-width: 130px;
    background: #fff; border-radius: 14px; padding: 14px 20px;
    box-shadow: 0 10px 24px rgba(122, 90, 40, .14);
    border: 1px solid rgba(31, 52, 81, .06);
}
.tl-stats b { font-size: 24px; color: var(--c-red-dark); line-height: 1; }
.tl-stats small { font-size: 13px; color: #6a6a6a; }

.tl-cross {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--c-navy); font-weight: 700; font-size: 14.5px; text-decoration: none;
    border-bottom: 2px solid rgba(31, 52, 81, .25); padding-bottom: 2px;
    transition: color .2s, border-color .2s;
}
.tl-cross:hover { color: var(--c-red-dark); border-color: var(--c-red); }
.tl-cross i { font-size: 11px; transition: transform .2s; }
.tl-cross:hover i { transform: translateX(4px); }

/* ── BỘ LỌC MÔN ──────────────────────────────────────────── */
.tl-filter-wrap {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--c-navy-12);
    box-shadow: 0 6px 18px rgba(31, 52, 81, .06);
}
.tl-filter { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 0; }
.tl-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px; cursor: pointer;
    background: #fff; border: 1.5px solid var(--c-navy-12);
    color: var(--c-navy); font-size: 14px; font-weight: 600;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.tl-chip span {
    background: var(--c-navy-06); color: var(--c-navy);
    font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
    transition: background .2s, color .2s;
}
.tl-chip:hover { border-color: var(--c-red); color: var(--c-red-dark); transform: translateY(-1px); }
.tl-chip[aria-pressed="true"] { background: var(--c-grad); border-color: transparent; color: #fff; }
.tl-chip[aria-pressed="true"] span { background: rgba(255, 255, 255, .22); color: #fff; }

/* ── LƯỚI CARD ───────────────────────────────────────────── */
.tl-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
    gap: 22px;
}
.tl-item.tl-hidden { display: none; }
.tl-card {
    display: grid; height: 100%; text-decoration: none;
    background: #fff; border: 1px solid var(--c-navy-12); border-radius: 16px; overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.tl-card:hover { transform: translateY(-6px); box-shadow: 0 20px 42px rgba(31, 52, 81, .16); border-color: var(--c-red); }

.tl-card__photo { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--tl-cream-deep); }
.tl-card__photo img {
    width: 100%; height: 100%; object-fit: cover; object-position: center top;
    display: block; transition: transform .35s ease;
}
.tl-card:hover .tl-card__photo img { transform: scale(1.06); }
.tl-card__fallback {
    display: grid; place-items: center; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--c-navy), #2a466e);
    color: #fff; font-size: 46px; font-weight: 800; font-family: var(--tl-serif);
}
.tl-card__veil {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(13, 24, 40, .55));
    opacity: 0; transition: opacity .25s ease;
}
.tl-card:hover .tl-card__veil { opacity: 1; }
.tl-card__view {
    position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 10px);
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--c-grad); color: #fff;
    font-size: 13px; font-weight: 700; padding: 8px 18px; border-radius: 999px;
    opacity: 0; transition: opacity .25s ease, transform .25s ease;
    white-space: nowrap; box-shadow: 0 10px 22px rgba(182, 12, 19, .35);
}
.tl-card__view i { font-size: 10px; }
.tl-card:hover .tl-card__view { opacity: 1; transform: translate(-50%, 0); }

.tl-card__body { display: grid; gap: 7px; padding: 16px 18px 18px; }
.tl-card__body b { font-size: 16px; line-height: 1.4; color: var(--c-navy); }
.tl-card__sub {
    justify-self: start; display: inline-flex; align-items: center; gap: 7px;
    background: var(--c-red-08); color: var(--c-red-dark);
    font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.tl-card__sub i { font-size: 11px; }

/* ── EMPTY + PAGINATION ──────────────────────────────────── */
.tl-empty { text-align: center; padding: 40px 0; color: #6a7386; font-size: 15.5px; }
.tl-empty-page { text-align: center; padding: 60px 0; color: #6a7386; }
.tl-empty-page i { font-size: 40px; color: var(--c-navy-12); margin-bottom: 14px; }
.tl-empty-page h2 { font-size: 20px; color: var(--c-navy); margin: 0 0 8px; }
.tl-pagination { display: flex; justify-content: center; margin-top: 34px; }

/* ── FOCUS & MOTION ──────────────────────────────────────── */
.tl a:focus-visible, .tl button:focus-visible {
    outline: 3px solid var(--c-red); outline-offset: 3px; border-radius: 8px;
}
@media (prefers-reduced-motion: reduce) {
    .tl *, .tl *::before, .tl *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .tl-hero { padding: 20px 0 36px; }
    .tl-stats li { min-width: calc(50% - 7px); }
    .tl-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .tl-card__body { padding: 12px 14px 14px; }
    .tl-card__body b { font-size: 14.5px; }
    .tl-filter { padding: 12px 0; gap: 8px; }
    .tl-chip { font-size: 13px; padding: 7px 12px; }
    .tl-hero__pattern { opacity: .35; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE POLISH — audit PC/Tablet/Mobile (2026-08-03)
   PC 4 cột đạt chuẩn; tablet/mobile: bộ lọc đang wrap 3-5 hàng
   (cao tới 207px ở 375px) mà lại sticky → chuyển 1 hàng cuộn ngang
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .tl-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tl-filter::-webkit-scrollbar { display: none; }
    .tl-chip { flex: 0 0 auto; white-space: nowrap; }

    /* Fade mép phải gợi ý còn chip phía sau */
    .tl-filter-wrap::after {
        content: ""; position: absolute; right: 0; top: 0; bottom: 1px; width: 40px;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95));
        pointer-events: none;
    }
}
