/**
 * FOOTER STYLES - Archivo unificado
 * Consolidación de todos los estilos del footer en un solo archivo
 */

/* ====================================
   ESTRUCTURA BASE Y POSICIONAMIENTO
   ==================================== */

.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
}

/* Espacio visual decorativo en la parte superior */
.site-footer::after {
  content: '';
  display: block;
  height: 2rem;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(to bottom, 
    rgba(241, 245, 249, 0.3), 
    transparent);
}

/* Contenedor principal del footer */
.site-footer .container {
  max-width: var(--max-width) !important;
  margin: 0 auto !important;
  padding-left: var(--container-padding) !important;
  padding-right: var(--container-padding) !important;
  padding-top: 1rem;
  position: relative;
  z-index: 20;
  width: auto !important;
}

/* ====================================
   LAYOUT DE COLUMNAS (GRID)
   ==================================== */

/* Reset de propiedades que pueden causar problemas */
.site-footer .container,
.site-footer .footer__top,
.site-footer .footer__info,
.site-footer .footer__nav,
.site-footer .footer__cta {
  overflow: visible !important;
  max-width: none !important;
}

/* Estructura de grid para tres columnas */
.footer__top {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  grid-template-areas: 
    "info nav cta" !important;
  gap: 2rem !important;
  margin-bottom: 3rem !important;
  padding: 0 !important;
  margin-top: 2rem !important;
}

.footer__info {
  grid-area: info !important;
  padding: 0 !important;
  position: relative;
}

.footer__nav {
  grid-area: nav !important;
  padding: 0 !important;
  position: relative;
}

.footer__cta {
  grid-area: cta !important;
  padding: 0 !important;
  position: relative;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Tablets (992px y menor) */
@media (max-width: 992px) {
  .footer__top {
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas: 
      "info nav"
      "cta cta" !important;
  }
  
  .footer__cta {
    grid-column: span 2 !important;
  }
  
  .footer__cta-btn {
    margin-top: 1rem;
  }
  
  .footer__social-container {
    margin-top: 0;
  }
}

/* Móviles (768px y menor) */
@media (max-width: 768px) {
  .footer__top {
    grid-template-columns: 1fr !important;
    grid-template-areas: 
      "info"
      "nav"
      "cta" !important;
  }
  
  .footer__info,
  .footer__nav,
  .footer__cta {
    grid-column: 1 !important;
  }
  
  .footer__social-container {
    margin-top: 1rem;
  }
}

/* ====================================
   ELEMENTOS VISUALES Y SEPARADORES
   ==================================== */

/* Separadores sutiles entre columnas en desktop */
@media (min-width: 993px) {
  .footer__nav:before,
  .footer__cta:before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 2rem;
    bottom: 2rem;
    width: 1px;
    background: linear-gradient(to bottom, 
      rgba(0,0,0,0.03), 
      rgba(0,0,0,0.08) 50%, 
      rgba(0,0,0,0.03));
  }
}

/* ====================================
   TÍTULOS Y TEXTOS
   ==================================== */

.footer__title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.footer__bottom {
  margin-top: 2rem;
}

/* ====================================
   ICONOS Y SVG
   ==================================== */

.site-footer svg {
  vertical-align: middle;
  display: inline-block;
}

.footer__icon {
  transition: all var(--transition-fast);
}

.footer__contact-item:hover .footer__icon {
  transform: scale(1.2);
  stroke: var(--primary-light);
  color: var(--primary);
}

/* ====================================
   ENLACES Y NAVEGACIÓN
   ==================================== */

/* Estilo principal para los enlaces del footer */
.footer__nav a, 
.footer__contact a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  position: relative;
  padding: 0.35rem 0;
  font-weight: 500;
}

.footer__contact a {
  font-weight: normal;
}

/* Icono de flecha para los enlaces principales */
.footer__nav-list > li > a::before {
  content: '›';
  margin-right: 0.5rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: bold;
}

/* Efectos hover para los enlaces principales */
.footer__nav-list > li > a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer__nav-list > li > a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Estilo subrayado para los enlaces */
.footer__nav a::after, 
.footer__contact a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
  transition: width 0.3s ease;
  opacity: 0.7;
}

/* Efecto hover para el subrayado */
.footer__nav a:hover::after, 
.footer__contact a:hover::after {
  width: 100%;
}

/* ====================================
   SUBMENÚS DE SERVICIOS
   ==================================== */

/* Estilo especial para enlaces de servicios */
.footer__services-submenu a {
  font-size: 0.9rem;
  padding: 0.25rem 0;
  color: var(--text-muted);
  transition: all 0.25s ease;
}

.footer__services-submenu a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer__services-submenu a::before {
  content: '•';
  margin-right: 0.5rem;
  color: var(--primary-light);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Estilos para la etiqueta de servicios */
.footer__services-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  display: block;
  position: relative;
}

.footer__services-label::after {
  content: '';
  position: absolute;
  bottom: -0.25rem;
  left: 0;
  width: 1.5rem;
  height: 2px;
  background-color: var(--primary);
  opacity: 0.5;
}

/* ====================================
   INFORMACIÓN DE CONTACTO
   ==================================== */

/* Enlaces de contacto */
.footer__contact a {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.footer__contact a i {
  margin-right: 0.5rem;
  color: var(--primary-light);
  transition: all 0.3s ease;
  font-size: 1rem;
}

.footer__contact a:hover i {
  color: var(--primary);
  transform: scale(1.2);
}

/* ====================================
   REDES SOCIALES
   ==================================== */

/* Estilos para redes sociales */
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.1);
  margin-right: 0.75rem;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.footer__social a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary);
  transform: scale(0);
  transition: all 0.4s ease;
  border-radius: 50%;
  opacity: 0;
}

.footer__social a:hover::before {
  transform: scale(1);
  opacity: 1;
}

.footer__social a i {
  position: relative;
  z-index: 1;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.footer__social a:hover i {
  transform: scale(1.2);
}

/* ====================================
   BOTÓN DE LLAMADA A LA ACCIÓN
   ==================================== */

/* Estilo para el botón de cotización */
.footer__cta-btn {
  display: inline-block;
  position: relative;
  padding: 0.7rem 1.5rem;
  background-color: var(--primary);
  color: #fff !important;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--primary);
  overflow: hidden;
  z-index: 1;
}

.footer__cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background-color: white;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: -1;
}

.footer__cta-btn:hover {
  color: var(--primary) !important;
  box-shadow: 0 4px 12px rgba(247, 197, 0, 0.3);
  transform: translateY(-2px);
}

.footer__cta-btn:hover::before {
  left: 0;
}

/* ====================================
   FOOTER INFERIOR
   ==================================== */

/* Estilo para enlaces de términos y condiciones en footer bottom */
.footer__bottom a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.15rem 0.25rem;
  position: relative;
  z-index: 1;
}

.footer__bottom a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: rgba(247, 197, 0, 0.15);
  transition: all 0.3s ease;
  z-index: -1;
}

.footer__bottom a:hover {
  color: var(--primary);
}

.footer__bottom a:hover::before {
  height: 100%;
}

/* Estilos para otros enlaces */
.footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  font-size: 0.875rem;
}

.footer__links a:hover {
  color: var(--primary);
  text-decoration: none;
}

.footer__links a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-light);
  transition: width 0.3s ease;
}

.footer__links a:hover::after {
  width: 100%;
}

/* ====================================
   ANIMACIONES DE CARGA
   ==================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animación para elementos del footer */
.site-footer.in-view .footer__info,
.site-footer.in-view .footer__nav,
.site-footer.in-view .footer__cta {
  animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.site-footer.in-view .footer__nav {
  animation-delay: 0.2s;
}

.site-footer.in-view .footer__cta {
  animation-delay: 0.4s;
}

/* Animación para los enlaces al cargar la página */
.footer__nav-list > li,
.footer__services-submenu li,
.footer__contact p {
  animation: fadeInUp 0.5s forwards;
  opacity: 0;
}

.footer__nav-list > li:nth-child(1),
.footer__services-submenu li:nth-child(1),
.footer__contact p:nth-child(1) {
  animation-delay: 0.1s;
}

.footer__nav-list > li:nth-child(2),
.footer__services-submenu li:nth-child(2),
.footer__contact p:nth-child(2) {
  animation-delay: 0.2s;
}

.footer__nav-list > li:nth-child(3),
.footer__services-submenu li:nth-child(3),
.footer__contact p:nth-child(3) {
  animation-delay: 0.3s;
}

.footer__nav-list > li:nth-child(4),
.footer__services-submenu li:nth-child(4),
.footer__contact p:nth-child(4) {
  animation-delay: 0.4s;
}

.footer__nav-list > li:nth-child(5),
.footer__services-submenu li:nth-child(5),
.footer__contact p:nth-child(5) {
  animation-delay: 0.5s;
}

/* Animación para los enlaces */
.site-footer.in-view .footer__nav a,
.site-footer.in-view .footer__contact a {
  animation: fadeInRight 0.5s ease forwards;
  opacity: 0;
}

/* Aplicar retraso en la animación para cada enlace */
.site-footer.in-view .footer__nav-list > li:nth-child(1) > a { animation-delay: 0.1s; }
.site-footer.in-view .footer__nav-list > li:nth-child(2) > a { animation-delay: 0.2s; }
.site-footer.in-view .footer__nav-list > li:nth-child(3) > a { animation-delay: 0.3s; }
.site-footer.in-view .footer__nav-list > li:nth-child(4) > a { animation-delay: 0.4s; }
.site-footer.in-view .footer__nav-list > li:nth-child(5) > a { animation-delay: 0.5s; }

/* Animación para los submenús */
.site-footer.in-view .footer__services-submenu a {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.site-footer.in-view .footer__services-submenu li:nth-child(1) > a { animation-delay: 0.3s; }
.site-footer.in-view .footer__services-submenu li:nth-child(2) > a { animation-delay: 0.4s; }
.site-footer.in-view .footer__services-submenu li:nth-child(3) > a { animation-delay: 0.5s; }

/* ====================================
   RESPONSIVE PARA MÓVILES
   ==================================== */

@media (max-width: 768px) {
  .footer__nav-list > li > a::before {
    margin-right: 0.35rem;
    font-size: 1rem;
  }
  
  .footer__social a {
    width: 1.8rem;
    height: 1.8rem;
    margin-right: 0.5rem;
  }
  
  .footer__social a i {
    font-size: 0.9rem;
  }
  
  .footer__contact a i {
    font-size: 0.9rem;
  }
  
  .footer__cta-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}