/* Contenedor de la galería */
.gallery {
  position: relative;
  width: 100%;
  overflow: hidden; /* Puedes mantenerlo */
}

/* Contenedor de ítems: SIN SCROLL y ajustable */
.gallery-container {
  display: flex;
  overflow-x: auto;
  gap:20px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Ítem de la galería: ahora responsive */
.gallery-item {
  flex: 0 0 calc((100% - 2 * 1.25rem) / 3);
  width: 500px;
  height: 300px;
  object-fit: cover;
  position: relative;
}

/* Imagen */
.gallery-item img {
  width: 100%;
  height: 100%;
}

/* Overlay azul */
.gallery-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 6, 68, 0.4);
  z-index: 1;
}

/* Texto overlay */
.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  opacity: 0; /* Inicia oculto */
  visibility: visible;
  z-index: 2;
  animation: fadeInText 2s forwards;
}

.text-overlay .title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.text-overlay .subtitle {
  font-size: 1rem;
  opacity: 0;
  animation: fadeInSubtitle 2s forwards 1s;
}

@keyframes fadeInText {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes fadeInSubtitle {
  0% { opacity: 0; }
  100% { opacity: 1; }

}

  /* Sección sector comercio */
  .impact-info {
    background: white;
    padding: 50px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  
  .impact-info .content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
  }

  .impact-info .content h2{
    font-weight: bold;
    text-align: center;
    font-size: 2.3rem;
    color: #0d163e;
    max-width: 800px;
  }
  
  
  /* Línea vertical */
  .line-separator {
    width: 6px;
    height: 170px;
    background-color: #c81851;
    border-radius: 4px;
  }
  
  /* Texto del párrafo */
  .impact-info p {
    font-size: 1.2rem;
    color: #0d163e;
    max-width: 550px;
    line-height: 1.6;
    text-align: justify;
  }
/* RESPONSIVE: Tablet y Móvil */
@media (max-width: 1024px) {
  .impact-info .content {
    flex-direction: column;  /* Apila verticalmente */
    gap: 30px;               /* Reduce espacio */
    text-align: center;      /* Centra textos */
  }

  .line-separator {
    width: 120px;   /* Ahora horizontal */
    height: 6px;
  }

  .impact-info p {
    text-align: center; /* Centra texto en móvil */
    max-width: 90%;     /* Más ancho en pantallas chicas */
  }
}
  /* Contenedor general de Armado, Remodelación e Inspecciones */
  .section-header h2 {
    font-size: 2rem; /* Tamaño de la fuente */
    font-weight: bold; /* Fuente en negrita */
    color: #0d163e; /* Color del texto */
    letter-spacing: 2px; /* Espaciado entre letras */
    margin: 0; /* Elimina márgenes predeterminados */
    position: relative;
    text-align: center;
  }
  
  .info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
  }
  
  .caracteristica {
    background: #0d163e;
    width: 200px;
    height: 120px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;

  }
  
  .caracteristica:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
    background: #c81851; /* Cambia a rosa al hacer hover */
  }
  
  .caracteristica i {
    font-size: 30px;
    margin-bottom: 10px;
    color: white;
  }
  
  .caracteristica h3 {
    font-size: 16px;
    margin: 0;
    color: white;
    letter-spacing: 0.5px;
  }

  /* Sección SERVICIOS INTEGRALES TÍTULO */
  .servicios {

    color: #0d163e;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px; /* agrega espacio arriba */
    

  }
  
  div.servicios h2 {
    font-size: 1.9rem;
    color: #0d163e;
    font-weight: bold;
    letter-spacing: 0.9px;
    margin-bottom: 20px;
    
  }

   /* Sección SERVICIOS INTEGRALES DESCRIPCIÓN */

   /* Contenedor principal de la sección */
.servicios-animados {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  min-height: 220px;
  margin-bottom: 3rem;
}

/* Estilo general de cada bloque */
.servicio {
  flex: 1;
  color: white;
  padding: 20px 20px;
  position: relative;
  text-align: center;
  overflow: hidden;
  transition: background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Colores alternos */
.bloque-azul {
  background-color: #0d163e;
}

.bloque-rosa {
  background-color: #c81851;
}

/* Íconos estilo favicon */
.icono-favicon {
  font-size: 50px;
  margin-bottom: 15px;
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

/* Título */
.servicio h3 {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
  transition: color 0.3s ease;
  letter-spacing: 0.5px;
}

/* Párrafo oculto por defecto */
.servicio p {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 15px;
  transition: opacity 0.4s ease, max-height 0.4s ease;
  font-size: 16px;
  line-height: 1.4;
  padding: 0 10px;
}

/* Mostrar párrafo al pasar el mouse */
.servicio:hover p {
  opacity: 1;
  max-height: 200px;
}

/* Animación del icono */
.servicio:hover .icono-favicon {
  transform: scale(1.15);
}

/*RESPONSIVE*/
@media (max-width: 1024px) {
  .servicio {
    flex: 1 1 50%;
  }
}

@media (max-width: 768px) {
  .servicio {
    flex: 1 1 100%;
  }

  .icono-favicon {
    font-size: 40px;
    padding: 12px;
  }

  .servicio h3 {
    font-size: 18px;
  }

  .servicio p {
    font-size: 15px;
  }
}

    /* Lo que producimos - galería */
 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  .contenedor {
    width: 85%;
    max-width: 1100px;
    overflow: hidden;
    margin: auto;
    padding: 60px 0;
  }
  
  .gallery {
    background: white;
  }
  
  .contenedor-galeria {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
  }
  @media (max-width: 600px) {
  .contenedor-galeria {
    justify-content: center;
  }
}
  
  .img-container {
    position: relative; /* Esto es necesario para posicionar el texto sobre la imagen */
    width: 30%;
    margin-bottom: 15px;
    overflow: hidden; /* Para evitar que la imagen se desborde al hacer zoom */
  }
  
  .img-galeria {
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 7px;
  }
  
  .texto-imagen {
    position: absolute;
    bottom: 0; /* Siempre en la parte inferior de la imagen */
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    background-color: rgba(6, 6, 68, 0.7);
    padding: 10px;
    z-index: 2;
    letter-spacing: 0.5px;
    pointer-events: none;
    transition: transform 0.3s ease-in-out;
  }
  
  /* Zoom sincronizado */
  .img-galeria:hover,
  .img-galeria:hover + .texto-imagen {
    transform: scale(1.1);
    transform-origin: bottom center;
  }
  
  .imagen-light {
    position: fixed;
    background: rgba(6, 6, 68, 0.4);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(100%);
    transition: transform .2s ease-in-out;
    z-index: 9999; /* Asegura que esté siempre encima */
  }
  
  .show {
    transform: translate(0);
  }
  
  .agregar-imagen {
    object-fit: cover;
    width: 60%;
    border-radius: 15px;
    transform: scale(0);
    transition: transform .3s .2s;
  }
  
  .showImage {
    transform: scale(1);
  }
  
  .close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    cursor: pointer;
    color: #fff;
    font-size: 25px;
  }


/* Desktop: por defecto .img-container width: 30% */

/* Tablet: 2 por fila */
@media (max-width: 1024px) {
  .img-container {
    width: 45%;
  }
}

/* Celular: 1 por fila */
@media (max-width: 600px) {
  .img-container {
    width: 100%;
  }

  /* Opcional: Ajusta tamaño de texto para móvil */
  .texto-imagen {
    font-size: 18px;
    padding: 8px;
  }
}

/* ================== MÁS AJUSTADO PARA CELULARES PEQUEÑOS ================== */
@media (min-width: 376px) and (max-width: 720px) {
.gallery {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:nth-child(1) {
  animation: fade 15s infinite;
}
.gallery-item:nth-child(2) {
  animation: fade 15s infinite 5s;
}
.gallery-item:nth-child(3) {
  animation: fade 15s infinite 10s;
}

@keyframes fade {
  0%   { opacity: 0; z-index: 0; }
  5%   { opacity: 1; z-index: 1; }
  30%  { opacity: 1; z-index: 1; }
  35%  { opacity: 0; z-index: 0; }
  100% { opacity: 0; z-index: 0; }
}

  .text-overlay .title {
    font-size: 1.5rem;
  }
  
  /* Subtítulo */
  .text-overlay .subtitle {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }

   .impact-info .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px !important;
 
  }

  .impact-info .content h2 br:first-of-type {
    display: none; /* Oculta el primer <br> */
  }

  .impact-info .content h2 {
    order: 1;
    font-size: 1.1rem;
    margin-bottom: -5px !important;
  }


  .line-separator {
    order: 2;
    width: 40px;
    height: 4px;
    background-color: #c81851;
    border-radius: 2px;
  }

  .impact-info p {
    order: 3;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0;
  }

  .section-header h2{
    font-size: 1rem;
    padding: 9px 0 20px 0 !important;

  }

  div.sectores h2 {
    font-size: 1rem;
  }

  @keyframes cambioColor {
    0% { background: #0d163e; }
    50% { background: #c81851; }
    100% { background: #0d163e; }
}

  .caracteristica{
    animation: cambioColor 10s infinite linear;
    width: 110px;
    height: 90px;
  }

  .caracteristica h3{
    font-size: 0.75rem;
    
  }

  .caracteristica i{
    font-size: 20px;
  }

  .sectores h2{
    font-size: 0.9rem !important;
  }

  .section-header + .sectores {
    margin-top: 8px !important; /* Ajusta el valor si aún hay separación */
  }

  .lista-sectores {
    flex-wrap: nowrap;          /* Evita que los elementos hagan salto a otra línea */
    overflow: hidden;           /* Oculta cualquier contenido que se salga del contenedor */
    justify-content: center;    /* Centra horizontalmente los elementos dentro del contenedor */
    position: relative;         /* Para posicionar absolutamente a los hijos (li) respecto a este contenedor */
    height: 1.5em;              /* Altura fija para que el contenedor no cambie de tamaño */
  }

  .lista-sectores li {
    flex: 0 0 100%;             /* Cada li ocupa el 100% del ancho del contenedor */
    display: block;             /* Mostrar como bloque para que tome todo el ancho asignado */
    text-align: center;         /* Centrar el texto dentro de cada li */
    position: absolute;         /* Posiciona todos los li sobre el mismo lugar (superpuestos) */
    top: 0;                    /* Alinea arriba dentro del contenedor */
    left: 0;                   /* Alinea a la izquierda dentro del contenedor */
    width: 100%;                /* Ocupa todo el ancho disponible */
    opacity: 0;                 /* Oculto por defecto */
    transition: opacity 1s ease; /* Transición suave de opacidad al cambiar de estado */
    font-size: 0.9rem;
  }

  .lista-sectores li.active {
    opacity: 1;                 /* Texto visible cuando tiene la clase active */
    position: relative;         /* Para que el texto visible tome su posición normal y no se superponga */
  }

  .contenedor {
    width: 95%;
    padding-top: 10px;   
    padding-bottom: 100px !important;
    margin-top: 0;       
    overflow-x: hidden;

  }

  .contenedor-galeria {
    display: flex;             /* slider horizontal */
    flex-direction: row;       /* asegúrate que sea fila */
    flex-wrap: nowrap;         /* no se envuelven */
    align-items: center;
    overflow-x: auto;          /* scroll horizontal */
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 16px;
    padding: 10px 0;
  }

  .contenedor-galeria::-webkit-scrollbar {
    display: none;
  }

  .img-container {
    flex: 0 0 85%;       /* ancho de cada "slide" */
    width: 250px;
    height: 180px;         
    scroll-snap-align: center;
    position: relative;
    margin: 0;
  }

  .img-galeria {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    object-fit: cover;
  }

  .texto-imagen {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 8px;
    z-index: 2;
    letter-spacing: 0.5px;
    pointer-events: none;
    font-size: 1rem;
    
  }

  .agregar-imagen {
    width: 90%;
  }

  .close {
    font-size: 22px;
    width: 30px;
    top: 10px;
    right: 10px;
  }

  footer{
  margin-top: 40px;
  padding: 20px 0;
  }

}

/* ================== PARA PANTALLAS DE 721 TABLETS ================== */
@media (min-width: 721px) and (max-width: 1366px) {
  .gallery-item {
    flex: 0 0 31.79% !important;
    height: 190px !important;
  }
  .text-overlay .title {
    font-size: 0.9rem;
  }
  .text-overlay .subtitle{
    font-size: 0.8rem;
  }

  .impact-info .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
 
  }

  .impact-info .content h2 br:first-of-type {
    display: none; /* Oculta el primer <br> */
  }

  .impact-info .content h2 {
    order: 1;
    font-size: 1.1rem;
    margin-bottom: -5px;
  }


  .line-separator {
    order: 2;
    width: 40px;
    height: 4px;
    background-color: #c81851;
    border-radius: 2px;
  }

  .impact-info p {
    order: 3;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0;
  }

  .section-header h2{
    font-size: 1.1rem;
    padding: 5px 0 20px 0 !important;

  }

  div.sectores h2 {
    font-size: 1rem;
  }

  @keyframes cambioColor {
    0% { background: #0d163e; }
    50% { background: #c81851; }
    100% { background: #0d163e; }
}

  .caracteristica{
    animation: cambioColor 10s infinite linear;
    width: 150px !important;
    height: 100px;
  }

  .caracteristica h3{
    font-size: 0.8rem;
    
  }

  .caracteristica i{
    font-size: 20px;
  }

  .section-header + .sectores {
    margin-top: 20px !important; /* Ajusta el valor si aún hay separación */
  }

  .sectores h2{
    font-size: 1rem !important;
    white-space: normal;
    max-width: 600px;
    justify-content: center;
    margin: 0 auto;
  }
  
  .lista-sectores {
    flex-wrap: wrap;          /* Evita que los elementos hagan salto a otra línea */
    overflow: hidden;           /* Oculta cualquier contenido que se salga del contenedor */
    justify-content: center;    /* Centra horizontalmente los elementos dentro del contenedor */
    position: relative;         /* Para posicionar absolutamente a los hijos (li) respecto a este contenedor */
    height: 5rem;              /* Altura fija para que el contenedor no cambie de tamaño */
  }

  .lista-sectores li {
    font-size: 0.9rem;
    
  }

  .contenedor {
    width: 95%;
    padding-top: 20px;   
    margin-top: 0;       
    overflow-x: hidden;

  }

  .texto-imagen {
    font-size: 0.9rem;
  }


}

/* ================== PARA PANTALLAS DE 768 ================== */
@media (min-width: 769px) and (max-width: 1024px) {

}