/* ===============================
   PARALLAX 1 - CONTADORES ANIMADOS
=============================== */
.parallax-section {
  position: relative;
  height: 500px;
  overflow: hidden;
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

.parallax-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.parallax-container img {
  display: none;
}

.parallax-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../images/rollos-placas-hule-industrial-parallax1.webp');
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 1;
}

.parallax-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    transparent 20%,
    transparent 80%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

.parallax-section .counter-item {
  color: #fff;
  margin: 15px 0;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9);
}

.parallax-section .counter-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #c40000;
}

.parallax-section .counter-value {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.parallax-section .counter-title {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.95;
}

/* ===============================
   PARALLAX 2 - CERTIFICACIONES
=============================== */
.parallax-certifications-section {
  position: relative;
  width: 100%;
}

.parallax-certifications {
  position: relative;
  height: 600px;
  overflow: hidden;
}

.parallax-certifications-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../../images/rollos-placas-hule-industrial-parallax2.webp');
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 1;
}

.parallax-certifications-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    transparent 20%,
    transparent 80%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

.certifications-title {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.certifications-text {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1.7;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.certifications-text strong {
  color: #c40000;
}

.certifications-text em {
  font-style: italic;
  color: #f8f9fa;
}

.certifications-subtitle {
  color: #002c5b;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

/* ===============================
   CARRUSEL INFINITO - LOGOS EXTRA GRANDES
=============================== */
.certifications-scroll-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 40px 0;
  mask: linear-gradient(
    90deg,
    transparent,
    white 10%,
    white 90%,
    transparent
  );
  -webkit-mask: linear-gradient(
    90deg,
    transparent,
    white 10%,
    white 90%,
    transparent
  );
}

.certifications-track {
  display: flex;
  gap: 40px;
  animation: scroll-certifications 10s linear infinite;
  width: max-content;
  padding: 0 60px;
}

.certification-item {
  flex: 0 0 auto;
  width: 280px;
  text-align: center;
  padding: 40px 30px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  transition: all 0.4s ease;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #f8f9fa;
}

.certification-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  border-color: #002c5b;
}

.certification-item img {
  max-height: 120px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: all 0.4s ease;
  filter: grayscale(0.3);
}

.certification-item:hover img {
  transform: scale(1.15);
  filter: grayscale(0);
}

@keyframes scroll-certifications {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-280px * 8 - 40px * 8));
  }
}

.certifications-scroll-container:hover .certifications-track {
  animation-play-state: paused;
}

/* ===============================
   RESPONSIVE COMPLETO PARA AMBOS PARALLAX
=============================== */

/* Desktop grande */
@media (max-width: 1200px) {
  .parallax-certifications {
    height: 550px;
  }
  
  .certifications-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
  }
  
  .certifications-text {
    font-size: 1rem;
  }
  
  .certification-item {
    width: 250px;
    height: 200px;
    padding: 35px 25px;
  }
  
  .certification-item img {
    max-height: 100px;
    max-width: 180px;
  }
  
  @keyframes scroll-certifications {
    100% {
      transform: translateX(calc(-250px * 8 - 40px * 8));
    }
  }
}

/* Tablet */
@media (max-width: 992px) {
  .parallax-section {
    height: 450px;
  }
  
  .parallax-certifications {
    height: 500px;
  }
  
  .certifications-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }
  
  .certifications-text {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .parallax-section .counter-value {
    font-size: 2.2rem;
  }
  
  .parallax-section .counter-icon {
    font-size: 1.8rem;
  }
  
  .certification-item {
    width: 220px;
    height: 180px;
    padding: 30px 20px;
  }
  
  .certification-item img {
    max-height: 90px;
    max-width: 160px;
  }
  
  .certifications-track {
    gap: 35px;
  }
  
  @keyframes scroll-certifications {
    100% {
      transform: translateX(calc(-220px * 8 - 35px * 8));
    }
  }
}

/* Móvil grande */
@media (max-width: 768px) {
  /* FIX PARA AMBOS PARALLAX EN MÓVIL */
  .parallax-section::before {
    background-attachment: scroll !important;
  }
  
  .parallax-section {
    height: 500px;
  }
  
  .parallax-certifications {
    height: 650px;
  }
  
  .parallax-certifications-bg {
    background-attachment: scroll !important;
  }
  
  .parallax-certifications-content {
    padding: 40px 20px;
  }
  
  .certifications-title {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    line-height: 1.3;
  }
  
  .certifications-text {
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .certifications-text p {
    margin-bottom: 1rem;
  }
  
  .parallax-section .counter-value {
    font-size: 2rem;
  }
  
  .parallax-section .counter-icon {
    font-size: 1.6rem;
  }
  
  .parallax-section .counter-title {
    font-size: 0.9rem;
  }
  
  .certification-item {
    width: 180px;
    height: 150px;
    padding: 25px 15px;
  }
  
  .certification-item img {
    max-height: 70px;
    max-width: 140px;
  }
  
  .certifications-track {
    gap: 30px;
    animation: scroll-certifications 50s linear infinite;
  }
  
  @keyframes scroll-certifications {
    100% {
      transform: translateX(calc(-180px * 8 - 30px * 8));
    }
  }
}

/* Móvil pequeño */
@media (max-width: 576px) {
  .parallax-section {
    height: 550px;
  }
  
  .parallax-certifications {
    height: 700px;
  }
  
  .parallax-certifications-content {
    padding: 30px 15px;
  }
  
  .certifications-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }
  
  .certifications-text {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  
  .certifications-text p {
    margin-bottom: 0.8rem;
  }
  
  .parallax-section .counter-value {
    font-size: 1.8rem;
  }
  
  .parallax-section .counter-icon {
    font-size: 1.4rem;
  }
  
  .parallax-section .counter-item {
    margin: 10px 0;
  }
  
  .certification-item {
    width: 140px;
    height: 120px;
    padding: 20px 12px;
  }
  
  .certification-item img {
    max-height: 55px;
    max-width: 110px;
  }
  
  .certifications-track {
    gap: 25px;
    animation: scroll-certifications 40s linear infinite;
  }
  
  @keyframes scroll-certifications {
    100% {
      transform: translateX(calc(-140px * 8 - 25px * 8));
    }
  }
}

/* Móvil muy pequeño */
@media (max-width: 400px) {
  .parallax-section {
    height: 600px;
  }
  
  .parallax-certifications {
    height: 750px;
  }
  
  .certifications-title {
    font-size: 1.4rem;
  }
  
  .certifications-text {
    font-size: 0.8rem;
    line-height: 1.4;
  }
  
  .parallax-section .counter-value {
    font-size: 1.6rem;
  }
}

/* Landscape */
@media (max-height: 500px) and (orientation: landscape) {
  .parallax-section {
    height: 350px;
  }
  
  .parallax-certifications {
    height: 400px;
  }
  
  .certifications-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
  }
  
  .certifications-text {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  
  .parallax-section .counter-value {
    font-size: 1.5rem;
  }
}