/* ============================================================
   TRANG CHI TIẾT GIẢNG VIÊN (/giang-vien/{slug})
   Palette A đã duyệt: nền kem (đo từ mockup #FBEEDF) + token site
   (.hl cung cấp --c-navy #1F3451, --c-red #D7261E, --c-gold #ffd34d)
   Prefix riêng: .tc-*
   ============================================================ */

.tc {
    --tc-cream: #FBEEDF;          /* nền hero — đo pixel từ ảnh mẫu */
    --tc-cream-deep: #F3E0C4;     /* card quote / vòng tròn ảnh */
    --tc-cream-line: #E0C9A2;     /* line-art hoạ tiết */
    /* Times trước Georgia: Georgia render dấu tiếng Việt lỗi (dấu sắc tách rời) */
    --tc-serif: "Times New Roman", "Noto Serif", "Liberation Serif", serif;
    --tc-body: #4A4A4A;
}

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

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

.tc-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 4.5fr) minmax(0, 2.5fr);
    gap: 40px; align-items: center;
}
.tc-hero__grid--noquote { grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); }

/* Chân dung: khung tròn thống nhất cho mọi định dạng ảnh + hoạ tiết mềm */
.tc-hero__media { display: grid; justify-items: center; }
.tc-portrait { position: relative; width: min(300px, 100%); aspect-ratio: 1; }

/* Khung tròn chứa ảnh (mask mọi loại ảnh — hết cảnh ảnh vuông thô) */
.tc-portrait__frame {
    position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: block;
    background: radial-gradient(circle at 34% 28%, #fff 0, var(--tc-cream-deep) 74%);
    border: 5px solid #fff;
    box-shadow: 0 24px 48px rgba(122, 90, 40, .25), 0 0 0 1px rgba(31, 52, 81, .1);
}
.tc-portrait__frame img {
    width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block;
}

/* Vòng nét đứt xoay chậm quanh ảnh */
.tc-portrait__dash {
    position: absolute; inset: -14px; border-radius: 50%;
    border: 2px dashed rgba(31, 52, 81, .35);
    animation: tc-spin 26s linear infinite;
}
/* Cung đỏ nhấn ở đáy (mềm hoá bố cục) */
.tc-portrait__arc {
    position: absolute; inset: -26px; border-radius: 50%;
    border: 4px solid transparent;
    border-bottom-color: var(--c-red);
    border-left-color: rgba(215, 38, 30, .35);
    transform: rotate(-12deg);
}
@keyframes tc-spin { to { transform: rotate(360deg); } }

/* Chip môn học nổi trên mép dưới ảnh */
.tc-portrait__chip {
    position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
    z-index: 2; display: inline-flex; align-items: center; gap: 8px;
    background: var(--c-grad); color: #fff;
    font-size: 13.5px; font-weight: 700; letter-spacing: .3px;
    padding: 8px 18px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 10px 22px rgba(182, 12, 19, .35), 0 0 0 3px #fff;
}
.tc-portrait__chip i { font-size: 12px; color: #fff !important; }

.tc-portrait__fallback {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--c-navy), #2a466e);
    color: #fff; font-size: 64px; font-weight: 800; font-family: var(--tc-serif);
}

/* Nội dung chính */
.tc-eyebrow {
    display: inline-block; color: var(--c-red-dark);
    font-size: 13px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 12px;
}
.tc-name {
    font-family: var(--tc-serif);
    font-size: clamp(28px, 3.1vw, 44px); line-height: 1.18;
    color: var(--c-navy); font-weight: 700; margin: 0 0 14px;
}
/* Desktop: tên nằm trọn 1 dòng; mobile để tự wrap */
@media (min-width: 1024px) {
    .tc-name { white-space: nowrap; }
}
.tc-rule { display: block; width: 76px; height: 5px; border-radius: 3px; background: var(--c-red); margin-bottom: 16px; }
.tc-desc { font-size: 16px; line-height: 1.7; color: var(--tc-body); max-width: 560px; margin: 0 0 22px; }

/* Card badge trắng */
.tc-badges {
    display: inline-flex; align-items: stretch; gap: 20px;
    background: #fff; border-radius: 16px; padding: 16px 24px;
    box-shadow: 0 12px 28px rgba(122, 90, 40, .16);
    border: 1px solid rgba(31, 52, 81, .06);
    max-width: 100%;
}
.tc-badge { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tc-badge__ic {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--c-navy); color: #fff;
}
.tc-badge__ic i { font-size: 17px; color: #fff !important; }
.tc-badge__txt { display: grid; line-height: 1.3; min-width: 0; }
.tc-badge__txt small { font-size: 12px; color: #8a8a8a; }
.tc-badge__txt b { font-size: 15.5px; color: var(--c-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-badge__sep { width: 1px; background: rgba(31, 52, 81, .14); }

/* Card quote */
.tc-quote {
    position: relative; background: var(--tc-cream-deep);
    border-radius: 18px; padding: 46px 26px 30px;
    box-shadow: inset 0 0 0 1px rgba(122, 90, 40, .12);
}
.tc-quote__mark {
    position: absolute; top: 6px; left: 18px;
    font-size: 58px; line-height: 1; color: var(--c-red); font-family: var(--tc-serif);
}
.tc-quote p {
    font-family: var(--tc-serif); font-style: italic;
    font-size: 16.5px; line-height: 1.65; color: var(--c-navy); margin: 0 0 16px;
}
.tc-quote__rule { display: block; width: 54px; height: 4px; border-radius: 2px; background: var(--c-red); }

/* ── 2) BỐN KHỐI NỘI DUNG ────────────────────────────────── */
.tc-blocks { background: linear-gradient(180deg, #fff, #faf7f2); }
/* Lưới 2×2 cố định — card lẻ cuối tự trải full, không để 3 trên 1 dưới */
.tc-blocks__grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 20px; align-items: stretch;
}
.tc-blocks__grid[data-count="1"] { grid-template-columns: 1fr; }
.tc-blocks__grid .tc-card:last-child:nth-child(odd):not(:only-child) { grid-column: 1 / -1; }
.tc-card {
    position: relative; overflow: hidden;
    background: #fff; border: 1px solid rgba(31, 52, 81, .1); border-radius: 16px;
    padding: 28px 26px 24px; box-shadow: 0 10px 26px rgba(31, 52, 81, .06);
    transition: transform .25s ease, box-shadow .25s ease;
}
/* Thanh màu nhấn trên đầu mỗi card — mỗi khối một màu */
.tc-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--c-navy); }
.tc-card:nth-child(2)::before { background: #1e9e50; }
.tc-card:nth-child(3)::before { background: #d9a406; }
.tc-card--achieve::before { background: var(--c-grad) !important; }
.tc-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(31, 52, 81, .11); }
.tc-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.tc-card__ic {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
    display: grid; place-items: center; background: var(--c-navy);
    transition: transform .25s ease;
}
.tc-card:hover .tc-card__ic { transform: scale(1.1) rotate(-6deg); }
.tc-card:nth-child(2) .tc-card__ic { background: #1e9e50; }
.tc-card:nth-child(3) .tc-card__ic { background: #d9a406; }
.tc-card__ic i { font-size: 17px; color: #fff !important; }
.tc-card__head h2 {
    font-family: var(--tc-serif); font-size: 21px; font-weight: 700;
    color: var(--c-navy); margin: 0;
}
.tc-card__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tc-card__list li {
    position: relative; padding-left: 22px;
    font-size: 15px; line-height: 1.65; color: var(--tc-body);
}
.tc-card__list li::before {
    content: ""; position: absolute; left: 4px; top: .62em;
    width: 7px; height: 7px; border-radius: 50%; background: var(--c-red);
}
/* Thành tích: bullet sao vàng */
.tc-card--achieve .tc-card__ic { background: var(--c-grad); }
.tc-card--achieve .tc-card__list li { padding-left: 26px; }
.tc-card--achieve .tc-card__list li::before {
    content: "★"; width: auto; height: auto; border-radius: 0; background: none;
    color: #d9a406; font-size: 13px; left: 2px; top: .18em;
}

/* ── 3) KHOÁ HỌC ─────────────────────────────────────────── */
.tc-courses__grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px;
}
.tc-course {
    display: grid; text-decoration: none; height: 100%;
    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;
}
.tc-course:hover { transform: translateY(-5px); box-shadow: 0 18px 38px rgba(31, 52, 81, .14); border-color: var(--c-red); }
.tc-course__thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--c-navy-06); }
.tc-course__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tc-course:hover .tc-course__thumb img { transform: scale(1.05); }
.tc-course__noimg { display: grid; place-items: center; height: 100%; color: var(--c-navy); font-size: 30px; opacity: .4; }
.tc-course__body { display: grid; gap: 8px; padding: 16px 18px 18px; }
.tc-course__body b { font-size: 15.5px; line-height: 1.45; color: var(--c-navy); }
.tc-course__price { display: flex; align-items: baseline; gap: 10px; }
.tc-course__price em { font-style: normal; font-weight: 800; font-size: 17px; color: var(--c-red-dark); }
.tc-course__price s { font-size: 13.5px; color: #9aa3b2; }

/* Fallback strip khi chưa gán khóa học */
.tc-courses-strip { padding: 40px 0 8px; }
.tc-strip {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
    background: #fff; border: 1px solid var(--c-navy-12); border-left: 5px solid var(--c-red);
    border-radius: 14px; padding: 20px 24px; box-shadow: 0 10px 24px rgba(31, 52, 81, .06);
}
.tc-strip p { margin: 0; font-size: 15px; color: var(--tc-body); line-height: 1.6; max-width: 720px; }
.tc-strip p i { color: var(--c-red); margin-right: 8px; }
.tc-strip p b { color: var(--c-navy); }

/* ── 5) PREV / NEXT ──────────────────────────────────────── */
.tc-nav { padding: 34px 0 60px; } /* section cuối trang (CTA đã bỏ — footer có sẵn) */
.tc-nav__row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.tc-nav__link {
    display: inline-flex; align-items: center; gap: 12px; text-decoration: none;
    padding: 12px 16px; border-radius: 14px; border: 1px solid var(--c-navy-12);
    background: #fff; max-width: 100%;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.tc-nav__link:hover { border-color: var(--c-red); box-shadow: 0 10px 22px rgba(215, 38, 30, .12); transform: translateY(-2px); }
.tc-nav__link i { color: var(--c-red); font-size: 13px; }
.tc-nav__link span { display: grid; line-height: 1.3; min-width: 0; }
.tc-nav__link small { font-size: 12px; color: #8a8a8a; }
.tc-nav__link b { font-size: 14.5px; color: var(--c-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-nav__link--prev { justify-self: start; }
.tc-nav__link--next { justify-self: end; text-align: right; }
.tc-nav__all { justify-self: center; }

/* ── 6) CTA ──────────────────────────────────────────────── */
.tc-cta { padding: 30px 0 64px; }
.tc-cta__inner {
    display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center;
    background: linear-gradient(135deg, #16263d, var(--c-navy) 55%, #2a466e);
    border-radius: 20px; padding: 34px 40px; color: #fff;
    position: relative; overflow: hidden;
    box-shadow: 0 22px 46px rgba(31, 52, 81, .32);
}
.tc-cta__inner::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(420px 200px at 88% -10%, rgba(215, 38, 30, .35) 0, transparent 60%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 24px);
    pointer-events: none;
}
.tc-cta__inner > div { position: relative; }
.tc-cta__inner h2 { font-family: var(--tc-serif); font-size: clamp(20px, 2.3vw, 27px); color: #fff; margin: 0 0 8px; }
.tc-cta__inner p { font-size: 15px; color: rgba(255, 255, 255, .88); margin: 0; max-width: 620px; }
.tc-cta__actions { display: flex; flex-wrap: wrap; gap: 14px; position: relative; }

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

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1023px) {
    .tc-hero__grid, .tc-hero__grid--noquote { grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 30px; }
    .tc-quote { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 24px 26px 22px; }
    .tc-quote__mark { position: static; }
    .tc-quote__rule { grid-column: 2; }
    .tc-portrait { width: min(240px, 100%); }
    .tc-nav__row { grid-template-columns: 1fr 1fr; }
    .tc-nav__all { grid-column: 1 / -1; grid-row: 2; }
    .tc-cta__inner { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .tc-hero { padding: 20px 0 44px; }
    .tc-hero__grid, .tc-hero__grid--noquote { grid-template-columns: 1fr; gap: 26px; }
    .tc-hero__media { order: -1; }
    .tc-portrait { width: min(220px, 70vw); }
    .tc-name { max-width: none; }
    .tc-badges { display: grid; grid-auto-flow: row; gap: 14px; padding: 16px 18px; width: 100%; }
    .tc-badge__sep { width: auto; height: 1px; }
    .tc-badge__txt b { white-space: normal; }
    .tc-quote { grid-template-columns: 1fr; }
    .tc-blocks__grid { grid-template-columns: 1fr; }
    .tc-blocks__grid .tc-card:last-child:nth-child(odd):not(:only-child) { grid-column: auto; }
    .tc-nav__row { grid-template-columns: 1fr; }
    .tc-nav__link--prev, .tc-nav__link--next { justify-self: stretch; }
    .tc-nav__link--next { flex-direction: row-reverse; text-align: left; justify-content: space-between; }
    .tc-nav__all { grid-column: auto; grid-row: auto; justify-self: stretch; text-align: center; }
    .tc-cta__inner { padding: 26px 22px; }
    .tc-hero__pattern { opacity: .35; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE POLISH — audit PC/Tablet/Mobile (2026-08-03)
   PC 1440 + Tablet 768 đạt chuẩn sẵn; mobile nén hero 748→~660px
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 479px) {
    .tc-hero { padding: 16px 0 38px; }
    .tc-crumb { margin-bottom: 20px; }
    .tc-hero__grid, .tc-hero__grid--noquote { gap: 20px; }
    .tc-portrait { width: min(190px, 62vw); }
    .tc-name { margin-bottom: 10px; }
    .tc-rule { margin-bottom: 12px; }
    .tc-desc { font-size: 15px; margin-bottom: 16px; }
    .tc-badges { padding: 14px 16px; gap: 12px; }
    .tc-portrait__chip { font-size: 12.5px; padding: 7px 14px; }
}
