/* ================================
   Footer: Phượng Hoàng V2
   Industrial anchor with unmistakable presence
   ================================ */

.footer {
  position: relative;
  z-index: 1;
  /* Footer always dark: scope text tokens locally regardless of page theme */
  --ph-text-primary: #EDF1F7;
  --ph-text-secondary: #94A6BE;
  --ph-text-muted: #7E94AE;
  --ph-border-default: rgba(148, 166, 190, 0.08);
  --ph-divider: rgba(148, 166, 190, 0.06);
  background-color: #020d17;
  padding: clamp(0.75rem, 1.5vw, 1.5rem) 0 0;
  margin: 0;
}

/* Tapered whisper: subtle green accent fades at edges, not a hard rule */
.footer::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 30%,
    rgba(29, 139, 44, 0.10) 42%,
    rgba(29, 139, 44, 0.22) 50%,
    rgba(29, 139, 44, 0.10) 58%,
    transparent 70%,
    transparent 100%
  );
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.footer-main {
  max-width: var(--ph-container-wide);
  margin: 0 auto;
  padding: 0 var(--ph-space-md);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .footer-shell { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .footer-main {
    display: grid;
    grid-template-columns: 1fr minmax(240px, 280px);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
  }

  .footer-shell {
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
  }

  .footer-qr {
    padding-top: 0;
    border-top: none;
  }

  .footer-qr-codes {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }

  .footer-qr-item img {
    width: 100px;
    height: 100px;
  }
}

/* ── Brand column ── */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand .footer-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ph-text-primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.footer-brand h5 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ph-accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--ph-text-muted);
  line-height: 1.75;
  max-width: 480px;
}

/* ── Badges ── */
.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.25rem;
}

.footer-badges span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 18px;
  background: var(--ph-accent-subtle);
  border: 1px solid var(--ph-border-default);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ph-text-muted);
}

.footer-badges span::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ph-accent);
  flex-shrink: 0;
}

/* ── Link columns ── */
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.footer-block h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ph-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.75rem;
}

/* Green underline beneath column headings */
.footer-block h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--ph-accent);
}

.footer-block ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-block li {
  font-size: 0.875rem;
  color: var(--ph-text-muted);
  line-height: 1.65;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.footer-block li strong {
  font-weight: 600;
  color: var(--ph-text-secondary);
  min-width: 52px;
}

.footer-block a {
  color: var(--ph-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease,
              transform 0.2s ease;
}

.footer-block a:hover {
  color: var(--ph-accent);
  transform: translateX(4px);
}

/* ── Bottom bar ── */
.footer-bottom {
  border-top: 1px solid var(--ph-divider);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: 1.5rem var(--ph-space-md);
}

.footer-bottom p {
  max-width: var(--ph-container-wide);
  margin: 0 auto;
  font-size: 0.75rem;
  color: var(--ph-text-muted);
  opacity: 0.5;
  text-align: center;
}

/* ── QR download section ── */
.footer-qr {
  /* sits beside .footer-shell at desktop; separator added on mobile */
}

@media (max-width: 1023px) {
  .footer-qr {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    padding-top: clamp(1.5rem, 3vw, 2.5rem);
    border-top: 1px solid var(--ph-divider);
  }
}

.footer-qr-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ph-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.375rem;
}

.footer-qr-sub {
  font-size: 0.8125rem;
  color: var(--ph-text-muted);
  margin-bottom: 1.25rem;
}

.footer-qr-codes {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.footer-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-qr-item img {
  width: 130px;
  height: 130px;
  border-radius: 8px;
  border: 1px solid var(--ph-border-default);
  background: #fff;
  padding: 8px;
  object-fit: contain;
}

.footer-qr-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ph-text-secondary);
}

.footer-qr-meta {
  font-size: 0.6875rem;
  color: var(--ph-text-muted);
}

@media (max-width: 379px) {
  .footer-qr-codes {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
  }
}

/* ── Floating Zalo ── */
.floating-zalo {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 140;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ph-accent);
  color: var(--ph-text-on-accent);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 8px 32px rgba(29,139,44,0.45),
              0 2px 8px rgba(0,0,0,0.30);
  transition: all 0.2s ease;
}

.floating-zalo:hover {
  background: var(--ph-accent-hover);
  box-shadow: 0 12px 40px rgba(29,139,44,0.55);
  transform: translateY(-2px);
  color: var(--ph-text-on-accent);
}

.floating-zalo .zalo-icon {
  width: 22px; height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.floating-zalo .zalo-icon svg { width: 20px; height: 20px; }

.zalo-text { white-space: nowrap; }

@media (max-width: 479px) {
  .zalo-text { display: none; }
  .floating-zalo {
    padding: 14px;
    right: 12px;
    bottom: 16px;
  }
}
