/* ===================================================================== */
/*                    🏛️ CALCULADORA DE PROPORÇÃO DE ESPAÇOS             */
/* ===================================================================== */

/* ===================================
   VARIÁVEIS DE COR - ÁREA ARQUITETURA
   ================================== */
:root {
    --primary: #78716c;          /* Cinza estrutura */
    --secondary: #a3a3a3;        /* Prata material */
    --accent: #f59e0b;           /* Dourado detalhes */
    --light: #f8f7f4;            /* Fundo bege claro */
    --gradient: linear-gradient(135deg, #78716c, #a3a3a3);
    --warning: #f59e0b;          /* Amarelo para avisos */
    --success: #22c55e;          /* Verde para ótimo */
    --danger: #dc2626;           /* Vermelho para problemas */
}

/* ===================================
   PREVENIR SCROLL HORIZONTAL
   ================================== */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.proporcao-espacos-calculator-section,
.proporcao-espacos-container,
.proporcao-espacos-input-row,
.proporcao-espacos-buttons,
.proporcao-espacos-examples {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   LAYOUT PRINCIPAL
   ================================== */
.proporcao-espacos-calculator-section {
    margin-bottom: 3rem;
}

.proporcao-espacos-header {
    text-align: center;
    margin-bottom: 2rem;
}

.proporcao-espacos-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.proporcao-espacos-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.proporcao-espacos-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e6ed;
    overflow-x: hidden;
    max-width: 100%;
}

/* ===================================
   INPUTS E FORMULÁRIOS
   ================================== */
.proporcao-espacos-dados-basicos {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.proporcao-espacos-dados-basicos h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proporcao-espacos-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.proporcao-espacos-input-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.proporcao-espacos-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.proporcao-espacos-input-group input,
.proporcao-espacos-input-group select {
    width: 100%;
    padding: 0.8rem;
    padding-right: 3rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.proporcao-espacos-input-group input:focus,
.proporcao-espacos-input-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(163, 163, 163, 0.1);
}

.proporcao-espacos-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-weight: 600;
    pointer-events: none;
    margin-top: 0.75rem;
}

/* ===================================
   BOTÕES
   ================================== */
.proporcao-espacos-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.proporcao-espacos-calculate-btn {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.proporcao-espacos-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(120, 113, 108, 0.3);
}

.proporcao-espacos-clear-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.proporcao-espacos-clear-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ===================================
   BOTÕES DE EXEMPLOS
   ================================== */
.proporcao-espacos-examples {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.proporcao-espacos-example-btn {
    background: rgba(163, 163, 163, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(163, 163, 163, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.proporcao-espacos-example-btn:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-1px);
}

/* ===================================
   RESULTADO PRINCIPAL EM CARD
   ================================== */
.proporcao-espacos-result {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--accent);
    animation: fadeIn 0.8s ease;
}

.proporcao-espacos-result h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.8rem;
}

.proporcao-espacos-resultado {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--accent);
    animation: fadeIn 0.8s ease;
}

.proporcao-espacos-resultado h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.8rem;
}

.proporcao-espacos-resultado .resultado-status {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border-left: 5px solid;
}

.proporcao-espacos-resultado .resultado-perfeita {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border-left-color: var(--success);
}

.proporcao-espacos-resultado .resultado-boa {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-left-color: var(--accent);
}

.proporcao-espacos-resultado .resultado-regular {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border-left-color: var(--warning);
}

.proporcao-espacos-resultado .resultado-desproporcional {
    background: rgba(220, 38, 38, 0.1);
    color: var(--danger);
    border-left-color: var(--danger);
}

/* ===================================
   CARDS DINÂMICOS PARA ADS
   ================================== */
.calc-explanation,
.explanation {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--secondary);
    animation: fadeIn 0.8s ease;
}

.calc-explanation h3,
.explanation h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid var(--light);
    padding-bottom: 0.8rem;
}

.calc-explanation h4,
.explanation h4 {
    color: var(--secondary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.5rem;
}

.calc-explanation p,
.explanation p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.calc-legal,
.legal-explanation {
    background: rgba(120, 113, 108, 0.03);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(120, 113, 108, 0.2);
    animation: fadeIn 0.8s ease;
}

.calc-legal h3,
.legal-explanation h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid rgba(120, 113, 108, 0.1);
    padding-bottom: 0.8rem;
}

.calc-legal h4,
.legal-explanation h4 {
    color: var(--primary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
    border-bottom: 2px solid rgba(120, 113, 108, 0.1);
    padding-bottom: 0.5rem;
}

.calc-legal p,
.legal-explanation p {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===================================
   DADOS FORNECIDOS E FÓRMULAS
   ================================== */
.dados-fornecidos {
    background: linear-gradient(135deg, var(--light), rgba(120, 113, 108, 0.08));
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary);
}

.dados-fornecidos p {
    margin: 0.4rem 0;
    color: var(--primary);
    font-weight: 500;
}

.dados-fornecidos strong {
    color: var(--primary);
}

/* ===================================
   ANIMAÇÕES
   ================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   CONTEÚDO EDUCACIONAL - VISUAL OBRIGATÓRIO
   ================================== */
/* Container educacional principal */
.educational-content {
    margin-top: 3rem;
}

.educational-content h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1rem;
}

/* Cards educacionais - ESSENCIAL para visual bonito */
.content-block {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
}

.content-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.content-block h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-block h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.content-block p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===================================
   ELEMENTOS VISUAIS ESPECIAIS
   ================================== */
/* Grid de tipos de proporção */
.proporcion-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.proportion-type {
    background: linear-gradient(135deg, var(--light) 0%, rgba(120, 113, 108, 0.05) 100%);
    border: 1px solid var(--primary);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.proportion-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
}

.proportion-type:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(120, 113, 108, 0.15);
}

.type-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.type-ratio {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.85rem;
}

.type-header strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.proportion-type p {
    color: #5a6c7d;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
}

/* Destaque de fórmulas */
.formula-highlight {
    background: linear-gradient(135deg, var(--light) 0%, rgba(120, 113, 108, 0.08) 100%);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}

.formula-main {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.formula-highlight p {
    color: var(--secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Passos numerados */
.steps-list {
    margin: 1.5rem 0;
}

.step-item {
    background: rgba(120, 113, 108, 0.05);
    border-left: 4px solid var(--primary);
    padding: 1.2rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}

.step-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* Grid de exemplos */
.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.example-item {
    background: rgba(120, 113, 108, 0.03);
    border: 1px solid rgba(120, 113, 108, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.example-item:hover {
    transform: translateY(-2px);
}

.example-calculation {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    border: 1px solid #e0e6ed;
}

.example-calculation p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

/* Lista de dicas estilizada */
.tips-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tips-list li {
    background: rgba(120, 113, 108, 0.05);
    border: 1px solid rgba(120, 113, 108, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
}

.tips-list li:hover {
    background: rgba(120, 113, 108, 0.08);
    transform: translateX(5px);
}

/* Grid de aplicações */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.application-item {
    background: linear-gradient(135deg, var(--light) 0%, rgba(120, 113, 108, 0.08) 100%);
    border: 1px solid var(--primary);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.application-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

.application-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(120, 113, 108, 0.15);
}

.application-item h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Referências */
.references-content {
    margin: 1.5rem 0;
}

.references-list {
    list-style: none;
    padding: 0;
}

.references-list li {
    background: rgba(120, 113, 108, 0.03);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.references-list em {
    color: var(--primary);
    font-weight: 600;
}

.accuracy-note {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.2rem;
    margin-top: 2rem;
}

.accuracy-note h5 {
    color: #856404;
    margin-bottom: 0.8rem;
}

.accuracy-note p {
    color: #856404;
    margin: 0;
    line-height: 1.6;
}

/* ===================================
   FAQ STYLING
   ================================== */
.faq-container {
    margin-top: 1.5rem;
}

.faq-item {
    background: white;
    border: 1px solid rgba(120, 113, 108, 0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(120, 113, 108, 0.1);
}

.faq-question {
    background: var(--light);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    border: none;
    outline: none;
    transition: background-color 0.3s ease;
    font-size: 1rem;
}

.faq-question:hover {
    background: rgba(120, 113, 108, 0.08);
}

.faq-answer {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid rgba(120, 113, 108, 0.1);
}

.faq-answer p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

/* ===================================
   CREDIBILIDADE STYLING
   ================================== */
.credibilidade-container {
    border: 2px solid var(--primary);
    border-radius: 15px;
    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;
    filter: drop-shadow(0 2px 4px rgba(120, 113, 108, 0.3));
}

.credibilidade-title {
    color: var(--primary);
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.credibilidade-content {
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.credibilidade-logo {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.2rem;
}

.credibilidade-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.credibilidade-badge {
    background: rgba(120, 113, 108, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(120, 113, 108, 0.2);
}

/* ===================================
   HELP
   ================================== */
.proporcao-espacos-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.proporcao-espacos-help p {
    margin: 0;
    color: #856404;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===================================
   RESPONSIVIDADE
   ================================== */
@media (max-width: 768px) {
    .proporcao-espacos-header h1 {
        font-size: 2rem;
    }
    
    .proporcao-espacos-container {
        padding: 1.5rem;
    }
    
    .proporcao-espacos-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .proporcao-espacos-input-group {
        min-width: 100%;
    }
    
    .proporcao-espacos-buttons,
    .proporcao-espacos-examples {
        flex-direction: column;
        align-items: center;
    }
    
    .proporcao-espacos-calculate-btn,
    .proporcao-espacos-clear-btn,
    .proporcao-espacos-example-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
    
    .proporcion-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .content-block {
        padding: 1.5rem;
    }
    
    .educational-content h2 {
        font-size: 1.5rem;
    }
    
    .calc-explanation,
    .explanation,
    .calc-legal,
    .legal-explanation {
        padding: 1.5rem;
    }
    
    .proporcao-espacos-result {
        padding: 1.5rem;
    }
    
    .credibilidade-container {
        padding: 1.5rem;
    }
    
    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .credibilidade-badge {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .proporcao-espacos-header h1 {
        font-size: 1.8rem;
    }
    
    .proporcao-espacos-container {
        padding: 1rem;
    }
    
    .proporcion-types-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    
    .proportion-type {
        padding: 1rem;
    }
    
    .type-header {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .credibilidade-title {
        font-size: 1.2rem;
    }
    
    .credibilidade-content {
        font-size: 1rem;
    }
}