/*
Theme Name: CelosAPK USA Edition
Author: CelosAPK
Description: Custom Theme for USA Market - High Performance.
Version: 2.0
Language: en_US
*/

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

/* --- 2. HEADER E LOGO --- */
.site-header { background: #fff; padding: 15px 0; border-bottom: 1px solid #ddd; text-align: center; }
.logo-area { display: flex; justify-content: center; margin-bottom: 15px; }
.logo-area img { max-width: 280px; }

/* --- 3. NAVEGAÇÃO --- */
.main-navigation { border-top: 1px solid #eee; border-bottom: 1px solid #eee; display: flex; justify-content: center; position: relative; }
.nav-menu-list { list-style: none; display: flex; margin: 0; padding: 0; }
.nav-menu-list li a { display: block; padding: 15px 20px; font-weight: 700; text-transform: uppercase; font-size: 14px; }
.nav-menu-list li a:hover { color: #00ce7c; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; margin: 10px auto; }
.menu-toggle .bar { display: block; width: 25px; height: 3px; background-color: #333; margin: 5px 0; }

/* --- 4. CONTEÚDO GERAL --- */
.section-title, .section-title-center { text-transform: uppercase; font-size: 18px; margin: 40px 0 20px; padding-bottom: 10px; font-weight: 900; border-bottom: 1px solid #eee; }
.section-title-center { text-align: center; }

/* Mosaico */
.mosaic-grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 220px 220px; gap: 15px; margin-bottom: 40px; }
.main-post, .side-post { position: relative; border-radius: 8px; overflow: hidden; }
.main-post { grid-row: span 2; }
.mosaic-item-inner { width: 100%; height: 100%; background-size: cover; background-position: center; position: relative; }

/* Notícias Recentes */
.latest-news-list { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.news-item-horizontal { display: flex; gap: 15px; align-items: flex-start; }
.news-thumb { flex: 0 0 160px; height: 110px; overflow: hidden; border-radius: 6px; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Mais Vistos */
.viewed-list { display: flex; flex-direction: column; gap: 15px; }
.viewed-item { display: flex; align-items: center; gap: 15px; background: #fff; padding: 10px; border-radius: 6px; }
.rank-number { font-size: 24px; font-weight: 700; color: #ccc; }

/* Categorias com Imagem */
.category-image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.cat-image-card { display: block; height: 120px; border-radius: 8px; overflow: hidden; }
.cat-image-inner { width: 100%; height: 100%; background-size: cover; background-position: center; }

/* --- 5. PÁGINA DE ARTIGO (SINGLE) --- */
.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; margin-top: 30px; }
.post-content-area { background: #fff; padding: 30px; border-radius: 8px; }
.post-header { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.post-header h1 { font-size: 32px; line-height: 1.3; margin-top: 10px; }
.post-meta { font-size: 14px; color: #777; margin-top: 15px; }
.post-featured-image { margin-bottom: 20px; }
.post-featured-image img { width: 100%; height: auto; border-radius: 8px; }
.post-entry { line-height: 1.7; font-size: 16px; }
.post-entry p { margin-bottom: 1.5em; }
.related-posts { margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.related-title { font-size: 20px; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-item .related-thumb { height: 120px; background-size: cover; background-position: center; border-radius: 6px; margin-bottom: 10px; }
.related-item h4 { font-size: 14px; font-weight: 700; }

/* --- 6. SIDEBAR --- */
.sidebar-widget { background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 25px; }
.widget-title { font-size: 18px; font-weight: 800; text-transform: uppercase; margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
.sidebar-widget .search-form { display: flex; }
.sidebar-widget .search-field { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px 0 0 6px; font-size: 14px; }
.sidebar-widget .search-submit { padding: 12px 15px; border: 1px solid #007bff; background: #007bff; color: #fff; cursor: pointer; border-radius: 0 6px 6px 0; }
.recent-posts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.recent-posts-list li a { display: flex; align-items: center; gap: 15px; }
.recent-posts-list .mini-thumb { flex-shrink: 0; width: 60px; height: 60px; overflow: hidden; border-radius: 6px; }
.recent-posts-list .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-posts-list h3 { font-size: 14px; font-weight: 700; line-height: 1.4; }
.recent-posts-list li a:hover h3 { color: #007bff; }
.social-placeholders div { background: #f4f4f4; height: 100px; display: flex; align-items: center; justify-content: center; color: #999; border-radius: 6px; }

/* --- 7. FOOTER --- */
.site-footer { background: #111; color: #fff; padding: 50px 0 20px; text-align: center; }
.footer-site-title a { color: #007bff; font-size: 28px; font-weight: 900; text-transform: uppercase; }
.footer-menu-list { list-style: none; display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; padding: 0; flex-wrap: wrap; }

/* ================================================================
   CSS RESPONSIVO FINAL
   ================================================================ */
@media screen and (max-width: 768px) {
    /* --- Layouts de Grid --- */
    .mosaic-grid {
        display: block; /* MUITO IMPORTANTE: Mudar para 'block' */
    }
    .main-post, .side-post {
        height: 250px;
        margin-bottom: 15px; /* Espaço entre os cards do mosaico */
    }

    .latest-news-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .news-item-horizontal {
        flex-direction: column;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        overflow: hidden;
    }
    .news-thumb {
        flex-basis: auto;
        width: 100%;
        height: 200px;
        border-radius: 8px 8px 0 0;
    }
    .news-content {
        padding: 15px;
    }

    .category-image-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* --- Layout do Artigo --- */
    .post-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .sidebar-area {
        margin-top: 30px;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* --- Navegação Mobile --- */
    .menu-toggle { display: block; }
    .main-navigation { display: none; }
    .main-navigation.is-active { display: block; position: absolute; top: 100%; left: 0; width: 100%; background: #fff; z-index: 1000; }
    .nav-menu-list { flex-direction: column; width: 100%; }
    .nav-menu-list li { text-align: center; border-bottom: 1px solid #f0f0f0; }

    /* --- Ajustes Gerais --- */
    .logo-area img { max-width: 200px; }
    .section-title, .section-title-center { font-size: 16px; }
    .post-header h1 { font-size: 24px; }
}

@media screen and (max-width: 480px) {
    .category-image-grid {
        grid-template-columns: 1fr;
    }
}
