/* ============================================================
   TRANG CHỦ V2 — theo mockup khách duyệt 2026-08-04
   Palette: đỏ #D7261E/#B01116, vàng #FFD34D, navy #1F3451
   Prefix .hv-* — không ảnh hưởng header/footer/trang khác
   ============================================================ */

.hv {
    --hv-red: #D7261E;
    --hv-red-dark: #B01116;
    --hv-grad: linear-gradient(135deg, #D7261E 0%, #A50D12 100%);
    --hv-gold: #FFD34D;
    --hv-navy: #1F3451;
    --hv-body: #4A4A4A;
    --hv-line: rgba(31, 52, 81, .12);
    --hv-tint: #FFF6F4;
}
.hv-container { max-width: 1320px; margin-inline: auto; padding-inline: 16px; }
.hv-sec { padding: 34px 0; }
.hv-sec--tint { background: var(--hv-tint); }

/* ── Tiêu đề section ── */
.hv-head { text-align: center; margin-bottom: 26px; }
.hv-head--row { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; }
.hv-h2 {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: clamp(20px, 2.2vw, 26px); font-weight: 800;
    color: var(--hv-red-dark); text-transform: uppercase; letter-spacing: .3px;
    margin: 0;
}
.hv-h2 i { font-size: 22px; }
.hv-h2 img { width: 34px; height: 34px; object-fit: contain; }
.hv-lead { font-size: 15px; color: var(--hv-body); margin: 8px 0 0; }
.hv-pill {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 18px; border-radius: 999px;
    border: 1.5px solid var(--hv-red); color: var(--hv-red-dark);
    font-size: 13.5px; font-weight: 700; text-transform: uppercase; text-decoration: none;
    transition: background .2s, color .2s, transform .2s;
}
.hv-pill:hover { background: var(--hv-red); color: #fff; transform: translateY(-1px); }

/* ── 1) HERO SLIDER ── */
.hv-hero { padding: 20px 0 0; }
.hv-slider { position: relative; border-radius: 24px; overflow: hidden; box-shadow: 0 18px 44px rgba(176, 17, 22, .18); }
/* 12/08: khách yêu cầu banner chính nhỏ hơn 1 cỡ (~8%), vẫn căn giữa cân đối */
@media (min-width: 1024px) {
    .hv-slider { max-width: 1150px; margin-inline: auto; }
}
.hv-slider__track { position: relative; }
.hv-slide { display: none; }
.hv-slide.is-on { display: block; }
.hv-slide img { width: 100%; height: auto; display: block; }
.hv-hero__cta {
    position: absolute; left: 5.6%; bottom: 12%;
    display: inline-flex; align-items: center; gap: 10px;
    background: #fff; color: var(--hv-red-dark);
    font-size: clamp(12px, 1.15vw, 16px); font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
    padding: .8em 1.7em; border-radius: 999px; text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
    transition: transform .2s ease, box-shadow .2s ease;
}
.hv-hero__cta:hover { transform: translateY(-2px); color: var(--hv-red-dark); box-shadow: 0 12px 28px rgba(0, 0, 0, .3); }
.hv-hero__cta i { font-size: .8em; }
.hv-slider__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .92); color: var(--hv-red-dark); font-size: 14px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
    transition: background .2s, transform .2s;
    z-index: 2;
}
.hv-slider__nav:hover { background: #fff; transform: translateY(-50%) scale(1.07); }
.hv-slider__nav--prev { left: 14px; }
.hv-slider__nav--next { right: 14px; }
.hv-slider__dots {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.hv-dot {
    width: 10px; height: 10px; border-radius: 999px; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, .55); padding: 0;
    transition: width .25s ease, background .25s ease;
}
.hv-dot.is-on { width: 26px; background: #fff; }

/* ── 2) ĐẾM NGƯỢC ── */
/* 08/08: khung đếm ngược PHÓNG TO cho nổi bật (doc mục A1) */
.hv-count { padding: 22px 0 8px; }
.hv-count__bar {
    display: grid; grid-template-columns: 1.2fr auto 1fr; align-items: center; gap: 26px;
    background: var(--hv-grad); border-radius: 24px; padding: 28px 38px; color: #fff;
    box-shadow: 0 20px 46px rgba(176, 17, 22, .32);
}
.hv-count__title { display: flex; align-items: center; gap: 16px; }
.hv-count__title img { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.hv-count__title div { display: grid; gap: 3px; }
.hv-count__title span { font-weight: 800; text-transform: uppercase; font-size: 20px; letter-spacing: .5px; line-height: 1.35; }
.hv-count__timer { display: flex; gap: 14px; }
.hv-count__box {
    display: grid; justify-items: center; gap: 0;
    background: #fff; border-radius: 14px; padding: 11px 0 9px; min-width: 92px;
    box-shadow: inset 0 -4px 0 rgba(176, 17, 22, .18);
}
.hv-count__box b { font-size: 38px; line-height: 1.1; color: var(--hv-red-dark); font-weight: 800; font-variant-numeric: tabular-nums; }
.hv-count__box small { font-size: 12.5px; font-weight: 700; letter-spacing: 1px; color: #8a5a58; text-transform: uppercase; }
.hv-count__date { justify-self: end; text-align: center; border-left: 1px solid rgba(255, 255, 255, .35); padding-left: 30px; display: grid; gap: 3px; }
.hv-count__date small { font-size: 14.5px; opacity: .92; }
.hv-count__date b { font-size: 30px; font-weight: 800; letter-spacing: .5px; }

/* ── 3) KHÓA HỌC ── */
.hv-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.hv-course {
    position: relative; display: block; min-height: 250px;
    border-radius: 18px; overflow: hidden; text-decoration: none;
    background-size: cover; background-position: center right;
    transition: transform .25s ease, box-shadow .25s ease;
}
.hv-course:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(31, 52, 81, .25); }
.hv-course--red { background-color: #8f0d12; }
.hv-course--navy { background-color: var(--hv-navy); }
.hv-course__veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 10, 14, .62) 24%, rgba(10, 10, 14, .12) 70%, transparent); }
.hv-course__body { position: relative; display: grid; gap: 8px; padding: 26px 28px; color: #fff; max-width: 78%; }
.hv-course__tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--hv-gold); }
.hv-course__tag i { font-size: 10px; }
.hv-course__label { font-size: clamp(20px, 2vw, 27px); font-weight: 800; text-transform: uppercase; line-height: 1.25; }
.hv-course__label span { color: var(--hv-gold); }
.hv-course__list ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 5px; }
.hv-course__list li { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.hv-course__list li i { color: var(--hv-gold); font-size: 13px; }
.hv-course__btn {
    justify-self: start; display: inline-flex; align-items: center; gap: 8px;
    margin-top: 10px; padding: 9px 20px; border-radius: 999px;
    background: #fff; color: var(--hv-red-dark);
    font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
    transition: gap .2s ease;
}
.hv-course:hover .hv-course__btn { gap: 13px; }
.hv-course__btn i { font-size: 10px; }

/* ── 4+5) ĐỘI NGŨ — card GV/TG dùng chung trong css/team-cards.css ── */
.hv-h2--team { font-size: 22px; letter-spacing: .6px; }
.hv-team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ── 6) VÌ SAO CHỌN ── */
.hv-why { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.hv-why__item { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 10px 18px; }
.hv-why__item + .hv-why__item { border-left: 1px dashed var(--hv-line); }
.hv-why__ic { width: 52px; height: 52px; display: grid; place-items: center; }
.hv-why__ic img, .hv-why__ic svg { width: 48px; height: 48px; object-fit: contain; }
.hv-why__txt { display: grid; gap: 4px; }
.hv-why__txt b { font-size: 14.5px; font-weight: 800; color: var(--hv-red-dark); text-transform: uppercase; letter-spacing: .3px; }
.hv-why__txt small { font-size: 13.5px; color: var(--hv-body); }

/* ── 7) TIN TỨC ── */
.hv-news { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hv-post {
    display: grid; background: #fff; border: 1px solid var(--hv-line); border-radius: 14px;
    overflow: hidden; text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.hv-post:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(31, 52, 81, .13); border-color: var(--hv-red); }
.hv-post__thumb { aspect-ratio: 16 / 9; overflow: hidden; background: #f4f5f8; }
.hv-post__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.hv-post:hover .hv-post__thumb img { transform: scale(1.05); }
.hv-post__noimg { display: grid; place-items: center; height: 100%; color: var(--hv-navy); font-size: 26px; opacity: .35; }
.hv-post__body { display: grid; gap: 7px; padding: 13px 15px 15px; }
.hv-post__body b { font-size: 14.5px; line-height: 1.45; color: #16233a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hv-post__body time { font-size: 12.5px; color: #8a93a5; }

/* ── 8) REVIEWS ── */
.hv-reviews-wrap { position: relative; padding: 0 6px; }
.hv-reviews {
    list-style: none; margin: 0; padding: 6px 2px 14px;
    display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3);
    gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.hv-reviews::-webkit-scrollbar { display: none; }
.hv-review {
    scroll-snap-align: start;
    background: #fff; border: 1px solid var(--hv-line); border-radius: 16px;
    padding: 18px 20px; box-shadow: 0 10px 24px rgba(31, 52, 81, .07);
}
.hv-review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hv-review__head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.hv-review__head > span:not(.hv-review__stars) { display: grid; gap: 1px; min-width: 0; }
.hv-review__head b { font-size: 15px; color: #16233a; }
.hv-review__head small { font-size: 12.5px; color: #8a93a5; }
.hv-review__stars { margin-left: auto; color: var(--hv-red); font-size: 11px; display: inline-flex; gap: 2px; flex: 0 0 auto; }
.hv-review p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--hv-body); font-style: italic; }
.hv-rv-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hv-line); cursor: pointer;
    display: grid; place-items: center; background: #fff; color: var(--hv-red-dark); font-size: 13px;
    box-shadow: 0 6px 16px rgba(31, 52, 81, .14); z-index: 2;
    transition: background .2s, color .2s;
}
.hv-rv-nav:hover { background: var(--hv-red); color: #fff; }
.hv-rv-nav--prev { left: -14px; }
.hv-rv-nav--next { right: -14px; }

/* ── 9) CỘNG ĐỒNG ── */
.hv-comm { padding: 10px 0 44px; }
.hv-comm__card {
    display: grid; grid-template-columns: 1.05fr .95fr; gap: 30px; align-items: center;
    background: var(--hv-grad); border-radius: 22px; padding: 34px 38px; color: #fff;
    position: relative; overflow: hidden;
    box-shadow: 0 22px 48px rgba(176, 17, 22, .3);
}
.hv-comm__card::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(480px 220px at 92% -12%, rgba(255, 255, 255, .14) 0, transparent 60%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 26px);
    pointer-events: none;
}
.hv-comm__copy { position: relative; display: grid; gap: 12px; justify-items: start; }
.hv-comm__chip {
    display: inline-flex; padding: 6px 16px; border-radius: 999px;
    background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
    font-size: 13px; font-weight: 700;
}
.hv-comm__copy h2 { font-size: clamp(21px, 2.3vw, 28px); font-weight: 800; margin: 0; color: #fff; }
.hv-comm__copy p { margin: 0; font-size: 14.5px; line-height: 1.7; color: rgba(255, 255, 255, .92); max-width: 480px; }
.hv-comm__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hv-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px; border-radius: 999px; text-decoration: none;
    font-size: 14px; font-weight: 700; transition: transform .2s, background .2s, color .2s;
}
.hv-btn--light { background: #fff; color: var(--hv-red-dark); }
.hv-btn--light:hover { transform: translateY(-2px); color: var(--hv-red-dark); }
.hv-btn--ghost { border: 1.5px solid rgba(255, 255, 255, .6); color: #fff; }
.hv-btn--ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; transform: translateY(-2px); }

.hv-comm__grid { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hv-social {
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px;
    background: #fff; border-radius: 14px; padding: 14px 16px; text-decoration: none;
    transition: transform .22s ease, box-shadow .22s ease;
}
.hv-social:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .22); }
.hv-social__ic {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    color: #fff; font-size: 18px;
}
.hv-social--facebook .hv-social__ic { background: #1877f2; }
.hv-social--group .hv-social__ic { background: #E8483F; }
.hv-social--tiktok .hv-social__ic { background: #16233a; }
.hv-social--zalo .hv-social__ic { background: #0068ff; }
.hv-social__zalo { font-size: 12px; font-weight: 800; letter-spacing: .3px; }
.hv-social__txt { display: grid; gap: 2px; min-width: 0; }
.hv-social__txt b { font-size: 14.5px; color: #16233a; }
.hv-social__txt small { font-size: 12px; color: #7c8598; line-height: 1.45; }

/* ── RESPONSIVE ── */
@media (max-width: 1023px) {
    .hv-count__bar { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; padding: 22px 20px; }
    .hv-count__date { justify-self: center; border-left: 0; padding-left: 0; }
    .hv-courses { grid-template-columns: 1fr; }
    .hv-team { grid-template-columns: repeat(2, 1fr); }
    .hv-why { grid-template-columns: repeat(2, 1fr); gap: 14px 0; }
    .hv-why__item:nth-child(3) { border-left: 0; }
    .hv-news { grid-template-columns: repeat(2, 1fr); }
    .hv-reviews { grid-auto-columns: calc((100% - 20px) / 2); }
    .hv-comm__card { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
    .hv-sec { padding: 26px 0; }
    .hv-hero { padding: 12px 0 0; }
    .hv-slider { border-radius: 16px; }
    .hv-slider__nav { width: 34px; height: 34px; font-size: 12px; }
    .hv-hero__cta { left: 50%; bottom: 9%; transform: translateX(-50%); white-space: nowrap; }
    .hv-hero__cta:hover { transform: translateX(-50%) translateY(-2px); }
    /* 08/08: khung đếm ngược vẫn nổi bật nhưng gọn hơn trên điện thoại */
    .hv-count__bar { padding: 20px 16px; gap: 16px; }
    /* 4 ô Ngày/Giờ/Phút/Giây nằm gọn 1 hàng (không xuống dòng làm khung cao) */
    .hv-count__timer { flex-wrap: nowrap; justify-content: center; gap: 8px; width: 100%; }
    .hv-count__box { min-width: 0; flex: 1 1 0; padding: 8px 0 7px; }
    .hv-count__box b { font-size: 28px; }
    .hv-count__box small { font-size: 11px; letter-spacing: .5px; }
    .hv-count__title img { width: 60px; height: 60px; }
    .hv-count__title span { font-size: 16px; }
    .hv-count__date b { font-size: 25px; }
    /* 6/08 mobile: đội ngũ 2 cột song song, ảnh thu nhỏ (doc mục I.2 + I.3) */
    .hv-team { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    /* 6/08 mobile: 4 mục USP vào ô riêng, lưới 2 hàng × 2 cột (doc mục I.4) */
    .hv-why { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .hv-why__item,
    .hv-why__item + .hv-why__item {
        background: #fff; border: 1px solid var(--hv-line); border-radius: 14px;
        padding: 14px 10px 13px; gap: 8px;
        box-shadow: 0 8px 20px rgba(31, 52, 81, .07);
    }
    .hv-why__ic { width: 44px; height: 44px; }
    .hv-why__ic img, .hv-why__ic svg { width: 40px; height: 40px; }
    .hv-why__txt b { font-size: 13px; }
    .hv-why__txt small { font-size: 12.5px; }
    /* 6/08 mobile: tin tức trượt ngang, tự chạy như banner (doc mục I.5) */
    .hv-news {
        grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%;
        gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
        scrollbar-width: none; padding-bottom: 8px;
    }
    .hv-news::-webkit-scrollbar { display: none; }
    .hv-post { scroll-snap-align: start; }
    /* 6/08 mobile: card cảm nhận to hơn — thêm ảnh + chữ rõ hơn (doc mục I.6) */
    .hv-reviews { grid-auto-columns: 94%; gap: 14px; }
    .hv-review { padding: 20px 18px; }
    .hv-review__head img { width: 62px; height: 62px; }
    .hv-review__head b { font-size: 16px; }
    .hv-review__head small { font-size: 13px; }
    .hv-review p { font-size: 15px; line-height: 1.7; }
    .hv-rv-nav--prev { left: -4px; }
    .hv-rv-nav--next { right: -4px; }
    .hv-comm__card { padding: 24px 18px; }
    .hv-comm__grid { grid-template-columns: 1fr; }
    .hv-head--row { flex-wrap: wrap; }
}

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

/* H1 SEO ẩn thị giác (screen-reader vẫn đọc) */
.hv-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}


/* ============================================================
   HIỆU ỨNG TRANG CHỦ (đi kèm js/home-fx.js)
   ============================================================ */
/* Reveal cuộn so le */
html.hv-anim .hvfx { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s cubic-bezier(.16, 1, .3, 1); }
html.hv-anim .hvfx.is-in { opacity: 1; transform: none; }

/* Gạch đỏ mọc dưới tiêu đề section khi hiện */
.hv-head .hv-h2 { position: relative; padding-bottom: 10px; }
.hv-head .hv-h2::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 64px;
    border-radius: 2px; background: var(--hv-grad);
}
html.hv-anim .hv-head.hvfx .hv-h2::after { transform: scaleX(0); transform-origin: left; transition: transform .7s .25s cubic-bezier(.16, 1, .3, 1); }
html.hv-anim .hv-head.hvfx.is-in .hv-h2::after { transform: scaleX(1); }
.hv-head--row .hv-h2 { padding-bottom: 10px; }

/* Ken Burns: banner active zoom chậm */
.hv-slide img { will-change: transform; }
.hv-slide.is-on img { animation: hvKB 7s ease-out forwards; }
@keyframes hvKB { from { transform: scale(1); } to { transform: scale(1.05); } }

/* Vệt sáng quét qua card đội ngũ khi hover */
.hv-cardimg { position: relative; }
.hv-cardimg::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -85%; width: 55%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg); pointer-events: none; transition: left .1s;
}
.hv-cardimg:hover::after { left: 135%; transition: left .7s ease; }

/* Nút CTA hero thở nhẹ */
.hv-hero__cta { animation: hvBreath 2.8s ease-in-out infinite; }
@keyframes hvBreath {
    0%, 100% { box-shadow: 0 6px 18px rgba(176, 17, 22, .35); }
    50%      { box-shadow: 0 8px 30px rgba(176, 17, 22, .6); }
}

/* Số countdown pop khi đổi giá trị */
.hv-count__box b { display: inline-block; }
.hv-count__box b.tick { animation: hvPop .45s ease; }
@keyframes hvPop { 30% { transform: scale(1.22); color: #FFD34D; } }

/* Icon card khóa học + social lắc nhẹ khi hover */
.hv-social:hover .hv-social__ic { animation: hvWiggle .5s ease; }
.hv-course:hover .hv-course__btn i { animation: hvWiggle .5s ease; }
@keyframes hvWiggle {
    25% { transform: rotate(-8deg) scale(1.12); }
    60% { transform: rotate(6deg); }
}

/* Ảnh tin tức phóng nhẹ khi hover */
.hv-news a:hover img { transform: scale(1.05); }
.hv-news img { transition: transform .35s ease; }

@media (prefers-reduced-motion: reduce) {
    .hv-slide.is-on img, .hv-hero__cta, .hv-count__box b.tick { animation: none !important; }
    html.hv-anim .hvfx { opacity: 1 !important; transform: none !important; }
}

/* ── "Xem thêm" đội ngũ: style dùng chung trong css/team-cards.css ── */
