html, body {
    margin: 0;
    box-sizing: border-box;
    font-family: quicksand, Helvetica, sans-serif;
    color: white;
    background-color: rgb(22, 22, 22);
    scroll-behavior: smooth;
    max-width: 100%;
}

.links {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 2%;
    left: 0; 
    right: 0; 
    margin: 0; 
    gap: 60px; 
    list-style-type: none;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #f4f4f4;
}

h2 {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.5;
}


/* NAVIGATION */
li a {
    text-decoration: none;
    font-weight: 500;
    color: #d6d6d6;
}

li a:hover, .a-middle span:hover {  
    color: rgb(194, 194, 194);
}

/* TOGGLE SWITCH */ 
.lang-switch {
  position: relative;
  width: 60px;
  height: 30px;
  margin: 10px;
}

.lang-switch input {
  display: none;
}

.slider {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #2a2a2a;
  border: 2px solid rgb(53, 53, 53);
  border-radius: 30px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 0.3s ease;
}

.slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 26px;
  height: 26px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  z-index: 1;
}

input:checked + .slider::before {
  transform: translateX(30px);
}

.lang-text {
  z-index: 2;
  width: 50%;
  text-align: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

input:not(:checked) + .slider .en {
  opacity: 0.4;
}

input:checked + .slider .es {
  opacity: 0.4;
}

.hidden {
    display: none;
}


/* NAV-BUTTON */ 
.nav-button {
    position: relative;
    width: 40px;
    height: 30px;
    background: transparent;
    cursor: pointer;
    display: none;
  }
  
  .nav-button input {
    display: none;
  }
  
  .nav-button span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: rgb(255, 255, 255);
    border-radius: 9px;
    opacity: 1;
    right: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
  }
  
  .nav-button span:nth-of-type(1) {
    top: 0px;
    transform-origin: left center;
  }
  
  .nav-button span:nth-of-type(2) {
    top: 50%;
    transform: translateY(-50%);
    transform-origin: left center;
  }
  
  .nav-button span:nth-of-type(3) {
    top: 100%;
    transform-origin: left center;
    transform: translateY(-100%);
  }
  
  .nav-button input:checked ~ span:nth-of-type(1) {
    transform: rotate(45deg);
    top: 0px;
    left: 5px;
  }
  
  .nav-button input:checked ~ span:nth-of-type(2) {
    width: 0%;
    opacity: 0;
  }
  
  .nav-button input:checked ~ span:nth-of-type(3) {
    transform: rotate(-45deg);
    top: 28px;
    left: 5px;
  }



/*TITLE*/
#title {
    height: 100vh;
    margin: 0;
    justify-content: center;
    align-items: center;  
    display: flex;
    flex-direction: column;
}

#title div {
    box-sizing: border-box;
    justify-content: center;
    width: 50%;
}

#title h1 {
    box-sizing: border-box;
    font-family: 'League Spartan', sans-serif, system-ui;
    font-size: 10rem;
    font-weight: 800;
    letter-spacing: -10px;
    margin: 20px 15px -16px 0;
    animation: pulse; /* referring directly to the animation's @keyframe declaration */
    animation-duration: 1.5s; /* don't forget to set a duration! */
}

#title h5 {
    color:#e2e2e2;
    font-size: 1.4rem;
    font-weight: 600;
    width: 50%;
    margin-top: 20px;
    text-align: center;
}

#title h6 {
    color:#e2e2e2;
    font-size: 1.2rem;
    margin: 0 0 25px 15px;
    margin-left: 15px;
    margin-bottom: 25px;
    padding: 0;
    text-align: left;
}

#title img {
    animation: pulse;
    width: 100%;
    margin-bottom: 20px;
    filter: url(./filtro-sharpen.svg);
    filter: contrast(120%) brightness(130%); /* Alternativa de respaldo */
}

body section {
    margin: 250px 0;
    justify-content: center;
    align-items: center;
    text-align: center;
}

p {
    text-align: center;
    font-size: 1.3rem;
}

#slogan {
    display: flex;
    flex-direction: column;
}

#slogan img {
    width: 35px;
    margin-right: 25px;
    margin-bottom: -4px;
    height: auto;
}

#slogan h2 {
    width: 40%;
    margin: 0 auto;
}

#slogan div {
    text-align: center;
    margin: -5px;
    padding: 0;
}

.hr-container {
    min-height: 270px;
}
.hr {
    width: 2px;
    height: 250px;
    background: linear-gradient(to bottom, transparent, rgb(255, 255, 255), transparent); /* Degradado hacia los extremos */
    border: none;
    transform: scaleY(0); /* Inicialmente oculto */
    transform-origin: top; /* El crecimiento empieza desde la parte superior */
    transition: transform 1.2s ease-out; /* Transición suave */
}
.hr.visible {
    transform: scaleY(1); /* Crecimiento al tamaño original cuando es visible */
}


/*CERTIFICATES*/
.img-container {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px 0px;
    align-items: center; /* Centrar las imágenes verticalmente */
    width: 60%; /* Ancho del contenedor */
}

#certificates img {
    width: 140px;
    height: auto;
    transition: all 0.3s ease;
}

#certificates img:hover {
    transform: scale(1.2);
}


/*SERVICES*/
#services {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 30px 70px;
    max-width: 100%;
}

#services > h2 {
    line-height: 1.6;
    width: 60%;
    margin-top: -5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}


/* LIBROS */ 
.book-container {
    align-items: center;
    justify-content: center;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.book {
    position: relative;
    border-radius: 0px 10px 10px 0px;
    width: 250px;
    height: 335px;
    background-color: whitesmoke;
    -webkit-box-shadow: 1px 1px 6px #cfcfcf;
    box-shadow: 3px 3px 10px #aeaeae;
    -webkit-transform: preserve-3d;
    -ms-transform: preserve-3d;
    transform: preserve-3d;
    -webkit-perspective: 2000px;
    perspective: 2000px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #000;
}

.cover {
    top: 0;
    position: absolute;
    background-color: lightgray;
    width: 100%;
    height: 100%;
    border-radius: 0px 10px 10px 0px;
    cursor: pointer;
    -webkit-transition: all 0.5s;
    transition: all 0.5s;
    -webkit-transform-origin: 0;
    -ms-transform-origin: 0;
    transform-origin: 0;
    -webkit-box-shadow: 3px 3px 0px #cfcfcf;
    box-shadow: 0px 0px 20px #9f9f9f98;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.book:hover .cover {
    -webkit-transition: all 0.5s;
    transition: all 0.5s ease;
    -webkit-transform: rotatey(-80deg);
    -ms-transform: rotatey(-80deg);
    transform: rotatey(-80deg),;
}

.book.open .cover {
    transform: rotateY(-80deg); /* Abre el libro */
}
.book.closed .cover {
    transform: rotateY(0deg); /* Cierra el libro */
}


.book img {
    display: flex;
    width: 50px;
    height: auto;
}

.book h2 {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    font-family: sans-serif, Arial, Helvetica;
}

.book p {
  font-size: 1.1rem;
  font-weight: bolder;
  padding: 10px;
  text-align: left;
  margin-left: 50px;
  line-height: 1.5;
}





/* ACADEMY */
#academy {
    margin: 200px auto;
}

#academy h1 {
    margin-bottom: 40px;
}

#academy h2 {
    width: 50%;
    margin: auto;
}

.maps-container {
    margin-top: 40px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 50px;
}

.map {
    border: none;
    border-radius: 10px;
    box-shadow: 2px 2px 12px rgb(224, 224, 224);
    filter: grayscale(100%);
    transition: all 0.3s ease;
    aspect-ratio: 1;
    width: 450px;
    height: 450px;
}

.map:hover {
    transform: scale(1.01);
    box-shadow: 2px 2px 16px rgb(224, 224, 224);
}


/* FORM */
form {
    max-width: 600px;
    margin: auto; /* Centra el formulario */
    padding: 2rem 0rem;
    background-color: #2b2b2b; /* Color de fondo claro */
    border-radius: 8px; /* Bordes redondeados */
    box-shadow: 0px 0px 12px rgb(148, 148, 148); /* Sombra */
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

form:hover {
    transform: scale(1.01);
    box-shadow: 0px 0px 14px rgb(136, 135, 135); /* Sombra */
}

::placeholder {
    color: #d2d2d2;
    font-size: 1em;
}

form > div {
    display: flex;
    flex-direction: row; /* Coloca el label y el input en la misma fila */
    justify-content: center; /* Alinea los elementos al inicio */
    align-items: center; /* Alinea verticalmente el label y el input */    width: 100%; /* Asegura que el contenedor ocupe el ancho completo */
}

.input {
    box-sizing: border-box;
    background-color: #7c7c7c;
    margin: 15px;
    border: none;
    outline: none;
    width: 250px;
    padding: 9px 20px;
    font-size: 16px;
    border-radius: 8px;
    box-shadow: inset 2px 4px 8px rgba(15, 15, 15, 0.596);
    color: #fff;
}

#input-message {
    border-radius: 10px;
    width: 250px;
}

.privacy-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.privacy-policy {
    color: #fff;
    font-size: 0.8rem;
    margin-left: 10px;
    line-height: 1.4;
    text-align: left;
}

.privacy-policy a {
    color: #cbcbcb;
    text-decoration: none;
}

#checkbox {
    transform: scale(1.3); /* Aumenta el tamaño 1.5 veces */
    margin-bottom: 20px;
    cursor: pointer;
}

form button {
    font-family: inherit;
    font-size: 16px;
    background: rgb(226, 226, 226);
    color: rgb(0, 0, 0);
    width: fit-content;
    padding: 0.5em 0.7em;
    display: flex;
    margin: 40px auto;
    margin-bottom: 20px;
    align-items: center;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}
  
form a {
    display: flex;
}

button span {
    display: block;
    font-weight: 600;
    margin-left: 0.3em;
    transition: all 0.3s ease-in-out;
}

button svg {
    display: block;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
}
  
button:hover .svg-wrapper {
    animation: fly-1 0.6s ease-in-out infinite alternate;
}
  
button:hover svg {
    transform: translateX(1.2em) rotate(45deg) scale(1.1);
}
  
button:hover span {
    transform: translateX(5em);
}
  
button:active {
    transform: scale(0.95);
}
  
@keyframes fly-1 {
    from {
        transform: translateY(0.1em);
    }

    to {
        transform: translateY(-0.1em);
    }
}
  
/*REVIEWS*/
#reviews {
    display: flex;
    margin: 0 auto;
}

.carousel {
    width: 80%;
    overflow: hidden;
}

.wrap {
    display: grid;
    grid-auto-flow: column;
    justify-items: stretch;
    animation: slide 20s linear infinite;
    gap: 2%;
    
}
.wrap hr {
    width: 2px;
    height: 70%;
    background: linear-gradient(to bottom, transparent, rgb(255, 255, 255), transparent); /* Degradado hacia los extremos */
    border: none;
}

.review-container {
    margin-bottom: 100px;
    min-width: 320px;
    padding: 20px;
    border-radius: 10px;
}

.review-container img {
    width: 100px;
    height: auto;
    margin: -10px 0;
}

.review-container h2 {
    margin-bottom: 0;
}

.review-container p {
    color: #d7d7d7;
    line-height: 1.6;
    font-size: 1.1rem;
}

@keyframes slide {
    to {
        translate: calc(-4 * 250px);
    }
}


/* FOOTER */
footer {
    width: 100%;
    display: flex;
    flex-direction: row;
    margin-top: 100px;
    background-color: #2b2b2b;
    color: white;
    text-align: center;
    justify-content: center;
    gap: 5%;
}

footer h2 {
    font-size: 1em;
    color: #a2a2a2;
    align-self: flex-start;
    margin: 0;
}

footer > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer > div > div {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 6%;
    justify-content: center;
    align-items: first baseline;
}

.logo-footer {
    width: 80px;
    height: auto;
    margin: 20px 0 40px;
}

.icono-footer {
    width: 20px;
    height: auto;
    margin-right: 10px;
}

footer section {
    display: flex;
    flex-direction: column;
    margin: 0;
    text-align: left;
}

footer ul {
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
    line-height: 2;
    font-size: 1.1em;
}

footer a {
    color: #ffffff;
    word-wrap: break-word;
    word-break: break-all;
    text-decoration: none;
}

footer a:hover {
    color: #dadada;
}

footer p {
    font-size: 0.9em;
    color: #dadada;
    margin: 60px 0 10px;  
}



@media (max-width: 999px) {
    #title > div {
        width: 90%;
    }
    #title h5 {
        width: 80%;
    }
    #slogan h2 {
        width: 90%;
    }
    header {
        display: flex;
        flex-direction: row-reverse;
        justify-content: right;
        align-items: right;      
        height: 0;
    }
    .links {
        position: absolute;
        top: 60px;             
        left: 16px;
        right: 16px;
        margin: 0 auto;
        flex-direction: column;
        gap: 15px;
        padding: 20px 28px;
        list-style: none;
        background: #424242;
        border-radius: 12px;
        max-height: 0;
        opacity: 0;            
        overflow: hidden;
        visibility: hidden;
        transition: max-height .3s ease, opacity .3s ease;
        z-index: 200;       
    }

    .links.show {
        max-height: 500px;     /* lo suficiente para todos los enlaces */
        opacity: 1;            /* ← ← ←   opaco de verdad  */
        visibility: visible;
    }

    .links.hide {
        opacity: 0; /* Se hace invisible */
        max-height: 0; /* Se oculta */
        overflow: hidden;
        visibility: hidden;
    }

    .a-left, .a-middle span, #nav-academy-part1 {
        color: #dcdcdc;
    }
    .a-middle {
        margin-left: 0;
    }
    .nav-button {
        display: flex;
        margin: 15px;
    }
    .book-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    #services h2, #academy h2, .img-container {
        width: 90%;
    }
    iframe {
        width: 35%;
        height: 300px;
    }
    footer > div > div {
        flex-direction: column;
        align-items: first baseline;  
        gap: 30px;
    }
    footer section {
        width: 50%;
        margin: 0 auto;
        align-items: flex-start;
    } 
}

@media (max-width: 768px) {
    footer section {
        margin: 0;
        width: 100%;
        margin-left: 64px;
        justify-content: left;
        align-items: flex-start;
    }
}


@media (max-width: 500px) {
    body section {
        margin: 200px 0;
    }
    .check {
        display: none;
    }
    #responsive-check {
        display: flex;
        position: absolute;
        top: 10px;
        left: 10px;
    }
    #title h5 {
        width: 90%;
        display: flex;
    }
    #title h6 {
        margin: 0 0 20px 0;
    }
    .nav-button {
        display: flex;
        margin: 10px;
    }
    .links {
        margin: 0 4px;
        gap: 15px;
        padding: 10px 16px;
        border-radius: 10px;
        background: #424242;
    }
    .book-container {
        grid-template-columns: 1fr;
    }
    .img-container {
        grid-template-columns: 1fr 1fr;
    }
    .map {
        aspect-ratio: 1/1;
        width: 90%;
        height: auto;
    }
    form {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    .carousel {
        width: 90%;
    }
    #certificates-title {
        word-wrap: break-word;
        padding: 20px 30px;
    }
    #certificates img {
        width: 110px;
    }
    footer section {
        margin: 0;
        width: 100%;
        margin-left: 32px;
        justify-content: left;
        align-items: flex-start;
    }
    footer h2 {
        align-self: left;
    }
    .logo-footer {
        margin: 40px;
        width: 90px;
        height: auto;
    }
    .wrap { 
        animation: slide 25s linear infinite;
    }
}

@media (max-width: 425px) {
    
}