/* TPR Review — header/footer chung (trang ngoài trang chủ) + ô hotline/nút tư vấn cho header trang chủ.
   Màu theo biến Figma "TPR Review / Site V3.1 (live)". */

:root {
	--tpr-header-bg: #053b8d;
	--tpr-page: #021437;
	--tpr-footer: #02132d;
	--tpr-menu-bg: #06214f;
	--tpr-gold: #f0c57a;
	--tpr-gold-num: #c9a35e;
	--tpr-text-footer: #d7e0ee;
	--tpr-muted-dark: #9fb2cc;
	--tpr-cta-top: #f37a3c;
	--tpr-cta-bottom: #e2552a;
	--tpr-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tpr-h, .tpr-h *, .tpr-menu, .tpr-menu *, .tpr-f, .tpr-f *, .tpr-fab { box-sizing: border-box; }
.skip-link.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link.screen-reader-text:focus { z-index: 1000; width: auto; height: auto; clip: auto; padding: 12px 16px; background: #fff; color: #053b8d; }

/* ---------- Ô hotline + nút tư vấn (dùng cả trong header trang chủ qua shortcode) ---------- */
.tpr-h__actions { display: none; align-items: center; gap: 24px; font-family: var(--tpr-font); }
.tpr-h__hotline { display: inline-flex; align-items: center; gap: 8px; color: var(--tpr-gold) !important; font-size: 15px; line-height: 22px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.tpr-h__cta { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 22px; border-radius: 10px; border: 1px solid #ef9779; background: linear-gradient(180deg, var(--tpr-cta-top), var(--tpr-cta-bottom)); color: #fff !important; font-size: 15px; line-height: 20px; font-weight: 600; text-decoration: none !important; white-space: nowrap; box-shadow: 0 6px 16px rgba(230, 96, 49, .28); }
.tpr-h__cta:hover { filter: brightness(1.05); }
.tpr-h__call { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: #fff !important; }
@media (min-width: 1024px) {
	.tpr-h__actions { display: inline-flex; }
	.tpr-h__call { display: none; }
}

/* ---------- Header ---------- */
.tpr-h { position: sticky; top: 0; z-index: 100; background: var(--tpr-header-bg); font-family: var(--tpr-font); }
body.admin-bar .tpr-h { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tpr-h { top: 46px; } }
.tpr-h__bar { max-width: 1170px; height: 64px; margin: 0 auto; padding: 0 15px; display: grid; grid-template-columns: 24px 1fr 24px; align-items: center; }
.tpr-h__brand { justify-self: center; display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; font-size: 20px; line-height: 28px; font-weight: 700; letter-spacing: .01em; }
.tpr-h__brand img { width: 30px; height: 30px; object-fit: contain; }
.tpr-h__right { justify-self: end; display: flex; align-items: center; gap: 24px; }
.tpr-h__menu { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; font: 500 15px/22px var(--tpr-font); cursor: pointer; }
.tpr-h__menu-label { display: none; }
@media (min-width: 1024px) {
	.tpr-h__bar { height: 88px; padding: 0; grid-template-columns: auto 1fr; }
	.tpr-h__brand { justify-self: start; }
	.tpr-h__brand img { width: 34px; height: 34px; }
	.tpr-h__menu-label { display: inline; }
}
@media (min-width: 1024px) and (max-width: 1199px) { .tpr-h__bar { padding: 0 24px; } }

/* ---------- Menu toàn màn hình ---------- */
.tpr-menu { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .6); }
.tpr-menu[hidden] { display: none; }
.tpr-menu__panel { position: absolute; top: 0; right: 0; width: min(420px, 100%); height: 100%; overflow-y: auto; padding: 72px 32px 32px; background: var(--tpr-menu-bg); }
.tpr-menu__close { position: absolute; top: 20px; right: 20px; padding: 4px; border: 0; background: none; color: #fff; cursor: pointer; }
.tpr-menu__list { margin: 0; padding: 0; list-style: none; }
.tpr-menu__list li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.tpr-menu__list a { display: flex; gap: 16px; padding: 16px 0; color: #fff !important; font: 500 17px/24px var(--tpr-font); text-decoration: none !important; }
.tpr-menu__list a span { width: 24px; color: var(--tpr-gold-num); font-weight: 600; }
.tpr-menu__list a:hover { color: var(--tpr-gold) !important; }
.tpr-menu__hotline { display: inline-block; margin-top: 28px; color: var(--tpr-gold) !important; font: 600 16px/22px var(--tpr-font); text-decoration: none !important; }
body.tpr-menu-open { overflow: hidden; }

/* ---------- Footer ---------- */
.tpr-f { background: var(--tpr-footer); color: var(--tpr-text-footer); font-family: var(--tpr-font); padding: 40px 0 24px; }
.tpr-f a { color: var(--tpr-text-footer); }
.tpr-f__inner, .tpr-f__bottom { max-width: 1170px; margin: 0 auto; padding: 0 16px; }
.tpr-f__inner { display: grid; gap: 28px; }
.tpr-f__eyebrow { margin: 0 0 10px; font-size: 14px; line-height: 20px; color: var(--tpr-muted-dark); }
.tpr-f__company { margin: 0 0 16px; font-size: 18px; line-height: 26px; font-weight: 700; color: #fff; text-transform: uppercase; }
.tpr-f__list { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 21px; }
.tpr-f__note { margin: 0; font-size: 13px; line-height: 20px; color: var(--tpr-muted-dark); }
.tpr-f__map { min-height: 240px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); }
.tpr-f__map iframe { display: block; width: 100%; height: 100%; min-height: 240px; border: 0; }
.tpr-f__bottom { display: flex; flex-direction: column; gap: 10px; margin-top: 32px; padding-top: 20px; padding-bottom: 72px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; line-height: 20px; }
.tpr-f__bottom p { margin: 0; font-weight: 700; color: #fff; }
.tpr-f__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1024px) {
	.tpr-f { padding: 72px 0 32px; }
	.tpr-f__inner, .tpr-f__bottom { padding: 0; }
	.tpr-f__inner { grid-template-columns: 1fr 1fr; gap: 48px; }
	.tpr-f__company { font-size: 22px; line-height: 30px; }
	.tpr-f__bottom { flex-direction: row; justify-content: space-between; align-items: center; padding-bottom: 0; }
}
@media (min-width: 1024px) and (max-width: 1199px) { .tpr-f__inner, .tpr-f__bottom { padding: 0 24px; } }

/* ---------- Nút nổi "Bạn muốn tìm dự án phù hợp?" (giống trang chủ) ---------- */
.tpr-fab { position: fixed; left: 50%; bottom: 16px; z-index: 90; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--tpr-gold-num); background: linear-gradient(180deg, #fff3dc, #f2d8a6); color: #14254a !important; font: 600 15px/20px var(--tpr-font); text-decoration: none !important; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: opacity .2s, transform .2s; }
.tpr-fab span { color: #cc3366; }
.tpr-fab.is-hidden { opacity: 0; pointer-events: none; transform: translate(-50%, 12px); }

/* ---------- Chữ mô tả ở hero TRANG CHỦ (Prompt 2, bước 7) — chỉ CSS, chỉ trang chủ ----------
   Desktop 16px/26px, mobile 14px/22px, màu #c9d6ea cho đủ độ dễ đọc. */
body.home.page-id-15 .elementor-element-5b1b45e p.e-paragraph-base { font-size: 14px; line-height: 22px; color: #c9d6ea; }
@media (min-width: 1024px) {
	body.home.page-id-15 .elementor-element-5b1b45e p.e-paragraph-base { font-size: 16px; line-height: 26px; }
}

/* ---------- 2 widget Shortcode trong header trang chủ (Elementor trang 15) ----------
   Mỗi widget là 1 flex item của hàng header. Khi nội dung bên trong ẩn đi
   (nút gọi ẩn >=1024, ô hotline/nút tư vấn ẩn <1024) thì PHẢI ẩn luôn wrapper,
   nếu không nó vẫn chiếm 1 ô của justify-content:space-between và đẩy logo sang
   giữa (logo phải nằm sát mép trái như trước). :has() + lớp dự phòng theo id
   (id do mình chèn, giữ nguyên chừng nào còn dùng widget đó). */
@media (min-width: 1024px) {
	body.home.page-id-15 .elementor-element:has(> .tpr-h__call),
	body.home.page-id-15 .elementor-element-f9b8f70 { display: none; }
	body.home.page-id-15 .elementor-element:has(> .tpr-h__actions),
	body.home.page-id-15 .elementor-element-8cf63aa { margin-left: auto; }
}
/* Không ẩn wrapper nút "Nhận tư vấn" ở mobile một mình: wrapper vẫn là 1 flex item
   của hàng header (justify-content:flex-end ở mobile) — ẩn nó làm logo bị đẩy lệch.
   Thay vào đó: ẩn wrapper VÀ đổi hàng sang space-between để nút gọi nằm mép trái,
   logo đúng giữa, menu bám mép phải (đúng Figma 09 V3.2 + checklist). */
@media (max-width: 1023px) {
	body.home.page-id-15 .elementor-element:has(> .tpr-h__actions),
	body.home.page-id-15 .elementor-element-8cf63aa { display: none; }
	body.home.page-id-15 .e-23d22a4-1b1f873 { justify-content: space-between; }
}

/* ==========================================================================
   PROMPT 9 — PHẦN 3B: header 88px -> 72px (toàn site, 1024–1599px)
   Trang chủ dựng header bằng Elementor nên có rule riêng ở assets/tpr-v31.css.
   Biến --tpr-header-h do JS đo lại nên tự cập nhật; --tpr-v31-header-h đổi ở v31.
   ========================================================================== */
@media (min-width: 1024px) and (max-width: 1599px) {
  .tpr-h__bar { height: 72px; }
  .tpr-h__brand { font-size: 18px; line-height: 26px; gap: 8px; }
  .tpr-h__brand img { width: 30px; height: 30px; }
  .tpr-h__right { gap: 16px; }
  .tpr-h__hotline { font-size: 14px; line-height: 20px; gap: 6px; }
  .tpr-h__cta { height: 40px; padding: 0 18px; font-size: 14px; }   /* nút tư vấn co tương ứng */
  .tpr-h__menu { font-size: 14px; }
}

/* ==========================================================================
   PROMPT 13 B1 — chỉ còn 2 kiểu nút (+ nút nổi giữ dạng viên thuốc)
   ========================================================================== */
.tpr-btn-primary,
.tpr-h__cta,
.da-cta,
.da-open,
.tpr-cf7 .tpr-cf7__submit,
.e-button-base.button-pri {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px !important;
  height: auto !important;
  padding: 0 24px !important;
  background: #e66031 !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #fff !important;
  font-family: inherit;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none !important;
  text-decoration: none !important;
}

.tpr-btn-secondary,
.elementor-button,
.hec-lm__button,
.tpr-news__more-btn,
.tpr-shorts__cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px !important;
  height: auto !important;
  padding: 0 24px !important;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid #c9a35e !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #c9a35e !important;
  font-family: inherit;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none !important;
  text-decoration: none !important;
}

.da-open:hover { background: #d4541f !important; color: #fff !important; }
.tpr-btn-primary:hover,
.tpr-btn-primary:focus-visible { background: #d4541f !important; color: #fff !important; }
.tpr-btn-secondary:hover,
.tpr-btn-secondary:focus-visible { background: rgba(201,170,116,.12) !important; color: #e2c68d !important; }

/* Header: cùng màu/bo góc nhưng nhỏ hơn */
.tpr-h__cta { min-height: 40px; padding: 0 16px !important; font-size: 15px !important; }

@media (max-width: 767px) {
  .tpr-btn-primary, .tpr-btn-secondary,
  .tpr-h__cta, .da-cta, .tpr-cf7 .tpr-cf7__submit, .e-button-base.button-pri,
  .elementor-button, .hec-lm__button, .tpr-news__more-btn, .tpr-shorts__cta {
    min-height: 52px !important;
    height: auto !important;
  }
  .tpr-h__cta { min-height: 40px; }
}

/* Prompt 14 — nút nổi nhường chỗ cho banner đồng ý cookie */
#tpr-float-cta { margin-bottom: var(--tpr-cb-h, 0px) !important; }
