/* Fuente y estilos base */
body {
  margin: 0;
  font-family: 'Baloo 2', sans-serif;
  background: linear-gradient(135deg, #0d47a1, #1976d2, #00bcd4);
  color: #fff;
}

/* Contenedor principal */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}
@media (max-width: 768px) {
  main {
    max-width: 100%;
    margin: 0;
    padding: 10px;
  }
}

/* Banner con logo */
.banner {
  text-align: center;
  background: #0d47a1;
  padding: 10px;
}
.logo {
  max-width: 200px;   /* tamaño fijo en PC y móvil */
  height: auto;
  animation: fadeInDown 1s ease;
}
@keyframes fadeInDown {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1565c0;
  padding: 0.5rem;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}
.nav-links a:hover {
  color: #00e5ff;
}
.hamburger {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 999; /* siempre encima del menú */
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    margin-left: auto;
  }
}

/* Responsive menú hamburguesa con animación */
@media (max-width: 768px) {
  .nav-links {
    max-height: 0;
    overflow: hidden;
    flex-direction: column;
    background: #1565c0;
    position: absolute;
    top: 120px; /* debajo del logo */
    right: 0;
    width: 200px;
    padding: 0;
    opacity: 0;
    transition: max-height 0.4s ease-out, padding 0.3s ease-out, opacity 0.4s ease-out;
  }
  .nav-links.show {
    max-height: 500px;
    padding: 1rem;
    opacity: 1;
  }
  .hamburger {
    display: block;
    margin-left: auto;
  }
}


/* Estilo general */
.nav-links li {
  position: relative;
}

/* Submenú oculto por defecto */
.dropdown-menu {
  display: none;
  position: absolute;
  background: #1565c0;
  list-style: none;
  padding: 0;
  margin: 0;
  top: 100%;
  left: 0;
  min-width: 200px;
  border-radius: 6px;
  z-index: 1000;
}

.dropdown-menu li a {
  display: block;
  padding: 10px;
  color: #fff;
  text-decoration: none;
}

.dropdown-menu li a:hover {
  background: #00e5ff;
  color: #000;
}

/* Mostrar submenú al pasar el mouse en PC */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* En móviles: submenú se despliega al tocar */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    min-width: 100%;
  }
}


/* Tarjetas interactivas */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.card {
  background: linear-gradient(135deg, #2196f3, #00bcd4);
  color: #fff;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.card button {
  margin-top: 10px;
  background: #fff;
  color: #1565c0;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s ease, color 0.3s ease;
}
.card button:hover {
  background: #00e5ff;
  color: #fff;
}

.cards-abecedario {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* siempre 4 columnas */
  gap: 20px;
  margin-top: 20px;
}

.cards-abecedario .card {
  background: linear-gradient(135deg, #2196f3, #00bcd4);
  color: #fff;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cards-abecedario .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.cards-abecedario .card img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
}


/* Footer */
footer {
  background: #0d47a1;
  color: #fff;
  text-align: center;
  padding: 15px;
  margin-top: 20px;
}

.cards-numeros {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* siempre 4 columnas */
  gap: 20px;
  margin-top: 20px;
}

.cards-numeros .card {
  background: linear-gradient(135deg, #2196f3, #00bcd4);
  color: #fff;
  padding: 15px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cards-numeros .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.cards-numeros .card img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
}

.numeros-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.numeros-nav button {
  background: linear-gradient(135deg, #2196f3, #00bcd4);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.3s ease, background 0.3s ease;
}

.numeros-nav button:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #00e5ff, #2196f3);
}

.subnav {
  background: #1565c0; /* azul consistente con tu menú */
  padding: 0.5rem;
  text-align: center;
}

.subnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.subnav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.subnav a:hover {
  background: #00e5ff;
  color: #000;
}
