.trayectoria-section {
  display: 100%;
  /*background-image: url("images/imagenes_index/imagen_trayectoria_menu.png");*/
  background-color: #ccc;        /* gris */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  max-width: 1118px;
  margin: 0 auto;
  padding: 20px;
  width: 1118px;
  justify-content: center;
}

.trayectoria-container {
  display: grid;
  grid-template-columns: 279px 188px 1fr; /* 3 columnas */
  gap: 10px;
}

.columna {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Caja de imagen */
.img-box {
  position: relative;
  display: block;
  margin: 5px;
  overflow: hidden;
}

.img-box img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
  transition: transform 0.4s ease-in-out;
}

/* Overlay (oculto por defecto en desktop) */
.img-box .overlay {
  position: absolute;
  top: 0;              /* cubre toda la imagen */
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2em;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Hover en desktop */
@media (min-width: 769px) {
  .img-box:hover img {
    transform: scale(1.08);
  }
  .img-box:hover .overlay {
    opacity: 1;
  }
}

/* Overlay siempre visible en móviles */
@media (max-width: 768px) {
  .img-box .overlay {
    opacity: 1;
    font-size: 1em;
  }
}

/* Caja de texto en columna 3 */
.texto-box {
  width: 177px;
  height: 82px;
  background: white;
  border: 1px solid #333;
  padding: 10px;
  font-size: 14px;
  color: #000;
  text-align: center;
  margin: 5px auto;
}

/* Imagen grande de más */
.grande {
  width: 279px;
  height: 385px;
}

.grande-mas {
  width: 401px;
  height: 382px;
}
