:root {
    --fuenteHeading: 'PT Sans', sans-serif;
    --fuenteParrafos: 'Open Sans', sans-serif;

    --primario: #784D37;
    --primarioClaro: #8d7366;
    --gris: #e1e1e1;
    --blanco: #FFFFFF;
    --negro: #000000;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;    /* 1rem = 10px */
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
    font-family: var(--fuenteParrafos);
    font-size: 1.6rem;

}

/* --- Globales ---*/

.contenedor {
    max-width: 120rem;
    width: 90%;
    margin: 0 auto;
}

a {
    text-decoration: none;
}

h1, h2, h3, h4 {
    font-family: var(--fuenteHeading);
}

h1 {
    font-size: 4.8rem;
}

h2 {
    font-size: 4rem;
}

h3 {
    font-size: 3.2rem;
}

h4 {
    font-size: 2.8rem;
}

img {
    max-width: 100%;
}

/* --- Utilidades ---*/

.no-margin {
    margin: 0;
}

.no-padding {
    padding: 0;
}

.centrar-texto {
    text-align: center;
}

/* --- HEADER ---*/
.webp .header {
    background-image: url(../img/banner.webp);
}
.no-webp .header {
    background-image: url(../img/banner.jpg);
}
.header {    
    height: 60rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

.header__texto {
    color: var(--blanco);
    margin-top: 12rem;
}

.barra {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--blanco);
}

.logo__nombre {
    font-weight: normal;
}

.logo__bold {
    font-weight: bold;
    text-decoration:underline;
}

.navegacion {
    display: flex;
    font-size: 1.8rem;
    gap: 2rem;
}

.navegacion__enlace {
    color: var(--blanco);
}

/* --- MAIN --- */
.principal {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.entrada {
    border-bottom: 1px solid var(--gris);
    margin-bottom: 2rem;
}

.entrada:last-of-type {
    border: none;
    margin: 0;
}

.boton {
    display: inline-block;
    color: var(--blanco);
    font-family: var(--fuenteHeading);
    text-align: center;
    padding: 1rem 3rem;
    font-size: 1.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2rem;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.boton--primario {
    background-color: var(--negro);
}
.boton--secundario {
    background-color: var(--primario);
}

.boton:hover {
    cursor: pointer;
    transform: scale(1.1);
}

.sidebar {
    display: flex;
    flex-direction: column;
}
.info-cursos {
    list-style: none;
}

.widget-curso {
    text-align: left;
    border-bottom: 1px solid var(--gris);
    margin-bottom: 2rem;
    text-align: center;
}

.widget-curso:last-of-type {
    border-bottom: none;
    margin-bottom: none;
}

.widget-curso__label{
    font-family: var(--fuenteHeading);
    font-weight: bold;
    font-size: 1.9rem;
}

.widget-curso__info{
    font-family: var(--fuenteParrafos);
    font-weight: normal;
}

/* --- SOBRE NOSOTROS ---*/
.nosotros {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.nosotros__imagen {
    margin-top: 3rem;
    border-radius: 1rem;
}

.nosotros__texto {
    font-family: var(--fuenteParrafos);
    font-size: 1.9rem;
    line-height: 3.8rem;
}

/* --- CURSOS ---*/
.curso {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    border-bottom: 1px solid var(--gris);
    padding: 3rem;
}

.curso:last-of-type {
    border: none;
    margin-bottom: none;
}

/* --- CONTACTO ---*/
.contacto-bg {
    background-image: url(../img/contacto.jpg);
    height: 40rem;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

.formulario {
    background: linear-gradient(var(--primarioClaro), var(--blanco) );
    /* background-color: var(--blanco); */
    margin: -10rem auto 0 auto;
    width: 95%;
    padding: 5rem;
    border-radius: 1rem;
}

.campo {
    display: flex;
    margin-bottom: 2rem;
    gap: 2rem;
}

.campo__label {
   flex: 0 0 9rem;
   text-align: right;
}

.campo__input {
    flex: 1;
    border: 1px solid var(--gris);
}

.campo__input--textarea {
    height: 20rem;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--negro);
    padding: 3rem 0;
    margin-top: 4rem;
}



/* --- Mobiles --- */
@media (max-width: 450px ) {
    .formulario {
        padding: 5rem 1rem 0 1rem;
    }
    .campo {
        gap:1rem;
    }
    .campo__label {
        flex: 0 0 9rem;
        text-align: left;
    }
    .campo__input {
        width: 95%;
        border: 1px solid var(--gris);
    }
}


@media (max-width:630px) {
    .barra,
    .navegacion {
        flex-direction: column;
    }

    .header__texto {
        margin-top: 8rem;
    }

    .principal {
        display: grid;
        grid-template-columns: 1fr;
    }

    .boton {
        display: block;
    }

    .footer .navegacion{
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
     .curso {
        grid-template-columns: 1fr;

    }
}

@media (max-width: 900px) {
     .nosotros {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}