/* ===== Biến giao diện: đổi màu, cỡ chữ ở đây ===== */
:root {
  --brand: #0B4E9F;                                         /* xanh logo, ghi đè từ trang quản trị */
  --brand-deep: color-mix(in srgb, var(--brand) 74%, #000);
  --brand-tint: color-mix(in srgb, var(--brand) 6%, #fff);
  --accent: #E0141D;                                        /* đỏ logo, dùng cho nút chính */
  --accent-deep: #BC0F17;
  --bg: #FFFFFF;
  --ink: #14213A;
  --muted: #56617A;
  --line: #DCE2EC;
  --danger: #B3261E;
  --radius: 10px;
  --wrap: 1140px;
  --header-h: 72px;
  --font: "Be Vietnam Pro", "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid #FFC83D; outline-offset: 2px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 6px; z-index: 30; }
.skip-link:focus { left: 8px; }

/* ===== Nút ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 8px;
  font: 600 16px/1.2 var(--font); text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.btn--small { min-height: 42px; padding: 0 18px; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-deep); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-deep); }
.btn[disabled] { opacity: .65; cursor: progress; }

/* ===== Đầu trang (màu xanh logo) ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--brand); color: #fff; }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }
.brand__logo { height: 42px; width: auto; display: block; }
.brand__sub { font-weight: 500; font-size: 15px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .4); }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav > a, .nav-item > a { font-size: 15px; font-weight: 500; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.site-nav > a:hover, .nav-item > a:hover { border-bottom-color: #fff; }
.nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-sub-toggle { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer; display: grid; place-items: center; }
.nav-sub-toggle svg { transition: transform .15s ease; }
.nav-item.is-open .nav-sub-toggle svg { transform: rotate(180deg); }
.nav-sub { display: none; position: absolute; top: 100%; left: -14px; z-index: 5; min-width: 280px; max-width: 360px; max-height: 70vh; overflow-y: auto; padding: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(11, 40, 90, .5); }
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }   /* giữ menu mở khi rê chuột từ mục xuống danh sách */
.nav-sub a { display: block; padding: 10px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; line-height: 1.35; text-decoration: none; color: var(--ink); }
.nav-sub a:hover, .nav-sub a:focus-visible { background: var(--brand-tint); color: var(--brand); }
.nav-item.is-open .nav-sub { display: block; }
@media (hover: hover) and (min-width: 1201px) {
  .nav-item--menu:hover .nav-sub, .nav-item--menu:focus-within .nav-sub { display: block; }
  .nav-item--menu:hover .nav-sub-toggle svg { transform: rotate(180deg); }
}
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; align-items: center; justify-content: center; }

/* ===== Banner (ảnh thay trong trang quản trị) ===== */
.banner { position: relative; background: var(--brand-deep); }
.banner--empty { min-height: 120px; }
.banner__viewport { position: relative; overflow: hidden; aspect-ratio: 8 / 3; max-height: 620px; width: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity .6s ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide--caption::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--brand-deep) 88%, transparent) 0%, color-mix(in srgb, var(--brand-deep) 55%, transparent) 42%, transparent 72%); }
.slide__caption { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; color: #fff; padding-bottom: 48px; }
.slide__title { font-size: clamp(22px, 4.2vw, 52px); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; max-width: 17ch; }
.slide__text { margin-top: 12px; font-size: clamp(15px, 1.6vw, 20px); max-width: 44ch; }
.banner__arrow { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--brand); cursor: pointer; display: grid; place-items: center; }
.banner__arrow:hover { background: #fff; }
.banner__arrow--prev { left: 16px; }
.banner__arrow--next { right: 16px; }
.banner__dots { position: absolute; left: 0; right: 0; bottom: 68px; z-index: 2; display: flex; justify-content: center; gap: 4px; }
.banner__dots button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.banner__dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); transition: width .2s ease, background-color .2s ease; }
.banner__dots button[aria-current="true"]::before { width: 26px; border-radius: 6px; background: #fff; }

/* ===== Khối giới thiệu + chọn nhanh vị trí ===== */
.intro { position: relative; z-index: 3; margin-top: -48px; }
.banner--empty + .intro { margin-top: -72px; }
.intro__card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 36px 40px; box-shadow: 0 18px 40px -24px rgba(11, 40, 90, .45); }
.intro__title { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; color: var(--brand); }
.intro__lead { margin-top: 12px; font-size: 18px; color: var(--muted); max-width: 62ch; }
.finder { margin-top: 28px; }
.finder__label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.finder__row { display: flex; gap: 12px; }
.finder__select { flex: 1; min-width: 0; }

/* ===== Khối nội dung (nền trắng) ===== */
.section { padding: 88px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__title { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.section__lead { margin-top: 12px; font-size: 18px; color: var(--muted); max-width: 60ch; }

/* ===== Vị trí tuyển dụng ===== */
.jobs { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.job { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.job__dept { font-size: 14px; font-weight: 600; color: var(--brand); }
.job__name { margin-top: 6px; font-size: 21px; line-height: 1.3; font-weight: 600; }
.job__summary { margin-top: 10px; color: var(--muted); font-size: 15px; }
.job__foot { margin-top: auto; padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.job__place { font-size: 14px; color: var(--muted); }
.job__apply { font-weight: 600; font-size: 15px; color: var(--brand); text-decoration: none; padding: 10px 16px; border: 1.5px solid var(--brand); border-radius: 8px; white-space: nowrap; }
.job__apply:hover { background: var(--brand); color: #fff; }

/* ===== Văn hóa công ty ===== */
.culture { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
.culture__intro { position: sticky; top: calc(var(--header-h) + 28px); }
.culture__item { padding: 28px 0; border-top: 1px solid var(--line); }
.culture__item:last-child { border-bottom: 1px solid var(--line); }
.culture__item dt { font-size: 25px; line-height: 1.3; font-weight: 600; color: var(--brand); }
.culture__item dd { margin-top: 8px; color: var(--muted); font-size: 17px; max-width: 56ch; }

/* ===== Quy trình ===== */
.steps { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { counter-increment: step; border-top: 3px solid var(--brand); padding-top: 18px; }
.step::before { content: "Bước " counter(step); display: block; font-size: 14px; font-weight: 600; color: var(--accent); }
.step h3 { margin-top: 6px; font-size: 20px; font-weight: 600; }
.step p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* ===== Form ứng tuyển ===== */
.apply { display: grid; grid-template-columns: 4fr 8fr; gap: 56px; align-items: start; }
.apply__privacy { margin-top: 20px; font-size: 14px; color: var(--muted); }
.form { background: var(--brand-tint); border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form--empty { display: block; }
.form__alert { grid-column: 1 / -1; padding: 12px 16px; border-radius: 8px; background: #FCEEEC; color: var(--danger); font-size: 15px; font-weight: 500; }
.field { min-width: 0; }
.field--wide, .form__actions { grid-column: 1 / -1; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--danger); }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="file"], select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1.5px solid #B9C3D3; border-radius: 8px;
  background: #fff; color: var(--ink);
  font: 400 16px/1.4 var(--font);
}
input[type="file"] { padding: 11px 14px; }
textarea { resize: vertical; min-height: 120px; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 0; border-color: var(--brand); }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--danger); }
.field__error { margin-top: 6px; font-size: 14px; color: var(--danger); }
.field__error:empty { display: none; }

/* ===== Chân trang (màu xanh logo) ===== */
.site-footer { background: var(--brand); color: #fff; padding: 52px 0 0; font-size: 15px; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 40px; }
.site-footer__logo { height: 64px; width: auto; display: block; }
.site-footer__tagline { margin-top: 14px; font-size: 17px; font-weight: 600; }
.site-footer__heading { font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.site-footer__contact p + p { margin-top: 4px; }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .25); padding: 18px 0; font-size: 14px; color: rgba(255, 255, 255, .85); }

/* ===== Popup thành công ===== */
.popup { border: 0; border-radius: 14px; padding: 36px 32px 28px; width: min(92vw, 420px); text-align: center; color: var(--ink); font-family: var(--font); }
.popup::backdrop { background: rgba(10, 28, 60, .6); }
.popup[open] { animation: popup-in .2s ease-out; }
.popup__mark { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; }
.popup h2 { font-size: 24px; font-weight: 700; }
.popup p { margin: 8px 0 24px; color: var(--muted); }
@keyframes popup-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

@media (min-width: 1201px) and (max-width: 1340px) {
  .brand__sub { display: none; }
}

/* ===== Menu thu gọn (đến 1200px) ===== */
@media (max-width: 1200px) {
  .nav-toggle { display: inline-flex; }
  .site-header__inner { gap: 12px; }
  .site-header__cta { margin-left: auto; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 8px 20px 16px;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    background: var(--brand); border-top: 1px solid rgba(255, 255, 255, .2);
    box-shadow: 0 16px 24px -16px rgba(0, 0, 0, .4);
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a, .nav-item > a { padding: 14px 0; font-size: 16px; border-bottom: 0; }
  .site-nav > a, .nav-item { border-bottom: 1px solid rgba(255, 255, 255, .15); }
  .site-nav > a:last-child { border-bottom: 0; }
  .nav-item { flex-wrap: wrap; justify-content: space-between; }
  .nav-sub-toggle { width: 44px; height: 44px; background: rgba(255, 255, 255, .14); }
  .nav-sub { position: static; flex-basis: 100%; min-width: 0; max-width: none; max-height: none; margin: 0 0 12px; box-shadow: none; border: 0; }
  .nav-sub::before { display: none; }
}

/* ===== Máy tính bảng và màn hình hẹp (đến 960px) ===== */
@media (max-width: 960px) {
  .banner__viewport { aspect-ratio: 2 / 1; }
  .culture, .apply { grid-template-columns: 1fr; gap: 32px; }
  .culture__intro { position: static; }
  .steps { grid-template-columns: 1fr 1fr; }
  .section { padding: 68px 0; }
}

/* ===== Điện thoại (đến 640px) ===== */
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .brand__logo { height: 34px; }
  .brand__sub { display: none; }
  .btn--small { padding: 0 14px; }
  .banner__viewport { aspect-ratio: 4 / 3; }
  .slide--caption::after { background: linear-gradient(0deg, color-mix(in srgb, var(--brand-deep) 90%, transparent) 0%, color-mix(in srgb, var(--brand-deep) 45%, transparent) 55%, transparent 100%); }
  .slide__caption { align-items: flex-end; padding-bottom: 72px; }
  .slide__text { display: none; }
  .banner__arrow { display: none; }            /* trên điện thoại vuốt ngang để đổi ảnh */
  .banner__dots { bottom: 36px; }
  .intro { margin-top: -28px; }
  .intro__card { padding: 24px 20px; }
  .intro__lead { font-size: 16px; }
  .finder__row { flex-direction: column; }
  .section { padding: 52px 0; }
  .section__lead { font-size: 16px; }
  .jobs { margin-top: 28px; gap: 16px; }
  .culture__item dt { font-size: 21px; }
  .culture__item dd { font-size: 16px; }
  .steps { grid-template-columns: 1fr; margin-top: 28px; }
  .form { grid-template-columns: 1fr; padding: 20px 16px; }
  .form__actions .btn { width: 100%; }
  .site-footer__logo { height: 52px; }
}

/* ===== Chế độ - Phúc lợi ===== */
.benefits { margin-top: 40px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.benefit { background: var(--brand-tint); border-radius: var(--radius); padding: 26px 24px; border-left: 4px solid var(--brand); }
.benefit h3 { font-size: 20px; line-height: 1.3; font-weight: 600; color: var(--brand); }
.benefit p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* ===== Tin tức, bài viết ===== */
.section--tight { padding: 56px 0 72px; }
.section--line { border-top: 1px solid var(--line); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.section__more { font-weight: 600; color: var(--brand); text-underline-offset: 4px; }
.section__title--sm { font-size: clamp(22px, 2.6vw, 28px); }
.posts { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--brand) url("logo.png") center / 110px auto no-repeat; }   /* bài chưa có ảnh đại diện: nền xanh + logo */
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 18px 20px 22px; }
.post-card__date { font-size: 14px; color: var(--muted); }
.post-card__title { margin-top: 6px; font-size: 19px; line-height: 1.35; font-weight: 600; }
.post-card__title a { text-decoration: none; }
.post-card__title a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.post-card__excerpt { margin-top: 8px; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.wrap--narrow { width: min(100% - 40px, 780px); }
.page-head { background: var(--brand-tint); border-bottom: 1px solid var(--line); padding: 40px 0 44px; }
.page-head__title { margin-top: 10px; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--brand); }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--brand); text-underline-offset: 3px; }
.article__date { display: block; margin-top: 14px; font-size: 15px; color: var(--muted); }
.article__body { padding: 40px 0 72px; }
.article__cover { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 32px; }
.article__cta { margin-top: 48px; padding: 24px; background: var(--brand-tint); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.article__cta p { font-size: 18px; font-weight: 600; }
.preview-bar { background: #FFF2D6; color: #7A5200; text-align: center; padding: 10px 16px; font-weight: 600; font-size: 15px; }

/* Nội dung bài viết do người viết nhập */
.prose { font-size: 17.5px; line-height: 1.75; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 27px; line-height: 1.3; font-weight: 700; margin-top: 1.7em; }
.prose h3 { font-size: 21px; line-height: 1.35; font-weight: 600; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose a { color: var(--brand); text-underline-offset: 3px; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 8px; margin-inline: auto; }
.prose blockquote { margin-inline: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--brand); color: var(--muted); font-size: 19px; }

.pager { margin-top: 40px; display: flex; gap: 8px; flex-wrap: wrap; }
.pager a { min-width: 44px; padding: 10px 12px; text-align: center; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 500; }
.pager a.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 960px) {
  .benefits, .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .benefits, .posts { grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
  .wrap--narrow { width: min(100% - 32px, 780px); }
  .page-head { padding: 28px 0 32px; }
  .article__body { padding: 28px 0 52px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 23px; }
  .article__cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .slide.is-active { transition: none; }
  .popup[open] { animation: none; }
  .btn, .banner__dots button::before, .nav-sub-toggle svg { transition: none; }
}
