/* assets/css/algebra-booleana.css */
/* CSS ISOLADO - Apenas para Calculadora de Álgebra Booleana */
/* CORES COMPUTAÇÃO APLICADAS - MANTENDO TODAS AS CLASSES FUNCIONAIS */

/* ===== VARIÁVEIS COMPUTAÇÃO ===== */
:root {
    --primary: #2d3436;          /* Preto código */
    --secondary: #00b894;        /* Verde terminal */
    --accent: #0984e3;           /* Azul digital */
    --light: #f8f9fa;            /* Fundo cinza claro */
    --gradient: linear-gradient(135deg, #2d3436, #00b894);
    
    /* Cores complementares */
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0ea5e9;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border: #d1d5db;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
}

/* ===================================
   SEÇÃO DA CALCULADORA BOOLEANA
   ================================== */
.boolean-calculator-section {
    margin-bottom: 3rem;
}

.boolean-header {
    text-align: center;
    margin-bottom: 2rem;
}

.boolean-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.boolean-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.boolean-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(45, 52, 54, 0.1);
    border: 1px solid var(--border);
}

/* ===================================
   SISTEMA DE TABS
   ================================== */
.boolean-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.boolean-tab-btn {
    background: var(--light);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.boolean-tab-btn:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.boolean-tab-btn.active {
    background: var(--primary);
    color: white;
    border-bottom: 2px solid var(--primary);
}

.boolean-tab-content {
    display: none;
}

.boolean-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ===================================
   OPERAÇÕES BÁSICAS
   ================================== */
.boolean-operation-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.boolean-input-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.boolean-input-group {
    flex: 1;
    min-width: 150px;
}

.boolean-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.boolean-input-group select,
.boolean-input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.boolean-input-group select:focus,
.boolean-input-group input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

.boolean-input-group small {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: block;
}

.boolean-calculate-btn,
.boolean-simplify-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 130px;
}

.boolean-calculate-btn {
    background: var(--gradient);
    color: white;
}

.boolean-calculate-btn:hover {
    background: linear-gradient(135deg, #00b894, #2d3436);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.boolean-simplify-btn {
    background: linear-gradient(135deg, var(--accent), #0369a1);
    color: white;
    margin-left: 0.5rem;
}

.boolean-simplify-btn:hover {
    background: linear-gradient(135deg, #0369a1, var(--accent));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.3);
}

/* ===================================
   PORTA LÓGICA VISUAL
   ================================== */
.boolean-visual-gate {
    width: 200px;
    height: 150px;
    background: linear-gradient(135deg, var(--light), rgba(0, 184, 148, 0.05));
    border: 2px solid var(--secondary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    transition: all 0.3s ease;
}

.boolean-visual-gate:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.2);
}

/* ===================================
   VARIÁVEIS DINÂMICAS
   ================================== */
.boolean-variables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

/* ===================================
   RESULTADO BOOLEANO
   ================================== */
.boolean-resultado {
    background: linear-gradient(135deg, var(--light), rgba(45, 52, 54, 0.05));
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    animation: slideInUp 0.5s ease;
}

.boolean-resultado h3 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.boolean-result-display,
.boolean-expression-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.boolean-result-expression,
.boolean-original-expr {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.boolean-result-equals {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
}

.boolean-result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    background: var(--primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    min-width: 80px;
    text-align: center;
}

.boolean-simplified-expr {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(9, 132, 227, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--accent);
    text-align: center;
    margin-top: 1rem;
}

/* ===================================
   TABELA VERDADE
   ================================== */
.boolean-truth-table {
    margin-top: 1rem;
    overflow-x: auto;
}

.boolean-truth-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.boolean-truth-table th {
    background: var(--primary);
    color: white;
    padding: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.boolean-truth-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.boolean-truth-table tr:nth-child(even) {
    background: var(--light);
}

.boolean-truth-table tr:hover {
    background: rgba(0, 184, 148, 0.05);
}

.boolean-truth-table .result-column {
    background: rgba(0, 184, 148, 0.1);
    color: var(--primary);
    font-weight: 700;
}

/* ===================================
   EXPLICAÇÃO BOOLEANA
   ================================== */
.boolean-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(9, 132, 227, 0.1), rgba(9, 132, 227, 0.05));
    border: 2px solid var(--accent);
    border-radius: 12px;
    animation: slideInUp 0.5s ease;
}

.boolean-explanation h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

/* ===================================
   CONTEÚDO EDUCACIONAL BOOLEANO
   ================================== */
.boolean-educational-content {
    margin-top: 3rem;
}

.boolean-content-block {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 15px rgba(45, 52, 54, 0.08);
    border: 1px solid var(--border);
}

.boolean-content-block h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.boolean-content-block p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Operações Básicas Grid */
.boolean-basic-operations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.boolean-operation-card {
    background: linear-gradient(135deg, var(--light), rgba(0, 184, 148, 0.05));
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.boolean-operation-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.15);
}

.boolean-gate-symbol {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.boolean-operation-card h4 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.boolean-operation-card p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.boolean-truth-mini {
    font-family: 'Courier New', monospace;
    background: var(--primary);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Aplicações Grid */
.boolean-applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.boolean-app-card {
    background: linear-gradient(135deg, rgba(9, 132, 227, 0.1), rgba(9, 132, 227, 0.05));
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.boolean-app-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 132, 227, 0.2);
}

.boolean-app-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.boolean-app-card h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.boolean-app-card p {
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Step by Step */
.boolean-step-by-step {
    margin-top: 2rem;
}

.boolean-step {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 12px;
    border-left: 4px solid var(--secondary);
}

.boolean-step-number {
    background: var(--secondary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 1rem;
    flex-shrink: 0;
}

.boolean-step-content h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.boolean-step-content p {
    color: var(--text-secondary);
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.boolean-step-content em {
    color: var(--secondary);
    font-style: italic;
}

/* Leis Grid */
.boolean-laws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.boolean-law-card {
    background: linear-gradient(135deg, rgba(45, 52, 54, 0.05), rgba(45, 52, 54, 0.02));
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.boolean-law-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 52, 54, 0.2);
}

.boolean-law-card h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.boolean-formula {
    font-family: 'Courier New', monospace;
    background: var(--primary);
    color: white;
    padding: 0.6rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.boolean-law-card p {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* ===================================
   EXEMPLOS E AJUDA
   ================================== */
.boolean-examples,
.boolean-help {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--light), var(--gray-100));
    border-radius: 15px;
    border: 1px solid var(--border);
}

.boolean-examples h2,
.boolean-help h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
}

.boolean-examples-grid,
.boolean-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.boolean-example-item {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
}

.boolean-example-item:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.boolean-example-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.boolean-example-item p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.boolean-example-btn {
    background: linear-gradient(135deg, var(--accent), #0369a1);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.boolean-example-btn:hover {
    background: linear-gradient(135deg, #0369a1, var(--accent));
    transform: translateY(-1px);
}

.boolean-help-item {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.boolean-help-item:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.boolean-help-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.boolean-help-content h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.boolean-help-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* ===================================
   FAQ, CREDIBILIDADE E REFERÊNCIAS - COMPUTAÇÃO
   ================================== */
.content-block {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 6px 25px rgba(45, 52, 54, 0.08);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.content-block:hover {
    box-shadow: 0 10px 35px rgba(45, 52, 54, 0.12);
    transform: translateY(-2px);
}

.content-block h3 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    border-bottom: 4px solid var(--primary);
    padding-bottom: 0.8rem;
    font-weight: 600;
}

/* FAQ Styles */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 20px rgba(45, 52, 54, 0.1);
}

.faq-item[open] {
    box-shadow: 0 8px 25px rgba(45, 52, 54, 0.15);
}

.faq-question {
    background: var(--primary);
    color: var(--white);
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    list-style: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question:hover {
    background: var(--secondary);
}

.faq-question::after {
    content: "▼";
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 1.5rem;
    background: var(--white);
}

.faq-answer p {
    margin: 0.8rem 0;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1rem;
}

.faq-answer p:first-child {
    margin-top: 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer strong {
    color: var(--primary);
    font-weight: 600;
}

/* Credibilidade Styles */
.credibilidade-container {
    background: linear-gradient(135deg, var(--light), rgba(45, 52, 54, 0.05));
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.credibilidade-icon {
    font-size: 2.5rem;
    color: var(--secondary);
}

.credibilidade-title {
    color: var(--primary);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
}

.credibilidade-content {
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.credibilidade-logo {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.credibilidade-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.credibilidade-badge {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(45, 52, 54, 0.2);
}

/* Referências Styles */
.referencias-container {
    margin-top: 1.5rem;
}

.referencias-lista {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.referencia-item {
    background: var(--light);
    border-left: 4px solid var(--primary);
    padding: 1.2rem 1.5rem;
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
    position: relative;
}

.referencia-item:hover {
    background: rgba(45, 52, 54, 0.08);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(45, 52, 54, 0.1);
}

.referencia-item::before {
    content: "📖";
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.referencia-item em {
    color: var(--primary);
    font-weight: 600;
}

/* ===================================
   ANIMAÇÕES
   ================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* ===================================
   RESPONSIVIDADE BOOLEANA
   ================================== */
@media (max-width: 768px) {
    .boolean-header h1 {
        font-size: 2rem;
    }
    
    .boolean-header p {
        font-size: 1rem;
    }
    
    .boolean-container {
        padding: 1.5rem;
    }
    
    .boolean-tabs {
        flex-direction: column;
    }
    
    .boolean-tab-btn {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .boolean-operation-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .boolean-input-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .boolean-input-group {
        min-width: unset;
    }
    
    .boolean-visual-gate {
        width: 100%;
        height: 120px;
    }
    
    .boolean-result-display,
    .boolean-expression-result {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .boolean-basic-operations,
    .boolean-applications-grid,
    .boolean-laws-grid {
        grid-template-columns: 1fr;
    }
    
    .boolean-examples-grid,
    .boolean-help-grid {
        grid-template-columns: 1fr;
    }
    
    .boolean-step {
        flex-direction: column;
        text-align: center;
    }
    
    .boolean-step-number {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .boolean-help-item {
        flex-direction: column;
        text-align: center;
    }
    
    .boolean-help-icon {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .boolean-truth-table {
        font-size: 0.8rem;
    }

    .content-block {
        padding: 1.5rem;
    }

    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .boolean-content-block {
        padding: 1.5rem;
    }
    
    .boolean-examples,
    .boolean-help {
        padding: 1.5rem;
    }
    
    .boolean-result-value {
        font-size: 2rem;
    }
    
    .boolean-formula {
        font-size: 0.8rem;
    }

    .content-block {
        padding: 1rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .faq-answer {
        padding: 1rem;
    }

    .credibilidade-container {
        padding: 1.5rem;
    }

    .credibilidade-badges {
        gap: 0.5rem;
    }

    .credibilidade-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}