/* ==============================================
   CORRECCIÓN FOOTER - ALINEACIÓN PERFECTA
   - Soluciona desalineación en todas las páginas
   - Centrado y espaciado consistente
   ============================================== */

/* Footer base - forzar alineación correcta */
footer {
  width: 100% !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 60px 0 20px !important;
  background: #333 !important;
  color: white !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
  text-align: left !important;
}

/* Contenedor principal del footer */
.footer-content {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 30px !important;
  display: grid !important;
  grid-template-columns: 250px 1fr 280px !important;
  gap: 60px !important;
  margin-bottom: 40px !important;
  box-sizing: border-box !important;
  align-items: start !important;
  justify-items: start !important;
}

/* Secciones del footer */
.footer-section {
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
  vertical-align: top !important;
}

.footer-section h3,
.footer-section h4 {
  color: #c49a6c !important;
  margin: 0 0 25px 0 !important;
  font-size: 1.3em !important;
  text-align: left !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
}

.footer-section p {
  color: #ccc !important;
  line-height: 1.6 !important;
  margin: 0 0 12px 0 !important;
  text-align: left !important;
  font-size: 0.95em !important;
}

.footer-section ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  text-align: left !important;
}

.footer-section li {
  margin-bottom: 6px !important;
  text-align: left !important;
  line-height: 1.4 !important;
}

.footer-section a {
  color: #ccc !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
  display: inline-block !important;
  padding: 2px 0 !important;
  font-size: 0.9em !important;
  text-align: left !important;
}

.footer-section a:hover {
  color: #c49a6c !important;
}

/* Footer highlights - Columna central */
.footer-highlights {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
  width: 100% !important;
}

.highlight-item {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  padding: 18px 16px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-radius: 10px !important;
  border-left: 4px solid #c49a6c !important;
  transition: all 0.3s ease !important;
}

.highlight-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateX(2px) !important;
}

.highlight-icon {
  color: #c49a6c !important;
  font-size: 1.4em !important;
  margin-top: 2px !important;
  flex-shrink: 0 !important;
  width: 24px !important;
  text-align: center !important;
}

.highlight-content {
  flex: 1 !important;
}

.highlight-content h4 {
  color: white !important;
  margin: 0 0 6px 0 !important;
  font-size: 1.05em !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.highlight-content p {
  color: #bbb !important;
  margin: 0 !important;
  font-size: 0.88em !important;
  line-height: 1.4 !important;
}

/* Contact info - Columna derecha */
.footer-contact-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  width: 100% !important;
}

.footer-contact-info p {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  color: #ddd !important;
  font-size: 0.95em !important;
  line-height: 1.4 !important;
  padding: 8px 0 !important;
}

.footer-contact-info i {
  color: #c49a6c !important;
  width: 22px !important;
  height: 22px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  font-size: 1.1em !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid #555 !important;
  padding: 20px 0 0 !important;
  text-align: center !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.footer-bottom p {
  margin: 0 !important;
  color: #888 !important;
  font-size: 0.9em !important;
  padding: 0 20px !important;
}

/* ==============================================
   RESPONSIVE FOOTER CORREGIDO
   ============================================== */

@media (max-width: 768px) {
  footer {
    padding: 40px 0 20px !important;
    text-align: left !important;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr !important;
    gap: 30px !important;
    padding: 0 15px !important;
    text-align: left !important;
  }
  
  .footer-section {
    text-align: left !important;
    width: 100% !important;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-size: 1.1em !important;
    margin-bottom: 15px !important;
    text-align: left !important;
  }
  
  .footer-section p,
  .footer-section li,
  .footer-section a {
    text-align: left !important;
    font-size: 0.9em !important;
  }
  
  .footer-section ul {
    text-align: left !important;
  }
  
  .highlight-item {
    padding: 12px !important;
    text-align: left !important;
  }
  
  .highlight-icon {
    font-size: 1.3em !important;
  }
  
  .highlight-content h4 {
    font-size: 1em !important;
    text-align: left !important;
  }
  
  .highlight-content p {
    text-align: left !important;
  }
  
  .footer-contact-info p {
    font-size: 0.9em !important;
    text-align: left !important;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 30px 0 15px !important;
    text-align: center !important;
    overflow-x: hidden !important;
  }
  
  .footer-content {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
    padding: 0 15px !important;
    text-align: center !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  
  .footer-section {
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-size: 1.2em !important;
    margin-bottom: 18px !important;
    text-align: center !important;
    color: #c49a6c !important;
  }
  
  .footer-section p {
    text-align: center !important;
    font-size: 0.88em !important;
    margin-bottom: 10px !important;
    line-height: 1.6 !important;
  }
  
  .footer-section ul {
    text-align: center !important;
    width: 100% !important;
    padding: 0 !important;
  }
  
  .footer-section li {
    text-align: center !important;
    margin-bottom: 10px !important;
  }
  
  .footer-section a {
    text-align: center !important;
    display: inline-block !important;
    width: auto !important;
    font-size: 0.9em !important;
  }
  
  .highlight-item {
    flex-direction: column !important;
    text-align: center !important;
    padding: 16px !important;
    align-items: center !important;
    gap: 10px !important;
  }
  
  .highlight-icon {
    align-self: center !important;
    margin: 0 !important;
    font-size: 1.5em !important;
  }
  
  .highlight-content {
    width: 100% !important;
  }
  
  .highlight-content h4 {
    text-align: center !important;
    font-size: 1em !important;
    margin-bottom: 6px !important;
  }
  
  .highlight-content p {
    text-align: center !important;
    font-size: 0.85em !important;
  }
  
  .footer-contact-info {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
  }
  
  .footer-contact-info p {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-size: 0.88em !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 320px !important;
    margin: 0 auto !important;
    padding: 6px 10px !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
    word-break: break-word !important;
  }
  
  .footer-contact-info i {
    flex-shrink: 0 !important;
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
    font-size: 1em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .footer-bottom {
    text-align: center !important;
    margin-top: 25px !important;
  }
  
  .footer-bottom p {
    font-size: 0.82em !important;
    padding: 0 20px !important;
    text-align: center !important;
    line-height: 1.5 !important;
  }
}

/* ==============================================
   PREVENIR DESBORDAMIENTO DEL FOOTER
   ============================================== */

/* Asegurar que el footer no cause scroll horizontal */
footer * {
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* Prevenir elementos que se salgan */
.footer-section ul,
.footer-section li,
.footer-contact-info,
.highlight-item {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* Links largos que se quiebren correctamente */
.footer-section a {
  word-break: break-word !important;
  hyphens: auto !important;
}

/* ==============================================
   CORRECCIONES ESPECÍFICAS SAFARI iOS
   ============================================== */

/* Safari iOS tiene problemas con flexbox en footer */
@media (max-width: 480px) {
  /* Forzar ancho completo en Safari iOS */
  footer {
    -webkit-overflow-scrolling: touch !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
  }
  
  .footer-content {
    display: grid !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
  }
  
  .footer-section {
    -webkit-box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  
  /* Safari iOS - Prevenir texto que se salga */
  .footer-contact-info p {
    -webkit-box-sizing: border-box !important;
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-flex-wrap: wrap !important;
    -webkit-box-align: center !important;
    -webkit-align-items: center !important;
    -webkit-box-pack: center !important;
    -webkit-justify-content: center !important;
    text-size-adjust: 100% !important;
    -webkit-text-size-adjust: 100% !important;
  }
  
  /* Safari iOS - Email y teléfono largos */
  .footer-contact-info p span,
  .footer-contact-info p a {
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    -webkit-hyphens: auto !important;
    hyphens: auto !important;
  }
  
  /* Safari iOS - Highlight items */
  .highlight-item {
    display: -webkit-box !important;
    display: -webkit-flex !important;
    display: flex !important;
    -webkit-box-orient: vertical !important;
    -webkit-box-direction: normal !important;
    -webkit-flex-direction: column !important;
  }
  
  .highlight-content {
    min-width: 0 !important;
    width: 100% !important;
  }
  
  .highlight-content h4,
  .highlight-content p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* ==============================================
   ALINEACIÓN ESPECÍFICA DE TEXTOS
   ============================================== */

/* DESKTOP - Alineación perfecta */
@media (min-width: 769px) {
  /* Footer principal más espacioso */
  footer {
    padding: 70px 0 25px !important;
  }
  
  /* Columnas perfectamente alineadas */
  .footer-content {
    max-width: 1400px !important;
    padding: 0 40px !important;
    grid-template-columns: 280px 1fr 300px !important;
    gap: 80px !important;
  }
  
  /* Primera columna - Información */
  .footer-section:first-child {
    max-width: 280px !important;
  }
  
  .footer-section:first-child h4 {
    margin-bottom: 20px !important;
    font-size: 1.4em !important;
  }
  
  .footer-section:first-child ul {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .footer-section:first-child li {
    margin-bottom: 12px !important;
  }
  
  .footer-section:first-child a {
    font-size: 0.95em !important;
    padding: 6px 0 !important;
    color: #ddd !important;
  }
  
  .footer-section:first-child a:hover {
    color: #c49a6c !important;
    padding-left: 4px !important;
    transition: all 0.3s ease !important;
  }
  
  /* Segunda columna - Servicios (centro) */
  .footer-highlights-section {
    max-width: 100% !important;
  }
  
  .footer-highlights-section h4 {
    margin-bottom: 25px !important;
    font-size: 1.4em !important;
  }
  
  /* Tercera columna - Contacto */
  .footer-section:last-child {
    max-width: 300px !important;
  }
  
  .footer-section:last-child h4 {
    margin-bottom: 25px !important;
    font-size: 1.4em !important;
  }
  
  /* Alineación de todos los textos */
  .footer-section,
  .footer-section *,
  .footer-section h3,
  .footer-section h4,
  .footer-section p,
  .footer-section ul,
  .footer-section li,
  .footer-section a {
    text-align: left !important;
  }
  
  .footer-contact-info p {
    text-align: left !important;
  }
  
  .highlight-content h4,
  .highlight-content p {
    text-align: left !important;
  }
  
  /* Footer bottom más espacioso */
  .footer-bottom {
    margin-top: 50px !important;
    padding-top: 25px !important;
  }
  
  .footer-bottom p {
    font-size: 0.9em !important;
  }
}

/* TABLET - Alineación a la izquierda */
@media (min-width: 481px) and (max-width: 768px) {
  .footer-section,
  .footer-section *,
  .footer-section h3,
  .footer-section h4,
  .footer-section p,
  .footer-section ul,
  .footer-section li,
  .footer-section a {
    text-align: left !important;
  }
  
  .footer-contact-info p {
    text-align: left !important;
  }
  
  .highlight-content h4,
  .highlight-content p {
    text-align: left !important;
  }
}

/* MÓVIL - Alineación centrada */
@media (max-width: 480px) {
  .footer-section,
  .footer-section *:not(i) {
    text-align: center !important;
  }
  
  .footer-section h3,
  .footer-section h4,
  .footer-section p,
  .footer-section ul,
  .footer-section li,
  .footer-section a {
    text-align: center !important;
  }
  
  .footer-contact-info {
    text-align: center !important;
    align-items: center !important;
  }
  
  .footer-contact-info p {
    text-align: center !important;
    justify-content: center !important;
    word-break: break-word !important;
  }
  
  .highlight-content,
  .highlight-content h4,
  .highlight-content p {
    text-align: center !important;
  }
  
  .footer-bottom,
  .footer-bottom p {
    text-align: center !important;
  }
}

/* Forzar alineación en elementos específicos problemáticos */
footer h3,
footer h4,
footer p,
footer li,
footer a,
footer span,
footer div {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  footer h3,
  footer h4,
  footer p,
  footer li,
  footer a,
  footer span {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Asegurar que los textos largos no rompan el diseño */
  .footer-contact-info p {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 0.85em !important;
    max-width: 100% !important;
    padding: 6px 10px !important;
  }
  
  .footer-contact-info i {
    flex-shrink: 0 !important;
    min-width: 18px !important;
    width: 18px !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Prevenir desbordamiento horizontal en móvil */
  .footer-section {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  .footer-section * {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }
}