/*This is a variable page for our color palette*/
:root{
    --aqua: #00607e; /*For banners */
    --celeste: #3a849b; /*For clearer backgrounds */
    --light-celeste: #f3f9fb; /*For lighter backgrounds */
    --blanco: #ffffff; /*For text and backgrounds */
    --celeste-oscuro: #004b5c; /*For darker backgrounds */
    --texto: #24333a; /*For normal text over light backgrounds */
    --texto-suave: #5b7078; /*For secondary text */
    --borde: #dbe7ec; /*For card borders and dividers */
    --texto-footer: #cfe4ea; /*For secondary text over dark backgrounds */
}

body{
    /*Adjusts the page so it takes the whole screen*/
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    /*Flex column so the footer can be pushed to the bottom with margin-top:auto*/
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a{
    text-decoration: none;
    color: var(--blanco);
}

/*Shared look for every button-like link (hero, groups and call to action)*/
.btn{
    padding: 10px 20px;
    border-radius: 5px;
    background-color: var(--aqua);
    color: var(--blanco);
    font-weight: bold;
}

.btn:hover{
    background-color: var(--celeste-oscuro);
}

/*=========== NAVBAR ===========*/

.navbar{
    background: #0f6780;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
}

.logo{
    display: flex;
}

.logo img{
    height: 36px;
    filter: brightness(0) invert(1);
}

.busqueda input{
    width: 400px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    outline: none;
    background: #4b8ca2;
    color: var(--blanco);
}

.busqueda input::placeholder{
    color: #d8edf2;
}

.usuario{
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn,
.profile-btn, #lang-btn, .logout-btn{
    color: var(--blanco);
    border: 1px solid var(--blanco);
    cursor: pointer;
}

.login-btn, .logout-btn{
    padding: 10px 18px;
    border-radius: 8px;
}

.profile-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 25px;
}

.login-btn:hover,
.profile-btn:hover{
    color: var(--aqua);
    background: var(--blanco);
}

.nav-toggle{
    display: none;
}

.hamburger{
    display: none;
    font-size: 2rem;
    color: var(--blanco);
    cursor: pointer;
}

#lang-btn{
    font: inherit;              /* same font than the rest of the page */
    box-sizing: content-box;    /* same size than the <a> */
    padding: 10px 18px;
    border-radius: 8px;
    background: transparent;
    color: var(--blanco);
}

#lang-btn:hover{
    color: var(--aqua);
    background: var(--blanco);
}
/*=========== SIDE MENU ===========*/

.container{
    display: grid;
    grid-template-columns: auto 1fr;
    flex: 1;
}

#side-menu{
    background-color: var(--celeste);
    width: 200px;
}

.menu{
    display: flex;
    flex-direction: column;
    padding: 5px;
    list-style: none;
    /* The gap is to add a space between the element in a flexbox or a grid*/
    gap: 10px;
    position: sticky;
    top: 0;
}

.nav-link{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--blanco);
    border-radius: 2px;
}

.nav-link.activo,
.nav-link:hover{
    background-color: var(--light-celeste);
    color: var(--celeste-oscuro);
}

.nav-link.activo:hover{
    background: var(--blanco);
}

.nav-link:hover i{
    animation: fa-beat 1s ease;
}

.contenido{
    min-width: 0;
}

/*Message shown on the home page after registering. Hidden while it has no text*/
.feedback-banner{
    margin: 0;
    padding: 12px 20px;
    font-weight: bold;
    text-align: center;
}

.feedback-banner:empty{
    display: none;
}

.feedback-banner.success{
    background-color: #e3f6ea;
    color: #1e6b3a;
}

.feedback-banner.error{
    background-color: #fdecea;
    color: #a12a1f;
}

.seccion{
    padding: 40px 30px;
}

.seccion h2{
    font-size: 30px;
    color: var(--aqua);
}

.seccion p{
    color: var(--texto-suave);
}

/*=========== HERO ===========*/

.hero{
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 20px;
    height: 600px;
    /*A gradient needs at least two colors, otherwise the whole rule is ignored*/
    background: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65)), url('../imagenes/hero-cohete.png') center / cover;
    color: var(--blanco);
    box-sizing: border-box;
}

.hero h1{
    font-size: 3rem;
    margin: 0;
}

.hero p{
    font-size: 1.2rem;
    margin: 10px 0;
}

.hero-buttons{
    display: flex;
    gap: 10px;
}

.btn-secondary{
    background: transparent;
    border: 1px solid var(--blanco);
}

.btn-secondary:hover{
    background-color: var(--blanco);
    color: var(--aqua);
}

/*=========== INSTITUTO ===========*/

.first-contenedor{
    display: flex;
    gap: 10px;
}

.text-itsp ul{
    color: var(--texto-suave);
    list-style-type: "✓ ";
    margin: 0;
}

.seccion-img{
    width: 600px;
    border-radius: 10px;
}

/*=========== CARDS ===========*/

.whatcan-cards{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 10px 0;
}

.card{
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.card:hover{
    transform: scale(1.05);
}

.icon-box{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 55px;
    height: 55px;
    /*flex-shrink:0 stops the box from being squashed when the text is long*/
    flex-shrink: 0;
    background-color: var(--light-celeste);
    border-radius: 10px;
    font-size: 25px;
    color: var(--aqua);
}

.card h3{
    margin: 0;
    font-size: 1.1rem;
    color: var(--aqua);
}

.card p,
.paso p{
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/*=========== STEPS AND GROUPS ===========*/

.seccion2{
    display: flex;
    gap: 50px;
}

.pasos{
    padding-top: 20px;
}

.globito-container{
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px 0;
    margin: 0;
    list-style: none;
}

.paso{
    display: flex;
    align-items: center;
    gap: 15px;
}

.paso h3{
    margin: 0;
    font-size: 18px;
    color: var(--aqua);
}

.globito{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background-color: var(--aqua);
    color: var(--blanco);
    border-radius: 50%;
    font-size: 30px;
    font-weight: bold;
}

/*=========== CALL TO ACTION ===========*/

.cta{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--aqua);
    color: var(--blanco);
}

.cta h3{
    font-size: 40px;
    margin: 0;
}

.btn-cta{
    background-color: var(--blanco);
    color: var(--aqua);
    border: 1px solid transparent;
}

.btn-cta:hover{
    background-color: var(--aqua);
    color: var(--blanco);
    border-color: var(--blanco);
}

/*=========== FOOTER ===========*/

.footer{
    /*margin-top auto pushes the footer to the bottom of the page*/
    margin-top: auto;
    background: var(--celeste-oscuro);
    color: var(--texto-footer);
    padding: 30px;
}

.footer-columnas{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 25px;
}

.footer h4{
    margin-top: 0;
    margin-bottom: 12px;
    color: var(--blanco);
}

.footer p{
    margin: 0;
    line-height: 1.6;
}

.footer ul{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer ul a{
    color: var(--texto-footer);
}

.footer ul a:hover{
    color: var(--blanco);
    text-decoration: underline;
}

.footer-logo{
    height: 32px;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

.footer-redes{
    display: flex;
    gap: 12px;
    margin-top: 12px;
    font-size: 20px;
}

.footer-abajo{
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    text-align: center;
    font-size: 0.85rem;
}

/*=========== RESPONSIVE ===========*/

/*1. TABLET BREAKPOINT (Under 1024px)*/
@media (max-width: 1024px){

    .busqueda input{
        width: 260px;
    }

    /*Picture and text, and the steps/groups pair, stop sitting side by side*/
    .first-contenedor,
    .seccion2{
        flex-direction: column;
        gap: 25px;
    }

    .seccion-img{
        width: 100%;
    }

    /*Grid reduces from 3 columns to 2 columns*/
    .whatcan-cards{
        grid-template-columns: 1fr 1fr;
    }

    .hero{
        height: 450px;
    }
}

/*2. CELLPHONE BREAKPOINT (Under 768px)*/
@media (max-width: 768px){

    .navbar{
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 15px;
        position: sticky;
        top: 0;
        z-index: 1000; /*Keeps the header always on top*/
    }

    /*The search bar drops to its own line under the logo and the user box*/
    .busqueda{
        display: flex;
        justify-content: space-around;
        order: 3;
        width: 100%;
    }

    .busqueda input{
        width: 90%;
        /*border-box so the 10px padding stays inside the 100%*/
        box-sizing: border-box;
    }

    /*The two column layout becomes a single column*/
    .container{
        grid-template-columns: 1fr;
    }

    .hamburger{
        display: inline-block;
    }

    /*The sidebar turns into a horizontal bar on top of the content.
    It sticks right under the navbar: js/menu.js measures the navbar height
    and 118px is only used if the script has not run yet*/
    #side-menu{
        width: auto;
        position: sticky;
        top: var(--alto-navbar, 118px);
        z-index: 999;
    }

    .menu{
        display: none;
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
        justify-content: space-around;
    }

    .nav-toggle:checked ~ .menu{
        display: flex;
    }

    .nav-link{
        flex-direction: column;
        gap: 4px;
        padding: 10px 15px;
        font-size: 0.85rem;
        text-align: center;
        /*Stops "Language" from breaking in two lines inside the bar*/
        white-space: nowrap;
    }

    .hero{
        height: 400px;
    }

    .hero h1{
        font-size: 2rem;
    }

    .hero p{
        font-size: 1rem;
    }

    .seccion{
        padding: 30px 15px;
    }

    .seccion h2{
        font-size: 24px;
    }

    /*Grid reduces to a single vertical column*/
    .whatcan-cards{
        grid-template-columns: 1fr;
    }

    .cta{
        text-align: center;
    }

    .cta h3{
        font-size: 28px;
    }

    .footer{
        padding: 25px 15px;
    }
}

/*3. SMALL PHONE BREAKPOINT (Under 480px)*/
@media (max-width: 480px){

    .hero-buttons{
        flex-wrap: wrap;
    }

    .login-btn, #lang-btn{
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .profile-btn{
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .logo img{
        height: 30px;
    }
}





/*=========== SUGGESTIONS ===========*/

/*Centers the title, the description and the form*/
.sugerencia{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 80px;
}

/*The little rounded label above the title*/
.etiqueta{
    padding: 8px 20px;
    border-radius: 20px;
    background-color: var(--celeste);
    color: var(--blanco);
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.sugerencia h2{
    margin: 15px 0 5px;
    font-size: 36px;
}

.sugerencia p{
    margin: 0;
    color: var(--aqua);
}

/*The form has a maximum width so it does not stretch too much on big screens*/
.formulario{
    width: 100%;
    max-width: 500px;
    margin-top: 40px;
}

.form-card{
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 30px;
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    text-align: left;
    /*border-box so the padding stays inside the 100% width*/
    box-sizing: border-box;
}

.campo{
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.campo label{
    font-weight: bold;
    color: var(--aqua);
}

.campo small{
    font-size: 0.8rem;
    color: var(--aqua);
}

.campo input,
.campo textarea{
    padding: 10px;
    border: 1px solid var(--borde);
    border-radius: 8px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.campo input:focus,
.campo textarea:focus{
    outline: none;
    border-color: var(--celeste);
}

/*The user can only make the textarea taller, not wider*/
.campo textarea{
    resize: vertical;
}

/*The button uses .btn and this only changes what is different*/
.btn-enviar{
    width: 100%;
    margin-top: 15px;
    background-color: var(--celeste);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-enviar:hover{
    background-color: var(--aqua);
}



/*=========== FAQ ===========*/

/*The list of questions: one box under the other*/
.faq{
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 0 30px;
}

/*Each question is a box with the same border and radius as the cards*/
.faq details{
    background-color: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 10px;
    padding: 15px 20px;
}

.faq details:hover{
    background-color: var(--light-celeste);
}

.faq summary{
    cursor: pointer;
    font-weight: bold;
    color: var(--aqua);
}

/*The answer that shows when the question is open*/
.faq p{
    margin: 10px 0 0;
    line-height: 1.5;
}

.faq a{
    color: var(--aqua);
    font-weight: bold;
}

.faq a:hover{
    text-decoration: underline;
}

.faq li{
    color: var(--texto-suave);
}
/*Small links inside the help cards*/
.card-link{
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--aqua);
}

.card-link:hover{
    text-decoration: underline;
}