
:root{
    --red: #a01313;
    --blue: #192189;
    --gray: #d1d1e8;
    --dark-gray: #323247;
    --white: #ffffff;
    --black: #000000;
}

*, *:after, *:before{
    margin: 0;
    padding: 0;
}

html{
    box-sizing: border-box;
}

body,
button{
    font-family: 'Nunito', sans-serif;
}

ul{
    padding: 0;
}

.uppercase{
    text-transform: uppercase;
}

.contenedor-principal{
    margin: 0 auto;
    max-width: 375px;
    height: 55vh;
}

/******************** HEADER ********************/

header{
    width: 100%;
    height: 120px;
    margin: 0 auto;
}

.galery{
    width: 100%;
    position: relative;
    margin: 0 auto;
}

.galery img{
    width: 100%;
    position: absolute;
}
.galery li{
    list-style: none;
}

figure{
    margin: 0;
}

#imagen1-desktop,
#imagen2-desktop,
#imagen3-desktop{
    display: none;
}

#imagen1{
    animation: opacidad1 5s;
    animation-delay: 9s;
}

#imagen2{
    animation: opacidad2 5s;
    animation-delay: 6s;
}

#imagen3{
    animation: opacidad3 10s;
    animation-delay: 3s;
}

@keyframes opacidad1{
    0%{
        opacity: 1;
    }
    25%{
        opacity: 1;
    }
    50%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

@keyframes opacidad2{
    0%{
        opacity: 1;
    }
    50%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}

@keyframes opacidad3{
    0%{
        opacity: 1;
    }
    25%{
        opacity: 0;
    }
    50%{
        opacity: 0;
    }
    100%{
        opacity: 1;
    }
}


/***************** SECTION ********************/
h2{
    font-size: 18px;
    text-align: center;
    margin: 40px 0 20px 0;
    text-transform: uppercase;
}

section,
main{
    width: 90%;
    margin: 0 auto;
    padding-bottom: 10px;
}

.tarjeta{
    border: 1px solid var(--gray);
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 6px 10px 18px -5px var(--dark-gray);
}

.tarjeta--header-curso{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 40px 120px;
    padding-top: 20px;
    padding-left: 20px;
    align-items: center;  
}

.bg1{
    background-image: url(../img/portada1.jpg);
    background-repeat: none;
    background-size: cover;
}

.bg2{
    background-image: url(../img/portada2.jpg);
    background-repeat: none;
    background-size: cover;
}

h3{
    grid-column: 1/3;
    font-size: 22px;
}

.nombre-curso{
    font-weight: 600;
}

.etiqueta-curso,
.etiqueta-diplomado{
    font-weight: bold;
    text-align: center;
    line-height: 2;
    height: 30px;
    color: var(--white);
}


.etiqueta-curso{
    background-color: var(--red);
}

.etiqueta-diplomado{
    background-color: var(--blue);
    
}

.tarjeta--footer-curso{
    padding: 20px 20px;
    text-align: center;
}

.tutor{
    font-size: 15px;
    line-height: 2.5;
}

.btn-curso,
.btn-diplomado{
    width: 80%;
    border: none;
    border-radius: 10px;
    height: 40px;
    font-weight: 600;
    font-size: 16px;
    color: var(--white);
    cursor: pointer;
}

.btn-curso{
    background-color: var(--red);
}
.btn-diplomado{
    background-color: var(--blue);
}
.btn-curso:after,
.btn-diplomado:after{
    content: '';
    background-image: url(../img/arrow.png);
    width: 36px;
    height: 17px;
    display: inline-block;
    background-repeat: no-repeat;
    margin-left: 5px;
}

.btn-curso:after img{
    width: 100%;
}


/************* MAIN *************/

h1{
   text-align: center; 
}

.tarjeta-beneficios{
    width: 90%;
    height: auto;
    background-color: rgba(25, 33, 137, .1);
    padding: 10px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 4px 5px 18px -8px var(--dark-gray);
}

.tarjeta-beneficios p{
    text-align: justify;
}

.tarjeta-beneficios h4{
    text-align: center;
    border-bottom: 1px solid var(--blue);
    margin-bottom: 8px;
    padding-bottom: 5px;
}


@media (min-width: 540px){
    p{
        font-size: 18px;
    }
    .contenedor-principal{
        max-width: 540px;
        height: 55vh;
    }
    header{
        width: 100%;
        height: 200px;
    }
    
    
    h2{
        font-size: 20px;
    }
    section,
    main{
        width: 75%;
        padding-bottom: 20px;
    }
    .tarjeta--header-curso{
        grid-template-rows: 70px 120px;
        padding-top: 30px;
    }
    
    h3{
        grid-column: 1/3;
        font-size: 26px;
        letter-spacing: 1px;
    }
    .etiqueta-curso,
    .etiqueta-diplomado{
        height: 40px;   
    }
    .tutor{
        font-size: 20px;
        line-height: 2.5;
    }
    .btn-curso,
    .btn-diplomado{
        width: 70%;
        height: 50px;
        font-size: 20px;
    }
    .tarjeta-beneficios h4{
        font-size: 24px;
        padding-bottom: 15px;
        margin-bottom: 20px;
    }

    
    .tarjeta-beneficios{
        padding: 20px;
        margin: 40px auto;
    }
    
    .tarjeta-beneficios p{
        text-align: justify;
    }
}

@media(min-width: 768px){
    .contenedor-principal{
        max-width: 768px;
        height: 55vh;
		
        
    }
    header{
        width: 100%;
        height: 300px;
    }
    .tarjeta-beneficios h4{
        font-size: 20px;
    }
}

@media (min-width: 1200px){
    .contenedor-principal{
        max-width: 1200px;
        height: 55vh;
        display: grid;
        grid-template-columns: 36% 64%;
        grid-template-rows: 500px 1000px;
        grid-template-areas: 
        "header header"
        "section main";
    }
    
    header{
        width: 100%;
        grid-area: header;
    }
    

    #imagen1-mobile,
    #imagen2-mobile,
    #imagen3-mobile{
        display: none;
    }
    #imagen1-desktop,
    #imagen2-desktop,
    #imagen3-desktop{
        display: block;
    }
    
    section{
        width: 90%;
        grid-area: section;
        /*height: 430px;
        overflow-y: scroll;
        padding-right: 20px;*/
    }
    
    
    main{
        grid-area: main;
        width: 90%;
    }

    h1{
        margin-top: 0;
    }
    #contenedor-beneficios{
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        column-gap: 10px;
    }
    .tarjeta-beneficios{
        width: 80%;
        margin-top: 0;
    }
    h2{
        font-size: 22px;
        margin-top: 0;
    }
    h1{
        font-size: 26px;
    }
}
