/* ===========================================================================
   BLOG: CARTÕES DE POST (LISTA E HOME), FILTROS, PAGINAÇÃO E A PÁGINA DO POST.
   =========================================================================== */

/* ---- CARTÕES --------------------------------------------------------------------
   O MESMO CARTÃO DAS SEÇÕES DO PAINEL: BRANCO, RETO, SOMBRA LEVE, SOBE 10px NO MOUSE.
   A CAPA TEM PROPORÇÃO FIXA (16:10) PARA OS CARTÕES FICAREM ALINHADOS. */

.posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-cartao {
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 0 3px rgba(0, 0, 0, .15);
    transition: all .2s ease-out 0s;
}

.post-cartao:hover {
    box-shadow: 4px 4px 10px #ccc;
    transform: translate(0, -10px);
}

.post-cartao__capa {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f5;
}

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

.post-cartao__corpo {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 25px 25px;
}

.post-cartao__categoria {
    margin-bottom: 6px;
    color: var(--laranja);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.post-cartao__titulo {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 500;
    line-height: 26px;
}

.post-cartao__titulo a:hover {
    color: var(--laranja);
}

.post-cartao__meta {
    margin-bottom: 15px;
    color: #727272;
    font-size: 14px;
    font-weight: 300;
}

.post-cartao__ler {
    margin-top: auto;
    color: var(--laranja);
    font-size: 14px;
    font-weight: 500;
}

.post-cartao__ler .icone {
    margin-left: 4px;
}

/* ---- SEÇÃO DA HOME ----------------------------------------------------------------- */

.blog-secao {
    margin-top: 20px;
    padding-bottom: 40px;
}

.blog-secao__todos {
    margin-top: 30px;
    text-align: center;
}

/* ---- FILTROS, LISTA VAZIA E PAGINAÇÃO ------------------------------------------------ */

.blog-filtros {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 20px;
    margin-bottom: 30px;
    padding: 20px 25px 5px;
    background: #fff;
    box-shadow: 0 0 3px rgba(0, 0, 0, .15);
}

.blog-filtros .campo {
    flex: 1 1 200px;
}

.blog-filtros select {
    display: block;
    width: 100%;
    height: 42px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font: inherit;
    font-size: 14px;
    font-weight: 300;
}

.blog-filtros__acoes {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.blog-filtros__limpar {
    color: #727272;
    font-size: 14px;
    text-decoration: underline;
}

.blog-vazio {
    padding: 40px 0;
    color: #636363;
    font-size: 16px;
    font-weight: 300;
    text-align: center;
}

.paginacao {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.paginacao__item {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    line-height: 38px;
    text-align: center;
}

.paginacao__item:hover,
.paginacao__item.ativo {
    border-color: var(--laranja);
    background: var(--laranja);
    color: #fff;
}

/* TÍTULO, "×", BOTÃO FLUTUANTE E VÉU SÓ EXISTEM NA GAVETA DO CELULAR. */
.blog-filtros__topo,
.blog-filtros-botao,
.blog-filtros-fundo {
    display: none;
}

/* ---- GAVETA DOS FILTROS (ABAIXO DE 992px) -----------------------------------------
   OS FILTROS SAEM DA PÁGINA E ABREM PELA DIREITA NO BOTÃO FLUTUANTE "FILTRAR". */

@media (max-width: 991px) {
    .blog-filtros {
        position: fixed;
        top: 0;
        right: -340px;
        bottom: 0;
        z-index: 1200;
        display: block;
        width: min(320px, 88vw);
        margin: 0;
        padding: 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: none;
        visibility: hidden;
        transition: right .3s ease, visibility .3s ease;
    }

    .blog-filtros.aberta {
        right: 0;
        visibility: visible;
        box-shadow: -4px 0 12px rgba(0, 0, 0, .2);
    }

    .blog-filtros__topo {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 20px;
    }

    .blog-filtros__titulo {
        font-size: 18px;
        font-weight: 500;
    }

    .blog-filtros__fechar {
        width: 36px;
        height: 36px;
        border-radius: 4px;
        background: var(--laranja);
        color: #fff;
        font-size: 16px;
        line-height: 36px;
    }

    .blog-filtros .campo { flex: none; }

    .blog-filtros__acoes .botao-laranja { flex: 1; }

    .blog-filtros-fundo {
        position: fixed;
        inset: 0;
        z-index: 1100;
        display: block;
        background: rgba(0, 0, 0, .4);
        opacity: 0;
        visibility: hidden;
        transition: opacity .3s ease, visibility .3s ease;
    }

    .blog-filtros-fundo.aberto {
        opacity: 1;
        visibility: visible;
    }

    /* BOTÃO FLUTUANTE NA LATERAL DIREITA, NO ALTO DA TELA. */
    .blog-filtros-botao {
        position: fixed;
        top: 18%;
        right: 10px;
        z-index: 80;
        display: inline-flex;
        border-radius: 4px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    }

    .blog-filtros-botao__abrir,
    .blog-filtros-botao__limpar {
        display: inline-flex;
        align-items: center;
        background: var(--laranja);
        color: #fff;
        transition: background .25s ease;
    }

    .blog-filtros-botao__abrir {
        gap: 8px;
        padding: 10px 16px;
        border-radius: 4px;
        font-size: 15px;
        font-weight: 500;
        white-space: nowrap;
    }

    .blog-filtros-botao.com-filtro .blog-filtros-botao__abrir {
        border-radius: 4px 0 0 4px;
    }

    /* O "×" TEM 44px (TOQUE CONFORTÁVEL), SEPARADO DO "FILTRAR" POR UMA LINHA CLARA. */
    .blog-filtros-botao__limpar {
        justify-content: center;
        width: 44px;
        border-left: 1px solid rgba(255, 255, 255, .4);
        border-radius: 0 4px 4px 0;
    }

    .blog-filtros-botao__abrir:hover,
    .blog-filtros-botao__limpar:hover {
        background: #c9701a;
    }

    body.blog-filtros-abertos {
        overflow: hidden;
    }
}

/* ---- PÁGINA DO POST ------------------------------------------------------------------- */

/* CAIXA DO POST COM LARGURA DE LEITURA (860px), CENTRADA NO CONTAINER. */
.post {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    box-shadow: 0 0 3px rgba(0, 0, 0, .15);
}

.post__titulo {
    margin: 0 0 10px;
    font-family: var(--fonte-titulo);
    font-size: 36px;
    font-weight: 500;
    line-height: 1.15;
}

.post__meta {
    margin-bottom: 25px;
    color: #727272;
    font-size: 14px;
    font-weight: 300;
}

.post__capa {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 30px;
}

/* O HTML VEM DO EDITOR DO PAINEL: SÓ TIPOGRAFIA, SEM SUPOR CLASSES. */
.post__conteudo {
    font-size: 16px;
    font-weight: 300;
    line-height: 26px;
}

.post__conteudo p,
.post__conteudo ul,
.post__conteudo ol,
.post__conteudo blockquote {
    margin: 0 0 16px;
}

.post__conteudo ul { padding-left: 22px; list-style: disc; }
.post__conteudo ol { padding-left: 22px; list-style: decimal; }

.post__conteudo h2,
.post__conteudo h3,
.post__conteudo h4 {
    margin: 30px 0 12px;
    font-weight: 500;
    line-height: 1.25;
}

.post__conteudo h2 { font-size: 26px; }
.post__conteudo h3 { font-size: 21px; }
.post__conteudo h4 { font-size: 18px; }

.post__conteudo a {
    color: var(--laranja);
    text-decoration: underline;
}

.post__conteudo img {
    max-width: 100%;
    height: auto;
}

.post__conteudo blockquote {
    padding: 10px 20px;
    border-left: 3px solid var(--laranja);
    color: #636363;
    font-style: italic;
}

.post__voltar {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post__voltar a {
    color: var(--laranja);
    font-size: 14px;
    font-weight: 500;
}

.post-outros {
    margin-top: 50px;
}

.post-outros__titulo {
    margin-bottom: 25px;
    font-family: var(--fonte-titulo);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.1;
}

/* ---- RESPONSIVO ---------------------------------------------------------------------- */

@media (max-width: 991px) {
    .posts { grid-template-columns: repeat(2, 1fr); }
    .post { padding: 30px; }
    .post__titulo { font-size: 30px; }
}

@media (max-width: 767px) {
    .posts { grid-template-columns: 1fr; gap: 20px; }
    .post { padding: 20px 15px; }
    .post__titulo { font-size: 24px; }
    .post-outros__titulo { font-size: 24px; }
}
