/* Base container */
.pila-tecnologica-container {
  max-width: 100%;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  user-select: none;
  padding: 0 10px; /* respiro lateral */
  position: relative; /* necesario como referencia */
  overflow: visible !important; /* <- truco clave */
}

.pila-main-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

/* Slider */
.pila-slider {
  position: relative;
  overflow: hidden;
}

.pila-slider-inner {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
}

.pila-slide {
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 15px 30px 15px 30px;
  margin: 10px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pila-slide-subtitle {
  text-align: center;
  font-size: 1.8rem;
  font-weight: lighter;
  margin: 40px 0px;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.pila-slide-subtitle.fade-out { opacity: 0; }
.pila-slide-subtitle.fade-in  { opacity: 1; }

/* Flechas */
.pt-prev, .pt-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  z-index: 10;
}
.pt-prev { left: 20px; background-image: url('icons/arrow-left.svg'); }
.pt-next { right: 20px; background-image: url('icons/arrow-right.svg'); }

/* Iconos */
.iconos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.icon-wrapper {
  cursor: default;
  position: relative;
  flex: 1 1 120px;   /* cada icono ocupa mínimo 120px y se ajusta */
  max-width: 160px; /* evita que se estiren demasiado */
  display: inline-block;
  justify-content: center;
}

.icono {
  width: 100%;
  height: auto;
  max-width: 120px;
  transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

/* Efecto: gris por defecto */
.icono.grayscale {
  filter: grayscale(100%);
  opacity: 0.6;
}
.icono.grayscale.activo {
  filter: grayscale(0%);
  opacity: 1;
}

/* Efecto: estático a color */
.icono.color {
  filter: none;
  opacity: 1;
}
.pila-slide.compact .icon-wrapper { padding: 0; }

/* Tooltips */
.pila-tecnologica-container .icon-tooltip {
  display: none;
  position: absolute;
  top: 100%;          /* debajo del icono */
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  background: #222;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.3;
  white-space: normal;
  z-index: 5000;
  max-width: 420px; 
  min-width: 240px;     
  box-sizing: border-box;
  
}

.icon-wrapper {
  position: relative;
}

.pila-tecnologica-container .icon-wrapper:hover .icon-tooltip,
.pila-tecnologica-container .icon-wrapper:focus .icon-tooltip {
  display: inline;
}
/* Dots */
.pt-dots {
  display: flex;
  justify-content: center;
  margin-top: 0px;
  gap: 8px;
}
.pt-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background-color: #ccc;
  cursor: pointer;
}
.pt-dot.active { background-color: #333; }

/* --- Responsive --- */

/* Tablets */
@media (max-width: 1024px) {
  .pila-main-title { font-size: 1.6rem; }
  .pila-slide-subtitle { font-size: 1.4rem; margin: 25px 0; }
  .icon-wrapper { flex: 1 1 100px; max-width: 130px; }
  .icono { max-width: 100px; }
  .pt-prev, .pt-next { width: 30px; height: 30px; }
}

/* Móviles grandes */
@media (max-width: 768px) {
  .pila-main-title { font-size: 1.4rem; margin-bottom: 15px; }
  .pila-slide-subtitle { font-size: 1.2rem; }
  .icon-wrapper { flex: 1 1 90px; max-width: 110px; }
  .icono { max-width: 90px; }
  .pt-prev { left: 10px; }
  .pt-next { right: 10px; }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .pila-main-title { font-size: 1.2rem; }
  .pila-slide-subtitle { font-size: 1rem; margin: 20px 0; }
  .icon-wrapper { flex: 1 1 70px; max-width: 90px; }
  .icono { max-width: 70px; }
  .pt-prev, .pt-next { width: 24px; height: 24px; top: auto; bottom: 10px; transform: none; }
  .pt-dots { margin-top: 10px; }
}
