/* ===== 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 auto;
  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;
}

/* ===== ACORDEÓN TIPOS DE LAMINADOS ===== */
.accordion {
  display: flex;
  overflow: hidden;
  width: 100%;
  height: clamp(200px, 40vw, 300px); 
  border-radius: 5px;
}

.accordion-select {
  display: none;
}

.accordion-title {
  position: relative;
  color: #0d163e;
  font-weight: bold;
  width: clamp(50px, 8vw, 65px);
  height: 100%;
  font-size: clamp(0.8rem, 1.5vw, 15px);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
  padding: 10px;
  letter-spacing: 4px;
}

.accordion-title img {
  width: auto;
  height: 100%;
  margin-bottom: 10px;
  object-fit: contain;
}

.accordion-title a {
  transform: rotate(-90deg);
  padding-top: 2rem;
  line-height: clamp(50px, 8vw, 65px);
  display: block;
  z-index: 2;
  color: #0d163e;
}

.accordion-content {
  width: 0%;
  height: 100%;
  transition: width 0.5s ease;
  box-sizing: border-box;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.accordion-select:checked + .accordion-title + .accordion-content {
  width: 100%;
}

.accordion-title:not(:last-child)::after {
  content: '';
  border-left: 2px solid #dedede;
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
}

.accordion-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* ===== SECCIÓN MATERIALES HPL, TFL, FRL ===== */
.laminates-section {
  text-align: center;
  padding: 3.75rem 1.25rem; /* 60px 20px */
  background: white;
}

.laminates-section h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: bold;
  margin-bottom: 2.5rem; /* 40px */
  color: #0d163e;
  letter-spacing: 0.5rem;
}

.laminates-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.875rem; /* 30px */
}

.flip-card {
  background-color: transparent;
  width: clamp(150px, 25vw, 200px);
  aspect-ratio: 1 / 1; /* cuadrado */
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: 20px;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 3vw, 1.5rem);
  font-weight: bold;
  padding: 20px;
}

.flip-card-front {
  color: white;
  letter-spacing: 0.2rem;
  background-size: cover;
  background-position: center;
}

.flip-card-back {
  background-color: #0d163e;
  color: white;
  transform: rotateY(180deg);
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.laminates-grid .flip-card:nth-child(1) .flip-card-front {
  background-image: url('https://firebasestorage.googleapis.com/v0/b/appinspections-77c4f.appspot.com/o/images%2Flaminados%2FFRL-1.webp?alt=media&token=4eb7b28f-66f6-4ede-8618-cb1818b1fc8b');
}

.laminates-grid .flip-card:nth-child(2) .flip-card-front {
  background-image: url('https://firebasestorage.googleapis.com/v0/b/appinspections-77c4f.appspot.com/o/images%2Flaminados%2FTFL.webp?alt=media&token=b8925423-b256-447e-8c11-8b91f1820d6b');
}

.laminates-grid .flip-card:nth-child(3) .flip-card-front {
  background-image: url('https://firebasestorage.googleapis.com/v0/b/appinspections-77c4f.appspot.com/o/images%2Flaminados%2FHPL-1.webp?alt=media&token=0a6070dd-b5b4-4c1e-8633-fdbd374a4e0f');
}

.laminates-grid .flip-card:nth-child(4) .flip-card-front {
  background-image: url('https://firebasestorage.googleapis.com/v0/b/appinspections-77c4f.appspot.com/o/images%2Flaminados%2FThicklam-1.webp?alt=media&token=3008e348-3e71-4a7c-982b-e5444b5069e7');
}

@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;
  }  

  .accordion {
    height: clamp(150px, 30vw, 200px);
  }

  .accordion-title {
    font-size: 0.7rem;
    letter-spacing: 1px; /* Menos espacio entre letras */
    padding: 5px;
    white-space: normal; /* Permite que el texto haga salto de línea */
  }

  .accordion-title a {
    transform: rotate(-90deg);
    padding-top: 1rem;
    line-height: normal;
    white-space: normal; /* También permite salto de línea dentro del link */
  }

  .laminates-section h2 {
    font-size: clamp(1.2rem, 4vw, 1.9rem); /* Más pequeño y fluido */
    letter-spacing: 0.3rem; /* Opcional: menos espacio entre letras */
  }

  .flip-card-inner {
    animation: flipMobile 5s infinite alternate;
  }
}

@keyframes flipMobile {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(180deg);
  }


}

@media (max-width: 1539px) {

.gallery-item {
    flex: 1 1 calc((100% - 2.5rem) / 3);
     max-height: 60vh;
}
.text-overlay .title {
  font-size: clamp(1rem, 3vw, 1.5rem);
}

}

