/* PMC Notícias - Frontend CSS */

/* Artigo de notícia — container principal: 1200px
   Escape do container estreito do Elementor via posicionamento central no viewport */
.pmc-noticia {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, 100vw);
    padding: 0 40px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1d1d1f;
}

/* Foto de destaque — usa toda a largura do container (1200px) */
.pmc-noticia-destaque {
    margin: 0 0 40px 0;
}

.pmc-noticia-destaque-img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.pmc-noticia-credito {
    font-size: 0.8rem;
    color: #86868b;
    font-style: italic;
    margin-top: 10px;
}

/* Header e texto — coluna proporcional ao container (1200px) */
.pmc-noticia-header,
.pmc-noticia-texto,
.pmc-noticia-video {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

/* Header */
.pmc-noticia-header {
    margin-bottom: 36px;
}

.pmc-noticia-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.pmc-noticia-cat {
    background: #f5f5f7;
    color: #1d1d1f;
    padding: 4px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.pmc-noticia-cat:hover {
    background: #e5e5ea;
    color: #0071e3;
}

.pmc-noticia-titulo {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    margin: 0 0 16px 0 !important;
    color: #1d1d1f !important;
    background: none !important;
    text-shadow: none !important;
}

.pmc-noticia-subtitulo {
    font-size: 1.2rem;
    color: #6e6e73;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.pmc-noticia-data {
    font-size: 0.875rem;
    color: #86868b;
    display: block;
    padding-bottom: 28px;
    border-bottom: 1px solid #e5e5e7;
}

/* Texto */
.pmc-noticia-texto {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #333;
    text-align: justify;
    hyphens: auto;
}

.pmc-noticia-texto p {
    margin-bottom: 1.5em;
}

.pmc-noticia-texto a {
    color: #0071e3;
    text-decoration: none;
}

.pmc-noticia-texto a:hover {
    text-decoration: underline;
}

.pmc-noticia-texto ul,
.pmc-noticia-texto ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.pmc-noticia-texto li {
    margin-bottom: 0.5em;
}

/* Créditos de texto e foto */
.pmc-noticia-creditos {
    max-width: 980px;
    margin: 24px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.pmc-noticia-credito-autor,
.pmc-noticia-credito-foto {
    font-size: 0.8rem;
    color: #86868b;
    font-style: italic;
}

/* Galeria de vídeos */
.pmc-noticia-videos {
    max-width: 980px;
    margin: 48px auto 0;
    padding-top: 32px;
    border-top: 1px solid #e5e5e7;
}

.pmc-noticia-videos h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1d1d1f;
}

/* 1 vídeo: largura total */
.pmc-noticia-videos-single {
    display: block;
}

/* 2+ vídeos: grid 2 colunas */
.pmc-noticia-videos-multi {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.pmc-noticia-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.pmc-noticia-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Galeria — usa toda a largura do container (1200px) */
.pmc-noticia-galeria {
    margin-top: 56px;
    padding-top: 32px;
    padding-bottom: 80px;
    border-top: 1px solid #e5e5e7;
}

.pmc-noticia-galeria h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 24px 0;
    color: #1d1d1f;
}

.pmc-noticia-galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.pmc-noticia-galeria-item {
    margin: 0;
}

.pmc-noticia-galeria-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.pmc-noticia-galeria-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.pmc-noticia-galeria-item a:hover .pmc-noticia-galeria-img {
    transform: scale(1.03);
}

/* =========================================================
   EDITAL — LAYOUT GERAL
   ========================================================= */

.pmc-edital {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1d1d1f;
}

/* Header */
.pmc-edital-header {
    padding: 48px 0 36px;
    border-bottom: 1px solid #e5e5e7;
    margin-bottom: 40px;
    text-align: center;
}

.pmc-edital-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #86868b;
    flex-wrap: wrap;
    margin-bottom: 20px;
    letter-spacing: 0.2px;
}

.pmc-edital-meta-item {
    font-weight: 400;
}

.pmc-edital-meta-sep {
    color: #c7c7cc;
}

.pmc-edital-titulo {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1d1d1f;
    margin: 0 0 16px 0;
}

.pmc-edital-subtitulo {
    font-size: 1.2rem;
    color: #6e6e73;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.pmc-edital-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.pmc-edital-cat-btn {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f2f2f7;
    color: #1d1d1f;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.pmc-edital-cat-btn:hover {
    background: #0071e3;
    color: #fff;
}

/* Layout: coluna única — PDF é o elemento principal */
.pmc-edital-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Corpo do texto — acima do PDF, largura legível centralizada */
.pmc-edital-corpo {
    max-width: 760px;
    margin: 0 auto 40px;
    width: 100%;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.pmc-edital-corpo p {
    margin-bottom: 1.4em;
}

.pmc-edital-corpo a {
    color: #0071e3;
    text-decoration: none;
}

.pmc-edital-corpo a:hover {
    text-decoration: underline;
}

.pmc-edital-corpo ul,
.pmc-edital-corpo ol {
    margin-bottom: 1.4em;
    padding-left: 1.5em;
}

.pmc-edital-corpo li {
    margin-bottom: 0.5em;
}

/* PDF Viewer — largura total, destaque principal */
.pmc-edital-pdf {
    width: 100%;
    border: 1px solid #e5e5e7;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f7;
    margin-bottom: 80px;
}

.pmc-edital-pdf-viewer {
    display: block;
    width: 100%;
    height: 90vh;
    min-height: 640px;
    border: none;
}

.pmc-edital-pdf-fallback {
    padding: 56px 24px;
    text-align: center;
    color: #86868b;
    font-size: 15px;
}

.pmc-edital-pdf-fallback a {
    display: inline-block;
    margin-top: 12px;
    color: #fff;
    background: #0071e3;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 8px;
    transition: background 0.2s;
}

.pmc-edital-pdf-fallback a:hover {
    background: #0077ed;
}

/* Responsivo */
@media (max-width: 768px) {
    .pmc-noticia {
        padding: 0 16px;
    }

    .pmc-noticia-header,
    .pmc-noticia-texto,
    .pmc-noticia-video {
        max-width: 100%;
    }

    .pmc-noticia-destaque-img {
        max-height: 280px;
        border-radius: 4px;
    }

    .pmc-noticia-titulo {
        font-size: 1.7rem;
    }

    .pmc-noticia-subtitulo {
        font-size: 1.05rem;
    }

    .pmc-noticia-texto {
        font-size: 1rem;
        line-height: 1.75;
    }

    .pmc-noticia-galeria-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .pmc-noticia-galeria-img {
        height: 150px;
    }

    .pmc-edital {
        padding: 0 16px;
    }

    .pmc-edital-titulo {
        font-size: 1.6rem;
    }

    .pmc-edital-subtitulo {
        font-size: 1rem;
    }

    .pmc-edital-corpo {
        margin-bottom: 28px;
    }

    .pmc-edital-pdf-viewer {
        height: 70vh;
        min-height: 400px;
    }
}

/* Notícia — PDF download */
.pmc-noticia-pdf {
    margin: 32px 0;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.pmc-noticia-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: #f5f5f7;
    border-radius: 10px;
    text-decoration: none;
    color: #1d1d1f;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s;
}

.pmc-noticia-pdf-link:hover {
    background: #e8e8ed;
}

.pmc-noticia-pdf-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #0071e3;
    color: #fff;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Edital — Anexos (frontend) */
.pmc-edital-anexos {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e5;
}

.pmc-edital-anexos-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 16px;
}

.pmc-edital-anexos-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pmc-edital-anexo-li {
    margin: 0;
    padding: 0;
}

.pmc-edital-anexo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f5f5f7;
    border-radius: 8px;
    text-decoration: none;
    color: #1d1d1f;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.15s;
    width: 100%;
    box-sizing: border-box;
}

.pmc-edital-anexo-link:hover {
    background: #e8e8ed;
}

.pmc-edital-anexo-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #0071e3;
    color: #fff;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
