/*
Theme Name: Cannabis Theme
Theme URI: https://cannabiscontabil.com
Author: Pedro Bernardo
Description: Tema customizado para Cannabis Contabil - Atualizado com Estilos de Blog
Version: 2.1
*/

:root {
    /* Paleta de Cores Refinada */
    --primary: #558B2F;          /* Verde Principal */
    --primary-dark: #2E5C18;     /* Verde Profundo para Hover/Textos */
    --primary-light: #EBF5E0;    /* Verde Bem Claro para fundos */
    --accent: #8BC34A;           /* Verde Acento para detalhes */
    
    --text-main: #1C2B20;        /* Quase preto, com tom esverdeado */
    --text-body: #4A5550;        /* Cinza chumbo para parágrafos */
    --text-light: #889990;       /* Texto de apoio */
    
    --bg-body: #FAFCFA;          /* Branco gelo levemente verde */
    --surface: #FFFFFF;          /* Branco puro */
    
    /* Alertas e Status */
    --color-danger: #c62828;
    --bg-danger: #fff5f5;
    --border-danger: #ffcdd2;
    
    --border-light: rgba(85, 139, 47, 0.15);
    --shadow-soft: 0 10px 40px -10px rgba(85, 139, 47, 0.15);
    --shadow-hover: 0 20px 50px -12px rgba(85, 139, 47, 0.25);
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    color: var(--text-body); 
    background-color: var(--bg-body); 
    overflow-x: hidden; 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Fundo Abstrato (Desktop apenas) */
body::before {
    content: ""; position: fixed; top: -20%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(85,139,47,0.08) 0%, rgba(255,255,255,0) 70%);
    z-index: -1; pointer-events: none;
}
body::after {
    content: ""; position: fixed; bottom: -10%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(139, 195, 74, 0.08) 0%, rgba(255,255,255,0) 70%);
    z-index: -1; pointer-events: none;
}

/* --- Tipografia Global --- */
h1, h2, h3, .brand { 
    color: var(--text-main); 
    font-weight: 800; 
    letter-spacing: -0.03em;
}
p { font-size: 1.05rem; margin-bottom: 1rem; }
a { color: var(--primary); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--primary-dark); }

/* --- Header & Nav --- */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 18px 0;
    position: sticky; top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.logo { display: flex; align-items: center; gap: 14px; }
.header-logo { height: 48px; width: auto; }
.logo-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.1; }
.brand { font-size: 1.25rem; color: var(--primary); text-transform: uppercase; }
.brand span { color: var(--text-main); }
.logo small { font-size: 0.6rem; color: var(--text-light); letter-spacing: 1.5px; font-weight: 600; margin-top: 2px; }

.nav-links { display: flex; list-style: none; gap: 40px; }
.nav-links a { 
    text-decoration: none; color: var(--text-main); 
    font-weight: 600; font-size: 0.95rem; 
    transition: color 0.3s; position: relative;
}
.nav-links a:hover { color: var(--primary); }
.menu-toggle { display: none; cursor: pointer; }

/* --- Hero Section --- */
.hero { 
    padding: 120px 0 100px; 
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(235, 245, 224, 0.3) 100%);
}
.hero-content { max-width: 750px; position: relative; z-index: 2; }

.badge { 
    background: var(--primary-light); color: var(--primary-dark); 
    padding: 8px 16px; border-radius: 50px; 
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; 
    margin-bottom: 24px; display: inline-block;
    border: 1px solid rgba(85, 139, 47, 0.2);
}

.hero h1 { 
    font-size: 3.5rem; line-height: 1.15; margin-bottom: 24px; 
    background: linear-gradient(to right, var(--text-main), var(--primary-dark));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p { font-size: 1.25rem; color: var(--text-body); margin-bottom: 40px; max-width: 90%; }
.hero-btns { display: flex; gap: 15px; flex-wrap: wrap; }

/* --- Buttons --- */
.btn { 
    padding: 16px 32px; border-radius: 12px; 
    text-decoration: none; font-weight: 700; font-size: 1rem;
    transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; border: none;
}
.btn-primary { 
    background: var(--primary); color: white; 
    box-shadow: 0 4px 15px rgba(85, 139, 47, 0.3);
}
.btn-primary:hover { 
    background: var(--primary-dark); transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(85, 139, 47, 0.4);
    color: white;
}
.btn-outline { 
    background: transparent; border: 2px solid var(--border-light); color: var(--primary-dark); 
}
.btn-outline:hover { 
    border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark);
}
.btn-white { 
    background: white; color: var(--primary); box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.btn-white:hover { background: #f0f0f0; transform: translateY(-2px); }

/* --- Services --- */
.services { padding: 100px 0; }
.header-section { text-align: center; margin-bottom: 60px; max-width: 800px; margin: 0 auto 60px; }
.section-title { font-size: 2.5rem; margin-bottom: 15px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }

.card { 
    background: var(--surface); padding: 40px 32px; 
    border-radius: var(--radius-lg); transition: all 0.4s ease; 
    border: 1px solid var(--border-light); box-shadow: var(--shadow-soft);
    display: flex; flex-direction: column; align-items: flex-start;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.icon-box { 
    width: 64px; height: 64px; background: var(--primary-light); 
    border-radius: 18px; display: flex; align-items: center; justify-content: center; 
    margin-bottom: 24px; color: var(--primary); font-size: 1.7rem; transition: 0.3s;
}
.card:hover .icon-box { background: var(--primary); color: white; }

/* --- Compliance Banner --- */
.compliance-banner { padding: 60px 0; margin: 40px 0; }
.compliance-card { 
    background: linear-gradient(135deg, #1f3b25 0%, #33691E 100%);
    color: white; padding: 80px 40px; border-radius: 30px; text-align: center;
    position: relative; overflow: hidden; box-shadow: 0 20px 60px rgba(31, 59, 37, 0.4);
}
.compliance-card h2 { color: white; font-size: 2.5rem; margin-bottom: 20px; position: relative; z-index: 2; }
.compliance-card p { opacity: 0.9; font-size: 1.15rem; margin-bottom: 40px; position: relative; z-index: 2; }

/* --- Contact Section --- */
.contact { padding: 80px 0 100px; }
.contact-card-centered {
    background: white; max-width: 700px; margin: 0 auto; padding: 60px;
    border-radius: 40px; box-shadow: var(--shadow-soft); border: 1px solid #f0f0f0; text-align: center;
}
.contact-header { margin-bottom: 40px; }
.contact-header h2 { font-size: 2.2rem; margin-bottom: 15px; }
.contact-intro { font-size: 1.1rem; color: var(--text-body); margin: 0 auto; }

/* WPForms */
div.wpforms-container-full .wpforms-form input,
div.wpforms-container-full .wpforms-form textarea {
    width: 100% !important; padding: 18px 20px !important;
    border: 2px solid #EEE !important; border-radius: 12px !important;
    background: #FAFAFA !important; font-size: 16px !important; margin-bottom: 15px !important; transition: 0.3s !important;
}
div.wpforms-container-full .wpforms-form input:focus,
div.wpforms-container-full .wpforms-form textarea:focus {
    border-color: var(--primary) !important; background: white !important;
    box-shadow: 0 0 0 4px rgba(85, 139, 47, 0.1) !important; outline: none !important;
}
div.wpforms-container-full .wpforms-form button[type=submit] {
    background-color: var(--primary) !important; color: white !important;
    border: none !important; border-radius: 12px !important; padding: 18px 32px !important;
    font-size: 1.1rem !important; font-weight: 700 !important; width: 100% !important;
    text-transform: uppercase; box-shadow: 0 4px 15px rgba(85, 139, 47, 0.3) !important;
    cursor: pointer !important; transition: all 0.3s !important; margin-top: 10px !important;
}
div.wpforms-container-full .wpforms-form button[type=submit]:hover {
    background-color: var(--primary-dark) !important; transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(85, 139, 47, 0.4) !important;
}

/* --- Footer --- */
footer { 
    background: #fcfdfc; padding: 60px 0 40px; 
    border-top: 1px solid rgba(0,0,0,0.05); text-align: center;
}
.footer-contact-info {
    display: flex; justify-content: center; align-items: center; flex-wrap: wrap;
    gap: 40px; margin-bottom: 40px;
}
.footer-item { display: flex; align-items: center; gap: 12px; color: var(--text-main); font-weight: 600; }
.footer-item i {
    color: var(--primary); font-size: 1.2rem; width: 36px; height: 36px;
    background: var(--primary-light); display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.footer-divider {
    height: 1px; width: 100%; max-width: 800px;
    background: rgba(0,0,0,0.05); margin: 0 auto 30px;
}
.footer-links a { 
    color: var(--text-body); font-weight: 600; margin: 0 15px; text-decoration: none; transition: 0.3s;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom { margin-top: 25px; font-size: 0.85rem; color: var(--text-light); }
.whatsapp-btn { 
    position: fixed; bottom: 30px; right: 30px; background: #25d366; color: white; 
    width: 65px; height: 65px; border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-size: 2.2rem; box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4); z-index: 1000; transition: 0.3s;
}
.whatsapp-btn:hover { transform: scale(1.1); }

/* --- MEDIA QUERIES --- */
@media (max-width: 992px) {
    .container { padding: 0 20px; }
    .hero h1 { font-size: 2.8rem; }
    .contact-card-centered { padding: 40px 30px; }
}
@media (max-width: 768px) {
    .menu-toggle { display: block; font-size: 1.6rem; color: var(--primary); }
    .nav-links {
        display: flex; flex-direction: column; position: fixed; top: 0; right: -100%;
        width: 85%; height: 100vh; background: white; padding: 80px 30px; 
        box-shadow: -5px 0 20px rgba(0,0,0,0.1); gap: 25px; transition: right 0.4s ease; z-index: 999; text-align: left;
    }
    .nav-links.active { right: 0; }
    .hero { padding: 90px 0 50px; text-align: center; }
    .hero h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    .services-grid { grid-template-columns: 1fr; }
    .footer-contact-info { flex-direction: column; gap: 20px; align-items: flex-start; padding-left: 10px; }
    .separator { display: none; }
    .whatsapp-btn { width: 55px; height: 55px; bottom: 20px; right: 20px; font-size: 1.8rem; }
}

/* ==========================================================================
   BLOG POST STYLES (NOVO - ADICIONADO PARA CORRIGIR OS POSTS)
   ========================================================================== */

/* Container mais estreito para leitura (centralizado) */
.single .entry-content, 
.post-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-size: 1.125rem; /* Texto levemente maior para leitura */
    color: var(--text-body);
}

/* Títulos dentro dos posts */
.entry-content h2, .entry-content h3,
.post-content h2, .post-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    line-height: 1.3;
    color: var(--primary-dark);
}

.entry-content h2, .post-content h2 { font-size: 1.8rem; border-bottom: 2px solid var(--primary-light); padding-bottom: 10px; display: inline-block; }
.entry-content h3, .post-content h3 { font-size: 1.4rem; }

/* Listas (Bolinhas e Números) */
.entry-content ul, .entry-content ol,
.post-content ul, .post-content ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}
.entry-content li, .post-content li { margin-bottom: 0.8rem; }
.entry-content ul li::marker, .post-content ul li::marker { color: var(--primary); font-weight: bold; }

/* Blockquote (Citações) */
.entry-content blockquote, .post-content blockquote {
    background: var(--primary-light);
    border-left: 5px solid var(--primary);
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--primary-dark);
    font-weight: 600;
}

/* --- ELEMENTOS RICOS (TABELAS E BOXES) --- */

/* Tabelas de Comparação */
.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    margin: 30px 0;
    border: 1px solid var(--primary-light);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 600px; /* Garante que não quebre no mobile */
}

.comparison-table th {
    background: var(--primary);
    color: white;
    text-align: left;
    padding: 18px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.comparison-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #eee;
    color: var(--text-body);
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tr:hover td { background-color: #f9fdf9; }

/* Highlight Box (Caixa Verde) */
.highlight-box {
    background: #f4f7f6 !important; /* Força cor clara */
    border-left: 5px solid var(--primary) !important;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* Finance Alert (Caixa com ícone) */
.finance-alert {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    border-left: 4px solid #FBC02D; /* Amarelo ouro para financeiro */
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.finance-alert i {
    font-size: 1.5rem;
    color: #FBC02D;
    background: #FFF9C4;
    padding: 10px;
    border-radius: 50%;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Forbidden Box (Caixa Vermelha de Proibição) */
.forbidden-box {
    background: var(--bg-danger) !important;
    border: 1px solid var(--border-danger) !important;
    padding: 30px;
    border-radius: 16px;
    margin: 30px 0;
}

.forbidden-box h3 { color: var(--color-danger) !important; font-size: 1.3rem; margin-top: 0; display: flex; align-items: center; gap: 10px; }
.forbidden-box ul { list-style: none; padding: 0; margin: 0; }
.forbidden-box li { 
    position: relative; 
    padding-left: 24px; 
    color: #b71c1c; 
    margin-bottom: 10px; 
}
.forbidden-box li::before {
    content: "✖";
    position: absolute; left: 0; color: var(--color-danger); font-weight: bold;
}

/* Ajustes de Imagens dentro do Post */
.entry-content img, .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    margin: 20px 0;
}

/* Responsividade dos Boxes no Mobile */
@media (max-width: 600px) {
    .highlight-box, .forbidden-box, .finance-alert {
        padding: 20px;
    }
    .finance-alert { flex-direction: column; }
    .entry-content h2, .post-content h2 { font-size: 1.5rem; }
}

/* ==========================================================================
   WPFORMS ALIGNMENT FIX (CANNABIS THEME)
   ========================================================================== */

/* 1. Reset Text Alignment specifically for the form wrapper */
/* This counteracts the 'text-align: center' from .contact-card-centered */
.contact-form-wrapper .wpforms-container {
    text-align: left;
}

/* 2. Style Standard Inputs (Text, Email, Textarea) */
/* specific selectors to avoid affecting checkboxes */
div.wpforms-container-full .wpforms-form input[type="text"],
div.wpforms-container-full .wpforms-form input[type="email"],
div.wpforms-container-full .wpforms-form textarea {
    width: 100% !important;
    padding: 16px 20px !important;
    border: 1px solid #E0E0E0 !important;
    border-radius: var(--radius-sm) !important;
    background: #FAFCFA !important; /* Matches your theme var --bg-body */
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main) !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
}

/* Input Focus State */
div.wpforms-container-full .wpforms-form input:focus,
div.wpforms-container-full .wpforms-form textarea:focus {
    border-color: var(--primary) !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 4px rgba(85, 139, 47, 0.1) !important;
}

/* 3. Fix Labels */
div.wpforms-container-full .wpforms-form label.wpforms-field-label {
    display: block !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: var(--text-main);
    text-align: left !important;
}

/* 4. Fix LGPD Checkbox (CRITICAL FIX) */
/* We must override the global 100% width rule for checkboxes */
div.wpforms-container-full .wpforms-form input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 12px 0 0 !important; /* Space between box and text */
    position: relative;
    top: 3px; /* Visual alignment fix */
    flex-shrink: 0; /* Prevents box from squishing */
    cursor: pointer;
    appearance: auto !important; /* Ensures browser renders a checkbox */
    border: 2px solid var(--primary) !important;
}

/* 5. Checkbox Layout Alignment */
/* Uses Flexbox to ensure the text sits next to the box, not under it */
div.wpforms-container-full .wpforms-field-checkbox ul,
div.wpforms-container-full .wpforms-field-checkbox li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

div.wpforms-container-full .wpforms-field-checkbox li {
    display: flex !important;
    align-items: flex-start !important;
    text-align: left !important;
}

/* Style the consent text */
div.wpforms-container-full .wpforms-field-checkbox .wpforms-field-label-inline {
    font-size: 0.9rem !important;
    color: var(--text-body) !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    display: inline-block;
}

/* 6. Button Styling */
div.wpforms-container-full .wpforms-form button[type=submit] {
    width: 100% !important;
    margin-top: 15px !important;
    background-color: var(--primary) !important;
    /* Keeps your original button styles */
}

/* ==========================================================================
   BLOG HORIZONTAL SCROLL (CARROSSEL) - BLINDADO
========================================================================== */

.blog-scroll-container {
    display: flex !important;
    flex-direction: row !important; /* Força a ficar um ao lado do outro */
    flex-wrap: nowrap !important; /* Impede totalmente de cair para a linha de baixo */
    gap: 30px;
    overflow-x: auto; /* Habilita barra de rolagem horizontal */
    padding-bottom: 20px; 
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; 
    width: 100%;
}

/* Estilizando a barra de rolagem */
.blog-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.blog-scroll-container::-webkit-scrollbar-track {
    background: rgba(85, 139, 47, 0.1); 
    border-radius: 10px;
}
.blog-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary); 
    border-radius: 10px;
}

/* Tamanho fixo dos cards */
.blog-card {
    flex: 0 0 340px !important; /* Força a largura de 340px e impede de esticar */
    max-width: 85vw; 
    scroll-snap-align: start; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
}

@media (max-width: 768px) {
    .blog-scroll-container { gap: 20px; }
    .blog-card { flex: 0 0 280px !important; }
}