/* =====================================================
   NOTÍCIAS
   ===================================================== */

.noticias-grade {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 0;

    box-sizing: border-box;
}


/* =====================================================
   CABEÇALHO
   ===================================================== */

.noticias-grade__cabecalho {
    width: 100%;
    margin-bottom: 30px;
}

.noticias-grade__cabecalho h2 {
    margin: 0;
    padding: 0;

    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;

    font-weight: 700;

    color: #222;

    position: relative;
}


/*
 * Pequeno detalhe visual abaixo de "Notícias"
 */

.noticias-grade__cabecalho h2::after {
    content: "";

    display: block;

    width: 55px;
    height: 4px;

    margin-top: 10px;

    background: #222;

    border-radius: 10px;
}


/* =====================================================
   GRID
   ===================================================== */

.noticias-grade__grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 35px 30px;

    width: 100%;
}


/* =====================================================
   CARD
   ===================================================== */

.noticia-card {
    width: 100%;
    min-width: 0;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    /*
     * Permite que o card se mova
     * suavemente no hover.
     */

    transition:
        transform 0.35s ease,
        filter 0.35s ease;
}


/*
 * Elevação do card
 */

.noticia-card:hover {
    transform: translateY(-6px);
}


/* =====================================================
   IMAGEM
   ===================================================== */

.noticia-card__imagem {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    margin: 0;

    background: #eeeeee;

    border-radius: 14px;

    /*
     * Sombra inicial.
     */

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.10);

    /*
     * Evita que o conteúdo
     * ultrapasse o arredondamento.
     */

    isolation: isolate;
}


/* =====================================================
   LINK DA IMAGEM
   ===================================================== */

.noticia-card__imagem .noticia-card__link {
    position: relative;

    display: block;

    width: 100%;
    height: 100%;

    overflow: hidden;
}


/* =====================================================
   IMAGEM
   ===================================================== */

.noticia-card__imagem img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    object-position: center;

    margin: 0;
    padding: 0;

    /*
     * Zoom suave.
     */

    transform: scale(1);

    transition:
        transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
        filter 0.6s ease;
}


/* =====================================================
   CAMADA DE VIDRO
   ===================================================== */

.noticia-card__efeito {
    position: absolute;

    inset: 0;

    z-index: 2;

    pointer-events: none;

    /*
     * Gradiente transparente.
     */

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.28),
            rgba(255,255,255,0.02) 45%,
            rgba(0,0,0,0.15)
        );

    opacity: 0;

    transition:
        opacity 0.45s ease;
}


/*
 * Reflexo diagonal
 */

.noticia-card__efeito::after {
    content: "";

    position: absolute;

    top: -120%;
    left: -80%;

    width: 60%;
    height: 300%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.45),
            transparent
        );

    transform: rotate(25deg) translateX(-100%);

    transition:
        transform 0.8s ease;
}


/* =====================================================
   HOVER DA IMAGEM
   ===================================================== */

.noticia-card:hover .noticia-card__imagem img {
    transform: scale(1.08);

    filter:
        brightness(0.88)
        saturate(1.08);
}


.noticia-card:hover .noticia-card__efeito {
    opacity: 1;
}


.noticia-card:hover .noticia-card__efeito::after {
    transform:
        rotate(25deg)
        translateX(350%);
}


/* =====================================================
   DESCRIÇÃO
   ===================================================== */

.noticia-card__descricao {
    position: relative;

    width: 100%;

    margin-top: -18px;

    padding: 18px 20px 17px;

    box-sizing: border-box;

    /*
     * Efeito vidro.
     */

    background:
        rgba(255, 255, 255, 0.78);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    /*
     * Borda transparente.
     */

    border:
        1px solid rgba(255, 255, 255, 0.65);

    /*
     * Arredondamento.
     */

    border-radius: 0 0 14px 14px;

    /*
     * Sombra muito suave.
     */

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.08);

    /*
     * Mantém o título acima da imagem.
     */

    z-index: 3;

    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        transform 0.35s ease;
}


/* =====================================================
   TEXTO
   ===================================================== */

.noticia-card__descricao .noticia-card__link {
    display: block;

    width: 100%;

    color: #222;

    font-size:
        clamp(16px, 1.4vw, 19px);

    line-height: 1.45;

    font-weight: 700;

    text-align: justify;

    text-decoration: none;

    transition:
        color 0.3s ease;
}


/* =====================================================
   HOVER DO TEXTO
   ===================================================== */

.noticia-card:hover .noticia-card__descricao {
    background:
        rgba(255, 255, 255, 0.92);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.13);

    transform: translateY(-2px);
}


.noticia-card:hover .noticia-card__descricao .noticia-card__link {
    color: #111;
}


/* =====================================================
   BOTÃO
   ===================================================== */

.noticias-grade__rodape {
    display: flex;

    justify-content: center;

    width: 100%;

    margin-top: 45px;
}


.noticias-grade__botao {
    position: relative;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 13px 30px;

    color: #fff;

    background:
        rgba(30, 30, 30, 0.92);

    border:
        1px solid rgba(255,255,255,0.15);

    border-radius: 10px;

    font-size: 16px;
    font-weight: 600;

    text-decoration: none;

    box-shadow:
        0 8px 20px rgba(0,0,0,0.15);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}


.noticias-grade__botao:hover {
    color: #fff;

    background:
        rgba(50, 50, 50, 0.96);

    transform:
        translateY(-3px);

    box-shadow:
        0 12px 28px rgba(0,0,0,0.22);
}


/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 900px) {

    .noticias-grade {
        padding-left: 20px;
        padding-right: 20px;
    }

    .noticias-grade__grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 30px 25px;
    }

}


/* =====================================================
   CELULAR
   ===================================================== */

@media (max-width: 600px) {

    .noticias-grade {
        padding-left: 15px;
        padding-right: 15px;
    }

    .noticias-grade__grid {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .noticia-card__descricao {
        margin-top: -12px;

        padding:
            16px 17px;
    }

    .noticia-card__descricao .noticia-card__link {
        font-size: 17px;

        text-align: left;
    }

    /*
     * Reduz o efeito no celular.
     * Isso evita movimentos exagerados
     * em telas pequenas.
     */

    .noticia-card:hover {
        transform: translateY(-3px);
    }

}


/* =====================================================
   ACESSIBILIDADE
   ===================================================== */

@media (prefers-reduced-motion: reduce) {

    .noticia-card,
    .noticia-card__imagem img,
    .noticia-card__efeito,
    .noticia-card__descricao,
    .noticias-grade__botao {
        transition: none !important;
    }

    .noticia-card:hover {
        transform: none;
    }

}