/* FOOTER */

/* Override section padding for footer-main to be tighter */
.footer-main.section {
  padding-bottom: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.18fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* Cuarta columna: Webpay / pago en línea (3ª columna = contacto, un poco más ancha) */
.footer-grid--has-pago {
  grid-template-columns: minmax(0, 1.72fr) minmax(0, 1fr) minmax(0, 1.14fr) minmax(0, 1fr);
  gap: var(--space-2xl);
}

/* Brand column */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-brand img {
  width: 180px;
  max-width: 100%;
  height: auto;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  max-width: 320px;
  line-height: 1.65;
}

/* Nav + Contact + Pago columns share heading styles */
.footer-nav h4,
.footer-contact h4,
.footer-pago h4 {
  color: #ffffff;
  margin-bottom: var(--space-lg);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
}

.footer-pago {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}

/* Solo logo enlazado, sin caja ni fondo */
.footer-pago-link {
  display: inline-block;
  align-self: flex-start;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer-pago-link:hover {
  opacity: 0.88;
}

.footer-pago-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer-pago-link img {
  max-width: 200px;
  width: 100%;
  height: auto;
  display: block;
  filter: none;
}

.footer-nav ul,
.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-nav li a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: var(--font-size-base);
  transition: color 0.2s ease;
}

.footer-nav li a:hover {
  color: #ffffff;
}

/* Contact items */
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--font-size-base);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.footer-contact-icon {
  flex-shrink: 0;
  margin-top: 2px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.footer-contact-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

/* Social icons row */
.footer-social {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s ease;
}

.footer-social-link:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

.footer-social-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}

.footer-contact a:hover {
  color: #ffffff;
}

/* Bottom bar */
.footer-bottom {
  background-color: rgba(0, 0, 0, 0.3);
  padding: var(--space-lg) var(--navbar-padding-x);
}

.footer-bottom .section-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.875rem;
  margin: 0;
  /* Color handled by .text-white utility class */
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .footer-grid--has-pago {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    max-width: none;
  }

  .footer-grid--has-pago .footer-pago {
    grid-column: 1 / -1;
    align-items: center;
    text-align: center;
  }

  .footer-grid--has-pago .footer-pago-link {
    align-self: center;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-brand {
    grid-column: auto;
    align-items: center;
    text-align: center;
  }

  .footer-brand p {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-nav,
  .footer-contact,
  .footer-pago {
    text-align: center;
  }

  .footer-pago {
    align-items: center;
  }

  .footer-pago-link {
    align-self: center;
  }

  .footer-nav ul {
    align-items: center;
  }

  .footer-contact ul {
    align-items: center;
  }

  .footer-contact li {
    justify-content: center;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-bottom {
    padding: var(--space-lg) var(--space-md);
    text-align: center;
  }

  .footer-bottom .section-container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
  }
}

@media (max-width: 420px) {
  .footer-brand img {
    width: 160px;
  }

  .footer-grid {
    gap: var(--space-lg);
  }
}
