/*
Theme Name: CNPJ Light
Author: Architect Senior
Description: Clean Light Mode Dashboard Theme - v4.1 (Light Version)
Version: 4.1
*/

:root {
    /* Paleta Light (Clara) */
    --bg-body: #f8fafc;        /* Fundo da página: Slate 50 */
    --bg-surface: #ffffff;     /* Fundo dos cards: Branco Puro */
    --bg-surface-hover: #f1f5f9; /* Hover: Slate 100 */
    
    --text-primary: #0f172a;   /* Texto principal: Slate 900 (Quase preto) */
    --text-secondary: #64748b; /* Texto secundário: Slate 500 (Cinza médio) */
    
    --brand-primary: #2563eb;  /* Azul mais vibrante para fundo branco */
    --brand-gradient-start: #2563eb;
    --brand-gradient-end: #0ea5e9;
    
    --accent-green: #16a34a;   /* Verde legível no branco */
    --accent-red: #dc2626;     /* Vermelho legível no branco */
    
    --border-color: #e2e8f0;   /* Bordas: Slate 200 */
    --radius-md: 16px;
    
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', sans-serif; 
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1rem;
    overflow-x: hidden;
}

a { color: var(--brand-primary); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--brand-gradient-end); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* --- HEADER --- */
.site-header {
    background: rgba(255, 255, 255, 0.9); /* Branco translúcido */
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.8rem 0;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    gap: 2rem;
    width: 100%;
}

.site-branding {
    flex-shrink: 0;
    min-width: 180px; 
    text-align: left; 
    margin-right: auto;
    display: flex;
    align-items: center;
}
.site-logo { 
    font-family: var(--font-heading); 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--brand-primary); /* Logo azul no light mode */
    text-transform: uppercase; 
    letter-spacing: -0.5px;
    text-decoration: none;
}
.custom-logo-link img { max-height: 45px; width: auto; display: block; }

.header-search-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    margin-right: auto;
}

.header-compact-search {
    position: relative;
    width: 100%;
    max-width: 500px; 
    display: flex;
    align-items: center;
}

.header-input {
    width: 100%;
    height: 42px;
    padding: 0 1.25rem;
    padding-right: 3rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: #f8fafc; 
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-sans);
    transition: all 0.3s ease;
    outline: none;
    -webkit-appearance: none;
}

.header-input:focus {
    border-color: var(--brand-primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.header-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--brand-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.header-submit:hover { background: var(--brand-gradient-end); }
.header-submit .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Espaçador (Direita) */
.header-spacer { display: none; width: 180px; flex-shrink: 0; }
@media (min-width: 992px) { .header-spacer { display: block; } }
@media (max-width: 768px) {
    .header-flex { flex-direction: column; align-items: stretch; gap: 1rem; }
    .site-branding { text-align: center; justify-content: center; min-width: auto; margin-right: 0; }
    .header-search-wrapper { order: 2; margin: 0; width: 100%; }
    .header-compact-search { max-width: 100%; }
    .header-spacer { display: none; }
}

/* --- HOME HERO --- */
.home-container { 
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 6rem 1.5rem;
    text-align: center; 
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home-title { 
    font-family: var(--font-heading); 
    font-size: 3rem; 
    font-weight: 800; 
    margin-bottom: 2rem; 
    color: var(--text-primary); 
    line-height: 1.2; 
}

.home-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: inline-block;
    font-weight: 600;
}

.big-search-form { position: relative; max-width: 640px; margin: 0 auto 5rem; width: 100%; }
.big-search-input { width: 100%; padding: 1.5rem 2.5rem; border-radius: 50px; border: 1px solid var(--border-color); background: #ffffff; color: var(--text-primary); font-size: 1.125rem; font-family: var(--font-sans); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1); transition: 0.3s; }
.big-search-input:focus { border-color: var(--brand-primary); outline: none; box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.15); }
.big-search-button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--brand-primary); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); }

/* --- GERAL --- */
.single-cnpj-wrapper { padding: 4rem 1.5rem; }
.cnpj-details-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .cnpj-details-grid { grid-template-columns: 2.5fr 1fr; align-items: start; } }

.cnpj-block { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 2.5rem; box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.04); }
.cnpj-block-header { background: #f8fafc; padding: 1.5rem 2rem; display: flex; align-items: center; border-bottom: 1px solid var(--border-color); }
.cnpj-block-header h3 { font-family: var(--font-heading); font-size: 1.125rem; color: var(--brand-primary); font-weight: 700; text-transform: uppercase; margin: 0; letter-spacing: 0.5px; }
.cnpj-block-header .dashicons { color: var(--brand-primary); margin-right: 1rem; font-size: 1.25rem; }
.cnpj-block-content { padding: 2rem; }

/* Blocks Spec */
.header-block { background: var(--bg-surface); }
.company-title { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.5rem; color: var(--text-primary); }
.company-subtitle { font-size: 1.1rem; color: var(--text-secondary); }

/* Stats Boxes no Light Mode */
.q-stat-box {
    background: #f8fafc !important; /* Override plugin default for light mode */
    border: 1px solid var(--border-color) !important;
}

/* Data Grid */
.data-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2.5rem; }
.data-item { display: flex; flex-direction: column; }
.data-label { font-size: 0.8rem; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 700; opacity: 0.8; }
.data-value { font-size: 1.125rem; color: var(--text-primary); font-weight: 500; }
.data-value-row { display: flex; align-items: center; gap: 10px; }

.copy-btn { width: 36px; height: 36px; padding: 0; border-radius: 10px; background: #f1f5f9; border: 1px solid var(--border-color); color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; flex-shrink: 0; }
.copy-btn:hover { background: #e2e8f0; color: var(--brand-primary); border-color: var(--brand-primary); }

.faq-list { display: flex; flex-direction: column; gap: 1.5rem; }
.faq-item { border-bottom: 1px solid var(--border-color); padding-bottom: 1.5rem; }
.faq-item:last-child { border-bottom: none; }
.faq-question { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; cursor: pointer; color: var(--text-primary); display: flex; justify-content: space-between; }
.faq-answer { margin-top: 1rem; color: var(--text-secondary); font-size: 1rem; line-height: 1.8; }

.site-footer { padding: 4rem 0; text-align: center; color: var(--text-secondary); border-top: 1px solid var(--border-color); margin-top: 5rem; }

/* Grid Módulos */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.module-card { background: var(--bg-surface); padding: 2.5rem; border-radius: var(--radius-md); border: 1px solid var(--border-color); text-align: center; display: flex; flex-direction: column; align-items: center; transition: 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.module-card:hover { transform: translateY(-5px); border-color: var(--brand-primary); box-shadow: 0 10px 15px rgba(0,0,0,0.1); }
.module-card .dashicons { font-size: 40px; width: 40px; height: 40px; margin-bottom: 1rem; color: var(--brand-primary); }
.module-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-primary); font-weight: 700; }
.module-card p { color: var(--text-secondary); font-size: 0.9rem; }

@media (max-width: 768px) {
    html { font-size: 15px; }
    .header-flex { flex-direction: column; gap: 1rem; }
    .site-branding { margin-right: 0; text-align: center; width: 100%; justify-content: center; }
    .home-container { padding: 4rem 1.5rem; }
    .company-header-flex { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    .big-search-input { padding: 1.2rem 1.5rem; padding-right: 4rem; }
}