/* ==========================================================
   Trang Tuyển dụng Green SM
   Mobile-first: gốc = Figma 151:1566 (390px), ≥1024px = Figma 76:921 (1440px)
   ========================================================== */

/* ---------- Dùng chung trong trang ---------- */
.td-section {
  padding: 64px 0;
}

.td-section--gray {
  background: var(--nen-xam-nhat);
}

.td-h2 {
  font-weight: 700;
  font-size: 26px;
  line-height: 34px;
  color: var(--chu-tieu-de);
}

.td-lead {
  font-size: 16px;
  line-height: 26px;
  color: var(--chu-noi-dung);
}

.td-head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}

/* Nội dung khác nhau giữa Figma mobile (151:1566) và desktop (76:921) */
.td-d-only { display: none; }
@media (min-width: 1024px) {
  .td-m-only { display: none; }
  .td-d-only { display: inline; }
}

/* Nhãn "Ảnh tạm" dùng class chung .img-note (base.css, đặt góc trên trái).
   Ở thẻ đối tượng và banner mobile, Figma đặt nhãn ở góc dưới trái. */
.td-who__card .img-note,
.td-hero__media .img-note {
  top: auto;
  bottom: 12px;
}

/* Danh sách tích xanh */
.td-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 24px;
  color: var(--chu-tieu-de);
}

/* Hàng kéo ngang trên mobile (tràn sát mép phải màn hình) */
.td-scroller {
  display: flex;
  gap: 12px;
  margin-right: calc(-1 * var(--gutter));
  padding-right: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.td-scroller::-webkit-scrollbar {
  display: none;
}

.td-scroller > * {
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ---------- 1. Banner ---------- */
.td-hero {
  padding-top: 16px;
}

.td-hero__box {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: var(--xanh-ngoc-nhat);
}

.td-hero__content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 20px 24px;
}

.td-hero__title {
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  color: var(--chu-tieu-de);
}

.td-hero__desc {
  font-size: 16px;
  line-height: 26px;
  color: var(--chu-noi-dung);
}

.td-hero__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.td-hero__cta {
  width: 100%;
}

.td-hero__hotline {
  display: none;
}

.td-hero__hotline-m {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.td-hero__hotline-m span {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: var(--chu-noi-dung);
}

.td-hero__hotline-m strong {
  font-weight: 700;
  font-size: 18px;
  line-height: 26px;
  color: var(--xanh-chu);
}

.td-hero__media {
  position: relative;
  height: 220px;
}

.td-hero__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 20px;
  color: var(--chu-phu);
}

.td-breadcrumb .is-current {
  color: var(--xanh-chu);
}

/* ---------- 2. Quyền lợi ---------- */
.td-benefits {
  padding: 56px 0 64px;
}

.td-benefits .td-head {
  gap: 20px;
  margin-bottom: 20px;
}

.td-benefit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 260px;
  height: 170px;
  padding: 20px;
  background: var(--nen-trang);
  /* Figma 151:1598 hiển thị thẻ không viền; giữ 1px trong suốt để chữ vẫn ở x/y=21 như Figma */
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
}

.td-benefit__title {
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: var(--chu-tieu-de);
}

.td-benefit__title--sm {
  font-size: 16px;
  line-height: 24px;
}

.td-benefit__big {
  font-weight: 700;
  font-size: 28px;
  line-height: 36px;
  color: var(--xanh-chu);
}

.td-benefit__desc {
  font-size: 15px;
  line-height: 24px;
  color: var(--chu-noi-dung);
}

/* ---------- 3. Đối tượng phù hợp ---------- */
.td-who__head {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}

.td-who__req {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.td-who__req-title {
  font-weight: 700;
  font-size: 18px;
  line-height: 26px;
  color: var(--xanh-chu);
}

.td-who__card {
  position: relative;
  width: 290px;
  height: 400px;
  overflow: hidden;
  border-radius: 16px;
}

.td-who__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-who__shade {
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  background: linear-gradient(to bottom, #209799 0%, #209799 55%, rgba(32, 151, 153, 0) 100%);
}

.td-who__text {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 250px;
  transform: translateX(-50%);
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--nen-trang);
  text-align: center;
}

.td-who__corner {
  position: absolute;
  right: -52px;
  bottom: -52px;
  width: 130px;
  height: 130px;
}

.td-who__corner img {
  width: 100%;
  height: 100%;
}

.td-who__corner span {
  position: absolute;
  left: 24px;
  top: 32px;
  font-weight: 700;
  font-size: 26px;
  line-height: 32px;
  color: var(--xanh-chu);
}

/* ---------- 4. Dịch vụ đang tuyển ---------- */
.td-services__list {
  align-items: stretch;
}

.td-svc {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 290px;
  height: 488px;
  overflow: hidden;
  background: var(--nen-trang);
  border: 1px solid var(--duong-ke);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.td-svc__media {
  position: relative;
  flex-shrink: 0;
  height: 200px;
}

.td-svc__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-svc__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
}

.td-svc__tag {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: var(--xanh-chu);
}

.td-svc__title {
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: var(--chu-tieu-de);
}

.td-svc__desc {
  font-size: 15px;
  line-height: 24px;
  color: var(--chu-noi-dung);
}

.td-svc__points {
  gap: inherit;
}

.td-svc__link {
  align-self: flex-start;
  padding-top: 4px;
  font-size: 15px;
}

/* Cả thẻ bấm được: vùng bấm của liên kết phủ toàn thẻ */
.td-svc__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
}

/* Liên kết trong thẻ không dùng hiệu ứng trỏ riêng của .text-link –
   trạng thái do cả thẻ quyết định (Figma 3:61 / 3:85 / 149:978) */
.td-svc .td-svc__link:hover {
  gap: 6px;
  color: var(--xanh-chu);
  text-decoration: none;
}
.td-svc .td-svc__link:hover .i-def { display: block; }
.td-svc .td-svc__link:hover .i-hov { display: none; }

/* Trạng thái Nhấn (171:1884 mobile, 166:1342 / 166:1384 desktop): nền xám nhạt, viền xanh */
.td-svc:active {
  background: var(--nen-xam-nhat);
  border-color: var(--xanh-thuong-hieu);
}

/* Trạng thái Trỏ (166:1324 / 166:1376): viền xanh, gạch chân liên kết */
@media (hover: hover) {
  .td-svc:hover {
    border-color: var(--xanh-thuong-hieu);
  }
  .td-svc:hover .td-svc__link {
    text-decoration: underline;
  }
}
.td-svc:focus-within {
  border-color: var(--xanh-thuong-hieu);
}
.td-svc:focus-within .td-svc__link {
  text-decoration: underline;
}
.td-svc .td-svc__link {
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  text-underline-offset: auto;
}

/* ---------- 5. Khu vực ---------- */
.td-areas__list {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  grid-auto-columns: 148px;
  gap: 8px;
}

.td-areas__list li {
  padding: 12px; /* 12 + 20 + 12 + viền 2 = 46px (151:1737) */
  background: var(--nen-trang);
  border: 1px solid var(--duong-ke);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: var(--chu-tieu-de);
  text-align: center;
  white-space: nowrap;
}

/* ---------- 6. Quy trình ---------- */
.td-steps .td-h2 {
  margin-bottom: 24px;
}

.td-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 250px;
  height: 200px;
  padding: 20px;
  background: var(--nen-trang);
  border: 1px solid var(--duong-ke);
  border-radius: 12px;
}

.td-step__mark {
  display: flex;
  align-items: center;
}

.td-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--xanh-thuong-hieu);
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--nen-trang);
}

.td-step__line {
  display: none;
  flex: 1 1 0;
  height: 2px;
  background: var(--duong-ke);
}

.td-step__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.td-step__text h3 {
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: var(--chu-tieu-de);
}

.td-step__text p {
  font-size: 15px;
  line-height: 24px;
  color: var(--chu-noi-dung);
}

/* ---------- 7. Câu hỏi thường gặp ---------- */
.td-faq__grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.td-faq__lead {
  display: none;
}

.td-faq__hotline {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  color: var(--xanh-chu);
}

.td-faq__list {
  order: 1;
  overflow: hidden;
  background: var(--nen-trang);
  border: 1px solid var(--duong-ke);
  border-radius: 12px;
}

.td-faq__hotline {
  order: 2;
}

.td-faq__item {
  padding: 16px 20px;
}

.td-faq__item + .td-faq__item {
  border-top: 1px solid var(--duong-ke);
}

.td-faq__q {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--chu-tieu-de);
  text-align: left;
}

.td-faq__q span {
  flex: 1 1 0;
  min-width: 0;
}

.td-faq__q .i-open,
.td-faq__item.is-open .td-faq__q .i-closed {
  display: none;
}

.td-faq__item.is-open .td-faq__q .i-open {
  display: block;
}

.td-faq__a {
  padding-top: 8px;
  font-size: 15px;
  line-height: 24px;
  color: var(--chu-noi-dung);
}

/* Figma ngắt dòng sát mép 694px; bù phần lẻ dưới 1px của trình duyệt để xuống dòng giống hệt */
.td-faq__a p {
  margin-right: -3px;
}

/* ---------- 8. Form đăng ký ---------- */
.td-apply {
  padding: 48px 0 64px;
}

.td-apply__box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 20px;
  background: var(--nen-xam-nhat);
  border-radius: 16px;
}

.td-apply__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.td-apply__eyebrow {
  display: none;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--vang-nhan-chu);
}

.td-apply__title {
  font-weight: 700;
  font-size: 22px;
  line-height: 30px;
  color: var(--chu-tieu-de);
}

.td-apply__desc {
  font-size: 16px;
  line-height: 26px;
  color: var(--chu-noi-dung);
}

.td-apply__desc strong {
  color: var(--xanh-chu);
}

/* ==========================================================
   Tablet (768px – 1023px): giữ bố cục mobile, nới ảnh banner
   ========================================================== */
@media (min-width: 768px) {
  .td-hero__media {
    height: 320px;
  }
  .td-hero__cta {
    width: auto;
    align-self: flex-start;
  }
  .td-hero__hotline-m {
    justify-content: flex-start;
  }
  .td-apply__box {
    padding: 40px;
  }
}

/* ==========================================================
   Desktop (≥1024px) – Figma 1440px
   ========================================================== */
@media (min-width: 1024px) {
  .td-section {
    padding: 96px 0;
  }

  .td-h2 {
    font-size: 36px;
    line-height: 44px;
  }

  .td-head {
    gap: 12px;
    margin-bottom: 40px;
  }

  /* Bỏ kéo ngang */
  .td-scroller {
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
    scroll-snap-type: none;
  }

  /* 1. Banner */
  .td-hero {
    padding-top: 32px;
  }
  .td-hero__box {
    flex-direction: row;
  }
  .td-hero__content {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    gap: 20px;
    padding: 56px 40px 56px 64px;
  }
  .td-hero__title {
    font-size: 48px;
    line-height: 58px;
  }
  .td-hero__desc {
    font-size: 18px;
    line-height: 28px;
  }
  .td-hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 32px;
    padding-top: 12px;
  }
  .td-hero__cta {
    align-self: auto;
  }
  .td-hero__hotline-m {
    display: none;
  }
  .td-hero__hotline {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .td-hero__hotline-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--xanh-thuong-hieu);
  }
  .td-hero__hotline-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
  }
  .td-hero__hotline-label {
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    color: var(--chu-noi-dung);
  }
  .td-hero__hotline-num {
    font-weight: 700;
    font-size: 24px;
    line-height: 32px;
    color: var(--xanh-chu);
  }
  /* 480px trên khung 1200px → 40% để co giãn ở màn hình hẹp hơn */
  .td-hero__media {
    flex: 0 0 40%;
    height: auto;
  }
  .td-hero__media .img-note {
    top: 12px;
    bottom: auto;
  }
  /* Figma desktop 76:972: cấp hiện tại SemiBold (mobile 151:1597 Regular) */
  .td-breadcrumb .is-current {
    font-weight: 600;
  }

  /* 2. Quyền lợi */
  .td-benefits {
    padding: 96px 0;
  }
  .td-benefits .td-head {
    gap: 12px;
    margin-bottom: 40px;
  }
  .td-benefits__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .td-benefit {
    gap: 8px;
    width: auto;
    height: auto;
    padding: 20px 0 0;
    border: 0;
    border-top: 1px solid var(--duong-ke);
    border-radius: 0;
    background: none;
  }

  /* 3. Đối tượng */
  .td-who__head {
    flex-direction: row;
    align-items: center;
    gap: 64px;
    margin-bottom: 40px;
  }
  .td-who__head .td-h2 {
    flex: 1 1 0;
    min-width: 0;
  }
  .td-who__req {
    flex: 0 0 460px;
  }
  .td-who__req .td-checks {
    gap: 12px;
  }
  .td-who__req .td-checks li {
    gap: 12px;
    font-size: 16px;
    line-height: 26px;
    color: var(--chu-noi-dung);
  }
  .td-who__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
  .td-who__card {
    width: auto;
    height: 576px;
  }
  .td-who__shade {
    height: 270px;
    background: linear-gradient(to bottom, #209799 0%, #209799 50%, rgba(32, 151, 153, 0) 100%);
  }
  .td-who__text {
    top: 28px;
    width: 320px;
    max-width: calc(100% - 32px);
    font-size: 18px;
    line-height: 26px;
  }
  .td-who__corner {
    right: -64px;
    bottom: -64px;
    width: 160px;
    height: 160px;
  }
  .td-who__corner span {
    left: 28px;
    top: 38px;
    font-size: 32px;
    line-height: 40px;
  }

  /* 4. Dịch vụ */
  .td-services__head {
    margin-bottom: 40px;
  }
  .td-services__list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
  }
  .td-svc {
    width: auto;
    height: auto;
  }
  .td-svc--major {
    grid-column: span 3;
    flex-direction: row;
  }
  .td-svc--minor {
    grid-column: span 2;
  }
  /* 232px trên thẻ 588px */
  .td-svc--major .td-svc__media {
    width: 39.5%;
    height: auto;
  }
  .td-svc--minor .td-svc__media,
  .td-svc--minor .td-svc__points {
    display: none;
  }
  .td-svc__body {
    flex: 1 1 0;
    min-width: 0;
    padding: 28px;
  }
  .td-svc--major .td-svc__body {
    gap: 12px;
  }
  .td-svc__title {
    font-size: 22px;
    line-height: 30px;
  }
  .td-svc__desc {
    font-size: 16px;
    line-height: 26px;
  }
  .td-svc__link {
    font-size: 16px;
  }
  .td-svc--minor .td-svc__link {
    padding-top: 8px;
  }
  .td-svc:active .td-svc__link {
    text-decoration: underline;
  }

  /* 5. Khu vực */
  .td-areas .td-head {
    margin-bottom: 32px;
  }
  .td-areas__list {
    grid-auto-flow: row;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: none;
    grid-auto-columns: auto;
  }
  .td-areas__list li {
    padding: 10px 12px; /* 10 + 20 + 10 + viền 2 = 42px như Figma */
  }

  /* 6. Quy trình */
  .td-steps .td-h2 {
    margin-bottom: 32px;
  }
  .td-steps__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .td-step {
    gap: 16px;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .td-step__line {
    display: block;
  }
  .td-step__text {
    gap: 6px;
    padding-right: 32px;
  }
  .td-step__text p {
    font-size: 14px;
    line-height: 22px;
  }

  /* 7. FAQ – Figma desktop 76:1074 hiển thị nền trắng (mobile 151:1822 vẫn xám #f9fafb) */
  .td-faq {
    background: var(--nen-trang);
  }
  .td-faq__grid {
    display: grid;
    /* 400px | 736px ở khung 1200px, co theo tỉ lệ khi hẹp hơn */
    grid-template-columns: minmax(0, 400fr) minmax(0, 736fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: 64px;
    row-gap: 16px;
    align-items: start;
  }
  .td-faq__title { grid-area: 1 / 1; }
  .td-faq__lead { grid-area: 2 / 1; display: block; }
  .td-faq__hotline { grid-area: 3 / 1; }
  .td-faq__list { grid-area: 1 / 2 / 5 / 3; }

  /* 8. Form */
  .td-apply {
    padding: 96px 0;
  }
  .td-apply__box {
    gap: 40px;
    padding: 80px 112px;
  }
  .td-apply__head {
    align-items: center;
    text-align: center;
  }
  .td-apply__eyebrow {
    display: block;
  }
  .td-apply__title {
    font-size: 36px;
    line-height: 44px;
  }
  .td-apply__form {
    gap: 24px;
  }
}
