/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* Títulos impactantes */
h1,
h2,
.nav-links a {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Textos de cuerpo y descripciones */
p,
span,
li {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
}

.main-container {
  display: flex;
}

/* Sidebar Vertical */
.sidebar {
  width: 200px; /* Reducido de 250px a 200px */
  height: 100vh;
  background-color: #000;
  border-right: 3px solid #e31e24;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.nav-links {
  list-style: none;
}

.nav-links li {
  margin: 20px 0;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  padding: 10px 30px;
  display: block;
  transition: 0.3s;
  border-left: 4px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: #e31e24;
  border-left: 4px solid #e31e24;
  background: linear-gradient(
    90deg,
    rgba(227, 30, 36, 0.1) 0%,
    transparent 100%
  );
}

.nav-links-container {
  height: 60vh; /* El menú propiamente dicho se queda a la altura del Hero */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Contenido Principal */
.main-content {
  margin-left: 200px;
  width: calc(100% - 200px);
  background-color: #000;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centra las secciones horizontalmente */
}
/* Banner Hero */
.hero {
  height: 60vh;
  border-bottom: 1px solid #1a1a1a; /* Un cierre sutil para el banner */
}

.banner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.hero-logo {
  max-width: 100%;
  max-height: 80%; /* Evita que toque los bordes del banner */
  object-fit: contain; /* Mantiene la proporción del logo */
  filter: drop-shadow(0 0 15px rgba(227, 30, 36, 0.2));
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive 768px */
@media (max-width: 768px) {
  .sidebar {
    height: 100vh; /* En móvil sí que ocupe todo para el menú */
    top: 0;
    left: -100%;
  }
  .sidebar.active {
    left: 0;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .hero {
    height: 50vh; /* Un poco más chico en móvil para dar espacio al contenido */
    margin-top: 0;
  }

  .hero-logo {
    max-width: 90%;
  }

  /* Botón Hamburguesa */
  .menu-btn {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    cursor: pointer;
  }

  .bar {
    width: 30px;
    height: 4px;
    background-color: #e31e24;
    margin: 6px 0;
    transition: 0.4s;
  }
}

/* Para desktop el botón no se ve */
@media (min-width: 769px) {
  .menu-btn {
    display: none;
  }
}

/* Sección Sobre Nosotros */
.sobre-nosotros {
  background-color: #000;
  margin-bottom: 0;
}

.historia-container {
  position: relative;
  width: 100%;
  min-height: 600px;
  /* Usamos la foto del taller con un overlay oscuro para que el texto resalte */
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("../assets/sanzNosotros.png");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 170px;
  color: #ffffff;
}

.historia-content {
  max-width: 800px;
  text-align: center;
}

.historia-content h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  color: #e31e24; /* Rojo Sanz */
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.linea-roja-central {
  width: 60px;
  height: 4px;
  background-color: #e31e24;
  margin: 15px auto 0; /* Centrado automático */
}

.historia-content p {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 25px;
  font-weight: 400;
}

.historia-content p strong {
  color: #fff;
  font-weight: 700;
}

.historia-content span {
  color: #e31e24; /* Resaltado en rojo */
  font-weight: 700;
  text-transform: uppercase;
}

/* Ajuste para que el contenido no choque con el navbar vertical */
@media (min-width: 769px) {
  .sobre-nosotros {
    margin-left: 0; /* Ya lo maneja el main-content padding si lo configuramos así */
  }
}

/* WhatsApp Flotante Estilo Sanz */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 80px;
  right: 40px;
  /*background-color: #e31e24;*/
  background-color: #25d366; /* Verde WhatsApp */
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  /*box-shadow: 0px 4px 15px rgba(227, 30, 36, 0.4);*/
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;

  /* ESTA ES LA CLAVE: Quita la raya de abajo */
  text-decoration: none !important;
  outline: none;
}

.whatsapp-float i,
.whatsapp-float svg {
  /* Asegura que el icono no herede decoraciones */
  text-decoration: none;
  display: block;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #c21a1f;
  box-shadow: 0px 6px 20px rgba(227, 30, 36, 0.6);
  /* Reforzamos que no aparezca la raya al pasar el mouse */
  text-decoration: none;
}

/* Ajuste para móviles */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 150px;
    right: 20px;
  }

  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}

/*<!-- Sección Servicios -->*/

.servicios-seccion {
  width: 100%;
  padding: 100px 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

.servicios-header {
  text-align: center;
  margin-bottom: 60px;
  width: 100%;
}

.servicios-header h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  color: #fff;
  text-transform: uppercase;
}

.servicios-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.servicios-texto {
  flex: 1;
  max-width: 550px;
  text-align: left;
}
.servicios-texto p {
  font-family: "Rajdhani", sans-serif;
  font-size: 1.2rem;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 20px;
}
.servicios-texto strong {
  color: #e31e24;
}

.servicios-img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.servicios-img img {
  width: 100%;
  max-width: 500px;
  border-radius: 4px;
  border-left: 5px solid #e31e24; /* Mantenemos el detalle de marca */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  /* Eliminamos transition y transform */
  filter: none;
}

/* Responsive */
@media (max-width: 992px) {
  .servicios-container {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .servicios-texto {
    text-align: center;
  }

  .servicios-img {
    order: -1;
  }
}

/*--- SECCIÓN CONTACTO Y MAPA ---*/
.contacto-seccion {
  padding: 80px 5%;
  background-color: #000;
  width: 100%;
}

.nosotros-contact {
  display: flex;
  gap: 20px; /* Reduje un poco el gap para que respire mejor */
  max-width: 1200px;
  margin: 0 auto;
  align-items: stretch; /* CLAVE: Estira ambos hijos a la misma altura */
}
/* Estilo Pro para el Mapa */
.nosotros-contact__map {
  flex: 1.5;
  background: #111;
  border: 1px solid #333;
  padding: 10px;
  border-radius: 8px;
  display: flex; /* Para que el wrapper interno también se estire */
}

.map-wrapper {
  width: 100%;
  height: 100%; /* Ocupa todo el alto del padre */
}

.map-wrapper iframe {
  width: 100%;
  height: 100%; /* El mapa ahora manda sobre el alto */
  min-height: 450px; /* Altura mínima recomendada */
  border: none;
  filter: grayscale(1) invert(0.9) contrast(1.2);
  border-radius: 4px;
  display: block;
}

/* Tarjeta de Información */
.nosotros-contact__info {
  flex: 1;
  display: flex; /* Permite que la info-card crezca */
}

.info-card {
  background: #111;
  padding: 30px;
  border-left: 4px solid #e31e24;
  border-radius: 4px;
  width: 100%; /* Asegura que ocupe todo el ancho del aside */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centra el contenido verticalmente si sobra espacio */
}

.info-card h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  color: #e31e24;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card p {
  font-family: "Rajdhani", sans-serif;
  color: #ccc;
  margin-bottom: 25px;
}

/* Tabla de Horarios */
.horario-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Rajdhani", sans-serif;
  margin-bottom: 25px;
}

.horario-table td {
  padding: 12px 0;
  border-bottom: 1px solid #222;
  color: #eee;
}

.horario-table td:last-child {
  text-align: right;
  color: #e31e24; /* Resaltamos las horas en rojo */
  font-weight: 600;
}

.horario-table tr.cerrado td {
  color: #666;
}

.info-footer {
  border-top: 1px solid #333;
  padding-top: 20px;
}

/* Responsive */
@media (max-width: 992px) {
  .nosotros-contact {
    flex-direction: column;
  }
  .nosotros-contact__map,
  .nosotros-contact__info {
    width: 100%;
  }
}

/*--- FOOTER PRINCIPAL ---*/
.site-footer {
  background-color: #080808; /* Negro casi total */
  color: #fff;
  padding: 80px 0 0 0;
  font-family: "Rajdhani", sans-serif;
  border-top: 2px solid #e31e24; /* Línea roja superior distintiva */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
  padding: 0 5% 60px 5%;
}

/* Columna de Marca */
.footer-logo-img {
  max-width: 180px;
  margin-bottom: 20px;
}

.brand-description {
  color: #888;
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 25px;
}

.brand-description strong {
  color: #e31e24;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #fff;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-social a:hover {
  background: #e31e24;
  transform: translateY(-3px);
}

/* Títulos de Columnas */
.footer-col h4 {
  font-family: "Orbitron", sans-serif;
  color: #e31e24;
  font-size: 1.1rem;
  text-transform: uppercase;
  margin-bottom: 30px;
  letter-spacing: 1px;
}

/* Enlaces y Datos */
.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links ul li {
  margin-bottom: 12px;
}

/* Enlaces de Navegación del Footer - Animación Suave */
.footer-links ul li a {
  color: #ccc;
  text-decoration: none;
  display: inline-block; /* Importante para que el transform funcione bien */
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1); /* Curva de velocidad más elegante */
  position: relative;
  padding-left: 0;
}

.footer-links ul li a:hover {
  color: #e31e24;
  transform: translateX(8px); /* Desplazamiento lateral suave */
}

/* Opcional: Agregar un pequeño indicador rojo que aparece al hacer hover */
.footer-links ul li a::before {
  content: "›";
  position: absolute;
  left: -15px;
  opacity: 0;
  color: #e31e24;
  transition: all 0.2s ease;
}

.footer-links ul li a:hover::before {
  opacity: 1;
  left: -10px;
}

.footer-contact p {
  color: #ccc;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-contact p i {
  color: #e31e24;
}

/*--- BARRA INFERIOR ---*/
.footer-bottom {
  background-color: #000;
  padding: 25px 5%;
  border-top: 1px solid #1a1a1a;
}

.bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #555;
  font-size: 0.9rem;
}

.developer-info a {
  color: #e31e24;
  text-decoration: none;
  font-weight: 700;
  margin-left: 5px;
}

.developer-info a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-social {
    justify-content: center;
  }
  .bottom-container {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .footer-col.footer-contact {
    text-align: center;
    margin: 0 auto; /* lo centra horizontalmente */
    display: block; /* asegura que se comporte como bloque */
  }

  .footer-col.footer-contact p {
    justify-content: center;
  }
}

/************************/

/* Sección Video Parallax */
.video-parallax {
  position: relative;
  width: 100%;
  height: 500px; /* Ajustá la altura a tu gusto */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* El video se comporta como un background cover */
.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  z-index: -2;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Overlay oscuro para mantener la estética Sanz */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Oscurece un poco el video */
  z-index: -1;
}

/* TRUCO SEO: H2 Invisible pero presente para Google */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/***************************************************/

.video-parallax {
  position: relative;
  width: 100%;
  height: 500px; /* Asegúrate de que tenga una altura fija */
  overflow: hidden;
  background-color: transparent; /* Importante: que no tenga un color sólido inicial */
  z-index: 1; /* Le damos un contexto de apilamiento positivo */
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0; /* Al fondo del contenedor, pero sobre el body */
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1; /* Sobre el video */
}

#video-divider {
  border: 5px solid red !important; /* Si ves el recuadro rojo, la sección está ahí */
}

.video-bg {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Asegura que la sección sea visible y tenga espacio */
#video-divider {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  background-color: #000; /* Fondo negro por si el video tarda en cargar */
  z-index: 1; /* Esto lo pone por encima del fondo del body */
}

/* El video debe estar en la capa base del contenedor */
.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  display: block !important;
  z-index: 0;
}

/* El overlay debe estar sobre el video pero bajo cualquier texto */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(
    0,
    0,
    0,
    0.4
  ); /* Oscurece el video lo justo para que se vea elegante */
  z-index: 1;
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

/**************************************************/

.video-parallax-container {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  /* ESTO ES VITAL: Crea la ventana para que el video no tape otras secciones */
  clip-path: inset(0 0 0 0);
  z-index: 1;
}

.video-fixed-bg {
  position: fixed; /* El video queda quieto */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* El z-index debe ser bajo para que el resto de la web pase por ARRIBA */
  z-index: -1;
  pointer-events: none;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

/* Líneas rojas completas */
.linea-roja-full {
  position: absolute;
  left: 0;
  width: 100%;
  height: 5px; /* Un poquito más gruesa para que se note el cierre */
  background-color: #ff0000;
  z-index: 10;
}

.linea-roja-full.top {
  top: 0;
}

.linea-roja-full.bottom {
  bottom: 0;
}

/***************/

/* Contenedor: Actúa como la "ventana" para el video fixed */
.video-parallax-container {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  clip-path: inset(0 0 0 0); /* Mantiene el video dentro de este bloque */
  z-index: 1;
  background-color: #000; /* Fondo negro base */
}

/* Líneas Rojas: De lado a lado, sin bordes extra */
.linea-roja-full {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px; /* Grosor de la línea Sanz */
  background-color: #ff0000;
  z-index: 10; /* Siempre por encima del video y overlay */
}

.linea-roja-full.top {
  top: 0;
}

.linea-roja-full.bottom {
  bottom: 0;
}

/* El Video: Efecto Fixed (No se mueve al scrollear) */
.video-fixed-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1; /* Al fondo para que las otras secciones pasen por arriba */
  pointer-events: none;
}

/* Overlay: Oscurece el video para resaltar las líneas rojas */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
}

/* IMPORTANTE: Borrá cualquier regla que tenga "border" para #video-divider */

/* Quitar bordes rojos laterales solo en móviles y tablets */
@media (max-width: 768px) {
  .info-card {
    border-left: none !important;
    border: none !important; /* Por si el borde está aplicado de forma general */
  }

  .servicios-img img {
    border-left: none !important;
    border: none !important; /* Asegura que no quede ningún borde en móvil */
  }
}
/*********************************************************************/

/* Animación de caída con rebote */
@keyframes dropAndBounce {
  0% {
    transform: translateY(-200%); /* Empieza bien arriba, fuera de la vista */
    opacity: 0;
  }
  60% {
    transform: translateY(10%); /* Baja de más (el impacto) */
    opacity: 1;
  }
  80% {
    transform: translateY(-5%); /* Rebota un poquito hacia arriba */
  }
  100% {
    transform: translateY(0); /* Se acomoda en su posición final */
  }
}
/*******************************************************************************/

/* Solo se activa si la pantalla es mayor a 768px */
@media (min-width: 769px) {
  .hero-logo {
    /* Nombre | Duración | Curva de velocidad | Delay */
    animation: dropAndBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;

    /* Mantenemos tu sombra pero la hacemos aparecer con la animación */
    filter: drop-shadow(0 0 15px rgba(227, 30, 36, 0.4));
  }
}
/**************************************************************************/
/* Ajuste del contenedor para que el logo y el texto se apilen verticalmente */
.banner-container {
  display: flex;
  flex-direction: column; /* Esto es clave: pone uno debajo del otro */
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Animaciones y Estilos solo para Escritorio */
@media (min-width: 769px) {
  .hero-logo {
    animation: dropAndBounce 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    filter: drop-shadow(0 0 15px rgba(227, 30, 36, 0.4));
    /* Aseguramos que no se achique */
    width: auto;
    max-height: 70%;
  }
}

/* En móviles lo ocultamos para que el inicio quede limpio con el logo solo */
@media (max-width: 768px) {
  .hero-slogan {
    display: none;
  }
}

/* Las Keyframes (si no las tenías) */
@keyframes fadeInUpSlogan {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/**************************************************************************/
/* --- AJUSTE PARA MÓVILES Y TABLETS (768px) --- */
@media (max-width: 768px) {
  /* Forzamos que el contenedor apile los elementos verticalmente */
  .banner-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    height: 100%;
    padding: 0 20px;
  }

  /* Ajustamos el logo para que no sea gigante y deje espacio */
  .hero-logo {
    max-width: 250px; /* O el tamaño que prefieras para el logo en mobile */
    height: auto;
    margin-bottom: 20px; /* Espacio entre logo y texto */
    animation: none; /* Quitamos animaciones pesadas para evitar saltos */
  }
}

/* --- AJUSTE PARA ESCRITORIO (Ocultar o Re-acomodar) --- */
@media (min-width: 769px) {
  /* Si en escritorio el logo debe estar solo, podés ocultar el slogan */
  /* .hero-slogan { display: none; } */

  /* O si querés que en escritorio también esté debajo pero con otro estilo: */
  .banner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .hero-slogan {
    display: block !important;
    font-family: "Orbitron", sans-serif;
    font-size: 0.8rem; /* Un pelín más chico para que entre bien en el cuadro */
    letter-spacing: 2px;
    color: #ffffff;
    text-transform: uppercase;
    text-align: center;

    /* AJUSTE DEL BORDE: Subimos a 1px y más opacidad para que se vea */
    /*border: 1px solid rgba(227, 30, 36, 0.6);*/
    padding: 12px 20px;
    margin-top: 20px;
  }

  .distintivos {
    display: none;
  }
}

/*************************************************************/

/* --- ELIMINAR SCROLL HORIZONTAL EN MÓVILES (768px) --- */
@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden; /* Corta cualquier elemento que se pase del borde derecho */
    position: relative;
  }

  .main-container,
  .main-content {
    width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important; /* Evita que márgenes laterales empujen el contenido */
  }

  /* Aseguramos que las secciones no fuercen un ancho mayor */
  section {
    max-width: 100vw;
    box-sizing: border-box;
  }
}

/*********************************************/
/* Ajuste de títulos para resoluciones de 768px o menores */
@media (max-width: 768px) {
  /* Título de la sección Nosotros */
  .historia-content h1 {
    font-size: 1.8rem !important; /* Bajamos de 2.5rem a 1.8rem */
    letter-spacing: 1px;
    margin-bottom: 10px;
  }

  /* Títulos de las secciones Servicios y Ubicación */
  .servicios-header h2 {
    font-size: 1.8rem !important; /* Mismo tamaño para mantener consistencia */
    letter-spacing: 1px;
    margin-bottom: 5px;
  }
}
/*****************************************************************/

/* --- COMPRESIÓN DE SECCIÓN NOSOTROS PARA 768px --- */
@media (max-width: 768px) {
  .historia-container {
    /* Quitamos la altura fija de 600px para que se adapte al contenido */
    min-height: auto !important;

    /* Reducimos el padding drásticamente (arriba/abajo 60px, lados 5%) */
    padding: 60px 5% !important;

    /* Mejoramos la posición del fondo para que no se vea tan estirada */
    background-position: center top;
    background-attachment: scroll; /* Esto ayuda a que no se vea "saltado" */
  }

  .historia-content {
    max-width: 100%; /* Que use todo el ancho disponible del nuevo padding */
  }

  .historia-content h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .historia-content p {
    font-size: 1rem;
    line-height: 1.5; /* Achicamos un poco el espacio entre líneas */
    margin-bottom: 15px;
  }
}
/*****************************************************/

/* --- AJUSTE DE UBICACIÓN PARA 768px --- */
@media (max-width: 768px) {
  .nosotros-contact {
    display: flex;
    flex-direction: column; /* Apilamos uno arriba del otro */
    gap: 20px;
    padding: 20px;
  }

  .nosotros-contact__map {
    order: 2; /* Pasamos el mapa abajo de la info para que primero vean el horario */
    padding: 5px; /* Menos borde interno */
  }

  .map-wrapper iframe {
    /* Bajamos la altura de 450px a algo más razonable */
    min-height: 250px !important;
    height: 250px;
  }

  .info-card {
    padding: 20px; /* Reducimos el padding de 30px que es mucho para mobile */
    border-left: none;
    border-top: 4px solid #e31e24; /* El detalle rojo ahora arriba para separar */
  }

  .info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .horario-table td {
    padding: 8px 0; /* Tabla más compacta */
    font-size: 0.95rem;
  }

  .info-footer {
    padding-top: 15px;
    font-size: 0.9rem;
  }
}

/***************************************/

/* --- OPTIMIZACIÓN FOOTER 768px --- */
@media (max-width: 768px) {
  .site-footer {
    /* Reducimos el espacio superior de 80px a 40px */
    padding: 40px 0 0 0 !important;
  }

  .footer-container {
    /* Menos espacio entre columnas apiladas */
    gap: 35px !important;
    padding-bottom: 40px !important;
  }

  .footer-logo-img {
    max-width: 150px; /* Logo un poco más chico para mobile */
  }

  .brand-description {
    font-size: 0.95rem;
    margin-bottom: 20px;
    padding: 0 10%; /* Para que el texto no toque los bordes al centrar */
  }

  .footer-col h4 {
    margin-bottom: 15px; /* Títulos más cerca de sus enlaces */
    font-size: 1rem;
  }

  .footer-links ul li {
    margin-bottom: 8px; /* Lista más compacta */
  }

  /* Quitamos el efecto de desplazamiento lateral en mobile */
  /* porque al estar centrado, el movimiento hacia la derecha queda raro */
  .footer-links ul li a:hover {
    transform: none;
    color: #e31e24;
  }

  .footer-links ul li a::before {
    display: none; /* Quitamos la flechita en mobile */
  }

  /* Barra de créditos más compacta */
  .footer-bottom {
    padding: 20px 5%;
  }

  .bottom-container {
    font-size: 0.85rem;
    text-align: center;
  }
}

/***************************************/

@media (max-width: 768px) {
  .footer-links ul {
    display: flex; /* Los pone en línea */
    flex-wrap: wrap; /* Si no entran, saltan de línea */
    justify-content: center; /* Los centra */
    gap: 15px; /* Espacio entre cada enlace */
    padding: 0;
    list-style: none;
  }

  .footer-links ul li {
    margin-bottom: 0; /* Quitamos el margen de abajo que tenían antes */
    display: flex;
    align-items: center;
  }

  /* Agregamos un separador visual entre los enlaces (opcional pero recomendado) */
  .footer-links ul li:not(:last-child)::after {
    content: "|"; /* Podés usar "-" o "•" */
    margin-left: 15px;
    color: #444; /* Un color gris suave para que no distraiga */
    font-size: 0.8rem;
  }

  .footer-links ul li a {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
}

/****************************/

@media (min-width: 769px) {
  .hero-slogan {
    display: block !important;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.3rem; /* Tamaño ideal para que entre en una línea */
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 25px;

    /* Brillo sutil para que resalte sobre el fondo negro */
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.3);

    opacity: 0; /* Invisible al inicio */

    /* Animación: dura 0.8s, empieza después de 1.2s (cuando el logo frena) */
    animation: fadeInUpSlogan 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) 1.2s
      forwards;
  }
}

@keyframes fadeInUpSlogan {
  0% {
    opacity: 0;
    transform: translateY(20px); /* Viene desde abajo */
  }
  100% {
    opacity: 1;
    transform: translateY(0); /* Llega a su posición original */
  }
}

/**************************************/

@media (max-width: 768px) {
  .hero-slogan-mobile {
    display: block !important;
    font-family: "Rajdhani", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 15px;
    min-height: 1.2em; /* Evita que el layout salte cuando aparece el texto */

    /* El cursor titilante */
    border-right: 2px solid #e31e24;
    padding-right: 5px;
    animation: blink-cursor 0.7s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
  }
}

/* Animación del cursor */
@keyframes blink-cursor {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #e31e24;
  }
}

/******************************************/
@media (max-width: 768px) {
  .historia-container {
    /* Forzamos que la imagen se quede quieta */
    background-attachment: fixed !important;

    /* Aseguramos que la imagen esté centrada y cubra todo */
    background-position: center center;
    background-size: cover;

    /* Ajuste de padding para que el texto no toque los bordes en tablets */
    padding: 60px 20px !important;
    min-height: 500px !important;
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto !important;
    min-height: 60vh;
    padding-bottom: 40px;
  }

  .banner-container {
    height: auto !important;
    overflow: visible !important;
  }

  .distintivos {
    margin-top: 30px;
    padding: 15px 25px;
    border: 1px solid #e31e24 !important;
    display: inline-block;
    background: rgba(227, 30, 36, 0.05);

    box-sizing: border-box;
    backface-visibility: hidden;
    transform: translateZ(0);
  }

  .distintivos p {
    margin: 0;
    line-height: 1.2;
    display: block;
  }
}

@media (max-width: 768px) {
  .banner-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100%;

    text-align: center;
    padding: 0;
    margin: 0;
  }

  .hero-logo {
    display: block !important;
    margin: 0 !important;
    max-width: 90%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: none !important;
  }
}

/*********************************************/

/* =======================================================
   AJUSTES FINALES SANZ CARDANES - 768px (Programming DSP)
   ======================================================= */

@media (max-width: 768px) {
  /* 1. CENTRADO PERFECTO DEL LOGO */
  .hero {
    min-height: 60vh !important; /* Mantiene el alto */
    display: flex !important;
    align-items: center !important; /* Centro vertical */
    justify-content: center !important; /* Centro horizontal */
    margin-top: 0 !important;
    padding: 0 !important;
  }

  .banner-container {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
    width: 100%;
    margin: 0 !important; /* Mata cualquier margen residual */
  }

  .hero-logo {
    max-width: 250px !important; /* Ajustá el tamaño a tu gusto */
    margin-bottom: 15px !important;
  }

  /* 3. IMAGEN ESTÁTICA (TRUCO PARA MÓVILES) */
  /* Usamos el método del pseudo-elemento porque el 'fixed' común falla en Android/iOS */
  /* 3. IMAGEN ESTÁTICA (HACK FINAL PARA IPHONE/ANDROID) */
  .historia-container {
    position: relative;
    background-image: none !important;
    overflow: hidden;
    z-index: 1;
    padding: 80px 20px !important;
    min-height: 500px; /* Aseguramos un alto mínimo */
    /* Clip-path ayuda a que el fondo no se desborde en algunos navegadores */
    clip-path: inset(0);
  }

  .historia-container::before {
    content: "";
    /* En lugar de absolute, usamos fixed para engañar a Safari */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
      url("../assets/sanzNosotros.png");
    background-size: cover;
    background-position: center;
    /* IMPORTANTE: En mobile cambiamos fixed por scroll porque el fixed ya lo tiene el contenedor ::before */
    background-attachment: scroll;
    z-index: -1;

    /* Estos dos evitan el zoom y el lag en iPhone */
    will-change: transform;
    transform: translateZ(0);
  }

  /* 4. NAVEGACIÓN DEL FOOTER EN LÍNEA */
  .footer-links ul {
    display: flex !important;
    flex-direction: row !important; /* Los pone uno al lado del otro */
    flex-wrap: wrap !important; /* Si no entran, saltan de línea */
    justify-content: center !important;
    gap: 10px;
    padding: 0;
    list-style: none;
  }

  .footer-links ul li {
    margin: 0 !important;
    display: flex;
    align-items: center;
  }

  /* El separador | */
  .footer-links ul li:not(:last-child)::after {
    content: "|";
    margin-left: 10px;
    color: #e31e24; /* Rojo Sanz para el separador */
    font-size: 0.8rem;
    opacity: 0.5;
  }

  .footer-links ul li a {
    font-size: 0.9rem !important;
    text-transform: uppercase;
  }
}

.fa-instagram:hover {
  color: #e1306c; /* El color de Instagram */
  transition: 0.3s;
}
