/* Contenedor de la galería */
/* ===== GALERÍA ===== */
.gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gallery-container {
  display: flex;
  overflow-x: auto;
  gap: 1.25rem; /* 20px */
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 0;

}

.gallery-container::-webkit-scrollbar {
  display: none;
}

.gallery-item {
  flex: 0 0 calc((100% - 2 * 1.25rem) / 3);
  width: clamp(300px, 50vw, 500px);
  aspect-ratio: 5 / 3;
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 68, 0.4);
  z-index: 1;
}

.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  opacity: 0;
  z-index: 2;
  animation: fadeInText 2s forwards;
}

.text-overlay .title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: bold;
  margin-bottom: 0.5rem;
  letter-spacing: 2px;
}

.text-overlay .subtitle {
  font-size: clamp(1rem, 3vw, 1.2rem);
  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 DISTRIBUCIÓN CONEXSA ===== */
.impact-info {
  background: white;
  padding: 3.125rem 1.25rem; /* 50px 20px */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.impact-info .content {
  width: 100%;
  max-width: 75rem; /* 1200px */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3.75rem; /* 60px */
  flex-wrap: wrap;
}

.impact-info .content h2 {
  font-weight: bold;
  text-align: center;
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  color: #0d163e;
  max-width: 50rem; /* 800px */
}

.line-separator {
  width: 0.375rem; /* 6px */
  height: 10.625rem; /* 170px */
  background-color: #c81851;
  border-radius: 4px;
}

.impact-info p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: #0d163e;
  max-width: 34.375rem; /* 550px */
  line-height: 1.6;
  text-align: justify;
}

/* Sección DISEÑAMOS Y FABRICAMOS */
.sectores {
  color: #0d163e;
  text-align: center;
  padding: 2rem 5vw;
  margin-top: 3.125rem; /* 50px ≈ 3.125rem */
}

div.sectores h2 {
  font-size: 1.9rem;
  color: #0d163e;
  font-weight: bold;
  letter-spacing: 0.056rem;
  margin-bottom: 1.25rem;
}

.lista-sectores {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.lista-sectores li {
  font-size: 0.99rem;
  letter-spacing: 0.063rem;
  font-weight: bold;
  color: #c81851;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: bold;
  color: #0d163e;
  letter-spacing: 0.125rem;
  margin: 0;
  position: relative;
  text-align: center;
}

.info {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.caracteristica {
  background: #0d163e;
  width: 13rem; /* 200px */
  height: 7.5rem; /* 120px */
  padding: 1rem;
  border-radius: 0.625rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 0.125rem 0.313rem rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.caracteristica:hover {
  transform: translateY(-0.313rem);
  box-shadow: 0 0.375rem 0.938rem rgba(0,0,0,0.2);
  background: #c81851;
}

.caracteristica i {
  font-size: 1.875rem;
  margin-bottom: 0.625rem;
  color: white;
}

.caracteristica h3 {
  font-size: 1rem;
  margin: 0;
  color: white;
  letter-spacing: 0.031rem;
}

  /* Lo que producimos - galería */
 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.contenedor {
  width: 85%;
  max-width: 68.75rem;
  overflow: hidden;
  margin: auto;
  padding: clamp(2rem, 5vw, 3.75rem) 0;
}

.gallery {
  background: white;
}

.contenedor-galeria {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.img-container {
  position: relative; /* Esto es necesario para posicionar el texto sobre la imagen */
  width: 30%;
  margin-bottom: clamp(0.5rem, 1vw, 1rem);
  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: 0.4375rem;
}

.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: clamp(0.875rem, 2vw, 1.25rem);
  font-weight: bold;
  background-color: rgba(6, 6, 68, 0.7);
  padding: clamp(0.25rem, 1vw, 0.625rem);
  z-index: 2;
  letter-spacing: 0.03125rem;
  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: 0.9375rem;
  transform: scale(0);
  transition: transform .3s .2s;
}

.showImage {
  transform: scale(1);
}

.close {
  position: absolute;
  top: 0.9375rem;
  right: 0.9375rem;
  width: 2.5rem;
  cursor: pointer;
  color: #fff; 
  font-size: 1.5625rem;
}

@media (min-width: 550px) and (max-width: 929px) {
  .laminates-grid {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-items: center;
    gap: 3rem; 
    justify-content: center;
  }

  .flip-card-inner {
    animation: flipMobile 5s infinite alternate;
  }
}

@keyframes flipMobile {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }

}

@media (max-width: 1024px) {
  .gallery {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 400px; /* Limita altura máxima */
  }

  /* El resto igual */
  .gallery-container {
    position: relative;
    display: block;
    height: 100%;
  }

  .gallery-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    animation: fade 15s infinite;
  }

  .gallery-item:nth-child(1) { animation-delay: 0s; }
  .gallery-item:nth-child(2) { animation-delay: 5s; }
  .gallery-item:nth-child(3) { animation-delay: 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; }
  }

  .impact-info .content {
    flex-direction: column;
    gap: 15px;
  }
  .impact-info .content h2 {
    margin-bottom: -5px;
    font-size: 1.5rem;
  }
  .line-separator {
    width: 40px;
    height: 4px;
  }
  .impact-info p {
    padding: 0 10px;
    font-size: 1rem;
    text-align: center;
  } 
  
  .contenedor-galeria {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
  }

  .gallery {
    margin-bottom: 3rem;
  }

  .img-container {
    flex: 0 0 80%;
    height: 40vw;
    scroll-snap-align: center;
  }

  .img-galeria {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .agregar-imagen{
     width: clamp(90vw, 95vw, 100%);
  }

  div.sectores h2 {
  font-size: 1.3rem;
  }

  .lista-sectores {
    position: relative;
    height: 2rem;
    overflow: hidden;
    padding: 0;
    margin: 0 auto;
    list-style: none;
  }

  .lista-sectores li {
    position: absolute;
    width: 100%;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    animation: aparecer 24s linear infinite;
  }

  /* Delays para los 6 ítems (24s total, 4s por ítem) */
  .lista-sectores li:nth-child(1) { animation-delay: 0s; }
  .lista-sectores li:nth-child(2) { animation-delay: 4s; }
  .lista-sectores li:nth-child(3) { animation-delay: 8s; }
  .lista-sectores li:nth-child(4) { animation-delay: 12s; }
  .lista-sectores li:nth-child(5) { animation-delay: 16s; }
  .lista-sectores li:nth-child(6) { animation-delay: 20s; }

  @keyframes aparecer {
    0%    { opacity: 0; visibility: hidden; z-index: 0; }
    5%    { opacity: 1; visibility: visible; z-index: 1; }
    18%   { opacity: 1; visibility: visible; z-index: 1; }
    23%   { opacity: 0; visibility: hidden; z-index: 0; }
    100%  { opacity: 0; visibility: hidden; z-index: 0; }
  }
  .sectores{
    margin-top: 1.5rem; ;
  }

  .section-header h2 {
    font-size: 1.3rem;
  }

  .info {
   margin-top: 2.5rem;
  }



}