.trayectoria-section {
  display: flex;
  background-image: url("images/imagenes_index/fondo_imagenes_trayectoria_mas.png");
  background-color: #ccc;  /* gris */
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  max-width: 1118px;
  margin: 40px auto;
  padding: 40px;
  
}

.trayectoria-container {
  display: grid;
  grid-template-columns: 279px 188px 1fr; /* 3 columnas */
  gap: 20px;
}

.columna {
  display: flex;
  flex-direction: column;
  gap: 40px;


.img-box {
  position: relative;
  display: block;
  margin: 20px;
  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 */
.img-box .overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  color: white;
  font-size: 1.2em;
  font-weight: bold;
  background: rgba(0,0,0,0.6);
  padding: 8px 12px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  height: 100%;
  
}

/* Overlay visible al hover (solo escritorio) */
@media (min-width: 769px) {
  .img-box:hover img {
    transform: scale(1.08);
  }
  .img-box:hover .overlay {
    opacity: 1;
  }
}

/* En móviles el overlay siempre se ve */
@media (max-width: 768px) {
  .trayectoria-container {
    grid-template-columns: 1fr; /* columnas apiladas */
  }
  .texto-box {
    width: 100%;
  }
  .grande, .grande-mas {
    width: 100%;
    height: auto;
  }

  .img-box .overlay {
    opacity: 1; /* siempre visible */
    font-size: 1em;
    bottom: 5px;
    left: 5px;
    right: 5px;
  }
}

/* Caja de texto en columna 3 */
.texto-box {
  width: 401px;
  height: 82px;
  background: white;
  border: 1px solid transparent;
  padding: 10px;
  font-size: 14px;
  color: #000;
  text-align: center;
  margin: 5px auto;
  border-radius: 10px;

 margin: 0; /* Elimina márgenes externos */
    line-height: 1.5; /* Ajusta el interlineado (1.5 es un valor común) */
    text-align: center; /* Centra el texto horizontalmente */
    word-wrap: break-word; /* Asegura que el texto no se desborde */
    font-size: 16px; /* Ajusta el tamaño de la fuente */
    text-size-adjust: 10px;
    
}

/* Imagen grande  imagen_trayectoria_menu.png */
.grande {
  width: 279px;
  height: 385px;
}

/* Imagen grande  mas_mas.png */
.grande-mas {
  width: 401px;
  height: 282px;
}

/**estilo submenu trayectorias**/
.link-trayectoria-submenu {
  color: #fff;
  text-decoration: none;
  font-size: 1.5em;
  margin-bottom: 20px;
  padding: 5px 20px;
  transition: background 0.3s ease;
  
}

.link-trayectoria-submenu:hover {
  background: rgba(0, 0, 0, 0.5);  /* overlay al pasar el mouse color oscuro*/
  color: #fff; /*texto blanco sobre el overlay*/
  border-radius: 5px;
}


/* Contenedor de botones flotantes */
.botones-flotantes {
  position: fixed;        /* Siempre visible aunque hagas scroll */
  top: 50%;               /* Centrado verticalmente */
  right: 0;               /* Pegado al borde derecho */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;              /* Espacio entre los botones */
  z-index: 9999;          /* Encima de todo */
}

/* Estilo de cada botón */
.boton-flotante {
  width: 60px;
  height: 40px;
  background-color: #ff00aa;  /* Fucsia */
  color: white;
  font-size: 14px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  text-align: center;
  line-height: 40px;          /* Centra verticalmente el texto */
  border: 2px solid gray;     /* Borde gris */
  border-radius: 4px 0 0 4px; /* Esquinas redondeadas a la izquierda */
  text-decoration: none;

  position: relative;
  right: -20px;               /* Sobresale 20px */
  transition: right 0.3s ease;
}

/* Al pasar el mouse */
.boton-flotante:hover {
  right: 0;
}
