/* =========================================
   RESET & VARIÁVEIS
   ========================================= */
:root {
    /* PALETA DE IDENTIDADE (CMYK + TECH) */
    --cmyk-cyan: #00B4D8;     /* Ciano moderno */
    --cmyk-magenta: #E11D48;  /* Magenta */
    --cmyk-yellow: #F59E0B;   /* Amarelo */
    --cmyk-key: #0F172A;      /* Preto Técnico */
    
    /* Variáveis Funcionais */
    --primary: var(--cmyk-cyan);
    --bg-body: #F1F5F9;
    --bg-sidebar: #0F172A;
    --text-sidebar: #E2E8F0;
    --bg-card: #FFFFFF;
    --text-main: #1E293B;
    --text-light: #64748B;
    
    /* Dimensões */
    --sidebar-width: 260px;
    
    /* Efeitos */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-active: 0 0 15px rgba(0, 180, 216, 0.4);
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3 { font-family: 'Poppins', sans-serif; }

/* =========================================
   LAYOUT DASHBOARD
   ========================================= */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1E293B;
    z-index: 50;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    text-align: center;
}

.logo-img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #334155;
    font-size: 0.75rem;
    color: #94A3B8;
    text-align: center;
}

/* --- ÁREA PRINCIPAL --- */
.main-content {
    flex-grow: 1;
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
    overflow-y: auto;
    width: 100%; 
    overflow-x: hidden; 
}

/* --- BANNER SLIDESHOW --- */
.banner-container {
    width: 100%;
    height: 300px; /* Altura padrão para Desktop */
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: #000;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Botões de Navegação */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    z-index: 10;
    padding: 15px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.banner-container:hover .slider-btn {
    opacity: 1;
}

.slider-btn i {
    font-size: 48px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

.slider-btn:hover {
    color: var(--cmyk-cyan);
    transform: translateY(-50%) scale(1.2);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }


/* --- NAVEGAÇÃO (Abas) --- */
.nav-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.nav-btn {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    padding: 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.nav-btn span {
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}

.nav-btn i { font-size: 24px; }

.nav-btn:hover {
    transform: translateY(-2px);
    border-color: var(--cmyk-cyan);
    color: var(--cmyk-cyan);
}

.nav-btn.active {
    background: var(--cmyk-cyan);
    color: white;
    border-color: var(--cmyk-cyan);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0%; height: 3px;
    background: white;
    transition: var(--transition);
}
.nav-btn.active::after { width: 100%; }

/* --- CONTEÚDO DAS ABAS --- */
.content-area {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-card);
    min-height: 400px;
    animation: fadeIn 0.4s ease-out forwards;
    border-top: 4px solid var(--cmyk-cyan);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Grid Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    background: #FFFFFF;
    padding: 25px;
    border-radius: var(--radius-md);
    border: 1px solid #E2E8F0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--cmyk-yellow);
    opacity: 0.5;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
    border-color: var(--cmyk-cyan);
}

.card:hover::before {
    background: var(--cmyk-magenta);
    opacity: 1;
}

.card h3 { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 12px;
    font-size: 1.1rem;
    color: var(--cmyk-key);
}

/* --- ESTILOS EXTRAS PARA ABA 3 (COMO PEDIR) --- */

/* 1. Mantra Box Compacto (Instruções) */
.mantra-box.compact {
    background: #FFFBEB;
    border: 1px dashed var(--cmyk-yellow); /* Borda mais fina */
    padding: 15px; /* Menos padding */
    border-radius: var(--radius-md);
    text-align: left; /* Alinhado à esquerda para leitura rápida */
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mantra-icon {
    font-size: 24px;
    color: var(--cmyk-yellow);
    flex-shrink: 0;
    margin-top: 2px;
}

.mantra-content h3 {
    font-size: 1rem;
    color: #B45309;
    margin-bottom: 5px;
}

.mantra-content p {
    font-size: 0.85rem;
    color: #92400E;
    line-height: 1.4;
}

.step-list-compact {
    list-style: none;
    margin-top: 10px;
    padding-left: 0;
}

.step-list-compact li {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.step-list-compact li::before {
    content: '•';
    color: var(--cmyk-magenta);
    font-weight: bold;
}


/* 2. Seletor de Templates (Radio Buttons Estilizados) */
.template-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.radio-label {
    flex: 1;
    min-width: 140px;
    cursor: pointer;
    position: relative;
}

.radio-label input {
    display: none; /* Esconde o radio nativo */
}

.radio-btn-face {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    text-align: center;
}

/* Estado Selecionado */
.radio-label input:checked + .radio-btn-face {
    background: var(--cmyk-cyan);
    color: white;
    border-color: var(--cmyk-cyan);
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
}

.radio-label:hover .radio-btn-face {
    border-color: var(--cmyk-cyan);
    color: var(--cmyk-cyan);
}

.radio-label input:checked + .radio-btn-face:hover {
    color: white;
}


/* 3. Área de Texto Editável */
.editable-box {
    position: relative;
    margin-bottom: 40px;
}

.custom-textarea {
    width: 100%;
    height: 220px;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-md);
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-main);
    resize: none; /* Impede redimensionar manual que quebra layout */
    outline: none;
    transition: var(--transition);
    line-height: 1.5;
}

.custom-textarea:focus {
    border-color: var(--cmyk-cyan);
    background: white;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.copy-btn-floating {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--cmyk-key);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    z-index: 10;
}

.copy-btn-floating:hover {
    background: var(--cmyk-cyan);
    transform: translateY(-2px);
}


/* FAQ (Accordion) */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

details.faq-item {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

details.faq-item[open] {
    border-color: var(--cmyk-cyan);
    box-shadow: var(--shadow-card);
}

summary.faq-question {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-main);
    list-style: none; /* Remove triângulo padrão */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

summary.faq-question::-webkit-details-marker {
    display: none; /* Remove triângulo no Chrome/Safari */
}

summary.faq-question:hover {
    background: #F8FAFC;
    color: var(--cmyk-cyan);
}

.faq-answer {
    padding: 0 20px 20px 20px;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px solid #F1F5F9;
    margin-top: 10px; /* Espaço entre pergunta e resposta */
    padding-top: 15px;
    animation: fadeIn 0.3s ease;
}

/* Ícone de seta personalizado via CSS */
summary.faq-question::after {
    content: '\002B'; /* Símbolo de + */
    font-size: 1.2rem;
    color: var(--cmyk-cyan);
    transition: transform 0.3s;
}

details.faq-item[open] summary.faq-question::after {
    content: '\2212'; /* Símbolo de - */
    transform: rotate(180deg);
    color: var(--cmyk-magenta);
}

/* Botão WhatsApp */
.cta-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    padding: 16px 30px;
    border-radius: 50px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    z-index: 100;
    font-family: 'Poppins', sans-serif;
}
.cta-float:hover { 
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.6);
}

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
    .app-layout { flex-direction: column; }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 15px 20px;
    }

    .logo-container { 
        margin-bottom: 0; 
        flex-direction: row; 
        gap: 0; 
        text-align: center; 
        width: 100%;
        justify-content: center;
    }
    
    .logo-img { 
        max-width: 90px;
        margin-bottom: 0; 
    }
    
    .sidebar-footer { display: none; }

    /* --- RODAPÉ MOBILE (Injetado via CSS) --- */
    .main-content::after {
        content: "\00A9 2024 Davim Studio \A Mecânica | Multimídia";
        white-space: pre-wrap; 
        display: block;
        text-align: center;
        margin-top: 40px;
        padding-top: 20px;
        border-top: 1px solid #E2E8F0;
        color: var(--text-light);
        font-size: 0.75rem;
        width: 100%;
        line-height: 1.5;
    }
    
    /* Ajuste de Padding para Mobile */
    .main-content {
        padding: 20px;
    }

    /* CORREÇÃO DO BANNER NO MOBILE */
    .banner-container {
        height: 180px; 
        border-radius: var(--radius-md);
        margin-bottom: 20px;
    }
    
    /* CORREÇÃO DOS BOTÕES DO SLIDER NO MOBILE */
    .slider-btn {
        opacity: 1; /* Sempre visível no mobile */
        padding: 5px;
    }
    .slider-btn i {
        font-size: 32px; 
    }

    .nav-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .nav-btn { flex-direction: column; text-align: center; }
    
    .content-area {
        padding: 20px;
    }
}