@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

/* Variáveis e Reset */
:root {
    --primary: #1f6fd6;
    --primary-dark: #114a9b;
    --primary-soft: #e7f1ff;
    --dark: #0f1f33;
    --light: #f5f9ff;
    --text: #1f2a37;
    --gray: #5a6776;
    --border: #e2ebf7;
    --shadow: 0 18px 40px rgba(16, 55, 103, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 46px; }

body { 
    font-family: 'Manrope', 'Segoe UI', sans-serif; 
    background: radial-gradient(circle at top, #f7fbff 0%, #eef4ff 40%, #f4f8ff 100%); 
    color: var(--text); 
    line-height: 1.7; 
    padding-top: 46px;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* Base */
.container { max-width: 1200px; margin: 0 auto; padding: 0 10px; }
.section-title { font-size: 1.9rem; margin-bottom: 26px; border-left: 5px solid var(--primary); padding-left: 15px; font-family: 'Playfair Display', serif; color: var(--dark); }

/* Header de Navegação Fixo */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 46px;
    background: rgba(255,255,255,0.9); border-bottom: 1px solid var(--border);
    z-index: 2000; backdrop-filter: blur(6px);
}

.site-header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo { display: inline-flex; align-items: center; margin: 0; padding: 0; }
.logo img { height: 40px; width: auto; max-width: 100%; display: block; object-fit: contain; }

/* Menu Hamburger (Checkbox Hack) */
.hide-checkbox { display: none; }
.menu-toggle { font-size: 1.8rem; cursor: pointer; display: none; color: var(--dark); z-index: 2100; }

#nav-menu { margin-left: auto; height: 100%; display: flex; align-items: center; }
#nav-menu ul { list-style: none; display: flex; gap: 22px; align-items: center; height: 100%; }
#nav-menu ul li a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark);
    transition: 0.3s;
    padding: 6px 10px;
    border-radius: 999px;
}
#nav-menu ul li a:hover { color: var(--primary-dark); background: var(--primary-soft); }
.nav-mobile-search { display: none; }

/* Botões */
.btn-primary,
.btn-outline,
.btn-load-more,
.btn-share {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 999px; font-weight: 600; transition: 0.3s;
    border: 1px solid transparent;
}

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 25px rgba(31, 111, 214, 0.25); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: #fff; }
.btn-outline:hover { background: var(--primary-soft); }
.btn-load-more { border-color: var(--primary); color: var(--primary); background: #fff; margin: 24px 0 10px; }
.btn-full { width: 100%; }
.btn-small { padding: 10px 16px; }

/* Hero */
.home-intro {
    margin-bottom: 15px;
    padding: 20px;
    background: linear-gradient(120deg, #f7fbff 0%, #e7f1ff 100%);
    border-radius: 24px;
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.home-hero-content { max-width: 860px; }
.hero-kicker { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.75rem; color: var(--primary-dark); margin-bottom: 12px; font-weight: 700; }
.home-intro h1 {
    font-size: 2.6rem;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.15;
    font-family: 'Playfair Display', serif;
}

.home-intro .subtitle {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 5px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions a { color: var(--primary-dark); font-weight: 600; }
.hero-actions a:hover { text-decoration: underline; }
.home-hero-highlight { display: flex; justify-content: flex-end; }
.highlight-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    max-width: 320px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.highlight-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--primary); font-weight: 700; }
.highlight-card h3 { font-size: 1.3rem; color: var(--dark); margin: 12px 0 8px; font-family: 'Playfair Display', serif; }
.highlight-card p { color: var(--gray); font-size: 0.95rem; }

/* Layout principal */
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.main-content { min-width: 0; }

.sidebar { position: static; display: flex; flex-direction: column; gap: 22px; }
.sidebar .sidebar-search-card { position: sticky; top: 54px; z-index: 5; }
.sidebar-card { background: #fff; border-radius: 18px; padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.sidebar-card.sidebar-search-card { padding: 12px; }
.sidebar-title { font-size: 1.1rem; margin-bottom: 16px; color: var(--dark); font-family: 'Playfair Display', serif; }
.sidebar-search-card .sidebar-title { margin-bottom: 8px; }
.sidebar-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.sidebar-item a { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; color: inherit; }
.sidebar-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.sidebar-item img { background: #eef4ff; }
.sidebar-item strong { display: block; font-size: 0.92rem; color: var(--dark); line-height: 1.3; }
.sidebar-meta { font-size: 0.75rem; color: var(--gray); text-transform: uppercase; letter-spacing: 0.08em; }
.sidebar-links { list-style: none; display: grid; gap: 10px; }
.sidebar-links a { color: var(--primary-dark); font-weight: 600; }
.sidebar-links a:hover { color: var(--primary); }
.sidebar-empty { color: var(--gray); font-size: 0.9rem; }
.sidebar-cta p { color: var(--gray); margin-bottom: 16px; }
.sidebar-search { display: grid; gap: 10px; }
.sidebar-search input {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    outline: none;
}
.sidebar-search button {
    border: none;
    background: var(--primary);
    color: #fff;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}
.sidebar-search-card .sidebar-search input { padding: 8px 10px; font-size: 0.9rem; }
.sidebar-search-card .sidebar-search button { padding: 8px 10px; font-size: 0.85rem; }
.sidebar-search button:hover { background: var(--primary-dark); }
.mobile-search { display: none; }

/* Grid e Cards */
.news-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 26px; 
}

.card { 
    background: #fff; border-radius: 16px; overflow: hidden; 
    transition: 0.3s; box-shadow: 0 10px 24px rgba(16, 55, 103, 0.08); 
    display: flex; flex-direction: column;
}

.card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(16, 55, 103, 0.14); }

.card-image-wrapper { position: relative; width: 100%; height: 210px; overflow: hidden; }
.card-image-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #eaf2ff 0%, #f7fbff 100%);
    z-index: 0;
}
.card-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card-image-wrapper img { position: relative; z-index: 1; background: transparent; }
.card:hover .card-image-wrapper img { scale: 1.05; }

.category-badge {
    position: absolute; top: 14px; left: 14px;
    background: var(--primary); color: #fff;
    padding: 6px 12px; font-size: 0.7rem; font-weight: bold;
    border-radius: 20px; text-transform: uppercase;
}

.post-header .category-badge {
    position: static;
    display: inline-flex;
    margin-bottom: 12px;
}

.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; gap: 12px; }
.card-title { font-size: 1.1rem; font-weight: 700; line-height: 1.4; color: var(--dark); }
.card-excerpt { font-size: 0.9rem; color: var(--gray); flex-grow: 1; }

.card-meta { 
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.8rem; color: #4b5a6b; border-top: 1px solid var(--border); padding-top: 12px;
}

.read-more { color: var(--primary); font-weight: 700; }
.pagination-wrapper { display: flex; justify-content: center; margin-top: 20px; }
.pagination-numbers-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 8px 20px rgba(16, 55, 103, 0.08);
}
.page-link,
.page-nav,
.page-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0 12px;
    transition: 0.2s ease;
}
.page-link:hover,
.page-nav:hover,
.page-more:hover {
    background: var(--primary-soft);
    border-color: #bfd5f8;
}
.page-link.is-active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.page-nav.is-disabled {
    color: #9aa7b7;
    background: #f8fbff;
    border-color: #e7eef8;
    cursor: default;
}

.empty-state { background: #fff; border-radius: 16px; border: 1px dashed var(--border); padding: 24px; text-align: center; color: var(--gray); }

/* Notícia */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.noticia-completa { background: #fff; border-radius: 22px; padding: 32px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.preview-mode-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eef4ff;
    border: 1px solid #d7e4fb;
    color: #1c4f98;
    font-size: 0.9rem;
    font-weight: 600;
}
.post-header { margin-bottom: 24px; }
.noticia-titulo { font-size: 2.4rem; line-height: 1.2; color: var(--dark); font-family: 'Playfair Display', serif; margin: 12px 0; }
.noticia-subtitulo { font-size: 1.1rem; color: var(--gray); margin-bottom: 16px; }
.noticia-meta { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; color: #4b5a6b; align-items: flex-start; }
.noticia-meta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.noticia-meta a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.meta-divider { color: #c2cfdf; }

.noticia-imagem {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px auto;
    overflow: hidden;
    border-radius: 16px;
}

.noticia-imagem img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

.noticia-texto { font-size: 1.02rem; color: #243143; line-height: 1.55; }
.noticia-texto p { margin-bottom: 12px; }
.noticia-texto img {
    max-width: 100%;
    height: auto;
    display: block;
}
.noticia-texto figure {
    margin: 16px 0;
}
.noticia-texto figcaption {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--gray);
}
.noticia-texto h2, .noticia-texto h3 { margin: 28px 0 12px; color: var(--dark); font-family: 'Playfair Display', serif; }
.noticia-texto ul { margin: 12px 0 12px 18px; }
.noticia-texto ol {
    margin: 12px 0;
    padding-left: 0;
    list-style-position: inside;
}
.noticia-texto ol li {
    margin-bottom: 6px;
}
.noticia-texto a { color: var(--primary); font-weight: 600; }

.article-ad {
    margin: 20px 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fbff;
    min-height: 74px;
}
.article-ad ins.adsbygoogle {
    display: block;
    min-height: 60px;
}
.article-ad--top {
    margin-top: 6px;
    margin-bottom: 18px;
}
.article-ad--mid {
    margin: 22px 0;
}
.article-ad--bottom {
    margin-top: 24px;
}

/* Tags da matéria */
.post-tags {
    margin: 22px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.post-tags span { color: var(--gray); font-weight: 600; font-size: 0.9rem; }
.post-tags a {
    background: #fff;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--primary-dark);
    font-weight: 600;
}
.post-tags a:hover { background: var(--primary-soft); }

.share-box { margin-top: 30px; padding: 20px; background: var(--primary-soft); border-radius: 16px; border: 1px solid var(--border); }
.share-box p { font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-share { padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; }
.btn-whatsapp { background: #0b7a36; color: #fff; }
.btn-x { background: #0b0f1a; color: #fff; }
.btn-facebook { background: #0b5ed7; color: #fff; }

.fact-list { display: grid; gap: 14px; }
.fact-list span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray); display: block; }
.fact-list strong { color: var(--dark); font-size: 0.95rem; }
.fact-list a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }

/* Relacionadas no final da matéria */
.related-section { margin-top: 32px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.related-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.25s;
    box-shadow: 0 8px 18px rgba(16, 55, 103, 0.08);
}
.related-card img { width: 100%; height: 140px; object-fit: cover; }
.related-card time {
    font-size: 0.75rem;
    color: #4b5a6b;
    padding: 12px 14px 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.related-card h3 {
    font-size: 1rem;
    padding: 10px 14px 16px;
    color: var(--dark);
    line-height: 1.35;
}
.related-card:hover { transform: translateY(-4px); box-shadow: 0 14px 24px rgba(16, 55, 103, 0.12); }

/* Hero de categoria */
.category-hero {
    margin: 12px 0 20px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(16, 55, 103, 0.08);
}
.category-hero h2 { font-size: 1.6rem; color: var(--dark); margin-bottom: 6px; font-family: 'Playfair Display', serif; }
.category-hero p { color: var(--gray); }
.category-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; color: var(--primary); font-weight: 700; }

/* Footer */
.main-footer { background: #0f233b; color: #e8f1ff; padding: 50px 0 0; margin-top: 70px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; align-items: start; }
.footer-box h4 { font-size: 1rem; margin-bottom: 14px; color: #fff; }
.footer-box ul { list-style: none; display: grid; gap: 10px; }
.footer-box a { color: #cfe2ff; }
.footer-box a:hover { color: #fff; }
.footer-brand p { color: #c3d7f5; margin-top: 12px; }
.footer-logo img { height: 60px; width: auto; filter: drop-shadow(0 8px 18px rgba(0,0,0,0.2)); }
.footer-cta p { color: #c3d7f5; margin-bottom: 16px; }
.main-footer .btn-outline { background: transparent; border-color: #9ec3ff; color: #e8f1ff; }
.main-footer .btn-outline:hover { background: rgba(255,255,255,0.08); }
.footer-bottom { margin-top: 40px; border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; }
.footer-bottom-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: #b9cbe6; font-size: 0.9rem; }
.footer-legal { display: flex; gap: 18px; }

/* Botão voltar ao topo */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: 0.25s;
    z-index: 2500;
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }

/* Modal newsletter */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 35, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    width: min(420px, 92vw);
    box-shadow: 0 20px 40px rgba(16, 55, 103, 0.2);
    position: relative;
}
.modal h3 { margin-bottom: 6px; color: var(--dark); }
.modal p { color: var(--gray); margin-bottom: 16px; }
.modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--gray);
}
.modal-form { display: grid; gap: 10px; }
.modal-form input {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
}

@media (min-width: 1025px) {
    .page-layout,
    .post-layout {
        align-items: stretch;
    }
    .sidebar {
        align-self: stretch;
    }
}

/* Responsivo */
@media (max-width: 1024px) {
    .page-layout,
    .post-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .sidebar { position: static; }
    .sidebar .sidebar-search-card { position: static; }
    body.is-search-page .sidebar { margin-top: 22px; }
    .home-intro { grid-template-columns: 1fr; }
    .home-hero-highlight { justify-content: flex-start; }
    .page-layout { display: block; }

    .menu-toggle { display: block; }
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(8, 18, 36, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: 0.25s;
        z-index: 1400;
    }
    #nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(78vw, 320px);
        background: #ffffff;
        transform: translateX(100%);
        opacity: 0;
        pointer-events: none;
        transition: 0.3s;
        border-left: 1px solid var(--border);
        z-index: 2001;
        box-shadow: -16px 0 32px rgba(16, 55, 103, 0.15);
        padding-top: 55px;
    }
    #nav-menu ul {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        padding: 0 18px 24px;
        align-items: flex-start;
    }
    #nav-menu ul li { width: 100%; }
    #nav-menu ul li a {
        width: 100%;
        padding: 10px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: var(--dark);
        border-radius: 10px;
        background: #f7fbff;
        border: 1px solid #e3edf9;
        transition: 0.25s;
        font-weight: 600;
    }
    #nav-menu ul li a::after {
        content: "›";
        font-size: 1rem;
        color: var(--primary);
        opacity: 0.9;
        transition: 0.25s;
    }
    #nav-menu ul li a:hover {
        background: var(--primary-soft);
        color: var(--primary-dark);
        border-color: #d2e4fb;
    }
    #nav-menu ul li a:hover::after { transform: translateX(6px); }
    .nav-mobile-search {
        display: block;
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        border: 1px solid #d7e8ff;
        border-radius: 12px;
        background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
    }
    .nav-mobile-search-title {
        margin-bottom: 8px;
        font-size: 0.82rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--primary-dark);
    }
    .nav-mobile-search-form {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
    }
    .nav-mobile-search-form input {
        height: 38px;
        border: 1px solid #c6daf8;
        border-radius: 10px;
        padding: 0 10px;
        font-size: 0.92rem;
        background: #fff;
        color: var(--dark);
        outline: none;
    }
    .nav-mobile-search-form input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 2px rgba(31, 111, 214, 0.12);
    }
    .nav-mobile-search-form button {
        height: 38px;
        border: 1px solid var(--primary);
        border-radius: 10px;
        background: var(--primary);
        color: #fff;
        font-size: 0.85rem;
        font-weight: 700;
        padding: 0 12px;
        cursor: pointer;
    }
    .nav-mobile-search-form button:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

    #bt_menu:checked ~ #nav-menu {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }
    #bt_menu:checked ~ .nav-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    .home-intro { padding: 8px; }
    .home-intro h1 { font-size: 2rem; }
    .noticia-titulo { font-size: 2rem; }
    .noticia-imagem img { height: 220px; }
    .noticia-texto { font-size: 1.06rem; }
    .noticia-texto p { margin-bottom: 20px; }
    .mobile-search { display: block; margin-bottom: 16px; }
    body.is-search-page .sidebar { margin-top: 24px; }
    .sidebar .sidebar-card:first-child { display: none; }
}

@media (max-width: 600px) {
    .logo img { height: 34px; max-width: 190px; }
    .home-intro h1 { font-size: 1.7rem; }
    .section-title { font-size: 1.6rem; }
    .noticia-completa { padding: 12px; }
    .news-grid { grid-template-columns: 1fr; }
    .footer-bottom-content { flex-direction: column; }
    .sidebar-card { padding: 14px; }
    .sidebar-search {
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
    }
    .sidebar-search input { padding: 8px 10px; font-size: 0.9rem; }
    .sidebar-search button { padding: 8px 12px; font-size: 0.85rem; }
}

@media (min-width: 769px) {
    body { padding-top: 66px; }
    html { scroll-padding-top: 66px; }
}
