/* =============================================================
   THÉP TRỌNG PHÁT — layout.css
   Khung trang: header · brand · nav · footer · nút nổi · back-to-top.
   ============================================================= */

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(18, 40, 76, 0.08);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), height 0.3s var(--ease);
}
.site-header.scrolled {
  background: #ffffff;
  box-shadow: 0 6px 26px rgba(18, 40, 76, 0.1);
  height: 70px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

/* ---------- Brand / logo ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  height: 50px;
  width: auto;
  flex: 0 0 auto;
  transition: height 0.3s var(--ease);
}
.site-header.scrolled .brand-mark { height: 44px; }
.brand-text { display: flex; flex-direction: column; gap: 5px; line-height: 1.15; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: 0.3px; color: var(--navy); }
.brand-name .accent { color: var(--orange); }
.brand-tag { font-size: 10.5px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  position: relative;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.3s var(--ease);
}
.nav-link:hover { color: var(--orange); }
.nav-link:hover::after { width: 100%; }
.nav-cta { margin-left: 6px; }
.nav-cta:hover { color: #fff; }

/* ---------- Hamburger ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  background: rgba(18, 40, 76, 0.05);
  border: 1px solid rgba(18, 40, 76, 0.15);
  border-radius: 10px;
  cursor: pointer;
  padding: 0 11px;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--navy); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s var(--ease); }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--muted-light); border-top: 4px solid var(--orange); }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: var(--muted-light); }
/* Logo navy+đỏ chìm trên nền tối -> đặt lên tile trắng bo góc (chỉ ở footer) */
.site-footer .brand-mark {
  box-sizing: content-box;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1.4fr; gap: 40px; padding: 64px 24px 46px; }
.footer-brand .brand { margin-bottom: 18px; }
.footer-desc { font-size: 0.96rem; line-height: 1.7; max-width: 380px; margin-bottom: 20px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.5px; position: relative; padding-bottom: 10px; }
.footer-col h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--orange); }
.footer-col ul { display: grid; gap: 11px; }
.footer-col a { font-size: 0.96rem; transition: color 0.2s var(--ease), padding-left 0.2s var(--ease); }
.footer-col a:hover { color: var(--orange); padding-left: 4px; }

/* Liên hệ có icon từng dòng */
.footer-contact li { display: flex; align-items: flex-start; gap: 11px; font-size: 0.95rem; line-height: 1.5; margin-bottom: 14px; }
.footer-contact svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; fill: none; stroke: var(--orange); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.footer-contact a { color: var(--muted-light); transition: color 0.2s var(--ease); }
.footer-contact a:hover { color: var(--orange); }
.footer-hotline { color: var(--orange) !important; font-weight: 800; font-size: 1.05rem; }

.footer-social { display: flex; gap: 12px; }
.footer-social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); transition: background 0.25s var(--ease), transform 0.25s var(--ease); }
.footer-social a:hover { background: var(--orange); transform: translateY(-3px); }
.footer-social svg { width: 20px; height: 20px; fill: #fff; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 20px 0; font-size: 0.9rem; }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted-light); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: var(--orange); }

/* ---------- Nút về đầu trang ---------- */
.back-to-top { position: fixed; left: 18px; bottom: 18px; z-index: 200; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s var(--ease), background 0.25s var(--ease); }
.back-to-top.show { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--orange); }
.back-to-top svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Nút nổi: Gọi + Zalo ---------- */
.floating-actions { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 14px; }
.fab { position: relative; width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28); transition: transform 0.25s var(--ease); }
.fab:hover { transform: scale(1.08); }
.fab svg { width: 27px; height: 27px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* màu nền + currentColor cho vòng pulse */
.fab-call { background: var(--orange); color: var(--orange); }
.fab-zalo { background: var(--zalo); color: var(--zalo); }
.fab::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 currentColor; animation: pulse 2s ease-out infinite; }

/* ---------- Responsive (layout) ---------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  /* Mobile nav drawer */
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh; height: 100dvh;
    width: min(82vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: calc(var(--header-h) + 12px) 26px 26px;
    background: var(--navy-900);
    box-shadow: -16px 0 50px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
  }
  body.nav-open .nav { transform: translateX(0); }
  .nav .nav-link { width: 100%; padding: 12px 0; font-size: 17px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav .nav-link:hover { color: var(--orange); }
  .nav-link::after { display: none; }
  .nav-cta { margin: 16px 0 0; width: 100%; }
  /* Header giữ nền trắng đặc khi mở menu */
  body.nav-open .site-header { background: #ffffff; box-shadow: 0 6px 26px rgba(18, 40, 76, 0.1); }
}

@media (max-width: 640px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding: 48px 24px 36px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .back-to-top { bottom: 84px; }
}
