@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Geomini:wght@200..800&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body {
    font-family: "DM Sans", sans-serif;    
    background: #f4f4f4;
    color: #1a1a1a;
}
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 900;
}
.navbar {
    background-color: #DB1D00;
    color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 7rem;
    padding: 0 1rem;
}
.navbar img {
    max-height: 5rem;
    background-color: white;
    padding: 0.5rem;
    border-radius: 3.8rem;
}
.navbar button {
    border: 0;
    background: transparent;
    color: white;
    font-size: clamp(13px, 2vw, 15px);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 0.9rem;
    border-radius: 6px;
    transition: background 0.15s;
}
.navbar button:hover {
    background: rgba(255,255,255,0.15);
}
.search-bar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
}
.search-bar.open {
    max-height: 80px;
    padding: 0.75rem 1rem;
}
.search-form {
    display: flex;
    max-width: 680px;
    margin: 0 auto;
    gap: 8px;
}
.search-form input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0.55rem 0.9rem;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s;
}
.search-form input:focus {
    border-color: #DB1D00;
}
.search-form button {
    background: #DB1D00;
    color: white;
    border: 0;
    border-radius: 6px;
    padding: 0.55rem 1rem;
    cursor: pointer;
    font-size: 15px;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 999;
}
.sidebar-overlay.open { display: block; }
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: min(260px, 80vw);
    height: 100dvh;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #555;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}
.close-btn:hover { background: #f5f5f5; }
.sidebar-list {
    list-style: none;
    padding: 0.5rem 0;
}
.sidebar-list li a {
    display: block;
    padding: 0.7rem 1.25rem;
    color: #222;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.12s, color 0.12s;
}
.sidebar-list li a:hover,
.sidebar-list li a.active {
    background: rgba(219,29,0,0.07);
    color: #DB1D00;
}
.sidebar-list li a.active {
    font-weight: 600;
    border-left: 3px solid #DB1D00;
    padding-left: calc(1.25rem - 3px);
}
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}
.ancora-wrap {
    margin-bottom: 2rem;
}
.ancora-card {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
    min-height: 320px;
}
.ancora-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.13); }
.ancora-img {
    flex: 0 0 55%;
    background-size: cover;
    background-position: center;
    min-height: 280px;
}
.ancora-info {
    flex: 1;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}
.ancora-badge {
    display: inline-block;
    background: #DB1D00;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 4px;
    width: fit-content;
}
.ancora-titulo {
    font-size: clamp(1.25rem, 2.5vw, 1.7rem);
    font-weight: 700;
    line-height: 1.3;
    color: #111;
}
.ancora-trecho {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}
.ancora-meta {
    font-size: 13px;
    color: #888;
}
.content-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}
.section-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #DB1D00;
    border-left: 3px solid #DB1D00;
    padding-left: 8px;
    margin: 1.5rem 0 1rem;
}
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.news-card {
    display: flex;
    gap: 1rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.1); }
.card-img-wrap {
    flex: 0 0 170px;
}
.card-img-wrap img {
    width: 170px;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    display: block;
}
.card-destaque .card-img-wrap {
    flex: 0 0 210px;
}
.card-destaque .card-img-wrap img {
    width: 210px;
}
.card-body {
    flex: 1;
    padding: 1.1rem 1.25rem 1.1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.card-titulo {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    line-height: 1.35;
}
.card-titulo:hover { color: #DB1D00; }
.card-trecho {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}
.card-meta {
    font-size: 12.5px;
    color: #999;
    margin-top: auto;
}
.side-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.side-widget {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.widget-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #DB1D00;
    border-left: 3px solid #DB1D00;
    padding-left: 8px;
    margin-bottom: 1rem;
}
.mais-lidas-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.mais-lidas-list li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.rank-num {
    flex: 0 0 22px;
    font-size: 20px;
    font-weight: 800;
    color: #DB1D00;
    opacity: 0.55;
    line-height: 1.2;
}
.mais-lidas-list li a {
    font-size: 13px;
    color: #222;
    text-decoration: none;
    line-height: 1.45;
}
.mais-lidas-list li a:hover { color: #DB1D00; }
.viu-isso-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.viu-isso-item {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}
.viu-isso-item img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
}
.viu-isso-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}
.viu-isso-titulo {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
}
.viu-isso-item:hover .viu-isso-titulo { color: #DB1D00; }
.viu-isso-meta {
    font-size: 11px;
    color: #999;
}
.sem-noticias {
    color: #888;
    padding: 2rem 0;
}
@media (max-width: 860px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    .side-col {
        order: -1;
    }
}
@media (max-width: 600px) {
    .ancora-card {
        flex-direction: column;
    }
    .ancora-img {
        flex: 0 0 200px;
        min-height: 200px;
        width: 100%;
    }
    .ancora-info {
        padding: 1.25rem;
    }
    .card-img-wrap,
    .card-destaque .card-img-wrap {
        flex: 0 0 130px;
    }
    .card-img-wrap img,
    .card-destaque .card-img-wrap img {
        width: 130px;
        min-height: 130px;
    }
}
@media (max-width: 480px) {
    .navbar {
        height: 5.5rem;
    }
    .navbar img {
        max-height: 4rem;
    }
    .btn-text {
        display: none;
    }
}
@media (min-width: 861px) {
    .card-img-wrap {
        flex: 0 0 220px;
    }
    .card-img-wrap img {
        width: 220px;
        min-height: 150px;
    }
    .card-destaque .card-img-wrap {
        flex: 0 0 260px;
    }
    .card-destaque .card-img-wrap img {
        width: 260px;
        min-height: 170px;
    }
    .card-titulo {
        font-size: 18px;
    }
    .card-trecho {
        font-size: 15px;
    }
}
.side-sticky {
    position: sticky;
    top: 7.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.anuncio-desktop {
    position: sticky;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    background: #eee;
}
.anuncio-slide {
    display: none;
    width: 100%;
}
.anuncio-slide.active {
    display: block;
}
.anuncio-slide img {
    width: 100%;
    height: auto;
    display: block;
}
.anuncio-mobile {
    display: none;
    position: sticky;
    width: 100%;
    margin: 1rem 0;
    background: #eee;
}
.anuncio-slide-mobile {
    display: none;
    width: 100%;
}
.anuncio-slide-mobile.active {
    display: block;
}
.anuncio-slide-mobile img {
    width: 100%;
    height: auto;
    display: block;
}
@media (max-width: 860px) {
    .anuncio-mobile { display: block; }
    .anuncio-desktop { display: none; }
}
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    margin-top: 3rem;
    padding: 2.5rem 1rem 0;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #333;
}
.footer-brand img {
    max-height: 7rem;
    background: white;
    padding: 0.4rem;
    border-radius: 3rem;
    margin-bottom: 0.75rem;
}
.footer-brand p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #aaa;
    font-style: italic;
}
.footer-links h4,
.footer-social h4{
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #fff;
    margin-bottom: 0.75rem;
}
.social-icons {
    display: flex;
    gap: 1rem;
}
.social-icons a {
    color: #aaa;
    font-size: 22px;
    transition: color 0.15s;
}
.social-icons a:hover { color: #DB1D00; }
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
    text-align: center;
    font-size: 12px;
    color: #666;
}
@media (max-width: 860px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}
@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   ADICIONAR AO FINAL DE testes_index.css
   ============================================================ */

/* --- Paginação (busca.php e categoria.php) --- */
.paginacao {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}
.pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #ddd;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pag-btn:hover {
    background: #DB1D00;
    color: #fff;
    border-color: #DB1D00;
}
.pag-btn.pag-ativa {
    background: #DB1D00;
    color: #fff;
    border-color: #DB1D00;
    font-weight: 700;
    pointer-events: none;
}
.pag-ellipsis {
    font-size: 14px;
    color: #aaa;
    padding: 0 2px;
    line-height: 36px;
}

/* --- Footer redistribuída (3 colunas equilibradas + marca) --- */
.footer-inner {
    grid-template-columns: 1.6fr 1.2fr 1fr;
}
/* Remove a 4ª coluna que estava vazia */
@media (max-width: 860px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}
@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

/* Footer brand: descrição um pouco menor que estava grande demais */
.footer-brand p,
.footer-links p {
    font-size: 0.95rem;
}