/* Header + Footer dùng chung cho web tuyển dụng - bám mockup PROTOTYPE (#254851) */
:root {
    --td-orange: #F7941D;
    --td-blue: #0256B3;
    --td-blue-dark: #034EA2;
    --td-blue-200: #A6C4E4;
}

/* Tự chủ box-sizing: 2 trang Liên hệ / Chính sách nhân sự không nạp bootstrap reset */
.td-header,
.td-header *,
.td-header *::before,
.td-header *::after,
.td-footer,
.td-footer *,
.td-footer *::before,
.td-footer *::after {
    box-sizing: border-box;
}

/* ------------------------------ HEADER ------------------------------ */
.td-header {
    position: sticky;
    top: 0;
    z-index: 1035;
    background: #fff;
    /* Mockup không có đường kẻ, nhưng các trang nền trắng (Quy trình / Liên hệ /
       Nộp hồ sơ) sẽ dính liền vào menu nếu thiếu -> thêm viền phân tách */
    border-bottom: 1px solid #E3EAF4;
}

.td-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.td-header__logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

    .td-header__logo img {
        display: block;
        height: 42px;
        width: auto;
    }

.td-header__nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 42px;
}

.td-header__link {
    color: var(--td-blue);
    font-size: 20px;
    font-weight: 700;
    line-height: 140%;
    white-space: nowrap;
    text-decoration: none;
}

    .td-header__link:hover,
    .td-header__link:focus,
    .td-header__link.is-active {
        color: var(--td-orange);
        text-decoration: none;
    }

.td-header__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border-radius: 10px;
    background: linear-gradient(180deg, #302CEF 0%, #2031A7 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 140%;
    white-space: nowrap;
    text-decoration: none;
}

    .td-header__cta:hover,
    .td-header__cta:focus {
        color: #fff;
        text-decoration: none;
        filter: brightness(1.08);
    }

    /* Đang ở trang Nộp hồ sơ (/ung-tuyen) */
    .td-header__cta.is-active {
        box-shadow: 0 0 0 3px rgba(247, 148, 29, .55);
    }

    .td-header__cta svg {
        flex: 0 0 auto;
    }

.td-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--td-blue);
}

.td-header__backdrop {
    display: none;
}

/* Tablet: thu gọn khoảng cách menu để đủ 1 hàng */
@media (max-width: 1199.98px) {
    .td-header__nav {
        gap: 24px;
    }

    .td-header__link {
        font-size: 18px;
    }
}

/* 992–1099: 18px không đủ chỗ cho nút "Nộp hồ sơ" */
@media (max-width: 1099.98px) {
    .td-header__link {
        font-size: 16px;
    }
}

/* Mobile / tablet dọc: menu thu vào drawer */
@media (max-width: 991.98px) {
    .td-header__inner {
        height: 72px;
        gap: 12px;
        padding: 0 16px;
    }

        .td-header__inner .td-header__logo img {
            height: 34px;
        }

    .td-header__toggle {
        display: inline-flex;
        order: 3;
    }

    .td-header__cta {
        margin-left: auto;
        height: 40px;
        padding: 0 14px;
        font-size: 14px;
    }

    .td-header__nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
        background: #fff;
        box-shadow: 0 12px 24px rgba(2, 86, 179, .15);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .15s ease, transform .15s ease, visibility .15s;
    }

    .td-header.is-open .td-header__nav {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .td-header__link {
        padding: 14px 16px;
        font-size: 20px;
        border-bottom: 1px solid #EEF2F7;
    }

        .td-header__link:last-child {
            border-bottom: 0;
        }

    .td-header.is-open .td-header__backdrop {
        display: block;
        position: fixed;
        inset: 72px 0 0 0;
        background: rgba(15, 23, 42, .35);
        z-index: -1;
    }
}

@media (max-width: 374.98px) {
    .td-header__cta span {
        display: none;
    }

    .td-header__cta {
        padding: 0 12px;
    }
}

/* Link "Nộp hồ sơ" trong menu: chỉ dùng trên mobile (ẩn nút CTA ở header) */
.td-header__link--nophs {
    display: none;
}

/* Nút menu (tablet + mobile): ô xanh nhạt bo góc (Figma) */
@media (max-width: 991.98px) {
    .td-header__toggle {
        background: #E3ECFA;
        color: #0B4BB3;
    }
}

/* Mobile theo Figma "Trang chủ Mobile": header cao 56, chỉ logo + nút menu */
@media (max-width: 767.98px) {
    .td-header__inner {
        height: 56px;
    }

    .td-header__toggle {
        margin-left: auto;
    }

    .td-header__cta {
        display: none;
    }

    .td-header__nav {
        top: 56px;
    }

    .td-header.is-open .td-header__backdrop {
        inset: 56px 0 0 0;
    }

    /* Figma Menu mobile (447:14395): "Nộp hồ sơ" là nút – nền gradient #1D329A→#312CF4, cao 45, bo 10, padding 10,
       icon 21×22 + chữ 20 SemiBold trắng; rộng theo chữ, canh trái như các mục menu */
    .td-header__nav .td-header__link.td-header__link--nophs {
        display: inline-flex;
        align-self: flex-start;
        align-items: center;
        gap: 10px;
        width: auto;
        height: 45px;
        margin: 12px 16px 16px; /* lề trái 16 = lề chữ của các mục menu (.td-header__link padding 14px 16px) → thẳng hàng */
        padding: 10px;
        border: 0;
        border-radius: 10px;
        background: linear-gradient(0deg, #1D329A 0%, #312CF4 100%);
        color: #fff;
        font-size: 20px;
        font-weight: 600;
        line-height: normal;
    }

        .td-header__nav .td-header__link.td-header__link--nophs::before {
            content: "";
            flex: 0 0 21px;
            width: 21px;
            height: 22px;
            background: currentColor;
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M14 3H7.5A2.5 2.5 0 0 0 5 5.5v13A2.5 2.5 0 0 0 7.5 21h6.7c.4 0 .8-.16 1.06-.44l3.3-3.3c.28-.28.44-.66.44-1.06V5.5A2.5 2.5 0 0 0 16.5 3H14Z' stroke-linejoin='round'/%3E%3Cpath d='M14.5 20.7v-3.2a1 1 0 0 1 1-1h3.2' stroke-linejoin='round'/%3E%3Cpath d='M8.7 8h6.6M8.7 11.3h6.6M8.7 14.6h3.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Cpath d='M14 3H7.5A2.5 2.5 0 0 0 5 5.5v13A2.5 2.5 0 0 0 7.5 21h6.7c.4 0 .8-.16 1.06-.44l3.3-3.3c.28-.28.44-.66.44-1.06V5.5A2.5 2.5 0 0 0 16.5 3H14Z' stroke-linejoin='round'/%3E%3Cpath d='M14.5 20.7v-3.2a1 1 0 0 1 1-1h3.2' stroke-linejoin='round'/%3E%3Cpath d='M8.7 8h6.6M8.7 11.3h6.6M8.7 14.6h3.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
        }

        .td-header__nav .td-header__link.td-header__link--nophs:hover,
        .td-header__nav .td-header__link.td-header__link--nophs:focus,
        .td-header__nav .td-header__link.td-header__link--nophs.is-active {
            color: #fff;
            text-decoration: none;
            filter: brightness(1.08);
        }
}

/* ------------------------------ FOOTER ------------------------------ */
.td-footer {
    background: linear-gradient(180deg, #0256B3 0%, #034EA2 100%);
    color: #fff;
}

.td-footer__inner {
    max-width: 1308px;
    margin: 0 auto;
    padding: 40px 24px 48px;
}

.td-footer a {
    color: inherit;
    text-decoration: none;
}

    .td-footer a:hover {
        text-decoration: underline;
    }

/* --- hàng đầu: logo + slogan | liên hệ --- */
.td-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}

.td-footer__brand {
    display: flex;
    gap: 20px;
}

.td-footer__brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

    .td-footer__brand-col img {
        display: block;
        height: 38px;
        width: auto;
    }

.td-footer__est {
    font-size: 12px;
    font-weight: 700;
    line-height: 140%;
}

.td-footer__slogan-1 {
    font-size: 12px;
    font-weight: 700;
    line-height: 140%;
    letter-spacing: .2px;
}

.td-footer__slogan-2 {
    font-size: 15px;
    font-weight: 700;
    line-height: 140%;
}

.td-footer__note {
    font-size: 12px;
    line-height: 140%;
    color: var(--td-blue-200);
}

.td-footer__contact {
    text-align: center;
}

.td-footer__contact-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 28px;
    margin-bottom: 8px;
}

.td-footer__contact-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--td-orange);
    font-size: 17px;
    font-weight: 700;
    line-height: 140%;
}

    .td-footer__contact-item:hover {
        color: var(--td-orange);
    }

.td-footer__open-hours {
    font-size: 15px;
    font-weight: 700;
    line-height: 140%;
}

.td-footer__open-note {
    font-size: 12px;
    line-height: 140%;
    color: var(--td-blue-200);
}

/* --- 3 miền --- */
.td-footer__regions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 56px;
    margin-top: 40px;
}

.td-footer__region-title {
    color: var(--td-orange);
    font-size: 26px;
    font-weight: 700;
    line-height: 130%;
    margin: 0 0 14px;
}

.td-footer__provinces {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .td-footer__provinces li {
        position: relative;
        padding-left: 18px;
        margin-bottom: 16px;
        font-size: 16px;
        line-height: 22px;
    }

        .td-footer__provinces li::before {
            content: "";
            position: absolute;
            left: 4px;
            top: 9px;
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: #fff;
        }

/* --- khối cuối: chính sách + thông tin công ty + QR --- */
.td-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-top: 24px;
}

.td-footer__policies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 140%;
}

.td-footer__company {
    font-size: 16px;
    line-height: 150%;
}

.td-footer__company-name {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
}

.td-footer__qr {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

    .td-footer__qr img {
        display: block;
        width: 122px;
        height: 122px;
        border-radius: 10px;
    }

.td-footer__qr-text {
    color: var(--td-orange);
    font-size: 17px;
    font-weight: 700;
    line-height: 135%;
    text-transform: uppercase;
}

/* --- responsive footer --- */
@media (max-width: 1199.98px) {
    .td-footer__regions {
        gap: 32px;
    }

    .td-footer__region-title {
        font-size: 22px;
    }
}

@media (max-width: 991.98px) {
    .td-footer__top {
        flex-direction: column;
        gap: 24px;
    }

    .td-footer__contact {
        text-align: left;
    }

    .td-footer__contact-row {
        justify-content: flex-start;
        gap: 20px;
    }

    .td-footer__regions {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-top: 32px;
    }

    .td-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }
}

@media (max-width: 575.98px) {
    .td-footer__inner {
        padding: 32px 16px 40px;
    }

    .td-footer__brand {
        flex-direction: column;
        gap: 12px;
    }

    .td-footer__contact-item {
        font-size: 15px;
    }

    .td-footer__region-title {
        font-size: 20px;
    }

    .td-footer__provinces li {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .td-footer__company {
        font-size: 14px;
    }

    .td-footer__company-name {
        font-size: 16px;
    }

    .td-footer__qr img {
        width: 96px;
        height: 96px;
    }

    .td-footer__qr-text {
        font-size: 15px;
    }
}

/* ===== Hero banner + dải Fanpage dùng chung (trang chủ, việc làm...) ===== */
.hero-banner {
    position: relative;
    width: 100%;
    line-height: 0;
}

    .hero-banner__img {
        display: block;
        width: 100%;
        height: auto;
    }

.hero-banner__cta {
    position: absolute;
    left: 60.7%;
    top: 79.3%;
    width: 23.1%;
    height: 13%;
    border-radius: 999px;
    z-index: 2;
}

.fb-link {
    width: 100%;
    height: 70px;
    background: #1e1b8c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

    .fb-link img {
        width: 40px;
        height: 40px;
    }

    .fb-link a {
        color: #fff;
        text-decoration: none;
    }

        .fb-link a:hover {
            text-decoration: underline;
            cursor: pointer;
        }

.fb-text {
    font-size: 30px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .fb-link {
        height: 50px;
    }

        .fb-link img {
            width: 30px;
            height: 30px;
        }

    .fb-text {
        font-size: 20px;
    }
}

@media (max-width: 500px) {
    .fb-link {
        height: 40px;
    }

    .fb-text {
        font-size: 16px;
    }
}

@media (max-width: 344px) {
    .fb-link {
        height: 34px;
    }

    .fb-text {
        font-size: 14px;
    }

        .fb-link img {
            width: 25px;
            height: 25px;
        }
}

/* ============ Trạng thái tương tác dùng chung (hover/active/focus) ============ */
:root {
    --td-focus: 0 0 0 3px rgba(2, 86, 179, .25);
    --td-ease: .16s ease;
}

/* Header nav: gạch chân trượt khi hover + focus rõ */
.td-header__link {
    transition: color var(--td-ease);
}

.td-header__cta {
    transition: filter var(--td-ease), transform var(--td-ease), box-shadow var(--td-ease);
}

    .td-header__cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(48, 44, 239, .35);
    }

    .td-header__cta:active {
        transform: translateY(0);
        filter: brightness(.95);
    }

    /* Bấm chuột vào menu không hiện viền focus mặc định (Bootstrap 4/AdminLTE: button:focus outline);
       điều hướng bằng bàn phím vẫn có viền :focus-visible bên dưới */
    .td-header a:focus:not(:focus-visible),
    .td-header button:focus:not(:focus-visible) {
        outline: none;
    }

    .td-header__link:focus-visible,
    .td-header__cta:focus-visible,
    .td-header__toggle:focus-visible {
        outline: none;
        box-shadow: var(--td-focus);
        border-radius: 6px;
    }

/* Footer: link tỉnh/chính sách hover đổi màu cam nhẹ */
.td-footer a,
.td-footer__provinces li {
    transition: color var(--td-ease);
}

    .td-footer a:hover {
        color: var(--td-orange);
        text-decoration: none;
    }

/* Dải fanpage: link focus rõ */
.fb-link a:focus-visible {
    outline: none;
    box-shadow: var(--td-focus);
    border-radius: 4px;
}

/* Hero CTA: đổ bóng nhẹ khi hover/ focus để biết bấm được */
.hero-banner__cta {
    transition: box-shadow var(--td-ease);
}

    .hero-banner__cta:hover {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, .55), 0 8px 20px rgba(214, 40, 40, .4);
    }

    .hero-banner__cta:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px #fff;
    }

/* Footer – danh sách tỉnh: tên luôn trên 1 dòng (34 tỉnh mới có tiền tố "Thành phố"/"Tỉnh", vd "Thành phố Hồ Chí Minh") */
.td-footer__provinces li {
    white-space: nowrap;
}

/* Máy tính ≥1280: 2 cột tên mỗi miền, cột rộng theo tên dài nhất, 3 miền dàn đều (1200–1279 không đủ chỗ → 1 cột bên dưới) */
@media (min-width: 1280px) {
    .td-footer__regions {
        grid-template-columns: repeat(3, max-content);
        justify-content: space-between;
        gap: 32px;
    }

    .td-footer__provinces {
        grid-template-columns: repeat(2, max-content);
        column-gap: 28px;
    }
}

/* 992–1279: không đủ chỗ 2 cột → 1 cột mỗi miền (footer cao hơn) */
@media (min-width: 992px) and (max-width: 1279.98px) {
    .td-footer__provinces {
        grid-template-columns: 1fr;
    }
}

/* Điện thoại nhỏ: 1 cột */
@media (max-width: 575.98px) {
    .td-footer__provinces {
        grid-template-columns: 1fr;
    }
}

/* Tên miền là nút (mở/thu trên tablet/mobile): bỏ kiểu nút mặc định; máy tính không có mũi tên, luôn mở */
.td-footer__region-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: default;
}

.td-footer__chevron {
    display: none;
    flex: 0 0 auto;
    transition: transform .2s ease;
}

/* Tablet/mobile: mỗi miền thu gọn mặc định, mũi tên mở/thu; danh sách tỉnh 3 cột */
@media (max-width: 991.98px) {
    .td-footer__regions {
        gap: 0;
    }

    .td-footer__region {
        border-bottom: 1px solid rgba(255, 255, 255, .2);
    }

    .td-footer__region-title {
        margin: 0;
        padding: 14px 0;
        cursor: pointer;
    }

    .td-footer__chevron {
        display: block;
    }

    .td-footer__region.is-open .td-footer__chevron {
        transform: rotate(180deg);
    }

    .td-footer__region .td-footer__provinces {
        display: none;
    }

    .td-footer__region.is-open .td-footer__provinces {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 12px;
        padding-bottom: 8px;
    }

        .td-footer__region .td-footer__provinces li {
            white-space: normal;
        }
}
