/* =====================================================================
   nang-cap.css — lớp nâng cấp CTA (12/11/2026)
   ---------------------------------------------------------------------
   Bổ sung 4 khối, tải SAU app.css nên các quy tắc .fab ở đây thắng mặc định:
     1. .qf    dải chọn nhanh nhu cầu (4 nút, 1 chạm)
     2. .trust dải uy tín thương hiệu
     3. .lm    hộp nhận bảng dự toán qua Zalo
     4. .fab   nút nổi có nhãn chữ + hiệu ứng rung Zalo

   Bảng màu theo đúng bộ mệnh Hoả đang dùng: --accent #b4121b, --kim #c08a2e
   ===================================================================== */

/* ---------- 1. DẢI CHỌN NHANH NHU CẦU ---------- */
.qf {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 10px;
  margin: 22px 0 2px;
}
.qf--4 { grid-template-columns: repeat(4, 1fr); }

.qf a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 13px;
  background: var(--paper, #fff);
  border: 1.5px solid var(--line, #f0d8c9);
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink, #2b1310);
  box-shadow: 0 2px 8px rgba(139, 13, 20, .07);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.qf a:hover,
.qf a:focus-visible {
  border-color: var(--accent, #b4121b);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(139, 13, 20, .18);
  outline: none;
}
.qf a:focus-visible { box-shadow: 0 0 0 3px rgba(180, 18, 27, .28); }

.qf .qf-i { font-size: 19px; line-height: 1; flex: 0 0 auto; }
.qf .qf-t { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.qf .qf-t b { font-size: 13.3px; font-weight: 800; color: var(--accent-dk, #8b0d14); }
.qf .qf-t i { font-size: 11.4px; font-style: normal; color: var(--ink-3, #7d564a); }

/* ---------- 2. DẢI UY TÍN ---------- */
.trust {
  background: var(--sand-2, #f8e2d5);
  border-top: 1px solid var(--line, #f0d8c9);
  border-bottom: 1px solid var(--line, #f0d8c9);
}
.trust .wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 13.1px;
  color: var(--accent-dk, #8b0d14);
}
.trust .t-seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  white-space: nowrap;
}
.trust .t-seal span {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--accent-dk, #8b0d14);
  color: #f3c778;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .3px;
  flex: 0 0 27px;
}
.trust .t-sep { width: 1px; height: 18px; background: #d9a98d; }
.trust .t-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.trust .t-item svg { width: 14px; height: 14px; fill: var(--accent, #b4121b); flex: 0 0 14px; }
.trust .t-where { color: var(--ink-3, #7d564a); font-size: 12.6px; }

/* ---------- 3. HỘP NHẬN BẢNG DỰ TOÁN ---------- */
.lm-sec { padding: 34px 0 6px; }
.lm--in { margin: 34px 0; }

.lm {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 26px;
  align-items: center;
  padding: 30px 34px;
  border-radius: 18px;
  border: 2px solid var(--kim, #c08a2e);
  background: linear-gradient(135deg, #7a0c12 0%, #a5141d 58%, #c23a28 100%);
  box-shadow: 0 18px 44px rgba(122, 12, 18, .3);
  color: #fff;
  overflow: hidden;
}
.lm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 8%, rgba(243, 199, 120, .22), transparent 46%);
  pointer-events: none;
}
.lm-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 11px;
  border: 1px solid rgba(243, 199, 120, .6);
  border-radius: 999px;
  background: rgba(243, 199, 120, .16);
  color: #f3c778;
  font-size: 11.4px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.lm h3 {
  margin: 0 0 10px;
  font-size: 22.5px;
  line-height: 1.34;
  font-weight: 800;
  color: #fff;
}
.lm p { margin: 0 0 14px; font-size: 14.3px; line-height: 1.62; color: #fbe0d2; }
.lm-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: 0;
  padding: 0;
}
.lm-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13.1px;
  color: #ffe7d9;
}
.lm-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  color: #f3c778;
  font-weight: 900;
}
.lm-act { position: relative; display: flex; flex-direction: column; gap: 10px; }
.lm-btn {
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8d492, #eeb655);
  color: #5c1108;
  font-size: 15.2px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
  transition: transform .16s, box-shadow .16s;
}
.lm-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .34); }
.lm-btn:focus-visible { outline: 3px solid #f3c778; outline-offset: 3px; }
.lm-sub {
  display: block;
  text-align: center;
  font-size: 12.9px;
  color: #fbe0d2;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lm-note {
  margin: 2px 0 0;
  text-align: center;
  font-size: 11.6px;
  color: rgba(255, 231, 217, .82);
}

/* Trang bài viết có luật ".art a{color:var(--accent)}" mạnh hơn .lm-sub,
   làm nút phụ chìm vào nền đỏ. Khoá lại màu ở đây. */
.lm .lm-sub,
.lm a.lm-sub { color: #fbe0d2; text-decoration-color: rgba(251, 224, 210, .6); }
.lm .lm-btn,
.lm a.lm-btn { color: #5c1108; }
.lm .lm-note { color: rgba(255, 231, 217, .82); }

/* ---------- 4. NÚT NỔI CÓ NHÃN CHỮ ---------- */
.fab { align-items: flex-end; gap: 10px; }
.fab a {
  width: auto;
  height: 58px;
  padding: 7px 20px 7px 7px;
  border-radius: 29px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .26);
}
.fab .fab-ico {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  flex: 0 0 44px;
}
.fab svg { width: 24px; height: 24px; fill: #fff; }

/* Tắt vòng xung cũ: nút giờ là viên thuốc, vòng tròn sẽ lệch */
.fab .zalo::after { display: none; }

.fab-lbl { display: flex; flex-direction: column; line-height: 1.16; text-align: left; color: #fff; white-space: nowrap; }
.fab-lbl b { font-size: 13.7px; font-weight: 800; }
.fab-lbl i { font-size: 11.2px; font-style: normal; opacity: .95; }

@keyframes nk-rung {
  0%, 86%, 100% { transform: rotate(0); }
  88% { transform: rotate(-9deg); }
  91% { transform: rotate(9deg); }
  94% { transform: rotate(-6deg); }
  97% { transform: rotate(5deg); }
}
.fab .zalo.rung .fab-ico { animation: nk-rung 1.25s ease-in-out; }

/* ---------- THU GỌN THEO BỀ RỘNG ---------- */
@media (max-width: 980px) {
  .qf, .qf--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .lm { grid-template-columns: 1fr; gap: 20px; padding: 24px 20px; }
  .lm h3 { font-size: 19.5px; }
  .lm p { font-size: 13.7px; }
  .lm-list li { font-size: 12.7px; }
  .lm-btn { font-size: 14.4px; padding: 15px 16px; }
}
@media (max-width: 760px) {
  .trust .wrap { gap: 7px 12px; font-size: 12.4px; padding-top: 10px; padding-bottom: 10px; }
  .trust .t-sep { display: none; }
  /* Trên điện thoại câu dài không được nowrap, nếu không sẽ tràn ra ngoài màn hình */
  .trust .t-seal { white-space: normal; flex-basis: 100%; align-items: flex-start; }
  .trust .t-seal span { margin-top: 1px; }
  .trust .t-where { flex-basis: 100%; font-size: 12px; }
}
@media (max-width: 640px) {
  /* Điện thoại: thu về hình tròn, nhãn thành bong bóng nổi bên trái */
  .fab { right: 12px; bottom: 14px; gap: 10px; }

  /* Ở màn hình đầu, cụm nút nổi đè lên nút "Gọi" và "Tự tính chi phí" của hero.
     Ẩn cho tới khi khách cuộn được một đoạn — track.js gắn class .fab-an vào body. */
  body.fab-an .fab { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(10px); }
  .fab { transition: opacity .22s, visibility .22s, transform .22s; }

  .fab a {
    width: 54px;
    height: 54px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    position: relative;
  }
  .fab .fab-ico { width: 54px; height: 54px; background: transparent; }
  .fab svg { width: 25px; height: 25px; }

  .fab-lbl {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    padding: 7px 11px;
    border-radius: 10px;
    background: #2a1310;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .32);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s;
    pointer-events: none;
  }
  .fab-lbl::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 50%;
    margin-top: -5px;
    border: 5px solid transparent;
    border-left-color: #2a1310;
    border-right-width: 0;
  }
  .fab-lbl b { font-size: 12.5px; }
  .fab-lbl i { font-size: 10.7px; }
  .fab.hien-nhan .fab-lbl { opacity: 1; visibility: visible; }
}
@media (max-width: 560px) {
  .qf { gap: 8px; }
  .qf a { min-height: 54px; padding: 9px 10px; gap: 8px; }
  .qf .qf-i { font-size: 17px; }
  .qf .qf-t b { font-size: 12.4px; }
  .qf .qf-t i { display: none; }
  .lm-sec { padding: 26px 0 4px; }
  .lm--in { margin: 26px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .fab .zalo.rung .fab-ico { animation: none; }
  .qf a:hover, .lm-btn:hover { transform: none; }
  .fab-lbl { transition: none; }
}
