/**
 * Site footer — China Halal Tours style
 * Colors: see common.css :root tokens
 */
#footer.site-footer {
  position: relative;
  overflow: hidden;
  color: var(--text-on-primary);
  background: var(--primary);
}

#footer .site-footer__inner {
  width: min(100% - 40px, var(--layout-max-width));
  margin: 0 auto;
}

/* Decorative backgrounds */
#footer .site-footer__main {
  position: relative;
  padding: 72px 0 56px;
  --tas-water-inset: clamp(32px, 4vw + 14px, 56px);
}

#footer .site-footer__main::before,
#footer .site-footer__main::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  pointer-events: none;
  height: min(100%, 280px);
  width: auto;
  aspect-ratio: 1;
  max-width: min(42vw, 280px);
  background-image: url("../images/water.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#footer .site-footer__main::before {
  left: var(--tas-water-inset);
  transform: translate(-30%, -50%) scaleX(-1);
}

#footer .site-footer__main::after {
  right: var(--tas-water-inset);
  transform: translate(30%, -50%);
}

#footer .site-footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(4, minmax(0, 1fr));
  gap: 0;
}

#footer .site-footer__col {
  padding-left: 28px;
  border-left: 1px solid var(--accent-divider);
}

#footer .site-footer__brand {
  padding-right: 28px;
}

/* Brand block */
#footer .site-footer__brand-link {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  text-decoration: none;
  color: inherit;
}

#footer .site-footer__logo {
  width: 270px; 
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

#footer .site-footer__brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#footer .site-footer__title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-on-primary);
}

#footer .site-footer__tagline {
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--text-on-primary-muted);
}

#footer .site-footer__desc {
  margin: 0 0 28px;
  max-width: 320px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-on-primary-muted);
}

#footer .site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#footer .site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#footer .site-footer__social-link i {
  font-size: 0.95rem;
}

#footer .site-footer__social-link:hover,
#footer .site-footer__social-link:focus-visible {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Column headings */
#footer .site-footer__heading {
  margin: 0 0 22px;
  /* font-family: "Playfair Display", "Times New Roman", Georgia, serif; */
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--accent);
}

/* Quick links */
#footer .site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#footer .site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--text-on-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

#footer .site-footer__link-chevron {
  color: var(--accent);
  font-size: 0.875rem;
  line-height: 1;
}

#footer .site-footer__link:hover,
#footer .site-footer__link:focus-visible {
  color: var(--accent);
}

/* Icon lists */
#footer .site-footer__icon-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#footer .site-footer__icon-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text-on-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

#footer .site-footer__icon-link i {
  flex-shrink: 0;
  width: 18px;
  margin-top: 2px;
  text-align: center;
  color: var(--accent);
  font-size: 0.95rem;
}

#footer a.site-footer__icon-link:hover,
#footer a.site-footer__icon-link:focus-visible {
  color: var(--accent);
}

/* Trust bar */
#footer .site-footer__trust {
  border-top: 1px solid var(--accent-divider);
  border-bottom: 1px solid var(--accent-divider);
}

#footer .site-footer__trust-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#footer .site-footer__trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 92px;
  padding: 18px 16px;
  border-right: 1px solid var(--accent-divider);
}

#footer .site-footer__trust-item:last-child {
  border-right: none;
}

#footer .site-footer__trust-item i {
  flex-shrink: 0;
  font-size: 1.75rem;
  color: var(--accent);
}

#footer .site-footer__trust-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#footer .site-footer__trust-line {
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--text-on-primary);
  white-space: nowrap;
}

/* Bottom bar */
#footer .site-footer__bottom {
  padding: 18px 0 22px;
}

#footer .site-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#footer .site-footer__copyright {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-on-primary-muted);
}

#footer .site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#footer .site-footer__legal-link {
  font-size: 0.8125rem !important;
  line-height: 1.5;
  color: var(--text-on-primary-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

#footer .site-footer__legal-link:hover,
#footer .site-footer__legal-link:focus-visible {
  color: var(--accent);
}

#footer .site-footer__legal-sep {
  color: var(--accent-soft);
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 1199px) {
  #footer .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px 28px;
  }

  #footer .site-footer__brand {
    grid-column: 1 / -1;
    padding-right: 0;
  }

  #footer .site-footer__col {
    padding-left: 0;
    border-left: none;
  }

  #footer .site-footer__trust-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #footer .site-footer__trust-item:nth-child(3) {
    border-right: none;
  }
}

@media (max-width: 767px) {
  #footer .site-footer__main {
    padding: 48px 0 40px;
  }

  #footer .site-footer__main {
    --tas-water-inset: clamp(12px, 4vw, 24px);
  }

  #footer .site-footer__main::before,
  #footer .site-footer__main::after {
    height: min(100%, 160px);
    max-width: min(36vw, 160px);
  }

  #footer .site-footer__main::before {
    transform: translate(-22%, -50%) scaleX(-1);
  }

  #footer .site-footer__main::after {
    transform: translate(22%, -50%);
  }

  #footer .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  #footer .site-footer__desc {
    max-width: none;
  }

  #footer .site-footer__trust-grid {
    grid-template-columns: 1fr;
  }

  #footer .site-footer__trust-item {
    justify-content: flex-start;
    border-right: none;
    border-bottom: 1px solid var(--accent-divider);
  }

  #footer .site-footer__trust-item:last-child {
    border-bottom: none;
  }

  #footer .site-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  #footer .site-footer__trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #footer .site-footer__trust-item:nth-child(2n) {
    border-right: none;
  }
}
