/* =========================================================
   interactivo.css
   Estilos para las funciones agregadas con interactivo.js
   ========================================================= */

/* ----- Logo del colegio (al final del nav) ----- */
.logo-colegio{
  margin-left: 14px;
}

.logo-colegio img{
  border-radius: 50%;
}

@media (max-width: 700px){
  .logo-colegio{ margin-left: 8px; }
}

/* ----- Botón hamburguesa (oculto en escritorio) ----- */
.nav-toggle{
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 10px;
  line-height: 1;
}

.nav-links{
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-evenly;
  gap: 12px;
}

/* Deja el logo a la izquierda y los enlaces repartidos a la derecha,
   igual en las 4 páginas sin importar el justify-content original */
.barra-navegadora{
  justify-content: space-between;
}

/* ----- Enlace de la página activa ----- */
.barra-navegadora a.activo{
  background-color: rgba(255,255,255,0.28);
}

/* ----- Menú hamburguesa en móvil ----- */
@media (max-width: 700px){
  .nav-toggle{ display: block; }

  .barra-navegadora{
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav-links{
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }

  .nav-links.abierto{
    display: flex;
  }
}

/* ----- Animación de aparición al hacer scroll ----- */
.fade-in{
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible{
  opacity: 1;
  transform: translateY(0);
}

/* ----- Botón volver arriba ----- */
#volverArriba{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #333333;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s;
  z-index: 999;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}
#volverArriba.mostrar{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#volverArriba:hover{ background: #555555; }