/* ===== ESTILOS DEL FOOTER ===== */

.footer {
  background-color: var(--gray-50);
  color: var(--gray-600);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

.dark-theme .footer {
  background-color: var(--gray-900);
  color: var(--gray-400);
}

/* Contenedor principal del footer */
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

/* Logo y descripción */
.footer-brand {
  margin-bottom: 2rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.dark-theme .footer-logo {
  color: var(--white);
}

.footer-logo img {
  height: 40px;
  width: auto;
  margin-right: 0.75rem;
}

.footer-description {
  margin-bottom: 1.5rem;
  line-height: 1.7;
  color: var(--gray-600);
}

.dark-theme .footer-description {
  color: var(--gray-400);
}

/* Títulos de sección */
.footer-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
  position: relative;
  padding-bottom: 0.75rem;
}

.dark-theme .footer-title {
  color: var(--white);
}

.footer-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary);
}

/* Enlaces del footer */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  position: relative;
  padding-left: 1.5rem;
}

.dark-theme .footer-links a {
  color: var(--gray-400);
}

.footer-links a::before {
  content: '→';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  opacity: 0;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.footer-links a:hover::before {
  opacity: 1;
  left: -5px;
}

/* Información de contacto */
.footer-contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.contact-item i {
  color: var(--primary);
  margin-right: 1rem;
  margin-top: 0.25rem;
  font-size: 1.25rem;
  min-width: 1.5rem;
  text-align: center;
}

.contact-item a {
  color: var(--gray-600);
  text-decoration: none;
  transition: var(--transition);
}

.dark-theme .contact-item a {
  color: var(--gray-400);
}

.contact-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Newsletter */
.newsletter-form {
  margin-top: 1.5rem;
}

.newsletter-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--white);
  color: var(--gray-800);
}

.dark-theme .newsletter-input {
  background-color: var(--gray-800);
  border-color: var(--gray-700);
  color: var(--gray-200);
}

.newsletter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.newsletter-btn {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.newsletter-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.newsletter-btn i {
  font-size: 1.25em;
}

/* Redes sociales */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--gray-700);
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.dark-theme .social-link {
  background-color: var(--gray-800);
  color: var(--gray-300);
}

.social-link:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* Línea divisoria */
.footer-divider {
  border: none;
  height: 1px;
  background-color: var(--gray-200);
  margin: 3rem 0 2rem;
}

.dark-theme .footer-divider {
  background-color: var(--gray-800);
}

/* Copyright y enlaces legales */
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  text-align: center;
}

.copyright {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.dark-theme .copyright {
  color: var(--gray-500);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-links a {
  color: var(--gray-500);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

.legal-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Botón para volver arriba */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--primary-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Estilos responsivos */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-title {
    text-align: left;
  }
  
  .footer-links a {
    padding-left: 1rem;
  }
  
  .social-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-title {
    text-align: center;
  }
  
  .footer-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-links a {
    padding-left: 0;
  }
  
  .footer-links a::before {
    display: none;
  }
  
  .contact-item {
    justify-content: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
  
  .legal-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .back-to-top {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Animación de ola en el footer */
.footer-wave {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.footer-wave svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}

.footer-wave .shape-fill {
  fill: var(--white);
}

.dark-theme .footer-wave .shape-fill {
  fill: var(--gray-900);
}

/* Efecto de hover en las tarjetas de contacto */
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  border: 1px solid var(--gray-200);
  height: 100%;
}

.dark-theme .contact-card {
  background: var(--gray-800);
  border-color: var(--gray-700);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.contact-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  display: inline-block;
}

.contact-card h4 {
  margin-bottom: 0.75rem;
  color: var(--gray-900);
}

.dark-theme .contact-card h4 {
  color: var(--white);
}

.contact-card p {
  margin-bottom: 0;
  color: var(--gray-600);
}

.dark-theme .contact-card p {
  color: var(--gray-400);
}

/* Estilo para el mapa */n.footer-map {
  width: 100%;
  height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1.5rem;
  border: 1px solid var(--gray-200);
}

.dark-theme .footer-map {
  border-color: var(--gray-700);
}

/* Estilo para el aviso de cookies */n.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--white);
  padding: 1.5rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-consent.show {
  transform: translateY(0);
}

.dark-theme .cookie-consent {
  background-color: var(--gray-800);
  border-top: 1px solid var(--gray-700);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-text {
  flex: 1;
  min-width: 250px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-600);
}

.dark-theme .cookie-text {
  color: var(--gray-300);
}

.cookie-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.cookie-text a:hover {
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cookie-buttons {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .cookie-buttons .btn {
    width: 100%;
  }
}
