/*
Theme Name: Modern Portal USA - Final Fix
Author: Celos APK
Version: 3.1 (Optimized for Mobile)
*/

/* --- 1. BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: #f4f4f4; color: #333; line-height: 1.6; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; clear: both; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* --- 2. HEADER & NAV --- */
.site-header { 
    background: #fff; 
    padding: 20px 0; 
    border-bottom: 1px solid #eee; 
    text-align: center; 
    position: relative; /* Importante para o menu mobile absoluto */
}
.logo h1 { font-size: 26px; text-transform: uppercase; margin-bottom: 15px; }

.menu-toggle { 
    display: block; 
    background: #001529; 
    border: none; 
    cursor: pointer; 
    margin: 0 auto 10px; 
    padding: 12px 20px; 
    border-radius: 4px; 
}
.menu-toggle .bar { display: block; width: 20px; height: 2px; background: #fff; margin: 4px 0; transition: 0.3s; }

.main-nav { display: none; width: 100%; background: #fff; }
.main-nav.active { display: block; border-top: 1px solid #eee; margin-top: 10px; }
.nav-list { list-style: none; padding: 0; }
.nav-list li a { 
    display: block; 
    padding: 12px; 
    border-bottom: 1px solid #f9f9f9; 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 14px; 
}

/* --- 3. MOSAICO (MOBILE FIRST) --- */
.mosaic-grid { display: flex; flex-direction: column; gap: 10px; margin: 20px 0; }
.mosaic-main, .mosaic-side-item { 
    position: relative; 
    border-radius: 8px; 
    overflow: hidden; 
    width: 100%;
}
.mosaic-main { aspect-ratio: 16 / 9; }
.mosaic-side-item { aspect-ratio: 16 / 7; }

.mosaic-main img, .mosaic-side-item img { 
    width: 100%; height: 100%; object-fit: cover; 
}
.overlay { position: absolute; bottom: 0; width: 100%; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #fff; }

/* --- 4. LATEST NEWS (EMPILHADO NO MOBILE) --- */
.news-stack { display: flex; flex-direction: column; gap: 20px; margin: 20px 0; }
.news-card { 
    background: #fff; border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); 
    overflow: hidden; display: flex; flex-direction: column; 
}

.news-thumb-container { 
    width: 100%; aspect-ratio: 16 / 9; overflow: hidden; flex-shrink: 0; 
}
.news-thumb-container img { 
    width: 100%; height: 100%; object-fit: cover; 
}

.news-content { padding: 20px; flex-grow: 1; }
.cat-label a { color: #00ce7c; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.news-content h3 { font-size: 18px; font-weight: 800; margin: 10px 0; line-height: 1.3; }

/* --- 5. GRID DE CATEGORIAS --- */
.categories-highlight { margin: 40px 0; padding-top: 30px; border-top: 1px solid #eee; }
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-top: 20px; }

.cat-card {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cat-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.cat-card-title {
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* --- 6. LAYOUT DO ARTIGO + SIDEBAR --- */
.page-layout { display: flex; flex-direction: column; gap: 40px; margin-top: 30px; }
.post-content-area { width: 100%; }

.post-header h1 { font-size: 26px; line-height: 1.3; margin: 15px 0; color: #111; }
.post-meta { font-size: 13px; color: #888; margin-bottom: 25px; }
.post-featured-image { margin-bottom: 30px; border-radius: 12px; overflow: hidden; }

/* OTIMIZAÇÃO DE LEITURA */
.post-entry { font-size: 18px; line-height: 1.8; color: #333; }
.post-entry p { margin-bottom: 20px; }

/* --- 7. AUTHOR BIO & RELATED --- */
.author-bio-box {
    display: flex; flex-direction: column; align-items: center;
    background: #fff; padding: 30px; border-radius: 12px;
    margin: 40px 0; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.author-avatar img { border-radius: 50%; margin-bottom: 15px; border: 3px solid #00ce7c; }
.author-text h4 { font-size: 20px; margin-bottom: 10px; color: #001529; }
.author-text p { font-size: 15px; color: #666; margin-bottom: 15px; }
.author-link { color: #00ce7c; font-weight: 700; text-decoration: underline; }

.related-posts-section { margin-top: 50px; }

/* --- 8. FOOTER --- */
.site-footer { background: #000; color: #fff; padding: 50px 0; text-align: center; clear: both; width: 100%; }
.footer-menu-list { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 20px; }
.footer-menu-list li a { color: #bbb; font-size: 12px; text-transform: uppercase; }

.load-more-container { display: flex; justify-content: center; align-items: center; margin: 50px 0; width: 100%; }
.btn-load-more {
    background-color: #001529; color: #fff; border: none; padding: 16px 50px;
    border-radius: 50px; font-weight: 700; text-transform: uppercase;
    cursor: pointer; transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-load-more:hover { background-color: #00ce7c; transform: scale(1.05); }

/* --- 9. MEDIA QUERIES (TABLET & MOBILE) --- */
@media (max-width: 768px) {
    .main-nav {
        display: none; 
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%; 
        left: 0;
        z-index: 9999;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
    }

    .main-nav.active { display: block !important; }

    .nav-list { display: flex; flex-direction: column; padding: 10px 0; }
    .nav-list li { width: 100%; border-bottom: 1px solid #f0f0f0; }
    .nav-list li a {
        display: block;
        padding: 18px 25px !important;
        font-size: 18px !important; /* Letra legível no menu */
        font-weight: 700;
        text-align: left;
        color: #333;
    }
}

/* --- 10. MEDIA QUERIES (DESKTOP > 992px) --- */
@media (min-width: 992px) {
    .menu-toggle { display: none; }
    .main-nav { display: block; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-top: 15px; }
    .nav-list { display: flex; justify-content: center; gap: 25px; }
    .nav-list li a { border: none; padding: 12px 0; }

    .mosaic-grid { 
        display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 220px 220px; 
        height: 450px; gap: 15px; 
    }
    .mosaic-main { grid-row: span 2; height: 100%; aspect-ratio: auto; }
    .mosaic-side-item { height: 100%; aspect-ratio: auto; }

    .news-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
    .news-card { flex-direction: row; height: 165px; }
    .news-thumb-container { width: 220px; height: 100%; aspect-ratio: auto; }

    .category-grid { grid-template-columns: repeat(4, 1fr); gap: 25px; }

    .page-layout { flex-direction: row; }
    .post-content-area { width: 70%; }
    .site-sidebar { width: 30%; }
    .post-header h1 { font-size: 32px; }

    .author-bio-box { flex-direction: row; text-align: left; gap: 25px; }
    .author-avatar { flex-shrink: 0; }
    .author-avatar img { margin-bottom: 0; }
}

/* --- ESTILO DAS TAGS (BOTÕES) --- */
.post-tags {
    margin: 30px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px; /* Espaço entre o título TAGS e os botões */
}

.tags-title {
    font-weight: 800;
    font-size: 14px;
    color: #111;
}

.tags-links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Espaço real entre um botão e outro */
}

.tags-links-container a {
    background: #f0f0f0;
    color: #333;
    padding: 10px 18px; /* Aumentado para facilitar o clique no mobile */
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: 0.3s;
}

.tags-links-container a:hover {
    background: #00ce7c;
    color: #fff;
    border-color: #00ce7c;
}

/* Ajuste específico para Mobile */
@media (max-width: 768px) {
    .post-tags {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tags-links-container a {
        font-size: 15px; /* Letras maiores no celular como solicitado */
        padding: 12px 20px;
    }
}

/* --- ESTILO DA PÁGINA DE BUSCA --- */
.search-header h1 span {
    color: #00ce7c; /* Destaque no termo buscado */
    font-style: italic;
}

.no-results h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #111;
}

/* Paginação Estilo USA */
.pagination-container .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-container a, .pagination-container span {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
}

.pagination-container .current {
    background: #001529;
    color: #fff;
    border-color: #001529;
}

/* Ajuste de Texto Mobile para Busca */
@media (max-width: 768px) {
    .search-header h1 {
        font-size: 22px !important;
        padding: 0 10px;
    }
    
    .pagination-container a, .pagination-container span {
        font-size: 16px; /* Letras maiores no mobile */
        padding: 12px 20px;
    }
}