/* ============================================================
   layout.css – Header, Navigation, Footer, Sticky CTA
   ============================================================ */

/* ===== SITE HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
  transition: all var(--transition);
}

.site-header.scrolled {
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Header Navigation (Desktop) */
.header-nav {
  display: none;
}

@media (min-width: 900px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
  }

  .nav-link {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    padding: 6px 0;
    transition: color var(--transition);
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-navy);
    transition: width var(--transition);
    border-radius: 2px;
  }

  .nav-link:hover {
    color: var(--brand-navy);
  }

  .nav-link:hover::after {
    width: 100%;
  }
}

/* Header Call Action */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--brand-navy);
  padding: 8px 18px;
  background: var(--color-blue-light);
  border: 1px solid rgba(10, 37, 107, 0.14);
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  white-space: nowrap;
}

.header-call .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
  display: inline-block;
}

.header-call:hover {
  background: var(--brand-navy);
  color: var(--text-white);
  border-color: var(--brand-navy);
  transform: translateY(-1px);
}

.header-call:hover .status-dot {
  background: #4ADE80;
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.4);
}

/* ===== SITE FOOTER ===== */
.site-footer {
  background: #07152E;
  color: #94A3B8;
  border-top: 1px solid #1E293B;
  padding: 56px 0 110px; /* Chừa khoảng trống cho sticky CTA trên mobile */
}

@media (min-width: 768px) {
  .site-footer {
    padding: 64px 0 64px;
  }
}

.footer-inner {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.footer-logo {
  display: inline-block;
  background: #FFFFFF;
  padding: 10px 22px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.footer-logo .logo-img {
  height: 38px;
}

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: #E2E8F0;
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}

.footer-copy {
  font-size: 13px;
  color: #64748B;
  line-height: 1.7;
}

.footer-copy a {
  color: #38BDF8;
  font-weight: 600;
  transition: color var(--transition);
}

.footer-copy a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

/* ===== STICKY CTA MOBILE ===== */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 10px 16px;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-cta.visible {
  transform: translateY(0);
}

.sticky-bottom-row {
  display: flex;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
}

.sticky-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
}

.sticky-call {
  background: var(--brand-red);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
  position: relative;
}

.sticky-pulse {
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--brand-red);
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

.sticky-zalo {
  background: #0068FF;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 104, 255, 0.28);
}

@media (min-width: 768px) {
  .sticky-cta {
    display: none; /* Desktop có header & CTA rõ ràng, không che khuất màn hình */
  }
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border-medium);
  color: var(--brand-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--transition);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-navy);
  color: #FFFFFF;
  border-color: var(--brand-navy);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(10, 37, 107, 0.25);
}

@media (min-width: 768px) {
  .back-to-top {
    bottom: 30px;
    right: 30px;
  }
}