body{
    font-family: sans-serif;
    text-align: center;
    margin: 0;
}

.modal {
    width: 100%;
    height: 100%;
  
    position: absolute;
    top: -40%;
    left: 0;
    display: flex;
    animation: modal forwards;
    visibility: hidden;
    opacity: 0;
}

.contenido {
    margin: auto;
    width: 550px;
    height: 550px;
    background-image: url(../../image/curso.jpeg);
    background-size: cover;
    background-position: center;
    border-radius: 10px;
}

#cerrar {
    display: none;
}

.btn-cerrar{
    width: 10px;
    height: 10px;
    display: inline-table;
    top: -3%;
    right: -60%;
    position: relative;
    padding: 20px;
    background: darkred;
    color: white;
    font-size: 16px;
    border-radius: 50%;
    line-height: 10px;
    animation: modal forwards;
    visibility: hidden;
    opacity: 0;
    cursor:pointer;
}

.btn-whatsapp {
    background-color: #4CAF50;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-table;
    font-size: 16px;
    cursor: pointer;
    width: 120px;
    height: 40px;
    position: static;
    transform: translate(-5px, 525px);
    padding: 20px;
    line-height: 10px;
    border-radius: 60px;
}

.button1 {
    background-color: #4CAF50; 
    color:white; 
    border: 2px solid white;
}
  
.button1:hover {
    background-color: white;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

#cerrar:checked + label, #cerrar:checked ~ .modal {
    display: none;
}

@keyframes modal {
    100% {
        visibility: visible;
        opacity: 1;
    }
}

@media screen and (max-width: 900px){
    .contenido{
        flex-direction: column;
        max-height: 800px;
    }
    
}


@media screen and (max-width: 768px){
    
    .modal{
        top: -42%;
    }
    
    .contenido{
        flex-direction: column;
        width: 500px;
        background-image: url(../../image/curso-600px.jpeg);
    }
    
}


@media screen and (max-width: 600px){
    .modal{
        top: -42%;
    }
    
    .contenido{
        flex-direction: column;
        width: 450px;
        background-image: url(../../image/curso-600px.jpeg);
    }
    
}


@media screen and (max-width: 480px){
    
    .modal{
        top: -45%;
    }
    
    .contenido{
        width: 300px;
        height: 430px;
        background-image: url(../../image/curso-550px.jpeg);
        
    }

    .btn-cerrar {
        transform: translate(30%);
    }
    
    .btn-whatsapp{
        font-size: 12px;
        width: 100px;
        transform: translate(-30px, 402px);
    }
    
}

@media screen and (max-width: 320px){
    
    .modal{
        top: -45%;
    }
    
       .contenido{
        width: 260px;
        height: 400px;
        background-image: url(../../image/curso-400px.jpeg);
        
    }

    .btn-cerrar {
        transform: translate(30%);
    }
    
    .btn-whatsapp{
        font-size: 12px;
        width: 100px;
        transform: translate(-20px, 380px);
    }
    
}
}