* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #fff;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
}

.container {
    width: min(1110px, calc(100% - 28px));
    margin: 24px auto;
}

h1 {
    margin: 0 0 22px;
    color: #126da7;
    font-size: 28px;
    text-align: center;
}

.grade-cursos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 30px;
}

.card-curso {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 3px;
    border-bottom: 4px solid #087bc1;
    box-shadow: 0 1px 7px rgba(0, 0, 0, .22);
}

.imagem-wrapper {
    height: 153px;
    background: #e6e6e6;
}

.imagem-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sem-imagem {
    display: grid;
    height: 100%;
    place-items: center;
    padding: 12px;
    color: #777;
    text-align: center;
}

.conteudo-card {
    display: flex;
    flex: 1;
    align-items: center;
    flex-direction: column;
    padding: 18px 10px 10px;
}

.conteudo-card h2 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 18px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.btn {
    width: 142px;
    margin-top: auto;
    padding: 13px 8px;
    border-radius: 2px;
    background: #087bc9;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .25);
    transition: background .2s ease, transform .2s ease;
}

.btn:hover,
.btn:focus {
    background: #05669f;
    transform: translateY(-1px);
}

.alerta {
    padding: 18px;
    border-radius: 4px;
    background: #fff;
    text-align: center;
}

.erro {
    color: #9a1c1c;
}

@media (max-width: 1050px) {
    .grade-cursos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .grade-cursos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .grade-cursos {
        grid-template-columns: 1fr;
    }
}
