*{
  margin: 0%;
  padding: 0%;
  box-sizing: border-box;
  font-family: "Open Sans", sans-serif;
}

body{
  background-color: #F9F5E2;
}

header{
  background-color: #EE2A23;
  padding: 10px 50px;
  font-size: 1.2rem;
}

#banner{
  width: 100%;
}

#img-banner{
  width: 100%;
}

.lapagina {
    display: none;  /* Ocultar por defecto */
}

@media (max-width: 768px) {
    .lapagina {
        display: block;  /* Mostrar solo en pantallas pequeñas */
    }
}

#footer {
  width: 100%;
  text-align: left;
  background-color: #000000;
  padding-bottom: 50px;
  padding-top: 50px;
  font-size: 14px;
}

#footer a, #footer a:link {
  color: #FFF;
  text-decoration: none;
}

b.titulo-footer {
  font-size: 26px;
  color: #ffffff;
}

p.footer-inbal {
  color: #FFF;
}

#loading {
    display: none;
    text-align: center;
    padding: 20px;
}

#loading:before {
    content: '';
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/*================== MAIN PAGINAS ===================*/
.main{
  width: 85%;
  margin: 20px auto;
}

.main-materiales{
  width: 80%;
  margin: 50px auto;
}

.main-actividades{
  width: 80%;
  margin: 30px auto;
}

.main-proyectos{
  width: 80%;
  margin: 30px auto 60px;
}

.main-proyecto-color{
  width: 80%;
  margin: 30px auto;
  gap: 30px;
  display: flex;
  flex-direction: column;
}

#Fin{
  margin-bottom: 50px;
}



/*===================== MENÚ DE NAVEHACIÓN ===========================*/
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  font-size: 22px;
  font-weight: bold;
  color: #F9F5E2;
  font-family: "Nunito", sans-serif;
}

/* Links del menú */
.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links li a {
  text-decoration: none;
  color: #F9F5E2;
  font-family: "Nunito", sans-serif;
  font-weight: 400;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #F4BA2F;
}

/* Botón hamburguesa */
.hamburger {
  display: none; /* por defecto oculto */
  font-size: 28px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

#select{
  font-weight: 800;
}




/*======================= INICIO ======================*/
#presentacion{
  margin-bottom: 30px;
  text-align: left;
}


#pdf{
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 25px;
  margin: 50px auto;
}

#convocatoria{
  background-color: #F4BA2F;
  color: #F9F5E2;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 22px;
  padding: 15px 20px;
  margin: 0 50px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  width: 220px;
}

#convocatoria button{
  background-color: #F9F5E2;
  color: #F4BA2F;
  border: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 20px;
  text-align: center;
  width: 150px;
  margin: auto;
  border-radius: 15px;
}

#guia{
  background-color: #28BECD;
  color: #F9F5E2;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 22px;
  padding: 15px 20px;
  margin: 0 50px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  width: 220px;
}

#guia button{
  background-color: #F9F5E2;
  color: #28BECD;
  border: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 20px;
  text-align: center;
  width: 150px;
  margin: auto;
  border-radius: 15px;
}



/*========================== CARRUSEL ==========================*/

.carousel-item img {
  width: 100%;
  height: 700px;
  object-fit: cover;
}

.carousel-caption {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
}

.carousel-control-prev .material-icons,
.carousel-control-next .material-icons {
    font-size: 65px;       /* tamaño del ícono */
    color: white;          /* color del ícono */
    text-shadow: 0 0 8px black; /* mejora visibilidad */
}

/* Opcional: aumentar el área clickeable */
.carousel-control-prev,
.carousel-control-next {
    width: 8%;    /* aumenta área a los costados */
}

.carousel-control-prev:hover .material-icons,
.carousel-control-next:hover .material-icons {
    color: #28BECD;   /* color al pasar el mouse */
}


#flecha-roja{
  color: #EE2A23;
}

#flecha-azul{
  color: #28BECD;
}

#flecha-amarillo{
  color: #F4BA2F;
}

/* Barra decorativa */
.indicator-rojo {
  width: 90%;
  max-width: 900px;
  height: 18px;
  background: #EE2A23;
  border-radius: 20px;
}

/* Barra decorativa */
.indicator-azul {
  width: 90%;
  max-width: 900px;
  height: 18px;
  background: #28BECD;
  border-radius: 20px;
}


/* Barra decorativa */
.indicator-amarillo {
  width: 90%;
  max-width: 900px;
  height: 18px;
  background: #F4BA2F;
  border-radius: 20px;
}



/*======================= EXTRAS =========================*/

a{
  text-decoration: none;
}

h1{
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  display: inline-block; 
  position: relative;
  font-size: 30px;
  margin-bottom: 10px;
}

h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;                  
  width: 100%;
  height: 0.4em;              
  background-color: #28BECD;  
  border-radius: 6px;         
  z-index: -1;                
}

/*TITLE COLOR PLANTILLAS*/
 
#title-rojo::after{
  background-color: #EE2A23;
}

#title-azul::after{
  background-color: #28BECD;
}

#title-amarillo::after{
  background-color: #F4BA2F;
}



p{
  font-size: 14px;
}



/* =========================== PAGINA MATERIALES ===========================*/

#materiales{
  background-color: #28BECD;
  color: #F9F5E2;
  padding: 20px;
  margin: 50px auto;
}

#docentes{
  background-color: #F4BA2F;
  color: #F9F5E2;
  padding: 20px;
  text-align: center;
}

#docentes h2{
  text-align: left;
}

#alumnos{
  background-color: #EE2A23;
  color: #F9F5E2;
  padding: 20px;
  margin: 50px auto;
}

h2{
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 1.1;
}

#docentes button{
  background-color: #F9F5E2;
  color: #F4BA2F;
  border: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 18px;
  margin: auto;
  border-radius: 5px;
  padding: 2px 15px;
}

#pdf-materiales{
  display: flex;
  flex-direction: column;
  gap: 30px;
}

#preescolar{
  background-color: #EE2A23;
  color: #771512;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 30px;
  padding: 20px;
  margin: auto;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  width: 280px;
}

#preescolar button{
  background-color: #F9F5E2;
  color: #EE2A23;
  border: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 20px;
  text-align: center;
  width: 150px;
  margin: auto;
  border-radius: 15px;
}

#primaria{
  background-color: #28BECD;
  color: #145F67;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 30px;
  padding: 20px;
  margin: auto;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  width: 280px;
}

#primaria button{
  background-color: #F9F5E2;
  color: #28BECD;
  border: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 20px;
  text-align: center;
  width: 150px;
  margin: auto;
  border-radius: 15px;
}

#secundaria{
  background-color: #F4BA2F;
  color: #7A5D18;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 30px;
  padding: 20px;
  margin: auto;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  width: 280px;
}

#secundaria button{
  background-color: #F9F5E2;
  color: #F4BA2F;
  border: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 20px;
  text-align: center;
  width: 150px;
  margin: auto;
  border-radius: 15px;
}



/*==================== PAG ACTIVIDADES ====================*/

.actividades {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  margin: 50px auto;
}

.actividad-item {
  position: relative;
  overflow: hidden;
  border: 5px solid transparent;
  transition: all 0.3s ease-in-out;
  height: 50vh;
}

#azul{
  border: 10px solid #28BECD;
}

#rojo{
  border: 10px solid #EE2A23;
}

#amarillo{
  border: 10px solid #F4BA2F;
}

.actividad-item img {
  width: 100%;
  height: 100%;        
  object-fit: cover;    
  display: block;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #F9F5E2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  opacity: 0;
  padding: 20px;
  transition: opacity 0.3s ease-in-out;
}

.overlay h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.overlay p {
  font-size: 0.9rem;}

/* Hover */
.actividad-item:hover {
  border: none;
  transform: scale(1.05);
}

.actividad-item:hover .overlay {
  opacity: 1;
}





/*========================== PAG PROYECTOS ==============================*/

/* Filtro */
.filter {
  margin: 20px 0;
}

select {
  padding: 10px;
  font-size: 1em;
  border-radius: 8px;
}

/* Rejilla de proyectos */
.grid-proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: #F9F5E2;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
  text-decoration: none !important;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-info {
  padding: 15px;
}

/* Colores de fondo */
  .red { background: #EE2A23; }
  .Danza { background: #28BECD; }
  .Teatro { background: #F4BA2F; }

.category {
  font-size: 0.9em;
  text-align: right;
  margin-top: 10px;
  display: block;
}



/*======================== PROYECTO ROJO =====================*/
.contenedor-rojo{
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 10px solid #EE2A23;   
  border-radius: 5px;
  background-color: #EE2A23;
}

.contenedor-azul{
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 10px solid #28BECD;   
  border-radius: 5px;
  background-color: #28BECD;
}

.contenedor-amarillo{
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 10px solid #F4BA2F;   
  border-radius: 5px;
  background-color: #F4BA2F;
}

.contenedor-generico{
  display: flex;
  flex-direction: column;
  gap: 10px;
}



#img-contenedor{
  width: 100%;
}

#img-contenedor img{
  width: 100%;
}

.info{
  background-color: #F9F5E2;
  width: 100%;
  padding: 15px 20px;
}

.info h3{
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 35px;
  text-align: right;
}

#info-titulo-rojo{
  color: #EE2A23;
}

#info-titulo-azul{
  color: #28BECD;
}

#info-titulo-amarillo{
  color: #F4BA2F;
}

h4{
  font-family: "Nunito", sans-serif;
  font-weight: 900;
  display: inline-block; 
  position: relative;
  font-size: 20px;
}




.subrayado-rojo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px; /* distancia bajo el texto */
  width: 100%;
  height: 5px; /* grosor de la línea */
  background-color: #EE2A23; /* color de la línea */
  border-radius: 2px; /* esquinas redondeadas */
}

.subrayado-azul::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px; /* distancia bajo el texto */
  width: 100%;
  height: 5px; /* grosor de la línea */
  background-color: #28BECD; /* color de la línea */
  border-radius: 2px; /* esquinas redondeadas */
}

.subrayado-amarillo::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px; /* distancia bajo el texto */
  width: 100%;
  height: 5px; /* grosor de la línea */
  background-color: #F4BA2F; /* color de la línea */
  border-radius: 2px; /* esquinas redondeadas */
}


h5{
  color: #F9F5E2;
  font-weight: 800;
  font-size: 15px;
  font-family: "Nunito", sans-serif;
  text-align: right;
  padding: 8px 15px;
}

.modalidad-rojo{
  background-color: #EE2A23;
  width: 330px;
  margin-left: auto;
  border-radius: 30px 0px 0px 30px;
}

.modalidad-azul{
  background-color: #28BECD;
  width: 330px;
  margin-left: auto;
  border-radius: 30px 0px 0px 30px;
}

.modalidad-amarillo{
  background-color: #F4BA2F;
  width: 330px;
  margin-left: auto;
  border-radius: 30px 0px 0px 30px;
}


h6{
  font-family: "Nunito", sans-serif;
  font-size: 30px;
  font-weight: 800;
}

#rojo-credito{
  color: #EE2A23;
}

#azul-credito{
  color: #28BECD;
}

#amarillo-credito{
  color: #F4BA2F;
}


/* Barra decorativa */
.raya-roja {
  width: 100%;
  height: 15px;
  background: #EE2A23;
  border-radius: 20px;
  margin-top: -15px;
}

.raya-azul {
  width: 100%;
  height: 15px;
  background: #28BECD;
  border-radius: 20px;
  margin-top: -15px;
}

.raya-amarillo {
  width: 100%;
  height: 15px;
  background: #F4BA2F;
  border-radius: 20px;
  margin-top: -15px;
}







@media (max-width: 768px) {
  .hamburger {
    display: block; /* se muestra el botón */
  }

  .nav-links {
    position: absolute;
    top: 50px; /* debajo del header */
    left: 0;
    right: 0;
    background: #EE2A23;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    display: none; /* oculto por defecto */
    z-index: 9999; 
  }

  .nav-links.active {
    display: flex; /* se muestra al dar click */
  }

  .actividades{
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
  }

  #title-rojo{
    font-size: 26px;
  }

  #title-azul{
    font-size: 26px;
  }

  #title-amarillo{
    font-size: 26px;
  }
}


@media only screen and (min-width: 1200px){
  
  h1{
    font-size: 50px;
  }

  p{
    font-size: 22px;
  }

  .main{
    width: 80%;
    margin: 30px auto;
  }

  .arrow{
    font-size: 80px;
  }

  .carousel-images{
    width: 70%;
  }

  .indicator{
    height: 30px;
  }

  #convocatoria, #guia{
    font-size: 35px;
    padding: 25px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #pdf{
    flex-direction: row;
    margin: 100px 50px;
  }


  #presentacion{
    margin: 60px auto 90px auto;
  }

  #pdf-materiales{
    display: flex;
    flex-direction: row;
    gap: 10px;
  }

  .escuela{
    display: flex;
    flex-direction: row;
    gap: 30px;
    margin-bottom: 50px;
  }

  #alumnos{
    margin: 0%;
  }

  .main-actividades{
    margin: 80px auto 100px;
  }

  .main-proyectos{
    margin: 80px auto 100px;
  }
  
  /*PROYECTO ROJO*/
  .contenedor-rojo{
    flex-direction: row;
    gap: 15px;
    border: 15px solid #EE2A23;   
  }

  .contenedor-azul{
    flex-direction: row;
    gap: 15px;
    border: 15px solid #28BECD;   
  }

  .contenedor-amarillo{
    flex-direction: row;
    gap: 15px;
    border: 15px solid #F4BA2F;   
  }

  .contenedor-generico{
    flex-direction: row;
    gap: 15px;
  }

  #info-titulo-rojo{
    font-size: 50px;
  }

  #info-titulo-azul{
    font-size: 50px;
  }

  #info-titulo-amarillo{
    font-size: 50px;
  }

  h4{
    font-size: 25px;
  }

  .info{
    padding: 20px 30px;
  }

  h5{
    font-size: 25px;
    padding: 12px 25px;
  }

  .modalidad-rojo{
    background-color: #EE2A23;
    width: 70%;
    margin-left: auto;
    margin-top: 50px;
    margin-bottom: 50px;
  }

  .modalidad-azul{
    background-color: #28BECD;
    width: 70%;
    margin-left: auto;
    margin-top: 50px;
    margin-bottom: 50px;
  }

  .modalidad-amarillo{
    background-color: #F4BA2F;
    width: 70%;
    margin-left: auto;
    margin-top: 50px;
    margin-bottom: 50px;
  }


  h6{
    font-size: 50px;
  }

  .raya-roja {
    height: 25px;
    margin-bottom: 30px;
  }

  .raya-azul {
    height: 25px;
    margin-bottom: 30px;
  }

  .raya-amarillo {
    height: 25px;
    margin-bottom: 30px;
  }

  .indicator-rojo {
    height: 30px;
  }

  .indicator-azul {
    height: 30px;
  }

  .indicator-amarillo {
    height: 30px;
  }

  #Fin{
    margin-bottom: 100px;
  }

}

/* Contenedor de los boxes, aseguramos que se distribuyan bien */
.misbotones {
  font-family: 'Nunito', sans-serif;
  display: flex;
  justify-content: center;  /* Centra horizontalmente */
  align-items: center;  /* Centra verticalmente */
  flex-wrap: wrap;
  gap: 25px;
}

/* Estilo para cada box */
.box {
  color: #000;
  font-weight: 800;
  text-align: center;
  padding: 20px;
  width: 100%;
  max-width: 300px; /* Ajuste máximo para el tamaño de los contenedores */
  height: 175px; /* Establece una altura fija */
  border-radius: 10px;
  transition: background-color 0.3s ease;
  border: black;
  background-color: #FFF;
  display: flex;  /* Cambiado a flex para permitir alineación vertical */
  flex-direction: column; /* Asegura que los elementos (texto y botón) se apilen */
  justify-content: space-between;  /* Asegura que el texto y el botón se distribuyan con espacio entre ellos */
  border-style: solid;
  border-color: #e62b2a;
}

/* Estilo para el botón */
.elboton {
  background-color: #F4BA2F;
  color: #FFF;
  border: none;
  font-family: "Nunito", sans-serif;
  font-weight: 800;
  font-size: 20px;
  text-align: center;
  width: 150px;
  margin: 10px auto 0 auto; /* Espaciado y centrado */
  border-radius: 15px;
  display: block;
}

/* Responsividad */
@media (min-width: 768px) {
  .box {
    width: 45%;
  }
}

@media (min-width: 1024px) {
  .box {
    width: 18%;
  }
}

.filter {
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin: auto;
}

.filter label {
  font-weight: bold;
  margin-bottom: 8px;
  display: block;
}

.filter select {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ced4da;
  background-color: #ffffff;
  transition: border-color 0.3s ease;
}

.filter select:focus {
  border-color: #0056b3;
  box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}

.filter .form-group {
  margin-bottom: 15px;
}

/* Hacemos que el layout se ajuste */
@media (min-width: 768px) {
  .filter .form-group {
    display: inline-block;
    width: 48%; /* Cada select ocupa el 48% del contenedor */
    margin-right: 4%; /* Espacio entre los dos selectores */
  }

  .filter .form-group:last-child {
    margin-right: 0; /* El último selector no tiene margen derecho */
  }
}

/* Estado de loading mejorado */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensaje de no resultados */
.no-results {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Styling the container to arrange the thebuttons */
.thebutton-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 30px;
    padding: 30px;
}

/* Styling each thebutton */
.thebutton {
    width: 150px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s ease-in-out;
}

/* Image inside each thebutton */
.thebutton img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* Description text under the image */
.thebutton p {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

/* Effect when hovering over the thebutton */
.thebutton:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Optional: Fade effect for images */
.thebutton:hover img {
    opacity: 0.9;
}

/* Responsiveness: Adjust thebuttons on smaller screens */
@media (max-width: 768px) {
    .thebutton-container {
        flex-direction: column;
        align-items: right;
    }

    .thebutton {
        width: 80%;
        max-width: 300px;
    }
}