* {
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: 'Nunito', sans-serif;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    background-color: #ffb84c;
    background-image: url(/img/fondo.png);
    color: #101632dd;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, nav, button {
    font-family: 'Poppins', sans-serif;
}

/* --------HEADER SECTION---------- */

body, div, header, label, nav, ul, li, a, footer {
    margin: 0;
    padding: 0;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 5px solid #2cd3e1;
    transition: transform 0.3s ease;
    height: 100px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header.hidden {
    transform: translateY(-100%);
}

.header__open-nav-button {
    color: #f266ab;
    font-size: 2rem;
    font-weight: 600;
    display: block;
    cursor: pointer;
}

/* Cambiar tamaño del header al hacer scroll */
.header.scrolled {
    height: 60px; /* Altura reducida */
    padding: 5px 15px; /* Ajustar padding para encoger visualmente */
}

.header .header__checkbox{
    display: none;
}

.header__nav {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    position:absolute; 
    top: 100%;
    left: 0;
    background-color: #fff;
    width: 100%;
    z-index: -1;
}

.header__nav-list {
    display:flex;
    flex-direction:row;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    margin-left: 20px;
}

.header__checkbox:checked ~ .header__nav {
    opacity: 1;
    visibility: visible;
    z-index: 1000;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.header__logo {
    max-width: 120px;
    max-height: 140px;
    margin-top: 20px;
    height: auto;
    transition: all 0.3 ease;
}

.header__logo-container {
    max-width: 130px;
}

.header.scrolled .header__logo {
    max-width: 90px; /* Reducir tamaño del logo al hacer scroll */
}

.header__nav-item {
    list-style: none;
    margin-right: 10px;
    display: flex;
    flex-direction: column ;
}

.header__nav-item a {
    color:#4f3838;
    text-decoration: none;
}

.header__open-nav-button:hover {
    transform: scale(1.2);
}

.header__nav-item a:hover {
    text-decoration: underline;
}

/* --------HEADER QUERIES---------- */

@media  (min-width: 600px) {
    .header {
        height: 100px;
        padding: 0 20px;
    }

    .header.scrolled {
        height: 70px; /* Altura menor en pantallas grandes */
    }

    body {
        margin-top: 100px; /* Ajuste en pantallas grandes */
    }

    .header__logo {
        max-width: 150px;
    }

    .header__nav {
        display: flex;
        visibility: visible;
        opacity: 1;
        position:static;
        background: none;
        flex-direction: row;
        gap: 20px;
    }

    .header__checkbox {
        display: none;
    }

    .header__nav-list {
        flex-direction: row;
        gap: 20px;
    }

    .header__checkbox,
    .header__open-nav-button {
        display:none; 
    }
    }

/* --------HEADER ENDS---------- */


/* --------PROFILE SECTION---------- */

.profile__wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin:auto;
    max-width: 1400px;
}

.profile__data-container {
    max-width: 600px;
    padding: 12px;
    background-color: #fff;
}

.justificado {
    text-align:center;
    margin: 10px;
}
.profile__img-container {
    max-height: 500px;
    overflow: hidden;
}

.profile__img {
    max-width: 100%;
    width: 700px;
}

h1 {
    color:#f266ab;
}

/* --------PROFILE QUERIES---------- */

@media (min-width: 720px){
    .profile__wrapper {
        flex-direction: row;
        padding: 20px;
        background-color: transparent;
        height: 90vh;
        margin: auto;
    }

    .profile__data-container {
        background-color: #fff;
        min-width: 500px;
        display: flex;
        align-items: center;
        border-radius: 0px 25px 25px 0px;
        box-shadow: 10px 10px 9px #0002;
    }

    h1 {
        margin-top: 0;
        font-size: clamp(1.5rem, 4vw, 3rem);
        text-wrap: balance;
    }

    .profile__data { 
        max-width: 620px;
    }

    .profile__img-container {
        max-height: initial;
        border-radius: 25px 0px 0px 25px;
    }

    .profile__img{
        height: 100%;
        object-fit: cover;
        width: 600px;
    } 

}

/* --------PROFILE END---------- */

/* --------PORTFOLIO SECTION---------- */

.portfolio {
    background-color: #2cd3e1cc;
    color: #fff;
    text-shadow: 3px 3px 4px #fff;
    min-height: 100vh;
    display: flex;
    text-align: center;
    flex-direction: column;
    justify-content: space-evenly;
    font-size: 19px;
    padding: 20px;
}

.portfolio__title {
    font-size: 3rem;
    margin-bottom: 0;
    text-shadow: 3px 3px 9px #a450d1;
}

.portfolio__project-container {
    display: grid;
    grid-template-columns: 1fr; /* Ajusta el tamaño de las columnas */
    max-width: 800px;
    margin: auto;
    width: 100%;
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
    margin-bottom: 40px;
    transition: grid-template-columns 2s ease;
}

.portfolio__project {
    background-image: linear-gradient(#0001, #ffb84c77), url(portfolio/cursos_1.png);
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 6px;
    color: #fff;
    padding: 20px;
    transition: transform 2s ease, opacity 0.3s ease, z-index 1s ease; /* Transición suave */
    position: relative;
    opacity: 0; /* Inicialmente invisibles */
    z-index: 1; /* Valor inicial */
    width: calc(100% - 60px); /* Ancho ajustado con margen de 30px a cada lado */
    margin: 0 auto; 
    transform: translateX(0);
    transform: scale(1);
}

.portfolio__status {
    display: inline-block;
    background-color: #F266AB; /* Rosa de tu paleta */
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    border: 2px solid rgba(255,255,255,0.7);
}

a.educational__levels {
    color:#a450d1;
}

.portfolio__project:hover {
    transform: scale(1.10); /* Agrandar un 5% */
    z-index: 3; /* Asegurar que la tarjeta hover esté por encima */
    opacity: 0.9; 
    outline: 2px solid #e1b2a9; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); 
}

/* --------PORTFOLIO QUERIES---------- */
@media (max-width: 768px) {
    .portfolio__project-container {
        grid-template-columns: 1fr; /* Una columna en móviles */
        gap: 10px;
    }

    .portfolio__project {
        opacity: 1;
        transform: none!important;
        z-index: 1;
        width: 100%;
        margin: 0;
    }
    
}
/* --------CONTAC SECTIONS---------- */

header[id], header.encabezado {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2cd3e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.logo-button:hover{
    scale: 1.5;
}

header[id] .logo-button, header.encabezado .logo-button {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

header[id] .logo, header.encabezado .logo {
    width: 50px;
    height: auto;
    border-radius: 6px;
    margin-right: 10px;
}

header[id] nav, header.encabezado nav {
    display: flex;
    gap: 15px;
}

header[id] nav a, header.encabezado nav a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

header[id] nav a:hover, header.encabezado nav a:hover {
    background-color: #f266ab;
}

.logo-text {
    position: absolute;
    bottom: -5px; 
    left: 50%;
    transform: translateX(-50%); 
    background-color: #2cd3e1;
    color: white;
    padding: 5px 10px; 
    border-radius: 5px; 
    font-size: 10px; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    pointer-events: none; /* Evita que el texto interfiera con el clic */
    width: 50px;
}

.logo-button:hover .logo-text {
    opacity: 1;
}

section.form__contact {
    min-width: 50%;
    max-width: 450px;
    padding: 16px;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #000;
    text-shadow: 2px 2px 4px #fff;
    box-shadow: 8px 8px 8px  #391c48;
    border-radius: 25px 0px 25px 0px;
    background-image: radial-gradient(#a450d177,#a450d1);
    margin-bottom: 60px;
    margin-top: 40px;
}

.form__contact-form {
    flex: 1;
    padding: 12px;
    max-width: 600px;
    width: 100%;
}

.form__contact-title {
    text-align: center;
}

.form__contact-input-container input,
.form__contact-input-container textarea  {
    width: 100%;
    padding: 6px;
    font-size: 16px;
    margin: 4px;
    border: none;
    box-shadow: 2px 2px 3px rgba(36, 9, 9, 0.2);
    border-radius: 8px;
}

.form__contact-input-container input[type="submit"] {
    background-color: #f0f0f0;
    color: black;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form__contact-input-container input[type="submit"]:hover {
    background-color: #f266ab;
    border-radius: 6px;
    color: white;
    transform: scale(1.1);
    box-shadow: 8px 8px 10px #391c48;
}

.form__contact-input-container textarea {
    resize: none;
    min-height: 300px 
}

/* --------CONTACTO QUERIES---------- */

/* Ajustes para pantallas pequeñas */
@media screen and (max-width: 768px) {
    section.form__contact{
        margin-top: 60px
    }
    header[id], header.encabezado {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    header[id] .logo-button, header.encabezado .logo-button {
        margin-bottom: 10px;
    }

    header[id] nav, header.encabezado nav {
        flex-direction: row;
        gap: 10px;
    }

    header[id] nav a, header.encabezado nav a {
        font-size: 14px;
        padding: 5px 15px;
    }

    footer {
        font-size: 8px;
        padding: 30px;
    }

    /* Ajustes generales para evitar cortes */
    body {
        padding-top: 70px; /* Para compensar el espacio del header fijo */
    }
}


/* --------CONTANC ENDS---------- */






/* --------REGITRATION SECTIONS---------- */

.form__registration {
    min-width: 50%;
    max-width: 450px;
    padding: 16px;
    display: block;
    margin: 0 auto;
    flex-direction: column;
    justify-content: center;
    background-image: radial-gradient(#a450d177,#a450d1) ;
    align-items: center;
    color: #000;
    text-shadow: 2px 2px 4px #fff;
    box-shadow: 8px 8px 8px  #391c48;
    border-radius: 25px 0px 25px 0px;
    margin-bottom: 60px;
    margin-top: 50px;
}

.form__resgitration-form {
    flex: 1;
    padding: 12px;
    max-width: 600px;
    width: 100%;
}

.form__registration-title {
    text-align: center;
    color: #000;
}

.registration {
    margin: 10px;
    text-align: left;
    color: #000;
}

.form__registration-input-container input,
.form__registration-input-container textarea  {
    width: 95%;
    padding: 6px;
    margin: 10px 0px 6px 0px;
    font-size: 18px;
    border: none;
    box-shadow: 2px 3px 4px #391c48;
    border-radius: 7px;
}

.form__registration-input-container input[type="submit"] {
    background-color: #f0f0f0;
    color: black;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form__registration-input-container input[type="submit"]:hover {
    background-color: #f266ab;
    border-radius: 6px;
    color: white;
    transform: scale(1.1);
    box-shadow: 8px 8px 10px #391c48;
}

.form__registration-input-container textarea {
    resize: none;
    min-height: 300px; 
}

/* -------- SECTION ABOUT US---------- */

.site_us {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: auto;
    padding: 0 30px;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
    padding-bottom: 110px;
}
.page__us-wrapper {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px; /* Aumentamos el padding arriba/abajo para dar más aire */
    background-color: #fff;
    box-sizing: border-box;
    text-align: center;
    border-radius: 20px; /* Bordes un poco más redondeados para que sea más amigable */
    
    /* CORRECCIÓN DE MARGEN: */
    margin: 0 auto 40px auto; /* Centra horizontalmente y da 40px de espacio abajo */

    /* CAMBIO DE BORDER A MARGIN: */
    /* border-bottom: 30px;  <-- Esto no funciona sin un color/estilo y crea un hueco sólido */
}

.site__us-logo-container {
    width: 100%;
    max-width: 350px ;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.site__us-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.main-title {
    font-size: 2.5rem ;
    text-align: center;
    margin-top: 10px;
    color: #f266ab; /* Color rosa de tu marca */
}

.main-title__page_us {
    font-size: 3rem;
    color: #a450d1
}

.site__us-presentation {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 20px auto; /* CAMBIADO: Centra y da espacio, quita el margen negativo */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background-color: #fff;
    /* margin-left: 116px;  <-- ELIMINAR */
    /* margin-top: -125px;  <-- ELIMINAR */
}

.site-us__data-container {
    /* Quitamos el max-height fijo para que el contenedor crezca con el texto */
    height: auto; 
    max-height: 500px; /* Si quieres scroll, mantén un límite pero razonable */
    padding: 25px;
    background-color: #fff;
    border-radius: 8px;
    overflow-y: auto; /* Esto devuelve el scroll vertical */
    box-shadow: inset 0 0 10px rgba(164, 80, 209, 0.2);
}

.site-us__img-container{
    max-width: 700px;
    max-height: 800px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
    border-radius: 10px;
    border-bottom: 30px;
}

.img_teacher {
    width: 280px;  /* Tamaño fijo sugerido */
    height: 280px; /* Altura igual al ancho para círculo perfecto */
    object-fit: cover; /* Importante para que no se deforme */
    border-radius: 50%;
    border: 5px solid #a450d1; /* Cambiado a morado para combinar */
}

.site-us__description {
    max-width: 900px;
    margin-top: 20px ;
}

.page__us-description {
    text-align: justify;
    padding: 5px;
}

.grid-container__site_us {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Aumentamos el espacio vertical y horizontal */
    gap: 50px 30px; 
    padding: 40px;
    margin: 50px auto;
    width: 90%; /* Le damos más ancho para que el texto no se apriete */
    max-width: 1200px;
    box-sizing: border-box;
}

.mision-pargraph, .vision__paragraph {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-top: 15px;
}

.grid-item__site_us {
    background-color: #a450d1;
    display: flex;
    flex-direction: column; /* CLAVE: Esto pone los elementos uno debajo de otro */
    color: #fff;
    text-align: center;
    padding: 30px; /* Aumentamos el padding para que el contenido respire */
    box-sizing: border-box;
    border-radius: 40px; /* Un radio más limpio */
    align-items: center; /* Centra los elementos horizontalmente */
    justify-content: center; /* Centra el contenido verticalmente */
    
    /* Importante: quitamos el max-height fijo para que el texto no se pise */
    width: 100%;
    min-height: 450px; 
    height: auto; 
}


.grid-item__site_us:nth-child(2){
    background: linear-gradient(to right, #a450d1, #2cd3e1)
}

.grid-item__site_us:nth-child(3){
    background: linear-gradient(to right, #2cd3e1, #a450d1)
}


.grid-item__site_us img {
    max-width: 100%;
    width: 90%;
    height: auto;
    object-fit: contain;
    border-radius:50px / 25px;
    justify-content: center;
}

.flex__container-page-us {
    display: grid;
    grid-template-areas: 
        "header header header"
        "left center right"
        "footer footer footer";
    grid-template-rows: 100px 2fr 50px; /* Altura de las filas */
    grid-template-columns: 4fr 3fr 50px; /* Anchura de las columnas */
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-left: 50px;
    margin-bottom: -40px;
}


.profile__escuelas-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 5px;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 20px;
    justify-content: center;
    justify-items: center;
    box-shadow: 0 2px 5px #391c48;
}   

.article__page-us{
    width: 90%;
    height: 300px;
    overflow-y: scroll;
    grid-area: left;
}
.article__data{
    width: 100%;
    grid-area: center;
    height: 200px;
    margin-top: 20px;
}

.article__data-ul {
    width: 100%;
}

.title__escuelas {
    color:#f266ab;
    grid-area: header; 
    align-items: center;
    text-align: center;
    font-size: 2rem;
}

.profile__escuelas {
    list-style: none;
    display: flex;
    margin: 10px;
    max-width: 500px;
}

.profile__escuelas-name {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    width: 50%;
}

.load-bar {
    border: 2px solid #f266ab;
    border-radius: 8px;
    background-image: linear-gradient(to left, #a450d1 , #2cd3e1, #f266ab, #ffb84c) ;
    padding: 2px;
    font-size: 15px;
    width: 100%;
    margin: 4px;
    margin-left: 0;
}

.load-bar__bar {
    background-color: #0006;
    color: #fff;
    border-radius: 4px;
    padding: 4px 6px;
    display: block;
}

.bar--8 {
    width: 8%;
}

.bar--33 {
    width: 33%;
}

.bar--54 {
    width: 54%;
}

.bar--6 {
    width: 5%;
}

/* --------MEDIA QUEARIES ABOUT US---------- */

@media (max-width: 768px) {
    
    .site__us-logo-container {
        max-width: 300px;
        margin: 0 auto;
    }
    .site__us-logo {
        max-width: 100%;
        height: auto;
    }
    .site-us__data-container {
        max-width: 90%;
        padding: 16px;
    }
    .site__us-presentation{
        flex-direction: column;
        align-items: center;
    }
    .site-us__description{
        max-width: 330px;
    }
    .page__us-description {
        max-width: 400px;
    }
    .site-us__img-container{
        max-width: 90%;
    }
    .img_teacher {
        max-width: 300px;
    }
    h1.site_us {
        overflow-wrap: break-word;
        height: auto;
        font-family: 1.5rem;
    }
}

/* Teléfonos pequeños (hasta 480px) */
@media (max-width: 480px) {
    .site__us-logo-container {
        max-width: 200px; /* Contenedor aún más pequeño */
    }
    .profile__escuelas-container {
        padding: 8px; /* Reduce padding */
        max-width: 90%; /* Ocupa el 90% del ancho */
    }

    .load-bar {
        font-size: 12px; /* Texto más pequeño */
        width: 100%; /* Asegura que ocupe todo el ancho */
    }

    h1.site_us {
        font-size: 1.2rem; /* Ajusta aún más el tamaño del texto */
    }
}

/* Responsivo para pantallas medianas */
@media (max-width: 1400px) {
    .grid-container__site_us {
        grid-template-columns: repeat(2 , minmax(150px, 1fr)); /* Dos columnas en pantallas medianas */
    }
}

/* Responsivo para pantallas pequeñas */
@media (max-width: 768px) {
    .grid-container__site_us {
        grid-template-columns: 1fr; /* Una columna en pantallas pequeñas */
        gap: 5px;
        padding: 5px;
    }
    .grid-item__site_us {
        max-width: 100%; /* Asegura que no se desborde */
        height: auto; /* Ajusta la altura automáticamente */
    }
    .profile__escuelas-container {
        padding: 5px; /* Reduce el padding en pantallas pequeñas */
        
    }
    .flex__container-page-us {
        grid-template-areas: 
            "header"
            "center"
            "left"
            "footer"; /* Reorganiza las áreas */
        grid-template-rows: auto; /* Ajusta las filas automáticamente */
        grid-template-columns: 1fr; /* Solo una columna */
    }

    .article__page-us {
        grid-area: left;
        margin-top: 10px; /* Añade espacio entre secciones */
    }

    .article__data {
        grid-area: center;
    }
}
/* --------FOOTER ENDS---------- */

footer {
    padding: 60px;
    text-align: center;
    background-color: #2cd3e1;
    color: #fff;
    font-size: 12px;
    font-family: monospace;
    position: relative;
    z-index: 1000;
}