/*
Theme Name: Neviton
Theme URI: https://neviton.com.br
Author: Neviton
Author URI: https://neviton.com
Description: Twenty Twenty-Four improved CSS.
Version: 1.2
License: GNU General Public License v2 or later
*/

/* 1. Variáveis Globais e Reset */
:root {
    --primary-color: #c1121f;
    --primary-hover: #a00f19;
    --secondary-color: #5e5f2c;
    --text-color: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --container-width: 1000px;
    --font-main: 'Poppins', sans-serif;
    
    /* ALTERADO: Bordas menos arredondadas e sem sombra */
    --radius: 3px; 
    --shadow: none; 
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 2. Layout e Containers Globais */
.contentnav, 
.posts, 
.mainContent,
.calc-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
}

/* 3. Header e Navegação */
#header, .navBar {
    background-color: var(--primary-color);
    color: var(--white);
    position: relative;
}

.contentnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.navbar-brand {
    color: var(--white);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand img, .logo img {
    width: 100%;
    max-width: 40px;
    height: auto;
    object-fit: contain;
}

.logoTitle {
    font-size: 22px;
    margin: 0;
    line-height: 1;
}

.logoTitle span {
    color: #780000;
}

/* Menu Desktop */
.navlinks ul, nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navlinks ul li a, nav a {
    color: var(--white);
    font-weight: 300;
    font-size: 16px;
}

.navlinks ul li a:hover, nav a:hover {
    opacity: 0.8;
}

#menu-icon {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--white);
}

/* 4. Grid de Posts */
.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.posts article {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    /* ALTERADO: Adicionada borda leve para substituir a sombra e texto centralizado */
    border: 1px solid #e5e5e5;
    text-align: center; 
    transition: border-color 0.3s ease;
}

.posts article:hover {
    /* Efeito sutil de hover na borda em vez de sombra */
    border-color: #bbb;
}

.entry-content {
    height: 200px;
    background-color: #dbdbdb;
    overflow: hidden;
    position: relative;
}

.entry-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.entry-content:hover img {
    transform: scale(1.1);
}

.posts h2 {
    font-weight: 500;
    font-size: 1.125rem;
    margin: 1.5rem 0; /* Aumentei um pouco a margem para respirar */
    padding: 0 15px;
    color: #000;
}

.posts h2:hover {
    color: var(--secondary-color);
}

/* 5. Conteúdo Single / Pesquisa - MELHORADO */
.titleSingle {
    margin-bottom: 1.5rem;
}

/* =========================================
   ESTILO DA PESQUISA (CORRIGIDO)
   ========================================= */

.pesquisa {
    /* Define o tamanho e a borda da caixa */
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    background-color: var(--white);
    border: 1px solid #dcdcdc;
    border-radius: var(--radius); /* 3px conforme solicitado */
    padding: 5px 10px; /* Espaço interno */
    
    /* Força os itens a ficarem lado a lado */
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    
    box-sizing: border-box;
}

/* 2. Garante que o FORMULÁRIO interno também seja flexível 
   (O WordPress costuma colocar um <form> dentro da div) */
.pesquisa form {
    display: flex !important;
    width: 100% !important;
    align-items: center !important;
    margin: 0 !important;
}

/* 3. Se houver uma LABEL envolvendo o input, ela deve crescer */
.pesquisa label {
    flex: 1 !important;
    margin: 0 !important;
    display: flex !important; /* Garante que a label não quebre linha */
    width: 100%;
}

/* 4. O Campo de Texto (Input) */
.pesquisa input, 
.pesquisa input[type="text"], 
.pesquisa input[type="search"] {
    flex: 1 !important; /* Ocupa todo o espaço sobrando */
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    padding: 10px !important;
    margin: 0 !important;
    outline: none !important;
    color: var(--text-color);
    box-shadow: none !important;
    height: auto !important; /* Evita alturas fixas bugadas */
}

/* 5. O Botão/Ícone */
.pesquisa button,
.pesquisa .search-submit,
.pesquisa input[type="submit"] {
    flex-shrink: 0 !important; /* Impede o botão de ser esmagado */
    width: auto !important;
    background: transparent !important;
    border: none !important;
    padding: 0 10px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Estilo do ícone SVG dentro do botão */
.pesquisa svg, 
.pesquisa button svg {
    width: 20px;
    height: 20px;
    fill: #666;
    transition: fill 0.3s;
}

.pesquisa button:hover svg {
    fill: var(--primary-color);
}

/* 6. Botões Sociais */
.social-sharing-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 20px 0;
}

.social-sharing-buttons a {
    padding: 12px;
    border-radius: var(--radius);
    color: var(--white);
    text-align: center;
    font-weight: 500;
}

.social-sharing-buttons .Whats { background-color: #25D366; }
.social-sharing-buttons .Whats:hover { background-color: #1ebc57; }

.social-sharing-buttons .Pin { background-color: #E60023; }
.social-sharing-buttons .Pin:hover { background-color: #c7001f; }

/* 7. Posts Relacionados */
.title-post-relacionado {
    margin: 3rem 0 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.related-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.related-post-thumbnail {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-title {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-color);
    text-align: center; /* Centralizado também */
}

.related-post a:hover .related-post-title {
    color: var(--primary-color);
}

/* 8. Paginação */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 40px 0;
}

.pagination span, .pagination a {
    padding: 10px 20px;
    border-radius: var(--radius);
    text-align: center;
}

.pagination span {
    background-color: var(--primary-color);
    color: var(--white);
}

.pagination a {
    background: var(--white);
    color: var(--text-color);
    border: 1px solid #ddd;
}

.pagination a:hover {
    background-color: #eee;
}

/* 9. Calculadora */
.calculadora-espaco {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow); /* Usando var(--shadow) que agora é none */
    border: 1px solid #e5e5e5; /* Borda substituta */
    margin-bottom: 40px;
}

.campo {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.campo input {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid #ccc;
    font-size: 16px;
}

.btn-calcular {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.3s;
}

.btn-calcular:hover {
    background: var(--primary-hover);
}

/* 10. Footer */
.footercontent {
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 20px;
    margin-top: 50px;
}

/* =========================================
   MEDIA QUERIES (Responsividade)
   ========================================= */

@media only screen and (max-width: 768px) {
    
    #menu-icon {
        display: block;
    }

    nav, .navlinks ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 20px 0;
        z-index: 1000;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1); /* Mantive sombra apenas no menu drop */
    }

    nav.show, .navlinks.show ul {
        display: flex;
    }

    nav ul li, .navlinks ul li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    nav a, .navlinks ul li a {
        display: block;
        padding: 10px;
        font-size: 18px;
    }

    .posts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .social-sharing-buttons {
        grid-template-columns: 1fr;
    }
    
    .related-posts {
        grid-template-columns: 1fr;
    }

    .calculadora-espaco {
        padding: 20px;
    }

    .calc-wrapper h1 {
        font-size: 24px;
    }
    
    /* Ajuste da pesquisa no mobile para ocupar mais espaço */
    .pesquisa {
        max-width: 100%;
    }
}