:root{
  --comic-font: "Comic Neue", system-ui, sans-serif;
}

body {
  margin: 0;
  background: #ffffff;
  overflow-x: hidden;
}

.carrusel-container {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  background: #ffffff;
  margin-top: 20px;
}

.carrusel {
  display: flex;
  gap: 170px;
  will-change: transform;
}

.carrusel img {
  width: 150px;
  height: auto;
  border-radius: 8px;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.carrusel a img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.carrusel a:hover img {
  transform: scale(0.95);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
}

/* Container header */
.header {
  width: 100%;
  font-family: Arial, sans-serif;
  position: relative;
  z-index: 10;
  margin-bottom: 30px;
}

/* Ambas filas usan grid de 6 columnas */
.header-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
}

/* Primera fila - fondo blanco */
.header-top {
  background-color: #fff;
  padding: 10px 20px;
  gap: 15px;
  border-bottom: 1px solid #ddd;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr; /* más ancho para el logo */
}

/* Modulos primera fila */
.modulo.logo img {
  max-height: 170px;
  cursor: pointer;
}

/* Espacio vacío */
.modulo.espacio {
  /* Solo deja espacio, no hace nada */
}

/* Botones iniciar y registrar */
.btn {
  padding: 14px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap; /* evita que el texto se divida */
}

.btn.iniciar {
  background-color: #007bff;
  color: white;
}

.btn.registrar {
  background-color: #007bff;
  color: white;
}

/* Hover para botones */
.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.315);
  background-color: #459fff;
}

/* Segunda fila */
.header-bottom {
  height: 120px;
  gap: 0;
}

/* Cada módulo con color distinto y contenido en dos filas */
.modulo-color {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0px;
  color: white;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  user-select: none;
}

/* Las imágenes pequeñas */
.imagen-pequeña {
  width: 100%;
  height: 100%;
}

.imagen-pequeña img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* que se recorte proporcionalmente sin deformarse */
  margin: 0;
}

/* Colores módulos */
.modulo1 { background-color: #f7dc43; } /* rojo */
.modulo2 { background-color: #f7dc43; } /* rosa */
.modulo3 { background-color: #f7dc43; } /* morado */
.modulo4 { background-color: #f7dc43; } /* azul */
.modulo5 { background-color: #f7dc43; } /* azul claro */
.modulo6 { background-color: #f7dc43; } /* verde azulado */

header {
  margin: 15px 0; /* espacio arriba y abajo */
}

.carrusel-container:first-of-type {
  margin-top: 180px; /* ajusta según altura real del header */
}

.header-bottom a {
  display: block; /* Para que el enlace tome todo el espacio del módulo */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-bottom a:hover img {
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.4);
}

.botones-header {
  display: flex;
  justify-content: flex-end;
  grid-column: 2 / -1; /* hace que ocupe desde la col 2 hasta el final */
}

.botones-header .btn {
  margin-right: 30px; /* separación entre botones */
}

/* imagenes y videos */
/* Secciones imagen - video - imagen */
.quienes-somos-content,
.que-interactivos-content,
.info-colegios-content,
.como-funcionan-content
.abrelatas-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px; /* separación entre elementos */
  max-width: 100%;
  margin: 100px auto; /* separación con otras secciones */
}

.img-content {
  width: 100%;
  height: auto;
  display: block;
}

.video-content {
  width: 100%;
  max-width: 1200px;
  height: auto;
  display: block;
}

header + .carrusel-titular {
  margin-top: 10px; /* cambia el valor hasta que no quede tapada */
}

/*footer*/
.footer {
  background-color: #0082d8; /* Color base del footer */
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 250px;
}

.footer .social-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 15px;
}

.footer .social-icons a {
  color: white;
  font-size: 38px;
  transition: all 0.3s ease;
}

.footer .social-icons a:hover {
  color: #9cfff7; /* Color al pasar el cursor */
  transform: translateY(-5px);
}

.footer .copyright {
  font-size: 14px;
  opacity: 0.8;
}

/* Menú lateral oculto desde la izquierda */
.menu-lateral {
  position: fixed;
  top: 0;
  left: 0; /* dejamos en 0 y usamos transform */
  width: 300px;
  height: 100%;
  background-color: #ffffff;
  box-shadow: 3px 0 10px rgba(0,0,0,0.3);
  transform: translateX(-100%); /* completamente oculto */
  transition: transform 0.3s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 20px;
}

/* Cuando el menú está activo */
.menu-lateral.activo {
  transform: translateX(0); /* se desliza a su posición */
}

/* Overlay semitransparente */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4); /* fondo oscuro semitransparente */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1000; /* debajo del menú */
}

/* Overlay visible cuando el menú está activo */
.overlay.activo {
  opacity: 1;
  visibility: visible;
}

/* Botón menú fijo */
.menu-barras {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1002; /* encima de todo */
  font-size: 38px;
  cursor: pointer;
}

/* Estilizar enlaces del menú lateral */
/* Estilizar enlaces del menú lateral */
.menu-lateral a {
  text-decoration: none;
  font-size: 15px; /* tamaño mayor */
  color: rgb(61, 61, 61); /* letras blancas */
  font-family: Arial, sans-serif; /* misma que botones */
  font-weight: 600;
  letter-spacing: 1px; /* espaciado entre letras */
  transition: color 0.2s;
}

/* Quitar los puntos de la lista */
.menu-lateral ul.menu-superior,
.menu-lateral ul.menu-inferior {
  list-style: none; /* elimina los puntos negros */
  padding: 0;
  margin: 0;
}

/* Espaciado vertical y separadores de la lista superior */
.menu-lateral ul.menu-superior li {
  margin: 15px 0;
  padding-bottom: 10px; /* espacio antes de la línea */
  border-bottom: 1px solid #ccc; /* línea gris delgada */
}

/* Último ítem sin línea */
.menu-lateral ul.menu-superior li:last-child {
  border-bottom: none;
}

/* Lista inferior ajustada para no cortarse */
.menu-lateral ul.menu-inferior {
  margin-top: auto; /* se mantiene al fondo sin margen extra */
  padding-bottom: 60px; /* espacio desde el borde inferior */
}

.menu-lateral ul.menu-inferior li {
  margin: 15px 0; /* separación entre ítems */
}

/* Casita fija a la derecha junto al menú */
.icono.casita {
  position: fixed;
  top: 25px;          /* altura desde arriba */
  right: 80px;        /* separada del borde derecho y del menú */
  font-size: 38px;
  color: #007bff;
  cursor: pointer;
  z-index: 1002;      /* encima del resto */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.icono.casita:hover {
  transform: scale(1.1);
  filter: drop-shadow(0 0 3px #00000070);
}



/* Animación simple */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Clase reusable */
.fade-in {
  opacity: 0;
}

.fade-in.visible {
  animation: fadeIn 0.8s ease forwards;
}

.modulo.botones-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 50px;
  }

/* --- Responsive para móviles --- */
@media screen and (max-width: 768px) {

  /* --- Header top reestructurado --- */
  .header-top {
    display: grid;
    grid-template-columns: auto 1fr auto; /* iconos | botones | logo */
    align-items: center;
    gap: 4px;
    padding: 8px;
    overflow: hidden;
    position: relative;
  }

  /* Logo a la derecha */
  .modulo.logo {
    justify-self: end;
  }

  .modulo.logo img {
    max-height: 75px; /* ajuste para que quepa en móvil */
    width: auto;
  }

  /* Contenedor de botones en el centro */
  .modulo.botones-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .modulo.botones-header .btn {
    width: 100%;
    max-width: 90px; /* un poco más compacto */
    font-size: 9px;
    padding: 4px 8px;
    box-sizing: border-box;
  }

  /* Contenedor de iconos */
.modulo.iconos-header {
  display: flex;
  flex-direction: row;
  gap: 5px; /* espacio entre los iconos, ajusta a tu gusto */
  justify-content: flex-start; 
  align-items: center;
}

  /* Iconos a la izquierda, fijos */
  .icono.casita,
  .menu-barras {
    font-size: 17px; /* un poquito más pequeños */
    z-index: 999;
  }

  .icono.casita {
    justify-self: start;
  }

  .menu-barras {
    justify-self: start;
    margin-left: 0; /* separación entre iconos */
  }

  /* --- Segunda fila del header --- */
  .header-bottom {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: auto;
    gap: 5px;
    height: auto;
  }

  .modulo-color {
    font-size: 12px;
    padding: 0;
  }

  .imagen-pequeña img {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin: 0;
  }

  /* --- Carrusel --- */
  .carrusel-titular img.catalogo-img {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: block;
  }

  .carrusel img {
    width: 100px;
    margin: 0 5px;
  }

 .carrusel {
  display: flex;
  gap: 170px; /* mantiene tu separación */
  will-change: transform;
}

.carrusel-container {
  overflow: hidden;
}

  /* --- Secciones --- */
  .quienes-somos-content,
  .que-interactivos-content,
  .info-colegios-content,
  .como-funcionan-content
  .abrelatas-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 100%;
    margin: 20px auto;
  }

  header + .carrusel-titular {
    margin-top: 50px;
  }

  .footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 5px;
  }
}

/* --- Libro destacado --- */

.libro-destacado{
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 140px 0 90px;
}

.libro-card{
  position: relative;
  display: flex;
  gap: 36px;
  max-width: 1100px;
  width: 90%;
  background: #ffffff; /* papel cálido */
  border-radius: 22px;
  padding: 34px;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000; /* sombra tipo cómic */
}

.libro-card::after{
  content: "";
  position: absolute;
  bottom: -28px;
  left: 80px;

  width: 0;
  height: 0;

  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 28px solid #000;
}

.libro-card::before{
  content: "";
  position: absolute;
  bottom: -22px;
  left: 82px;

  width: 0;
  height: 0;

  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 24px solid #ffffff;
  z-index: 2;
}


.libro-img img{
  width: 220px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

.libro-info{
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.libro-info h2{
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.libro-info p{
  font-size: 16.5px;
  line-height: 1.5;
  max-width: 520px;
}


.btn-libro{
  align-self: flex-start;
  margin-top: 14px;
  padding: 12px 26px;

  background: #fff;      /* ← antes era hover */
  color: #000;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;

  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;

  transition: all 0.25s ease;
}

.btn-libro:hover{
  background: #000;      /* ← antes era normal */
  color: #fff;
  transform: translateY(0);
  box-shadow: none;
}

.libro-card,
.libro-card h2,
.libro-card p,
.btn-libro{
  font-family: var(--comic-font);
}


/* --- Responsive libro destacado (móvil vertical) --- */
@media screen and (max-width: 480px) {

  .libro-destacado {
    margin: 90px 0 60px;
  }

  .libro-card {
    flex-direction: column;
    gap: 18px;

    padding: 22px;
    border-radius: 18px;

    box-shadow: 6px 6px 0 #000;
  }

  /* Pico inferior más pequeño */
  .libro-card::after {
    bottom: -20px;
    left: 40px;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 20px solid #000;
  }

  .libro-card::before {
    bottom: -16px;
    left: 42px;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 16px solid #ffffff;
  }

  /* Imagen más pequeña */
  .libro-img {
    display: flex;
    justify-content: center;
  }

  .libro-img img {
    width: 150px;
  }

  /* Texto más compacto */
  .libro-info {
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .libro-info h2 {
    font-size: 20px;
  }

  .libro-info p {
    font-size: 14px;
    line-height: 1.45;
  }

  /* Botón centrado y más pequeño */
  .btn-libro {
    align-self: center;
    font-size: 14px;
    padding: 10px 22px;
  }
}

