/* =============================================================================
   Trang chủ Portal DDCI - dùng biến màu trong giao-dien.css (--ddci-*).
   Tiền tố tc- (trang chủ) để không đụng CSS cũ của theme.
============================================================================= */

.home-body { background: #fff; }

/* ---------------------------------------------------------------- Thành phần dùng chung */
/* Đệm trên + dưới mỗi mục: hai mục liền nhau cách đúng 2 lần số này (trước 88px -> gần 180px trắng). */
.tc-muc { padding: 56px 0; }
.tc-tieu-de-nho {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--ddci-xanh);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tc-tieu-de-nho::before {
    content: "";
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--ddci-vang) 0 30%, var(--ddci-xanh) 30% 100%);
}
.tc-tieu-de {
    margin: 0 0 16px;
    color: var(--ddci-navy);
    font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.tc-doan { color: var(--ddci-chu-phu); font-size: 1.02rem; line-height: 1.8; margin-bottom: 26px; text-align: justify; }
.tc-dau-muc { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 36px; flex-wrap: wrap; }
.tc-dau-muc .tc-tieu-de { margin-bottom: 0; }
.tc-dau-muc--giua { justify-content: center; text-align: center; }
.tc-dau-muc--giua .tc-tieu-de-nho { justify-content: center; }

/* Chữ chuyển màu như chữ "DDCI ĐIỆN BIÊN" trên banner, nghiêng về tông xanh sáng:
   tiêu đề các mục và các con số thống kê. Khung chữ ôm sát chữ (fit-content / inline-block)
   để dải màu trải đúng trên chữ, không kéo dài cả hàng. */
.tc-tieu-de,
.tc-so strong {
    background: linear-gradient(118deg, #0b4fb3 0%, #1677e0 48%, #22a6f2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}
.tc-tieu-de { width: fit-content; max-width: 100%; padding-bottom: .04em; }
.tc-dau-muc--giua .tc-tieu-de { margin-left: auto; margin-right: auto; }
.tc-lien-ket { color: var(--ddci-xanh); font-weight: 700; text-decoration: none; white-space: nowrap; }
.tc-lien-ket i { font-style: normal; display: inline-block; transition: transform .2s; }
.tc-lien-ket:hover { color: var(--ddci-navy); }
.tc-lien-ket:hover i { transform: translateX(4px); }

.tc-nut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    font-size: .98rem;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.tc-nut:hover { transform: translateY(-2px); }
.tc-nut--vang { background: var(--ddci-vang); color: var(--ddci-navy); box-shadow: 0 10px 22px rgba(244, 180, 0, .32); }
.tc-nut--vang:hover { color: var(--ddci-navy); box-shadow: 0 14px 28px rgba(244, 180, 0, .4); }
.tc-nut--xanh { background: var(--ddci-dai); color: #fff; box-shadow: 0 10px 22px rgba(10, 95, 174, .28); }
.tc-nut--xanh:hover { color: #fff; }
.tc-nut--vien { border-color: #c9dbee; color: var(--ddci-navy); background: #fff; }
.tc-nut--vien:hover { border-color: var(--ddci-xanh); color: var(--ddci-xanh); }
.tc-nut--trong { border-color: rgba(255, 255, 255, .55); color: #fff; }
.tc-nut--trong:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------------------------------------------------------------- Thẻ nổi dưới slider */
/* Banner trang chủ có chữ sát mép dưới nên thẻ không chồng lên slider nữa. */
.tc-noi { position: relative; z-index: 3; margin-top: 32px; }
.tc-noi__the {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
    padding: 30px 36px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(6, 56, 111, .16);
    border: 1px solid #e6eef8;
    position: relative;
    overflow: hidden;
}
.tc-noi__the::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--ddci-dai); }
.tc-nhan {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--ddci-xanh-nhat);
    color: var(--ddci-xanh);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.tc-noi__gioi-thieu h1 { margin: 10px 0 8px; color: var(--ddci-navy); font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.tc-noi__gioi-thieu p { margin: 0; color: var(--ddci-chu-phu); line-height: 1.65; }
.tc-noi__dot { padding-left: 32px; border-left: 1px dashed #d6e3f1; }
.tc-trang-thai { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.tc-trang-thai .cham { width: 10px; height: 10px; border-radius: 50%; }
.tc-trang-thai.dang-mo { color: #15803d; }
.tc-trang-thai.dang-mo .cham { background: #22c55e; box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: tc-nhip 1.8s infinite; }
.tc-trang-thai.da-dong { color: #6b7280; }
.tc-trang-thai.da-dong .cham { background: #9ca3af; }
@keyframes tc-nhip { 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.tc-noi__ngay { margin-top: 6px; color: var(--ddci-chu); font-weight: 600; }
.tc-noi__con { margin-top: 2px; color: var(--ddci-chu-phu); font-size: .92rem; }
.tc-noi__con strong { color: var(--ddci-navy); font-size: 1.35rem; font-weight: 800; margin-right: 2px; }
.tc-noi__nut { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 250px; }
.tc-noi__goi-y { color: #6b7280; font-size: .8rem; line-height: 1.5; text-align: center; }

/* ---------------------------------------------------------------- Số liệu */
.tc-so-lieu { padding: 56px 0 8px; }
.tc-so-lieu__luoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.tc-so {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 22px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f7faff 0%, #eef5fd 100%);
    border: 1px solid #e3edf9;
}
.tc-so__icon { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--ddci-dai); color: #fff; box-shadow: 0 8px 18px rgba(10, 95, 174, .25); }
.tc-so__icon svg { width: 26px; height: 26px; }
.tc-so strong { display: inline-block; color: var(--ddci-navy); font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.tc-so span:not(.tc-so__icon) { display: block; margin-top: 4px; color: var(--ddci-chu-phu); font-size: .9rem; font-weight: 500; }

/* ---------------------------------------------------------------- Mục tiêu + lối vào */
.tc-gioi-thieu { padding-top: 48px; background: var(--ddci-nen); }
.tc-loi-vao { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tc-loi {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px 24px 22px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e6eef8;
    box-shadow: 0 6px 20px rgba(6, 56, 111, .06);
    text-decoration: none;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.tc-loi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--ddci-dai); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.tc-loi:nth-child(2), .tc-loi:nth-child(4) { transform: translateY(26px); }
.tc-loi:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(6, 56, 111, .14); border-color: #cfe0f4; }
.tc-loi:nth-child(2):hover, .tc-loi:nth-child(4):hover { transform: translateY(22px); }
.tc-loi:hover::after { transform: scaleX(1); }
.tc-loi__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 16px; background: var(--ddci-xanh-nhat); color: var(--ddci-xanh); transition: background .25s, color .25s; }
.tc-loi__icon svg { width: 28px; height: 28px; }
.tc-loi:hover .tc-loi__icon { background: var(--ddci-dai); color: #fff; }
.tc-loi h3 { margin: 0 0 8px; color: var(--ddci-navy); font-size: 1.15rem; font-weight: 700; }
.tc-loi p { flex: 1; margin: 0 0 14px; color: var(--ddci-chu-phu); font-size: .93rem; line-height: 1.6; }
.tc-loi__mui { color: var(--ddci-xanh); font-weight: 700; font-size: .9rem; }
.tc-loi__mui i { font-style: normal; display: inline-block; transition: transform .2s; }
.tc-loi:hover .tc-loi__mui i { transform: translateX(4px); }

/* ---------------------------------------------------------------- Xếp hạng nổi bật */
.tc-xep-hang { background: var(--ddci-nen); position: relative; overflow: hidden; }
.tc-xep-hang::before {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(17, 137, 216, .12), transparent 70%);
}
.tc-xep-hang__luoi { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.tc-bang { border-radius: 18px; background: #fff; box-shadow: var(--ddci-bong); border: 1px solid #e6eef8; overflow: hidden; }
.tc-bang__dau { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; background: var(--ddci-dai); color: #fff; }
.tc-bang__dau h3 { margin: 0; color: #fff; font-size: 1.08rem; font-weight: 700; }
.tc-bang__dau span { color: #fff; font-size: .8rem; }
.tc-bang__ds { margin: 0; padding: 8px 0; list-style: none; }
.tc-bang__ds li { display: flex; align-items: center; gap: 14px; padding: 12px 24px; }
.tc-bang__ds li + li { border-top: 1px solid #f0f4f9; }
.tc-hang { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-weight: 800; font-size: .92rem; background: #eef2f7; color: #475569; }
.tc-hang--1 { background: linear-gradient(135deg, #ffe680, #f4b400); color: #6b4a00; box-shadow: 0 4px 10px rgba(244, 180, 0, .35); }
.tc-hang--2 { background: linear-gradient(135deg, #f1f5f9, #b8c4d2); color: #334155; }
.tc-hang--3 { background: linear-gradient(135deg, #ffd9b8, #d98a4a); color: #6b3410; }
.tc-bang__ten { flex: 1; min-width: 0; }
.tc-bang__ten a { display: block; overflow: hidden; color: var(--ddci-chu); font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.tc-bang__ten a:hover { color: var(--ddci-xanh); }
.tc-thanh { display: block; height: 6px; margin-top: 7px; border-radius: 6px; background: #edf2f8; overflow: hidden; }
.tc-thanh span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--ddci-xanh), var(--ddci-xanh-sang)); }
.tc-bang__diem { flex: none; min-width: 52px; color: var(--ddci-navy); font-size: 1.05rem; font-weight: 800; text-align: right; }

/* ---------------------------------------------------------------- Quy trình */
.tc-buoc { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.tc-buoc::before { content: ""; position: absolute; top: 46px; left: 12.5%; right: 12.5%; border-top: 2px dashed #c9dbee; }
.tc-buoc li { position: relative; padding: 0 8px; text-align: center; }
.tc-buoc__icon { position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 20px; border-radius: 50%; background: #fff; border: 1px solid #e3edf9; box-shadow: 0 12px 28px rgba(6, 56, 111, .1); color: var(--ddci-xanh); }
.tc-buoc__icon svg { width: 36px; height: 36px; }
.tc-buoc__so { position: absolute; z-index: 1; top: -4px; left: calc(50% + 22px); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ddci-vang); color: var(--ddci-navy); font-weight: 800; font-size: .9rem; box-shadow: 0 4px 10px rgba(244, 180, 0, .35); }
.tc-buoc h3 { margin: 0 0 8px; color: var(--ddci-navy); font-size: 1.08rem; font-weight: 700; }
.tc-buoc p { margin: 0; color: var(--ddci-chu-phu); font-size: .93rem; line-height: 1.6; }
.tc-quy-trinh__nut { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 44px; }

/* ---------------------------------------------------------------- Bản tin */
.tc-ban-tin { background: var(--ddci-nen); }
.tc-ban-tin__luoi { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; }
.tc-tin { display: block; border-radius: 18px; background: #fff; overflow: hidden; text-decoration: none; box-shadow: 0 6px 20px rgba(6, 56, 111, .06); border: 1px solid #e6eef8; transition: transform .25s, box-shadow .25s; }
.tc-tin:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(6, 56, 111, .14); }
.tc-tin figure { margin: 0; background-size: cover; background-position: center; transition: transform .5s; }
.tc-tin:hover figure { transform: scale(1.04); }
.tc-tin__ngay { display: inline-flex; align-items: center; gap: 6px; color: var(--ddci-xanh); font-size: .8rem; font-weight: 700; }
.tc-tin__ngay::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ddci-vang); }
.tc-tin h3 { margin: 6px 0 0; color: var(--ddci-navy); font-weight: 700; line-height: 1.4; }
.tc-tin--lon { display: flex; flex-direction: column; }
.tc-tin--lon > figure { height: 300px; }
.tc-tin--lon .tc-tin__noi { position: relative; padding: 22px 26px 26px; background: #fff; }
.tc-tin--lon h3 { font-size: 1.3rem; }
.tc-tin--lon p { display: -webkit-box; margin: 10px 0 0; overflow: hidden; color: var(--ddci-chu-phu); line-height: 1.65; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tc-ban-tin__phu { display: grid; gap: 16px; align-content: start; }
.tc-tin--nho { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.tc-tin--nho > figure { min-height: 116px; }
.tc-tin--nho .tc-tin__noi { position: relative; padding: 16px 18px; background: #fff; }
.tc-tin--nho h3 { display: -webkit-box; overflow: hidden; font-size: 1rem; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* ---------------------------------------------------------------- Hỏi đáp */
.tc-hoi-dap__anh { position: relative; padding: 18px; }
.tc-hoi-dap__anh::before { content: ""; position: absolute; inset: 0 40px 40px 0; border-radius: 28px; background: var(--ddci-dai); opacity: .1; }
.tc-hoi-dap__anh img { position: relative; display: block; width: 100%; border-radius: 24px; box-shadow: 0 24px 50px rgba(6, 56, 111, .18); }

/* ---------------------------------------------------------------- Tài liệu */
.tc-tai-lieu { padding-top: 24px; }
.tc-tai-lieu__luoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.tc-tl { display: flex; gap: 16px; padding: 22px; border-radius: 16px; border: 1px solid #e6eef8; background: #fff; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.tc-tl:hover { border-color: #cfe0f4; box-shadow: 0 14px 32px rgba(6, 56, 111, .1); transform: translateY(-2px); }
.tc-tl__icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--ddci-xanh-nhat); color: var(--ddci-xanh); }
.tc-tl__icon svg { width: 24px; height: 24px; }
.tc-tl h3 { margin: 2px 0 6px; color: var(--ddci-navy); font-size: 1.02rem; font-weight: 700; }
.tc-tl p { margin: 0; color: var(--ddci-chu-phu); font-size: .88rem; line-height: 1.55; }

/* ---------------------------------------------------------------- Dải kêu gọi */
.tc-keu-goi { padding: 0 0 56px; }
.tc-keu-goi__noi {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 44px 48px;
    border-radius: 24px;
    background: var(--ddci-dai);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(6, 56, 111, .25);
}
.tc-keu-goi__noi::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.3px); background-size: 20px 20px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); }
.tc-keu-goi__noi::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(255, 213, 74, .14); }
.tc-keu-goi__noi > * { position: relative; z-index: 1; }
.tc-keu-goi h2 { margin: 0 0 8px; color: #fff; font-size: clamp(1.35rem, 1rem + 1vw, 1.8rem); font-weight: 800; }
.tc-keu-goi p { margin: 0; max-width: 620px; color: #fff; line-height: 1.65; }
.tc-keu-goi__nut { display: flex; flex-wrap: wrap; gap: 12px; flex: none; }

/* ---------------------------------------------------------------- Màn hình nhỏ */
@media (max-width: 1199px) {
    .tc-noi__the { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .tc-noi__nut { grid-column: 1 / -1; flex-direction: row; align-items: center; max-width: none; }
    .tc-noi__goi-y { text-align: left; }
}
@media (max-width: 991px) {
    .tc-muc { padding: 44px 0; }
    .tc-loi:nth-child(2), .tc-loi:nth-child(4), .tc-loi:nth-child(2):hover, .tc-loi:nth-child(4):hover { transform: none; }
    .tc-buoc { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
    .tc-buoc::before { display: none; }
    .tc-ban-tin__luoi { grid-template-columns: minmax(0, 1fr); }
    .tc-keu-goi__noi { flex-direction: column; align-items: flex-start; padding: 36px 30px; }
}
@media (max-width: 767px) {
    .tc-noi { margin-top: 16px; }
    .tc-noi__the { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 20px 22px 26px; border-radius: 16px; }
    .tc-noi__dot { padding-left: 0; padding-top: 16px; border-left: 0; border-top: 1px dashed #d6e3f1; }
    .tc-noi__nut { flex-direction: column; align-items: stretch; }
    .tc-noi__goi-y { text-align: center; }
    .tc-so-lieu { padding-top: 32px; }
    .tc-so-lieu__luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tc-so { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
    .tc-so__icon { width: 42px; height: 42px; border-radius: 12px; }
    .tc-so__icon svg { width: 22px; height: 22px; }
    .tc-so strong { font-size: 1.55rem; }
    .tc-muc { padding: 36px 0; }
    .tc-loi-vao { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .tc-loi { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; padding: 18px; }
    .tc-loi__icon { width: 48px; height: 48px; margin: 0; }
    .tc-loi h3 { flex: 1; margin: 0; }
    .tc-loi p { flex-basis: 100%; margin: 10px 0 8px; }
    .tc-xep-hang__luoi { grid-template-columns: minmax(0, 1fr); }
    .tc-bang__ds li { padding: 11px 16px; gap: 12px; }
    .tc-buoc { grid-template-columns: minmax(0, 1fr); }
    .tc-buoc li { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; text-align: left; padding: 0; }
    .tc-buoc__icon { grid-row: span 2; width: 64px; height: 64px; margin: 0; }
    .tc-buoc__icon svg { width: 26px; height: 26px; }
    .tc-buoc__so { top: -6px; left: 42px; width: 26px; height: 26px; font-size: .8rem; }
    .tc-tin--lon > figure { height: 210px; }
    .tc-tin--nho { grid-template-columns: 112px minmax(0, 1fr); }
    .tc-hoi-dap__anh { display: none; }
    .tc-keu-goi { padding-bottom: 56px; }
    .tc-keu-goi__nut, .tc-keu-goi__nut .tc-nut { width: 100%; }
}

