.footer {
  position: relative;
  background: var(--color-charcoal);
  border-top: 1px solid var(--color-border);
  color: #fff;
  overflow: hidden;
  min-height: 500px;
}

/* Camada de fundo com textura - OCUPA TUDO */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: -50px;

  background-image: url("../images/linhas-footer.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  opacity: 0.1;
  filter: blur(0.4px) brightness(0.9);

  pointer-events: none;
  z-index: 0;
}

/* Elementos principais ficam acima do fundo */
.footer > .container,
.footer > .footer-bottom {
  position: relative;
  z-index: 2;
}

/* ================================
   CONTROLE DE ALINHAMENTO
   ================================ */

:root {
  --footer-band-height: 28px;
  --footer-knot-width: 740px;
  --footer-band-bleed: 2px;
  --footer-bottom-offset: -1px;
  --footer-knot-seam-overlap: 2px;
  --footer-knot-overlap: 0px;

  --footer-columns-offset: 170px;

  --footer-links-title-size: 1.45rem;
  --footer-links-item-size: 1rem;
  --footer-contact-size: 0.98rem;

  --footer-link-underline: var(--color-crimson);
}

/* Grid principal do footer */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding: 4rem 0 4rem 0;
  position: relative;
  z-index: 3;
  align-items: start;
}

/* Tablet: brand + navegação empilha embaixo */
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.35fr 1fr;
    column-gap: 3.25rem;
  }
}

/* Desktop: brand + bloco de 3 colunas (lado a lado) */
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2.6fr 3fr; /* esquerda (brand) + direita (3 colunas) */
    column-gap: 3.5rem;
  }
}

/* ================================
   NAV (3 COLUNAS LADO A LADO)
   ================================ */

.footer-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.25rem;
  align-items: start;
}

/* Tablet: 2 colunas */
@media (min-width: 768px) {
  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2.25rem;
  }
}

/* Desktop: 3 colunas */
@media (min-width: 1024px) {
  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 2.25rem;
  }

  /* ✅ offset só nas colunas de links (não mexe no brand) */
  .footer-nav .footer-links {
    padding-top: var(--footer-columns-offset);
  }
}

/* Em telas menores, não aplica offset */
@media (max-width: 1023px) {
  .footer-nav .footer-links {
    padding-top: 0;
  }
}

/* ================================
   BRAND / LOGO (IMG)
   ================================ */

.footer-brand {
  max-width: 24rem;
  display: flex;
  flex-direction: column;
}

.footer-logo-img {
  max-width: 350px;
  height: auto;
  display: block;
  margin-bottom: 1.2rem;
}

/* Textos com opacidade */
.footer-description,
.footer-bottom p,
.footer-links a,
.footer-bottom-links a,
.contact-item {
  color: rgba(255, 255, 255, 0.78);
}

/* Títulos das seções */
.footer-links h3 {
  font-family: var(--font-body);
  font-size: var(--footer-links-title-size);
  color: #fff;
  margin-bottom: 1rem;
  margin-top: 0;
  letter-spacing: 0.02em;
}

.footer-description {
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* Área de contato */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--footer-contact-size);
  transition: color var(--transition-fast);
  text-decoration: none;
}

.contact-item i,
.contact-item svg,
.contact-item [data-lucide] {
  width: 1.05rem;
  height: 1.05rem;
  color: #fff !important;
  stroke: #fff !important;
  fill: none !important;
  flex-shrink: 0;
}

.contact-item:hover {
  color: #fff;
}

/* Ícones sociais */
.footer-social {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 2.65rem;
  height: 2.65rem;

  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  color: #fff !important;

  transition: all var(--transition-normal);
}

.social-link i,
.social-link svg,
.social-link [data-lucide],
.social-link svg *,
.social-link [data-lucide] * {
  width: 1.35rem;
  height: 1.35rem;
  color: #fff !important;
  stroke: #fff !important;
  fill: none !important;
  filter: none !important;
  opacity: 1 !important;
  flex-shrink: 0;
}

.social-link:hover {
  background: var(--color-crimson);
  color: #fff;
  transform: translateY(-2px);
}

/* Listas de links */
.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  font-family: var(--font-body);
  font-size: var(--footer-links-item-size);
  transition: color var(--transition-fast);
  position: relative;
  display: inline-block;
  text-decoration: none;
}

.footer-links a::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--footer-link-underline);
  transition: width var(--transition-normal);
}

.footer-links a:hover {
  color: #fff;
}

.footer-links a:hover::after {
  width: 100%;
}

/* ================================
   FAIXA DECORATIVA COM NÓ
   ================================ */

.footer-band-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 120px;
  height: var(--footer-band-height);
  pointer-events: none;
  z-index: 5;
}

.footer-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--footer-bottom-offset);
  height: calc(var(--footer-band-height) + var(--footer-band-bleed));

  background-image: url("../images/faixa-continua.webp");
  background-repeat: repeat-x;
  background-position: left center;
  background-size: auto 100%;

  z-index: 1;

  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6)) saturate(1.2)
    contrast(1.15);
}

.footer-knot-left {
  position: absolute;
  left: calc(-1 * var(--footer-knot-seam-overlap));
  bottom: var(--footer-bottom-offset);

  width: calc(var(--footer-knot-width) + var(--footer-knot-seam-overlap));
  height: calc(var(--footer-band-height) + var(--footer-band-bleed));

  background-image: url("../images/faixa-com-noi.webp");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 100%;

  transform: translateX(var(--footer-knot-overlap));
  z-index: 2;

  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.65)) saturate(1.25)
    contrast(1.2);
}

/* Footer bottom */
.footer-bottom {
  border-top: none;
  padding: 2.25rem 0;
  margin-top: 1rem;
  position: relative;
  z-index: 10;
  background: transparent;
  backdrop-filter: none;
}

.footer-bottom-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
}

.footer-bottom-links a:hover {
  color: #fff;
}

/* ================================
   RESPONSIVO (faixa)
   ================================ */

@media (max-width: 1279px) {
  :root {
    --footer-knot-width: clamp(160px, 26vw, 320px);
  }

  .footer-band-container {
    bottom: 100px;
  }
}

@media (max-width: 1024px) {
  .footer-band-container {
    bottom: 90px;
  }
}

@media (max-width: 768px) {
  .footer-band-container {
    bottom: 80px;
  }
}

@media (max-width: 640px) {
  :root {
    --footer-band-height: 26px;
    --footer-knot-width: 160px;

    --footer-links-title-size: 1.35rem;
    --footer-links-item-size: 0.98rem;
    --footer-contact-size: 0.95rem;
  }

  .footer-band-container {
    bottom: 70px;
  }

  .footer-bottom {
    padding: 1.75rem 0;
  }
}

@media (max-width: 480px) {
  :root {
    --footer-knot-width: 120px;
  }

  .footer-band-container {
    bottom: 60px;
  }
}
