/* Reset y box-sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body y fuente Montserrat */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: white;
  color: #333737;
  line-height: 1.5;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Fuentes */

h1 {
font-size: 3em;
font-weight: 100;
}
h2 {
  font-size: 2em;
  line-height: 35px;
  font-weight: 100;
}
h3 {
  font-size: 1em;
  font-weight: 100;
}

p {
  font-size: 0.8em;
  font-weight: 100;
}
i {
  margin-right: 10px;
}

a {
  font-size: 0.9em;
  font-weight: 100;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.1s ease;
}

/* FONDOS */
.imagen-fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.imagen-fondo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.5); 
  z-index: 1;
}

.fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: scale(1);
  transition: transform 2s ease;
  transform-origin: center center;
  pointer-events: none;
}

.fondo.zoom-activo {
  transform: scale(1.2);
}

/* ANIMACIÓN TEXTOS */

.zoom-text, .slide-text {
  opacity: 0;
  transition: transform 1.5s ease, opacity 0.8s ease;
}

.zoom-text {
  transform: scale(2);
}

.zoom-activo {
  transform: scale(1);
  opacity: 1;
}

.slide-text {
  transform: translateX(-50px);
}

.slide-activo {
  transform: translateX(0);
  opacity: 1;
}

.zoom-text,
.slide-text {
  transition-delay: 0s;
}

.zoom-small-text {
  opacity: 0;
  transform: scale(0.5);
  transition: transform 1.5s ease, opacity 0.8s ease;
}

.zoom-small-activo {
  transform: scale(1);
  opacity: 1;
}

@media (max-width: 600px) {
  .slide-text, .zoom-text, .zoom-small-text {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .slide-activo, .zoom-activo, .zoom-small-activo {
    transform: none !important;
    opacity: 1 !important;
  }
}

/* NAVEGACION SUAVE */
html {
  scroll-behavior: smooth;
}

/* CONTENIDOS */

.contenido {
  position: relative;
  z-index: 2;
  max-width: 75%;
  text-align: center;
  justify-content: center;
}

@media (max-width: 768px) { 
  .contenido {
    max-width: 90%;
  }
}

/* HEADER */
header {
  background: transparent;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  z-index: 1000;
  display: flex;
  align-items: center;
}

header .container {
  display: flex;
  justify-content: space-between;
  width: 75%;
  margin: 10px auto auto auto;
  align-items: center;
  padding:1px 5px 1px 5px;
  background-color: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 50px; 
}

header .container.scroll-activo {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
  margin-top: 5px;
  margin-left: 15px;
  margin-right: 20px;
   display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
}

.desktop-nav {
  display: flex;    
  align-items: center;
  gap: 20px;
}

.desktop-nav a {
  color: #333737;
  cursor: pointer;
  text-align: center;
  padding: 5px 5px 5px 5px;
}

.desktop-nav a:hover,
.desktop-nav a.active-link {
  color: #757F7F;
}

/* Hamburguesa */
.menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  cursor: pointer;
  margin-left: 40px;
  padding: 10px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: #333737;
  transition: all 0.3s ease;
}

/* Menú móvil */
.mobile-menu {
  display: none;
  position: fixed;
  top: 120px;
  left: 0;
  width: 100%;
  height: 75%;
  z-index: 1001;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  opacity: 0;
  backdrop-filter: blur(4px);
}

.mobile-nav {
  display: flex;
  background-color: white;
  border-radius: 5%;
  flex-direction: column;
  align-items: center;
  padding: 20% 10%;
  max-width: 700px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav a {  
  width: 100%;  
  text-align: center;  
  color: #333737;
  padding: 0px 60px;
  margin-bottom: 10px;
  border: 1px solid #AEC3C3;
  border-radius: 50px;      
}

.mobile-nav a.active-link {
  color: #AEC3C3;
}

.mobile-nav .boton-agora {
  justify-content: center;
  padding: 5px 40px;
}

/* Hamburguesa */
.menu-toggle:checked ~ .mobile-menu {
  display: flex;
  opacity: 1;
}

.menu-toggle:checked ~ .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background-color: #333737;
}

.menu-toggle:checked ~ .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle:checked ~ .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
  background-color: #333737;
}

/* Bloquear scroll */
.menu-toggle:checked ~ .mobile-menu {
  overflow: hidden;
}

@media (max-width: 768px) {
  header .container {
    justify-content: center;
    padding:1px 20px 1px 20px ;
  }
  .desktop-nav {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .logo {
    padding-left: 35px;
  }
  .mobile-menu:not(.visible) {
    display: none;
  }
}

/* SECCIONES */

/* HERO */
#hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#hero h1 {
  margin-bottom: 30px;
}

#hero h1 span {
  color: #AEC3C3;
}

.contenedor-hero {
  position: relative;
  width: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 25px;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.logohero {
  width: 400px;
  height: auto;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

.botonagora {
  width: auto;
}

.contenedor-hero p {
  width: 400px;
  line-height: 20px;
  margin-left: auto;
  margin-right: auto;
}

.fondoeducacion1 {
  width: 100%;
  height: 90%;
  display: block;
}

@media (max-width: 768px){
  #hero h1 {
    font-size: 2em;
    line-height: 35px;
  }
  .logohero {
    width: 300px;
  }
  .botonagora {
    max-width: 200px;
  }
  .contenedor-hero p {
    width: 300px;
  }
}

/* AGORA */
#agora {
  position: relative;
  width: 100vw;
  height: auto;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.cuadros {
  display: flex;           
  justify-content: center; 
  align-items: flex-start; 
  gap: 20px;              
  width: 100%;   
  margin-top: 100px;
  margin-bottom: 20px;                
  flex-direction: row;      
}

.cuadro {
  width: 450px;          
  height: 225px;            
  display: flex;  
  justify-content: space-between;
  border-radius: 25px;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  flex-direction: column;
  overflow: hidden;
}

.cuadro h2 {
  margin-top: 20px;
}

.cuadro h3 {
  margin-bottom: 15px;
}

.logocuadro {
  width: 100px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;

}

.logocuadro img {
  width: 100%;
}

ul {
  list-style: none;
  text-align: left;  
  font-size: 0.8em;  
  margin-left: 20px;
  margin-right: 20px;
}

li {
  position: relative;
  padding-left: 25px; 
  margin-bottom: 15px; 
}

.agorakids {
  position: relative;
  width: 920px;
  align-items: flex-start;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
  border-radius: 25px;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.logoagorakids {
  width: 100px;
  margin-left: auto;
  margin-right: auto;
}

.logoagorakids img {
  width: 100%;
  height: auto;
}

.agorakids {
  margin-bottom: 20px;
}

.agorakids p {
  width: 75%;
  line-height: 20px;
  margin-bottom: 30px;
  margin-left: auto;
  margin-right: auto;
}

.video-agora {
  position: relative;
  width: 50%;
  border-radius: 15px;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.video-preview {
  cursor: pointer;
  width: 100%;
  height: auto;
}

.video-overlay {
  display: none;
  position: fixed;
  inset: 0;
  backdrop-filter: blur(2px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.video-wrapper {
  position: relative;
  width: 80vw;
  aspect-ratio: 16 / 9;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #AEC3C3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#video-ampliado {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cerrar-video {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  color: #333737;
  cursor: pointer;
  z-index: 2;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.imagenes-optimized {
   position: relative;
  width: 920px;
  align-items: flex-start;
  flex-direction: row;
  padding-top: 20px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-radius: 25px;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.imagenes-optimized img {
  cursor: pointer;
  width: 300px;
  height: auto;
  margin-left: 20px;
  margin-right: 20px;
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.imagenes-optimized img:hover {
  transform: scale(1.05);
}

.overlay-zoom {
  display: none;
  position: fixed;
  inset: 0;
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.zoom-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cerrar-zoom, .flecha-zoom {
  margin-right: 0;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  background-color: white;
  border-radius: 50px;
}

.imagen-ampliada-zoom {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.cerrar-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  color: #333737;
  z-index: 2;
  cursor: pointer;
}

.flecha-zoom {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #333737;
  z-index: 2;
  cursor: pointer;
}

.flecha-prev {
  left: 10px;
}

.flecha-next {
  right: 10px;
}


@media (max-width: 768px){
  .cuadros {
    flex-direction: column;
  }
  .cuadro {
    width: 350px;
    height: auto;
  }
  .agorakids {
    width: 350px;
    height: auto;
  }
  .imágenes-optimized {
    flex-direction: column;
    width: 350px;
    height: auto;
  }
}

  @media (max-width: 600px) and (orientation: portrait) {
  .video-wrapper {
    width: 80vw;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 15px;
  }
}

/* OTROS */
#otros {
  position: relative;
  width: 100vw;
  height: auto;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.contenido-otros {
   display: flex;           
  justify-content: center; 
  align-items: flex-start; 
  gap: 20px;              
  width: 100%;   
  margin-top: 100px;
  margin-bottom: 20px;                
  flex-direction: row;  
}

.contenedor {
  width: 450px;          
  height: 350px;            
  display: flex;  
  justify-content: space-between;
  border-radius: 25px;
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  flex-direction: column;
  overflow: hidden;
}

.contenedor h2 {
  margin-top: 20px;
}

.contenedor h3 {
  margin-bottom: 15px;
}

.contenedor p {
  width: 300px;
  line-height: 20px;
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;

}

.contenedor img {
  width: 100%;
  height: 90%;
  display: block;
}

@media (max-width: 768px){
  .contenido-otros {
    flex-direction: column;
  }
  .contenedor {
    width: 350px;
    height: auto;
  }
}