/*
Theme Name: Criterium Theme
Author: Criterium
Description: Tema v12.0 - Menu Responsivo (Mobile Hamburger).
Version: 12.0
*/

/* --- 1. RESET E GERAL --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; 
    line-height: 1.7; 
    color: #444; 
    background-color: #f4f6f8; 
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }

/* --- 2. HEADER E MENU (RESPONSIVO) --- */
header { 
    background-color: #2c3e50; 
    color: #fff; 
    position: relative; 
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    /* Mudança: Flex wrap para permitir que o menu caia para linha de baixo no mobile */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: auto;
    padding: 1rem 0;
    flex-grow: 1; /* Ocupa espaço disponível */
}

/* Logo */
.logo { display: flex; align-items: center; }
.logo img { max-height: 42px; width: auto; }

/* Botão Mobile (Escondido no Desktop) */
.menu-toggle {
    display: none; /* Só aparece no celular */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s;
}

/* Menu Desktop */
.main-nav ul { list-style: none; display: flex; margin: 0; padding: 0; }
.main-nav ul li { margin-left: 30px; }
.main-nav ul li a { 
    color: rgba(255,255,255,0.9); 
    font-weight: 600; 
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}
.main-nav ul li a:hover { color: #3498db; }


/* --- 3. SLIDER E BUSCA --- */
.hero-slider-container { 
    position: relative; width: 100%; height: 480px; background: #2c3e50; 
    overflow: hidden; margin-bottom: 60px; 
}
.slider-wrapper, .slide, .slide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.slide { background-size: cover; background-position: center; opacity: 0; transition: opacity 0.8s; z-index: 1; display: flex; align-items: center; justify-content: center; }
.slide.active { opacity: 1; z-index: 2; }
.slide-overlay { background: rgba(0,0,0,0.4); z-index: 3; }

.slide-content { position: relative; z-index: 4; text-align: center; color: white; padding: 20px; max-width: 800px; }
.slide-content h2 { font-size: 3rem; font-weight: 800; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.slide-tag { background: #e74c3c; color: #fff; padding: 5px 12px; font-size: 0.75rem; font-weight: bold; text-transform: uppercase; margin-bottom: 15px; display: inline-block; border-radius: 4px; }
.btn-slide { display: inline-block; padding: 12px 30px; background: #3498db; color: #fff; font-weight: bold; border-radius: 4px; font-size: 0.9rem; border: none; }
.btn-slide:hover { background: #2980b9; }

.search-overlay-container { position: absolute; bottom: 40px; width: 100%; z-index: 30; display: flex; justify-content: center; }
.search-container { width: 100%; max-width: 600px; padding: 0 20px; }
.search-form { display: flex; background: white; border-radius: 50px; padding: 5px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); }
.search-field { flex: 1; border: none; padding: 12px 25px; outline: none; font-size: 1rem; background: transparent; color: #333; }
.search-submit { background: #2c3e50; color: white; border: none; padding: 0 30px; border-radius: 50px; font-weight: 600; cursor: pointer; text-transform: uppercase; font-size: 0.8rem; transition: background 0.3s; }
.search-submit:hover { background: #3498db; }

.blog-header { text-align: center; padding-top: 60px; margin-bottom: 40px; background-color: transparent; box-shadow: none; }

/* --- 4. SINGLE POST --- */
.single-post-wrapper { width: 100%; padding-bottom: 80px; }
.single-post-container { max-width: 100%; }

.entry-header { text-align: center; max-width: 900px; margin: 50px auto 40px; padding: 0 20px; background-color: transparent; box-shadow: none; }
.entry-title { font-size: 2rem; line-height: 1.15; color: #2c3e50; font-weight: 800; margin-bottom: 25px; letter-spacing: -1px; }
.cat-links { display: inline-block; color: #3498db; font-size: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 15px; }
.cat-links a { color: inherit; border-bottom: 2px solid rgba(52, 152, 219, 0.2); }
.entry-meta-bottom { font-size: 1rem; color: #7f8c8d; font-weight: 500; border-top: 1px solid #e1e1e1; display: inline-block; padding-top: 20px; }
.entry-meta-bottom strong { color: #2c3e50; font-weight: 700; }
.post-thumbnail-container { max-width: 900px; margin: 0 auto 0; padding: 0; }
.post-thumbnail img { width: 100%; border-radius: 8px 8px 0 0; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

.entry-content { max-width: 900px; margin: 0 auto; background: #fff; padding: 60px; font-size: 1.2rem; color: #333; font-weight: 400; border-radius: 0 0 8px 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.entry-content p { margin-bottom: 30px; }
.entry-content h2 { margin-top: 40px; margin-bottom: 20px; font-size: 2rem; font-weight: 700; color: #2c3e50; }
.entry-content h3 { margin-top: 30px; margin-bottom: 15px; color: #2c3e50; font-size: 1.5rem; }
.entry-content blockquote { border-left: 5px solid #3498db; padding-left: 25px; margin: 40px 0; font-style: italic; color: #555; font-size: 1.3rem; background: #f8fbff; padding: 20px; }
.entry-content a { color: #3498db; font-weight: 600; border-bottom: 1px solid #3498db; }

.entry-footer { max-width: 900px; margin: 40px auto 0; padding: 0 20px; }
.post-navigation { display: flex; gap: 20px; margin-top: 30px; }
.post-navigation a { flex: 1; padding: 20px; background: #fff; border: 1px solid #dae1e7; color: #2c3e50; text-align: center; border-radius: 6px; font-weight: 700; transition: all 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.post-navigation a:hover { background: #2c3e50; border-color: #2c3e50; color: #fff; transform: translateY(-3px); }

/* --- 5. GRID DE POSTS --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-title { text-align: center; margin: 0 0 40px; font-size: 2rem; font-weight: 800; color: #2c3e50; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.card { display: flex; flex-direction: column; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 25px; }
.card-meta { font-size: 0.8rem; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; color: #999; }
.card-meta span.cat { color: #3498db; }
.card-content h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; color: #2c3e50; line-height: 1.3; }
.card-content p { color: #666; font-size: 1rem; margin-bottom: 20px; }
.read-more { font-weight: 700; font-size: 0.9rem; color: #3498db; text-transform: uppercase; letter-spacing: 0.5px; }

.view-all-container { text-align: center; margin-bottom: 60px; margin-top: 50px; }
.btn-view-all { display: inline-block; padding: 15px 40px; background: #2c3e50; color: #fff; font-weight: bold; border-radius: 50px; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; transition: background 0.3s; }
.btn-view-all:hover { background: #3498db; }

/* --- 6. PAGINAÇÃO --- */
.pagination { margin: 60px 0; display: flex; justify-content: center; }
.pagination ul { list-style: none; display: flex; gap: 8px; padding: 0; }
.pagination li { display: inline-block; margin: 0; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 15px; background-color: #fff; border: 1px solid #ddd; text-decoration: none; color: #2c3e50; border-radius: 4px; font-weight: bold; transition: all 0.3s; }
.pagination a:hover { background-color: #3498db; color: white; border-color: #3498db; }
.pagination .current { background-color: #2c3e50; color: white; border-color: #2c3e50; cursor: default; }

/* --- 7. FOOTER --- */
footer { background: #2c3e50; color: #bdc3c7; padding: 50px 0; text-align: center; font-size: 0.95rem; margin-top: 80px; border-top: 5px solid #3498db; }


/* --- 8. REGRAS MOBILE (MENU HAMBÚRGUER) --- */

/* Esconde a classe 'open' por padrão no desktop */
.main-nav { width: auto; }

@media (max-width: 940px) {
    .header-main { width: 100%; } /* Garante que logo e botão ocupem a linha de cima */
    
    /* Mostrar o botão */
    .menu-toggle { display: block; }
    
    /* Esconder o menu inicialmente */
    .main-nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        background-color: #263544; /* Um pouco mais escuro que o header */
    }
    
    /* Quando o menu estiver ativo (via JS) */
    .main-nav.active {
        max-height: 500px; /* Altura suficiente para os links */
    }

    /* Estilo dos links no Mobile */
    .main-nav ul {
        flex-direction: column;
        padding: 20px 0;
        width: 100%;
    }
    .main-nav ul li {
        margin: 0;
        text-align: center;
        width: 100%;
    }
    .main-nav ul li a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    /* Ajustes gerais Mobile */
    .post-thumbnail-container, 
    .entry-content { width: 90%; margin: 0 auto; }
    .entry-content { padding: 30px 20px; }
    .hero-slider-container { height: 350px; }
    .slide-content h2 { font-size: 2rem; }
}