/*
 * DHTD Child — solutions.css (Task 27, 05/09/2026)
 * CSS riêng cho archive CPT "Giải pháp" (/giai-phap/) — chỉ enqueue trên
 * chính archive này (is_post_type_archive('dhtd_solution'), xem
 * inc/enqueue.php). Dùng lại token màu (brand-colors.css) và utility dùng
 * chung (.dhtd-container/.dhtd-eyebrow/.dhtd-section-title/.dhtd-section-head/
 * .dhtd-btn* — tất cả đã có sẵn trong main.css, KHÔNG định nghĩa lại ở đây)
 * — chỉ bổ sung phần chưa có: modifier section-head căn giữa + chữ trên nền
 * Navy (nhân bản rút gọn từ about.css vì trang này không tải about.css),
 * breadcrumb (nhân bản rút gọn từ catalog.css), và toàn bộ layout riêng của
 * từng section trang Giải pháp.
 *
 * Không sửa home.css/catalog.css/about.css/contact.css/main.css.
 */

/* ---------------------------------- Section head modifiers (bổ sung, không có sẵn trong main.css) ---------------------------------- */
.dhtd-section-head--center {
  text-align: center;
  margin-inline: auto;
}
.dhtd-section-title--on-navy {
  color: var(--dhtd-white);
}

/* ---------------------------------- Breadcrumb (bản sao rút gọn từ catalog.css) ---------------------------------- */
.dhtd-crumb {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dhtd-muted);
  padding: 22px 0 0;
}
.dhtd-crumb a { color: var(--dhtd-muted); text-decoration: none; }
.dhtd-crumb a:hover { color: var(--dhtd-sky); }
.dhtd-crumb .sep { margin: 0 6px; opacity: .5; }
.dhtd-crumb .current { color: var(--dhtd-text); }

/* Focus-visible rõ ràng cho toàn bộ link/button trong trang (yêu cầu accessibility). */
.dhtd-solutions-main a:focus-visible,
.dhtd-solutions-main button:focus-visible {
  outline: 2px solid var(--dhtd-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==================================================================
 * 1. Hero
 * ================================================================== */
.dhtd-solutions-hero {
  padding: 28px 0 72px;
  background: var(--dhtd-white);
  overflow: hidden;
}
.dhtd-solutions-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
  gap: 48px;
  align-items: center;
}
.dhtd-solutions-hero__title {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  color: var(--dhtd-navy);
  margin: 0 0 20px;
  max-width: 18ch;
}
.dhtd-solutions-hero__desc {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--dhtd-text);
  max-width: 48ch;
  margin: 0 0 28px;
}
.dhtd-solutions-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.dhtd-solutions-hero__art {
  max-width: 380px;
  margin-inline: auto;
}
.dhtd-solutions-hero__art .dhtd-circuit-svg {
  width: 100%;
  height: auto;
}

@media (max-width: 782px) {
  .dhtd-solutions-hero__grid {
    grid-template-columns: 1fr;
  }
  /* Yêu cầu accessibility/responsive: text Hero hiển thị TRƯỚC artwork trên mobile. */
  .dhtd-solutions-hero__content { order: 1; }
  .dhtd-solutions-hero__art { order: 2; max-width: 260px; margin-top: 32px; }
}

/* ==================================================================
 * 2. "Doanh nghiệp của bạn đang cần gì?"
 * ================================================================== */
.dhtd-solutions-needs {
  padding: 0 0 88px;
  background: var(--dhtd-white);
}
.dhtd-solutions-needs__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.dhtd-solutions-needs__card {
  background: var(--dhtd-light-bg);
  border: 1px solid var(--dhtd-border);
  border-radius: 12px;
  padding: 26px 22px;
}
.dhtd-solutions-needs__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--dhtd-white);
  border: 1px solid var(--dhtd-border);
  color: var(--dhtd-navy);
  margin-bottom: 16px;
}
.dhtd-solutions-needs__icon .dhtd-icon-svg { width: 22px; height: 22px; display: block; }
.dhtd-solutions-needs__title {
  font-size: 1.0625rem;
  color: var(--dhtd-navy);
  margin: 0 0 8px;
}
.dhtd-solutions-needs__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--dhtd-muted);
  margin: 0 0 14px;
}
.dhtd-solutions-needs__link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dhtd-sky);
  text-decoration: none;
}
.dhtd-solutions-needs__link:hover { color: var(--dhtd-navy); text-decoration: underline; }

@media (max-width: 900px) {
  .dhtd-solutions-needs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .dhtd-solutions-needs__grid { grid-template-columns: 1fr; }
}

/* ==================================================================
 * 3. Giải pháp theo bài toán doanh nghiệp — hàng ảnh/nội dung xen kẽ
 * ================================================================== */
.dhtd-solutions-list {
  padding: 0 0 var(--dhtd-section-space); /* Task 54: 96px→chuẩn (giữa danh sách giải pháp và Quy trình 4 bước giảm từ 168px còn 128px) */
  background: var(--dhtd-white);
  scroll-margin-top: 24px; /* neo #dhtd-solutions-list không bị header che khi cuộn tới */
}
.dhtd-solutions-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.dhtd-solutions-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
  background: var(--dhtd-light-bg);
  border: 1px solid var(--dhtd-border);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
}
.dhtd-solutions-row--reverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.dhtd-solutions-row--reverse .dhtd-solutions-row__media { order: 2; }
.dhtd-solutions-row--reverse .dhtd-solutions-row__content { order: 1; }

.dhtd-solutions-row__media {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--dhtd-navy);
}
.dhtd-solutions-row__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dhtd-solutions-row__media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dhtd-white);
  opacity: .55;
}
.dhtd-solutions-row__media-placeholder .dhtd-icon-svg { width: 56px; height: 56px; }

.dhtd-solutions-row__content { padding: 32px 36px 32px 0; }
.dhtd-solutions-row--reverse .dhtd-solutions-row__content { padding: 32px 0 32px 36px; }
.dhtd-solutions-row__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--dhtd-navy);
  background: var(--dhtd-white);
  border: 1px solid var(--dhtd-border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.dhtd-solutions-row__title { font-size: 1.375rem; margin: 0 0 12px; }
.dhtd-solutions-row__title a { color: var(--dhtd-navy); text-decoration: none; }
.dhtd-solutions-row__title a:hover { color: var(--dhtd-sky); text-decoration: underline; }
.dhtd-solutions-row__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--dhtd-text);
  margin: 0 0 8px;
}
.dhtd-solutions-row__text strong { color: var(--dhtd-navy); }
.dhtd-solutions-row__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--dhtd-sky);
  text-decoration: none;
}
.dhtd-solutions-row__link:hover { color: var(--dhtd-navy); text-decoration: underline; }

@media (max-width: 900px) {
  .dhtd-solutions-row,
  .dhtd-solutions-row--reverse {
    grid-template-columns: 1fr;
  }
  .dhtd-solutions-row--reverse .dhtd-solutions-row__media,
  .dhtd-solutions-row__media { order: 1; }
  .dhtd-solutions-row--reverse .dhtd-solutions-row__content,
  .dhtd-solutions-row__content { order: 2; padding: 26px; }
}

/* Pagination (the_posts_pagination mặc định) */
.dhtd-solutions-pagination { margin-top: 40px; text-align: center; }
.dhtd-solutions-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  margin: 0 4px;
  border-radius: 6px;
  border: 1px solid var(--dhtd-border);
  color: var(--dhtd-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}
.dhtd-solutions-pagination .page-numbers.current {
  background: var(--dhtd-navy);
  border-color: var(--dhtd-navy);
  color: var(--dhtd-white);
}
.dhtd-solutions-pagination .page-numbers:hover:not(.current) {
  border-color: var(--dhtd-navy);
  background: var(--dhtd-light-bg);
}

/* Empty state — "Các nội dung giải pháp đang được cập nhật" */
.dhtd-solutions-empty {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 32px;
  background: var(--dhtd-light-bg);
  border: 1px solid var(--dhtd-border);
  border-radius: 14px;
}
.dhtd-solutions-empty__title {
  font-size: 1.25rem;
  color: var(--dhtd-navy);
  margin: 0 0 12px;
}
.dhtd-solutions-empty__desc {
  font-size: 0.9688rem;
  line-height: 1.65;
  color: var(--dhtd-muted);
  margin: 0 0 24px;
}

/* ==================================================================
 * 4. Quy trình 4 bước — nền Deep Navy
 * ================================================================== */
.dhtd-solutions-process {
  padding: var(--dhtd-section-space) 0; /* Task 54: 72px→chuẩn (khớp với List/Ecosystem xung quanh) */
  background: var(--dhtd-navy);
}
.dhtd-solutions-process .dhtd-solutions-ecosystem__lead,
.dhtd-solutions-process__grid {
  color: var(--dhtd-white);
}
.dhtd-solutions-process__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  position: relative;
}
.dhtd-solutions-process__item {
  position: relative;
  text-align: center;
  padding: 0 16px;
}
/* Đường nối nhẹ giữa các bước (chỉ hiện ở desktop, giữa 2 icon liền kề) */
.dhtd-solutions-process__item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(50% + 40px);
  width: calc(100% - 80px);
  height: 1px;
  background: rgba(245, 166, 35, 0.35); /* gold, mờ — "đường nối nhẹ" theo yêu cầu */
}
.dhtd-solutions-process__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.12);
  color: var(--dhtd-gold);
  margin: 0 auto 18px;
  position: relative;
  z-index: 1;
}
.dhtd-solutions-process__title {
  font-size: 1.0625rem;
  color: var(--dhtd-white);
  margin: 0 0 8px;
}
.dhtd-solutions-process__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

@media (max-width: 900px) {
  .dhtd-solutions-process__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 8px; }
  .dhtd-solutions-process__item:not(:last-child)::after { display: none; }
}
@media (max-width: 480px) {
  .dhtd-solutions-process__grid { grid-template-columns: 1fr; }
}

/* ==================================================================
 * 5. Hệ sinh thái giải pháp — dữ liệu động dhtd_service_group
 * ================================================================== */
.dhtd-solutions-ecosystem {
  padding: var(--dhtd-section-space) 0; /* Task 54: 88px→chuẩn */
  background: var(--dhtd-white);
}
.dhtd-solutions-ecosystem__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dhtd-muted);
  margin: 8px auto 0;
  max-width: 560px;
}
.dhtd-solutions-ecosystem__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.dhtd-solutions-ecosystem__card {
  text-align: center;
  padding: 30px 20px;
  background: var(--dhtd-light-bg);
  border: 1px solid var(--dhtd-border);
  border-radius: 12px;
}
.dhtd-solutions-ecosystem__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--dhtd-white);
  color: var(--dhtd-navy);
  margin: 0 auto 16px;
}
.dhtd-solutions-ecosystem__title {
  font-size: 1.0625rem;
  color: var(--dhtd-navy);
  margin: 0 0 8px;
}
.dhtd-solutions-ecosystem__title a { color: inherit; text-decoration: none; }
.dhtd-solutions-ecosystem__title a:hover { color: var(--dhtd-sky); text-decoration: underline; }
.dhtd-solutions-ecosystem__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--dhtd-muted);
  margin: 0;
}

@media (max-width: 900px) {
  .dhtd-solutions-ecosystem__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .dhtd-solutions-ecosystem__grid { grid-template-columns: 1fr; }
}

/* ==================================================================
 * 6. Case Study liên quan — 1 card lớn + 2 card phụ
 * ================================================================== */
.dhtd-solutions-cases {
  padding: var(--dhtd-section-space) 0; /* Task 54: 88px→chuẩn */
  background: var(--dhtd-light-bg);
}
.dhtd-solutions-cases__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.dhtd-solutions-case-featured {
  display: flex;
  flex-direction: column;
  background: var(--dhtd-white);
  border: 1px solid var(--dhtd-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.dhtd-solutions-case-featured__media { aspect-ratio: 16 / 9; background: var(--dhtd-navy); overflow: hidden; }
.dhtd-solutions-case-featured__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dhtd-solutions-case-featured__media-placeholder { display: block; width: 100%; height: 100%; }
.dhtd-solutions-case-featured__body { padding: 24px; }
.dhtd-solutions-case-featured__title {
  font-size: 1.1875rem;
  color: var(--dhtd-navy);
  margin: 0 0 16px;
  line-height: 1.4;
}

.dhtd-solutions-case-secondary {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.dhtd-solutions-case-card {
  display: flex;
  flex-direction: column;
  background: var(--dhtd-white);
  border: 1px solid var(--dhtd-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.dhtd-solutions-case-card__media { aspect-ratio: 16 / 9; overflow: hidden; }
.dhtd-solutions-case-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dhtd-solutions-case-card__title {
  font-size: 1rem;
  color: var(--dhtd-navy);
  margin: 0;
  padding: 16px 18px;
  line-height: 1.4;
}

.dhtd-solutions-cases__more { text-align: center; margin-top: 36px; }

@media (max-width: 900px) {
  .dhtd-solutions-cases__layout { grid-template-columns: 1fr; }
  .dhtd-solutions-case-secondary { flex-direction: row; }
}
@media (max-width: 600px) {
  .dhtd-solutions-case-secondary { flex-direction: column; }
}

/* ==================================================================
 * 7. CTA cuối trang
 * ================================================================== */
.dhtd-solutions-cta {
  padding: 56px 0;
  background: var(--dhtd-navy);
}
.dhtd-solutions-cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.dhtd-solutions-cta__title {
  font-size: 1.5rem;
  color: var(--dhtd-white);
  margin: 0 0 8px;
}
.dhtd-solutions-cta__desc {
  font-size: 0.9688rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 52ch;
}

@media (max-width: 700px) {
  .dhtd-solutions-cta__inner { flex-direction: column; align-items: flex-start; text-align: left; }
}
