/* --- VARIÁVEIS --- */
:root {
    /* PALETA OFICIAL */
    --pp-blue-dark: #234F74;
    /* Azul Escuro (Institucional/Fundo) */
    --pp-blue-medium: #3D79A4;
    /* Azul Médio (Botões/Destaques) */
    --pp-grey: #A1A2A5;
    /* Cinza (Detalhes/Bordas) */

    --white: #ffffff;
    --bg-light: #f8f9fa;
    --text-color: #333333;
    --primary-color: var(--pp-blue-medium);
    /* Mapping for compatibility */
    --text-muted: #666;
}

/* --- GERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--pp-blue-dark);
}

a {
    text-decoration: none;
    transition: 0.3s;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BOTÕES --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

.btn-primary {
    background-color: var(--pp-blue-medium);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--pp-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(35, 79, 116, 0.3);
}

.btn-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin: 0 5px;
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-social:hover {
    background-color: var(--pp-blue-medium);
    border-color: var(--pp-blue-medium);
}

.btn-outline {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid var(--pp-blue-medium);
    color: var(--pp-blue-medium);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    background: transparent;
}

.btn-outline:hover {
    background: var(--pp-blue-medium);
    color: #fff;
}

/* --- TAGS E CATEGORIAS --- */
.category-tag {
    background-color: var(--pp-blue-dark);
    color: var(--white);
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 2px;
    margin-bottom: 10px;
    display: inline-block;
}

.category-tag.highlight {
    background-color: var(--pp-blue-medium);
}

.category-tag.grey {
    background-color: var(--pp-grey);
    color: #fff;
}

/* NOVO ESTILO OVERLAY PREMIUM */
.category-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--pp-blue-medium);
    color: var(--white);
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    /* Arredondado sutil */
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* --- HEADER --- */
.top-bar {
    background-color: var(--pp-blue-dark);
    color: var(--white);
    font-size: 0.8rem;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header {
    background-color: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--pp-blue-medium);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--pp-blue-dark);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.logo small {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--pp-grey);
    margin-bottom: 2px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu li {
    list-style: none;
}

.nav-menu a {
    color: var(--pp-blue-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    position: relative;
}

.nav-menu a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--pp-blue-medium);
    transition: 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--pp-blue-medium);
}

.nav-menu a:hover:after,
.nav-menu a.active:after {
    width: 100%;
}

/* --- HERO BANNER --- */
.hero-banner {
    background: url('https://placehold.co/1920x500?text=Seguranca+Publica+MS') no-repeat center right;
    background-size: cover;
    min-height: 500px;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 650px;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--white);
}

.hero-content p {
    font-size: 1.2rem;
    border-left: 4px solid var(--pp-blue-medium);
    padding-left: 20px;
    margin-bottom: 30px;
    color: #e0e0e0;
}

/* SWIPER BANNER */
.swiper-hero {
    width: 100%;
    height: 500px;
}

.swiper-slide-hero {
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 10%;
}

.hero-overlay {
    background: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

@media(max-width:768px) {
    .swiper-slide-hero {
        padding-left: 20px;
        padding-right: 20px;
        justify-content: center;
        text-align: center;
    }

    .hero-banner {
        min-height: auto;
        padding: 60px 0;
    }

    .hero-overlay {
        background: rgba(35, 79, 116, 0.7);
    }
}

/* --- ESTRUTURA DE NOTÍCIAS --- */
.portal-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.portal-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
}

/* DESTAQUE PRINCIPAL */
/* DESTAQUE PRINCIPAL */
.featured-news {
    position: relative;
    height: 450px;
    border-radius: 8px;
    /* Arredondamento mais suave */
    overflow: hidden;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Sombra mais difusa */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.featured-news:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(35, 79, 116, 0.25);
}

.featured-overlay {
    background: linear-gradient(to top, rgba(35, 79, 116, 0.95), rgba(35, 79, 116, 0.3) 70%, transparent);
    width: 100%;
    padding: 40px 30px;
    color: var(--white);
    transition: background 0.4s ease;
}

.featured-news:hover .featured-overlay {
    background: linear-gradient(to top, rgba(35, 79, 116, 1), rgba(35, 79, 116, 0.4) 70%, transparent);
}

.featured-overlay h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin: 10px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* CARDS E GRID */
.news-grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    /* Espaçamento unificado */
    margin-bottom: 40px;
}

.news-card {
    background: var(--white);
    border: 1px solid #f0f0f0;
    /* Borda mais sutil */
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Curva de animação "premium" */
    position: relative;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: transparent;
    /* Remove borda para focar na sombra */
}

.news-card img {
    width: 100%;
    height: 180px;
    /* Um pouco mais alto */
    object-fit: cover;
    transition: transform 0.6s ease;
    /* Zoom mais lento e cinematográfico */
}

.news-card:hover img {
    transform: scale(1.08);
    /* Zoom sutil */
}

.news-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: auto;
    /* Remove altura fixa para evitar buracos */
    font-weight: 700;
    color: var(--pp-blue-dark);
    transition: color 0.3s ease;
}

.news-card:hover h3 {
    color: var(--pp-blue-medium);
}

.news-date {
    font-size: 0.75rem;
    color: #888;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* LISTA RÁPIDA */
.quick-news-list {
    background: var(--white);
    padding: 30px;
    border-radius: 6px;
    border-left: 4px solid var(--pp-blue-medium);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Sombra leve */
}

.quick-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.quick-item {
    display: flex;
    align-items: start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: transform 0.2s ease;
    /* Animação leve */
}

.quick-item:last-child {
    border: none;
    margin: 0;
    padding: 0;
}

.quick-item:hover {
    transform: translateX(5px);
    /* Move levemente para direita */
}

.quick-item i {
    color: var(--pp-blue-medium);
    margin-top: 5px;
    margin-right: 15px;
    font-size: 0.8rem;
}

.quick-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    transition: 0.2s;
}

.quick-item:hover h4 {
    color: var(--pp-blue-dark);
}

.quick-item a {
    color: inherit;
    text-decoration: none;
}

/* SIDEBAR */
.sidebar-widget {
    background: var(--white);
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.sidebar-title {
    font-size: 1.1rem;
    border-bottom: 2px solid var(--pp-grey);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--pp-blue-dark);
}

.opinion-card {
    text-align: center;
}

.opinion-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid var(--pp-blue-medium);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-widget:hover .opinion-card img {
    transform: scale(1.05) rotate(2deg);
}

.opinion-card h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.opinion-card p {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.most-read-list article {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.most-read-list article:hover {
    background: #f9f9f9;
}

.most-read-list img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.most-read-list h5 {
    font-size: 0.9rem;
    line-height: 1.3;
    color: #444;
    transition: color 0.2s;
}

.most-read-list article:hover h5 {
    color: var(--pp-blue-dark);
}

/* --- BIO SECTION --- */
.bio-section {
    background-color: var(--pp-blue-dark);
    color: var(--white);
    padding: 60px 0;
}

.bio-container {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

/* TIMELINE STYLES */
.bio-timeline {
    position: relative;
    padding-left: 40px;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: 30px;
    margin-left: 5px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -51px;
    /* Perfectly centered: -(40px padding + 1px border-center + 10px half-dot) */
    top: 2px;
    width: 14px;
    height: 14px;
    background: var(--pp-blue-medium);
    border: 3px solid var(--pp-blue-dark);
    border-radius: 50%;
}

.timeline-item h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 700;
    line-height: 1.2;
}

.timeline-item p {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.bio-image {
    flex: 1;
    text-align: center;
}

.bio-image img {
    width: 300px;
    border-radius: 8px;
    box-shadow: 10px 10px 0px var(--pp-blue-medium);
    display: inline-block;
}

.bio-content {
    flex: 2;
}

.bio-content h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.bio-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.bio-feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bio-feature-item i {
    color: var(--pp-blue-medium);
    font-size: 1.2rem;
}

/* --- SINGLE POST PAGE --- */
.single-wrapper {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: none;
}

.post-header-area {
    margin-bottom: 40px;
    border-bottom: none;
    padding-bottom: 20px;
    /* FIX: Remove sticky behavior inherited from global 'header' tag */
    position: relative !important;
    top: auto;
    z-index: 1;
}

.post-meta-badges {
    display: flex;
    gap: 15px;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
    align-items: center;
}

.post-title-lg {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--pp-blue-dark);
}

.featured-img-lg {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 30px;
}

.post-body-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.post-body-content p {
    margin-bottom: 20px;
}

.post-body-content h2 {
    color: var(--pp-blue-dark);
    margin-top: 30px;
    margin-bottom: 15px;
}

/* --- FOOTER --- */
footer {
    background-color: #1a1a1a;
    color: #999;
    padding: 40px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* RESPONSIVIDADE */
/* MENU MOBILE BUTTON */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--pp-blue-dark);
    font-size: 1.5rem;
    cursor: pointer;
}

/* RESPONSIVIDADE */
@media (max-width: 900px) {
    .portal-layout {
        grid-template-columns: 1fr;
    }

    .news-grid-row {
        grid-template-columns: 1fr;
    }

    .bio-container {
        flex-direction: column;
        text-align: center;
    }

    .bio-content h2 {
        font-size: 1.8rem;
    }

    .bio-features {
        text-align: left;
    }

    /* Header e Menu Mobile */
    .nav-wrapper {
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .logo {
        margin-bottom: 0;
        font-size: 1.2rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-container {
        width: 100%;
        order: 3;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 9999;
        padding: 10px 0;
        border-top: 1px solid #eee;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 0;
        width: 100%;
    }

    .nav-menu li a {
        display: block;
        padding: 15px 20px;
        border-bottom: 1px solid #f5f5f5;
    }

    .btn.btn-primary {
        display: none;
        /* Esconde botão WhatsApp no header mobile para limpar visual */
    }
}