/* ==================================================
   RESET & BASE
   ================================================== */

* {
  box-sizing: border-box;
}

html {
  -moz-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f6f8fb;
  color: #23303e;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

body.no-scroll {
  overflow: hidden;
}

/* ===============================
   HEADER WRAPPER
================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: linear-gradient(135deg, #c4161c, #ff3b3b);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}

/* 2 HÀNG: LOGO TRÊN – CONTACT DƯỚI */
.header-inner {
  max-width: 1080px;
  margin: auto;
  padding: 12px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===============================
   LOGO
================================ */

.logo-text {
  color: #fff;
  text-align: center;
}

.logo-main {
  font-size: 26px;
  font-weight: 800;
  margin: 0;
}

.logo-sub {
  font-size: 14px;
  opacity: .95;
  margin: 0;
}

/* ===============================
   HEADER CONTACT – 1 HÀNG
================================ */

.header-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
}

/* contact button */
.header-contact a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}

.header-contact a:hover {
  background: #fff;
  color: #c4161c;
}

/* ===============================
   ZALO NỔI BẬT
================================ */

.contact-zalo {
  background: #00bfa5;
  animation: pulse 2.5s infinite;
}

.contact-zalo:hover {
  background: #00a892;
  color: #fff;
}

/* ===============================
   PULSE
================================ */

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.4); }
  70% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* ===============================
   MOBILE TỐI ƯU
================================ */

@media (max-width: 768px) {

  .header-inner {
    padding: 10px 14px 12px;
    gap: 8px;
  }

  .logo-main {
    font-size: 20px;
  }

  .logo-sub {
    font-size: 12px;
  }

  .header-contact {
    gap: 6px;
  }

  .header-contact a {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* ẩn icon số phụ cho gọn */
  .phone-secondary i {
    display: none;
  }
}

/* ==================================================
   MAIN LAYOUT
   ================================================== */

main {
  max-width: 1080px;
  margin: auto;
  padding: 140px 20px 180px; /* chừa footer */
}

/* ==================================================
   HERO
   ================================================== */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

@media (max-width:768px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

.hero-box,
.form-box {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.hero-sub {
  color: #5a6b80;
  margin-top: 10px;
}

.hero-points {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width:768px) {
  .hero-points {
    grid-template-columns: 1fr;
  }
}

.point {
  background: #90e6ac;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
}

/* ==================================================
   FORM
   ================================================== */

.form-box form {
  display: grid;
  gap: 12px;
}

input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  font-size: 16px;
}

input:focus {
  outline: none;
  border-color: #ff3b3b;
  box-shadow: 0 0 0 3px rgba(255,59,59,.25);
}

button {
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  background: linear-gradient(135deg,#0a76d7,#0b62b3);
  color: #fff;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(135deg,#16c47f,#0bb07b);
}

/* ==================================================
   FLOAT CONTACT
   ================================================== */

.float-contact,
.float-left {
  bottom: 22%; 
  transform: translateY(-50%);
  position: fixed;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 900;
}

.float-contact {
  right: 16px;
  
}

.float-left {
  left: 16px;
  
}

.float-badge {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.float-badge img {
  width: 40px;
  height: 40px;
}

/* ==================================================
   FOOTER
   ================================================== */

.app-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #d60000;
  z-index: 1400;
}

.footer-bar {
  height: 40px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.footer-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 11px;
  text-align: center;
}

.footer-btn i {
  font-size: 18px;
  display: block;
  margin-bottom: 2px;
}

/* ===============================
   BOTTOM SHEET (UPGRADED)
================================ */
.bottom-sheet {
  position: fixed;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;

  width: min(92vw, 420px);
  max-width: 92vw;

  background: #fff;
  border-radius: 16px;
  padding: 10px;

  display: flex;
  flex-direction: column;
  gap: 6px;

  box-shadow: 0 14px 36px rgba(0,0,0,.22);
  z-index: 1300;

  transition:
    opacity .22s ease,
    transform .22s cubic-bezier(.2,.7,.3,1);

  will-change: transform, opacity;
}


.bottom-sheet.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

.bottom-sheet a {
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 12px;
  text-decoration: none;
  color: #111827;
  -webkit-tap-highlight-color: transparent;
}

.bottom-sheet a:hover {
  background: #f3f4f6;
}

/* ==================================================
   OVERLAY
   ================================================== */

/* ===============================
   OVERLAY
================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 1200;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}


/* ==================================================
   DISCLAIMER
   ================================================== */

/* ===============================
   DISCLAIMER
================================ */
.disclaimer {
  max-width: 1080px;
  margin: 24px auto 40px; /* 👈 quan trọng */
  padding: 14px 18px;

  background: #f9fafb;
  border-left: 4px solid #e5e7eb;
  border-radius: 10px;

  color: #6b7280;
  font-size: 13px;
  line-height: 1.55;
}

.disclaimer em {
  font-style: italic;
}

.disclaimer.compact {
  font-size: 12.5px;
  padding: 12px 12px;
}
section + .disclaimer {
  margin-top: 12px;
}
/* anchor offset for fixed header */

#disclaimer {
  scroll-margin-top: 200px;   /* tránh header */
}
.disclaimer::after {
  content: "";
  display: block;
  height: 72px; /* = chiều cao sticky + footer */
}


/* ==================================================
   ACCESSIBILITY
   ================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* ===============================
   TYPING LINE – ENHANCED (FIXED)
================================ */
.typing-line {
  font-size: 30px;
  font-size: 30px;
  font-weight: 600;
  color: #0905f7;
  margin: 18px 0;
  min-height: 4.6em;

  /* animation base */
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity .4s ease,
    transform .4s ease,
    translate .35s ease;

  /* text look */
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(255,255,255,.7);

  /* cursor setup */
  position: relative;
  display: inline-block; /* VERY IMPORTANT */
  white-space: nowrap;   /* 👈 1 dòng, không wrap */
}

/* Khi đang gõ */
.typing-line.active {
  opacity: 1;
  transform: translateY(0);

  text-shadow:
    0 1px 0 rgba(255,255,255,.8),
    0 0 8px rgba(37,99,235,.15);
}

/* Cursor */
.typing-line.active::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.2em;
  margin-left: 4px;

  background: linear-gradient(
    to bottom,
    transparent,
    #2563eb,
    transparent
  );

  animation: cursorBlink 1s steps(1) infinite;
  vertical-align: -0.15em;
}

.typing-line.done::after {
  display: none;
}

/* Cursor blink animation */
@keyframes cursorBlink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .float-contact,
  .float-left {
    bottom: 22%;
  }

  .typing-line {
    font-size: 18px;
  }
}


   /* ===============================
   STICKY LEAD CTA
================================ */
.sticky-lead {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 48px; /* nằm ngay trên footer / mobile nav */
  z-index: 1200;

  display: flex;
  justify-content: center;
  pointer-events: none;
}

.sticky-inner {
  height: 56px;                 /* 🔒 FIXED HEIGHT */
  padding: 0 8px;               /* horizontal only */

  display: flex;
  align-items: center;          /* vertical centering */
  background: linear-gradient(135deg, #ef4444, #ff3b3b);
  border-radius: 999px;

  box-shadow: 0 8px 24px rgba(239,68,68,.32);
  animation: pulseGlow 1.6s infinite;

  pointer-events: auto;
}

/* CTA button */
.sticky-btn {
  /* visual */
  background: #ffffff;
  color: #ef4444;
  border: none;
  border-radius: 999px;

  /* LOCK GEOMETRY (key fix) */
  height: 44px;                 /* fixed height */
  padding: 0 18px;              /* horizontal only */
  line-height: 44px;            /* match height → same in FF & Chrome */

  /* text */
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;

  /* behavior */
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;

  /* font rendering consistency */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* hover / active */
.sticky-btn:hover {
  transform: scale(1.05);
}

.sticky-btn:active {
  transform: scale(0.96);
}

/* ===============================
   PULSE ANIMATION (UNCHANGED)
================================ */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(239,68,68,.55);
  }
  90% {
    box-shadow: 0 0 0 18px rgba(239,68,68,0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239,68,68,0);
  }
}
/* ===============================
   STICKY FORM OVERLAY
================================ */
.sticky-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);

  display: none;
  align-items: flex-end;
  z-index: 2000;
}

.sticky-form-overlay.show {
  display: flex;
}

/* form box */
.sticky-form-box {
  background: #ffffff;
  width: 100%;
  max-width: 720px;
  margin: auto;
  padding: 22px 20px 26px;

  border-radius: 18px 18px 0 0;
  position: relative;

  animation: slideUp .35s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
/* ===============================
   STICKY FORM
================================ */
.sticky-form-box h3 {
  text-align: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.sticky-form input {
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 10px;

  border-radius: 10px;
  border: 2px solid #e5e7eb;
  font-size: 15px;

  transition: all .2s ease;
}

.sticky-form input:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.25);
}

.sticky-form button[type="submit"] {
  width: 100%;
  padding: 13px;

  border-radius: 12px;
  border: none;

  background: linear-gradient(135deg,#ef4444,#ff3b3b);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;

  transition: transform .15s ease;
}

.sticky-form button:active {
  transform: scale(0.97);
}
/* ===============================
   QUICK ACTIONS
================================ */
.sticky-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.sticky-actions a {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;

  font-weight: 700;
  text-decoration: none;
}

.sticky-actions .call {
  background: #ef4444;
  color: #fff;
}

.sticky-actions .zalo {
  background: #2563eb;
  color: #fff;
}
/* ===============================
   FORM CONSENT
================================ */
.form-consent {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

.form-consent a {
  color: #6b7280;
  text-decoration: underline;
}
/* ===============================
   CLOSE BUTTON
================================ */
.close-sticky {
  position: absolute;
  top: 2px;
  right: 2px;

  background: red;
  border: none;
  font-size: 8px;
  cursor: pointer;
}
/* ===============================
   LEAD POPUP
================================ */
.lead-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);

  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.lead-popup.show {
  display: flex;
}

.popup-content {
  background: #fff;
  padding: 24px;
  width: 90%;
  max-width: 360px;
  border-radius: 16px;
  text-align: center;
}

.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
section {
  scroll-margin-top: 180px; /* = hoặc > chiều cao header */
}
/* ===============================
   STICKY CTA TEXT ATTENTION
================================ */

/* Text wrapper */
.sticky-btn .cta-text {
  display: inline-block;
  animation: ctaZoomPulse 1.8s ease-in-out infinite;
  will-change: transform, text-shadow;
}

/* Animation keyframes */
@keyframes ctaZoomPulse {
  0% {
    transform: scale(1);
    text-shadow: none;
  }

  40% {
    transform: scale(1.08);
    text-shadow: 0 0 10px rgba(239,68,68,.55);
  }

  60% {
    transform: scale(1.08);
    text-shadow: 0 0 12px rgba(239,68,68,.65);
  }

  100% {
    transform: scale(1);
    text-shadow: none;
  }
}
/* ===============================
   FORM FOCUS HIGHLIGHT
================================ */


/* hero-box KHÔNG bị ảnh hưởng */
.hero-box.focused {
  outline: none;
  box-shadow: none;
}

/* ===============================
   FORM FOCUS HIGHLIGHT
================================ */

/* form-box khi được focus */
.form-box.focused {
  outline: 3px solid rgba(239,68,68,.25);
  box-shadow:
    0 0 0 6px rgba(239,68,68,.15),
    0 12px 32px rgba(239,68,68,.18);
  transform: translateY(-2px);
  transition:
    box-shadow .25s ease,
    transform .25s ease,
    outline .25s ease;
}

/* hero-box KHÔNG bị ảnh hưởng */
.hero-box.focused {
  outline: none;
  box-shadow: none;
}

/* ===============================
   HIDE FLOAT & STICKY (MOBILE ONLY)
================================ */

.hide-when-focus {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.94);
    transition: opacity .25s ease, transform .25s ease;
}

/* ===============================
   HIDE FLOAT & STICKY WHEN FORM FOCUS
================================ */
.hide-when-form-focus {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.94);
  transition: opacity .25s ease, transform .25s ease;
}

button,
.sticky-btn,
.accordion-header {
  white-space: normal;
  line-height: 1.4;
  text-align: center;
}
