/**
 * FOOTER - GOMALOR
 * Pie de página con información y enlaces
 */

/* ============================================
   FOOTER PRINCIPAL
   ============================================ */

.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-3xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}

/* Decoración de fondo */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(124, 170, 45, 0.05) 0%,
    transparent 50%,
    rgba(193, 39, 45, 0.05) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.footer .container {
  position: relative;
  z-index: 1;
}

/* ============================================
   GRID DEL FOOTER
   ============================================ */

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ============================================
   COLUMNAS
   ============================================ */

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ============================================
   LOGO Y SLOGAN
   ============================================ */

.footer__logo {
  max-width: 200px;
  height: auto;
  margin-bottom: var(--space-sm);
  /* filter: brightness(0) invert(1); */
}

.footer__slogan {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
  margin-bottom: var(--space-xs);
  font-family: var(--font-headings);
}

.footer__description {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  line-height: var(--leading-relaxed);
}

/* ============================================
   TÍTULOS DE COLUMNA
   ============================================ */

.footer__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  font-family: var(--font-headings);
  color: var(--color-white);
  margin-bottom: var(--space-sm);
  position: relative;
  padding-bottom: var(--space-xs);
}

.footer__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-secondary));
  border-radius: var(--radius-full);
}

/* ============================================
   LISTAS
   ============================================ */

.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__list li {
  position: relative;
  padding-left: var(--space-md);
}

.footer__list li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  transition: transform var(--duration-normal) var(--easing-smooth);
}

.footer__list li:hover::before {
  transform: translateX(4px);
}

/* ============================================
   ENLACES
   ============================================ */

.footer__link {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all var(--duration-normal) var(--easing-smooth);
  display: inline-block;
}

.footer__link:hover {
  color: var(--color-white);
  padding-left: var(--space-xs);
}

/* ============================================
   REDES SOCIALES
   ============================================ */

.footer__social {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.social-link {
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  text-decoration: none;
  transition: all var(--duration-normal) var(--easing-smooth);
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: var(--color-white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width var(--duration-normal) var(--easing-smooth),
              height var(--duration-normal) var(--easing-smooth);
  z-index: 0;
}

.social-link:hover::before {
  width: 100%;
  height: 100%;
}

.social-link:hover {
  border-color: var(--color-white);
  transform: translateY(-5px);
}

.social-link svg {
  position: relative;
  z-index: 1;
  transition: color var(--duration-normal) var(--easing-smooth);
}

.social-link:hover svg {
  color: var(--color-primary);
}

/* ============================================
   CONTACTO EN FOOTER
   ============================================ */

.footer__contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__contact-item {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* ============================================
   FOOTER BOTTOM
   ============================================ */

.footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-align: center;
  padding-top: var(--space-lg);
}

@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__copyright,
.footer__location {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

.footer__copyright {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer__location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 1023px) {
  .footer {
    padding: var(--space-2xl) 0 var(--space-md);
  }
  
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
  
  .footer__col:first-child {
    grid-column: 1 / -1;
  }
}

/* ============================================
   RESPONSIVE - MÓVIL
   ============================================ */

@media (max-width: 767px) {
  .footer {
    padding: var(--space-xl) 0 var(--space-md);
  }
  
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
  }
  
  .footer__logo {
    max-width: 180px;
  }
  
  .footer__slogan {
    font-size: var(--text-base);
  }
  
  .footer__description {
    font-size: var(--text-xs);
  }
  
  .footer__title {
    font-size: var(--text-lg);
  }
  
  .footer__link {
    font-size: var(--text-sm);
  }
  
  .footer__social {
    justify-content: center;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  .footer__bottom {
    padding-top: var(--space-md);
  }
  
  .footer__copyright,
  .footer__location {
    font-size: var(--text-xs);
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .footer {
    background-color: transparent;
    color: var(--color-black);
    page-break-inside: avoid;
  }
  
  .footer::before {
    display: none;
  }
  
  .footer__grid {
    border-bottom: 1px solid var(--color-gray-light);
  }
  
  .footer__logo {
    filter: none;
  }
  
  .footer__slogan,
  .footer__title,
  .footer__link,
  .footer__contact-item,
  .footer__copyright,
  .footer__location {
    color: var(--color-black);
  }
  
  .footer__social {
    display: none;
  }
  
  .footer__link {
    text-decoration: underline;
  }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

.footer__link:focus,
.social-link:focus {
  outline: 2px solid var(--color-white);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* ============================================
   ANIMACIONES (opcional)
   ============================================ */

.footer__col[data-aos] {
  transition-property: transform, opacity;
}

/* ============================================
   ESTADOS HOVER ESPECIALES
   ============================================ */

/* Links con iconos */
.footer__link-with-icon {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer__link-with-icon:hover {
  gap: var(--space-sm);
}

/* ============================================
   VERSIÓN OSCURA ALTERNATIVA (opcional)
   ============================================ */

.footer.footer--dark {
  background-color: var(--color-black);
}

.footer.footer--dark::before {
  background: linear-gradient(
    135deg,
    rgba(45, 80, 22, 0.1) 0%,
    transparent 50%,
    rgba(193, 39, 45, 0.1) 100%
  );
}