body {

    background-color: #f1f1f1;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

/*BARRA DE NAV*/

@font-face {
    font-family: 'Montserrat';
    src: url('../FONTS/Montserrat.ttf') format('truetype');
}
@font-face {
    font-family: 'MontserratBold';
    src: url('../FONTS/Montserrat-Bold.ttf') format('truetype');
}

.noticias-topo {
    width: 100%;
    padding: 50px 20px;
    text-align: center;
}

.noticias-conteudo h1 {
    font-family: 'MontserratBold', sans-serif;
    font-size: clamp(24px, 3vw, 32px);
    margin-bottom: 20px;
    color: #1a3b81;
    text-shadow: none;
}

.noticias-conteudo p {
    font-size: clamp(16px, 2vw, 20px);
    max-width: 800px;
    margin: 0 auto 20px auto;
    line-height: 1.6;
    color: #495057;
    text-shadow: none;
}

.ImgNoticias {

    margin-top: 90px;
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, #f4f8fb, #e9f1f7);

}

.btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    position: relative;
    margin-bottom: 20px;
    min-height: 48px; /* Garante altura mínima para não "pular" quando loga/desloga */

}

.btns-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.btns{
    background: #fff;
    color: #1a3b81;
    border: 1.5px solid #1a3b81;
    border-radius: 6px;
    padding: 8px 22px;
    font-size: 1rem;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: none;
    outline: none;
}

.btns:hover{
    background: #1a3b81;
    color: #fff;
    box-shadow: 0 2px 12px rgba(26, 59, 129, 0.08);
    border-color: #1a3b81;
}

.btns:active{
    background: #16306b;
    color: #fff;
    border-color: #16306b;
}

.btnCriar{

    padding: 20px 30px;
    text-align: center;
    text-decoration: none;
    font-size: 1.2em;
    font-family: "Montserrat";
    transition: 0.7s;
    margin-right: 40px;
    position: absolute;
    right: 0;
    background: #fff;
    color: #1a3b81;
    border: 1.5px solid #1a3b81;
    border-radius: 6px;
}

.btnCriar:hover{
    background: #1a3b81;
    color: #fff;
    box-shadow: 0 2px 12px rgba(26, 59, 129, 0.08);
    border-color: #1a3b81;    
    transform: scale(1.05);
}

.btnExcluir {
    position: absolute;
    right: 0;
    background-color: white;
    border: 2px solid rgb(0, 0, 0);
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.5s;
    margin: 10px 15px;

}

.btnExcluir:hover {

    transform: scale(1.1);
}

.btnEditarNoticia {
    background: white;
    border-radius: 5px;
    font-size: 20px;
    transition: transform 0.5s;
    position: absolute;
    margin: 10px 15px;
    z-index: 11;
    
}
.btnEditarNoticia:hover{
    transform: scale(1.1);

}

.AvisoNoticias {
    font-family: 'Montserrat';
    font-size: 18px;
    color: #1a3b81;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #1a3b81;
    border-radius: 12px;
    padding: 40px 30px;
    margin: 40px auto;
    max-width: 500px;
    box-shadow: 0 4px 15px rgba(26, 59, 129, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: bold;
}

.AvisoNoticias:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 59, 129, 0.2);
}

.noticias-container {
    max-width: 1300px;
    padding: 20px;
    font-family: 'Montserrat', sans-serif;
    margin: 0 auto;
    display: grid;
    gap: 40px;
    grid-template-columns: repeat(3, minmax(300px, 1fr));
    justify-content: start;

}

.noticia-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    max-width: 400px;
    position: relative;

}

.noticia-card.modo-exclusao .btn-excluir {
    display: block;
}

.noticia-card:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
    transform: translateY(-8px);
}

.noticia-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    filter: brightness(0.9);
    transition: filter 0,1s ease;
    image-rendering: auto; /* Adicionado */

}

/* Efeito de brilho ao passar o mouse */
.noticia-card:hover .noticia-img {
    filter: brightness(1)}

.noticia-conteudo {
    padding: 20px;
}

.categoria {
    display: inline-block;
    background: #202a81;
    color: #f1f1f1;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 5px 20px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.noticia-titulo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
}

.noticia-descricao {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.noticia-link {
    font-size: 0.9rem;
    color: #202a81;
    font-weight: bold;
    padding: 0;
    margin: 0;
    
}

.paginacao {
    text-align: center;
    margin: 20px 0;
}

.pagina-link {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagina-link:hover {
    background-color: #202a81;
    color: #fff;
}

.pagina-link.active {
    background-color: #202a81;
    color: #fff;
    font-weight: bold;
}

@media (max-width: 1330px) and (min-width: 768px) {
    .btnCriar {
        margin-right: 20px;
    }
}

/* Responsividade dos cards entre 1040px e 768px */
@media (max-width: 1040px) and (min-width: 770px) {
    .noticias-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        padding: 10px;
        margin: 10px;
    }
    .noticia-card {
        max-width: 100%;
    }
    .noticia-img {
        height: 170px;
    }
    .noticia-titulo {
        font-size: 1.1rem;
    }
    .noticia-descricao {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .noticias-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
        padding: 10px;
        margin: 20px;
    }
    .noticia-card {
        max-width: 100%;
    }
    .noticia-img {
        height: 180px;
    }
    .btn-container {
        flex-direction: column;
        align-items: center;
        min-height: unset;
    }
    .btns-group {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    .btnCriar {
        position: static;
        transform: none;
        width: 100%;
        max-width: 250px;
        margin-right: 0;
    }
}

/* 1 card por linha abaixo de 500px */
@media (max-width: 500px) {
    .noticias-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 5px;
        margin: 30px;
    }
    .noticia-img {
        height: 120px;
    }
    .noticia-conteudo {
        padding: 10px;
    }
    .noticia-titulo {
        font-size: 1rem;
    }
    .noticia-descricao {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;

    }
    .btns{
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    .btnCriar {
        width: 100%;
        max-width: 250px;
        margin-right: 0;
    }
    
}