/* ==================================================================
   Notícias SAAEO (noticias.php e noticia.php)
   Usa as cores definidas em style.css (--saaeo-blue, --saaeo-gold).
   ================================================================== */

/* ---------- Selo de categoria ---------- */
.badge-categoria {
    display: inline-block;
    background: var(--saaeo-blue);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    line-height: 1;
}
.badge-categoria-ouro {
    background: var(--saaeo-gold);
    color: #fff;
}

/* ---------- Notícia principal (capa) ---------- */
.noticia-capa {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    color: #fff;
    background-color: #00375e;
    background-image: linear-gradient(135deg, #005B9A 0%, #00375e 100%);
    background-size: cover;
    background-position: center;
    border-bottom: 4px solid var(--saaeo-gold);
    overflow: hidden;
}
/* Escurece a foto por baixo do texto para garantir a leitura */
.noticia-capa::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0, 30, 52, 0.95) 0%, rgba(0, 45, 78, 0.75) 40%, rgba(0, 45, 78, 0.10) 80%),
        linear-gradient(to right, rgba(0, 30, 52, 0.55) 0%, rgba(0, 30, 52, 0) 65%);
}
.noticia-capa-conteudo {
    max-width: 820px;
    padding: 4rem 0 3rem;
}
.noticia-capa-data {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}
.noticia-capa-titulo {
    font-size: clamp(1.8rem, 4.2vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.noticia-capa-titulo a {
    color: #fff;
    text-decoration: none;
    background-image: linear-gradient(var(--saaeo-gold), var(--saaeo-gold));
    background-size: 0 3px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.3s ease;
}
.noticia-capa-titulo a:hover {
    background-size: 100% 3px;
}
.noticia-capa-resumo {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 680px;
    margin-bottom: 1rem;
}
@media (max-width: 767.98px) {
    .noticia-capa { min-height: 420px; }
    .noticia-capa-conteudo { padding: 3rem 0 2rem; }
}

/* ---------- Filtros ---------- */
.filtro-categorias {
    overflow-x: auto;
    scrollbar-width: thin;
}

/* ---------- Cards da lista ---------- */
.card-noticia {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-noticia:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.8rem 1.6rem rgba(0, 45, 78, 0.12) !important;
}
.card-noticia-img {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #00375e;
}
.card-noticia-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.card-noticia:hover .card-noticia-img img {
    transform: scale(1.05);
}
.card-noticia-img .badge-categoria {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.card-noticia-sem-img {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(135deg, #005B9A 0%, #00375e 100%);
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 0),
        linear-gradient(135deg, #005B9A 0%, #00375e 100%);
    background-size: 20px 20px, 100% 100%;
}
.card-noticia .title-noticia:hover {
    color: var(--saaeo-blue) !important;
}

/* ---------- Página da matéria ---------- */
.materia-topo {
    background-color: var(--saaeo-blue);
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 0);
    background-size: 22px 22px;
    color: #fff;
    padding: 3rem 0 7rem;
}
.materia-topo-conteudo {
    max-width: 860px;
    margin: 0 auto;
}
.materia-voltar {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
}
.materia-voltar:hover { color: #fff; }
.materia-titulo {
    font-size: clamp(1.7rem, 3.8vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.materia-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 1rem;
}
.materia-corpo {
    max-width: 860px;
    margin: -5rem auto 0;
    position: relative;
    border-radius: 12px;
    padding: 2.5rem 3rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 45, 78, 0.12) !important;
}
@media (max-width: 767.98px) {
    .materia-corpo { padding: 1.5rem 1.25rem; }
}
.materia-foto {
    margin: -2.5rem -3rem 2rem;
}
.materia-foto img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}
.materia-foto figcaption {
    font-size: 0.82rem;
    color: #6c757d;
    padding: 0.6rem 3rem 0;
}
@media (max-width: 767.98px) {
    .materia-foto { margin: -1.5rem -1.25rem 1.5rem; }
    .materia-foto figcaption { padding: 0.6rem 1.25rem 0; }
}
.materia-lead {
    font-size: 1.25rem;
    line-height: 1.55;
    color: #343a40;
    font-weight: 500;
    border-left: 4px solid var(--saaeo-gold);
    padding-left: 1rem;
    margin-bottom: 2rem;
}
.materia-texto {
    font-size: 1.08rem;
    line-height: 1.8;
    color: #2b3035;
}
.materia-texto p { margin-bottom: 1.25rem; }
.materia-texto h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--saaeo-blue);
    margin: 2rem 0 0.75rem;
}
.materia-texto ul { margin-bottom: 1.25rem; padding-left: 1.3rem; }
.materia-texto li { margin-bottom: 0.4rem; }
.materia-texto a { color: var(--saaeo-blue); word-break: break-word; }

/* Fotos e vídeos no meio do texto */
.materia-midia {
    margin: 2rem 0;
}
.materia-midia img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}
.materia-midia .ratio {
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.materia-midia figcaption {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    padding-left: 0.75rem;
    border-left: 3px solid var(--saaeo-gold);
}

.materia-anexo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 0;
    padding: 1rem 1.25rem;
    border: 1px solid #f1c6ca;
    background: #fff5f5;
    border-radius: 10px;
    color: #212529;
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.materia-anexo:hover { background: #ffe9ea; color: #212529; }
.materia-anexo > .bi:first-child { font-size: 2rem; color: #dc3545; }
.materia-anexo small { display: block; color: #6c757d; }
.materia-anexo > .bi:last-child { font-size: 1.3rem; color: #dc3545; }

.materia-compartilhar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}
