/* ===================================================================== */
/*                🧮 CALCULADORA DE PROPORÇÃO DE INGREDIENTES            */
/* ===================================================================== */

/* ===================================
   VARIÁVEIS DE COR - ÁREA CULINÁRIA
   ================================== */
:root {
    --primary: #f59e0b;          /* Amarelo tempero */
    --secondary: #dc2626;        /* Vermelho pimenta */
    --accent: #059669;           /* Verde ervas */
    --light: #fefbf2;            /* Fundo amarelo claro */
    --gradient: linear-gradient(135deg, #f59e0b, #dc2626);
}

/* ===================================
   PREVENIR SCROLL HORIZONTAL
   ================================== */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.proporcao-ingredientes-calculator-section,
.proporcao-ingredientes-container,
.proporcao-ingredientes-input-row,
.proporcao-ingredientes-buttons,
.proporcao-ingredientes-examples {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   LAYOUT PRINCIPAL
   ================================== */
.proporcao-ingredientes-calculator-section {
    margin-bottom: 3rem;
}

.proporcao-ingredientes-header {
    text-align: center;
    margin-bottom: 2rem;
}

.proporcao-ingredientes-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-ingredientes-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.proporcao-ingredientes-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-ingredientes-dados-basicos {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.proporcao-ingredientes-dados-basicos h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proporcao-ingredientes-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.proporcao-ingredientes-input-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.proporcao-ingredientes-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.proporcao-ingredientes-input-group input,
.proporcao-ingredientes-input-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.proporcao-ingredientes-input-group input:focus,
.proporcao-ingredientes-input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.proporcao-ingredientes-unit {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.9rem;
    pointer-events: none;
}

/* ===================================
   SEÇÃO DE INGREDIENTES DINÂMICA
   ================================== */
.proporcao-ingredientes-ingredientes-container {
    margin: 1.5rem 0;
}

.proporcao-ingredientes-ingrediente-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 50px;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
    background: rgba(255, 255, 255, 0.7);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.proporcao-ingredientes-ingrediente-group {
    display: flex;
    flex-direction: column;
}

.proporcao-ingredientes-ingrediente-group label {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.proporcao-ingredientes-ingrediente-group input,
.proporcao-ingredientes-ingrediente-group select {
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
}

.proporcao-ingredientes-remove-ingrediente {
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    height: 40px;
}

.proporcao-ingredientes-remove-ingrediente:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.proporcao-ingredientes-add-ingrediente {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    margin-top: 1rem;
}

.proporcao-ingredientes-add-ingrediente:hover {
    background: #047857;
    transform: translateY(-1px);
}

/* ===================================
   BOTÕES
   ================================== */
.proporcao-ingredientes-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.proporcao-ingredientes-calculate {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
    min-width: 200px;
}

.proporcao-ingredientes-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.4);
}

.proporcao-ingredientes-clear {
    background: #6b7280;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.proporcao-ingredientes-clear:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* ===================================
   RESULTADO
   ================================== */
.proporcao-ingredientes-resultado {
    background: linear-gradient(135deg, #fff5e6, #fffbf0);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.proporcao-ingredientes-resultado-header h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proporcao-ingredientes-resultado-content {
    color: #2c3e50;
    line-height: 1.6;
}

.proporcao-ingredientes-resultado-content .resultado-header {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
}

.proporcao-ingredientes-resultado-content .ingredientes-ajustados {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.proporcao-ingredientes-resultado-content .ingrediente-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
}

.proporcao-ingredientes-resultado-content .ingrediente-item:last-child {
    border-bottom: none;
}

.proporcao-ingredientes-resultado-content .ingrediente-nome {
    font-weight: 600;
    color: var(--primary);
}

.proporcao-ingredientes-resultado-content .ingrediente-quantidade {
    color: var(--secondary);
    font-weight: 600;
}

.proporcao-ingredientes-resultado-content .fator-multiplicacao {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.proporcao-ingredientes-resultado-content .fator-multiplicacao h4 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* ===================================
   EXEMPLOS
   ================================== */
.proporcao-ingredientes-examples {
    background: rgba(245, 158, 11, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.proporcao-ingredientes-examples h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.proporcao-ingredientes-examples-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.proporcao-ingredientes-example {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.proporcao-ingredientes-example:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* ===================================
   CARDS DINÂMICOS ESPECÍFICOS PARA ADS-CORE
   ================================== */
.calc-explanation,
.explanation {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease;
}

.calc-explanation h3,
.explanation h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid var(--light);
    padding-bottom: 0.8rem;
    font-size: 1.4rem;
}

.calc-explanation h4,
.explanation h4 {
    color: var(--secondary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

.calc-explanation p,
.explanation p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.calc-legal,
.legal-explanation {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03) 0%, rgba(255, 255, 255, 0.95) 100%);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease;
}

.calc-legal h3,
.legal-explanation h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 0.8rem;
    font-size: 1.4rem;
}

.calc-legal h4,
.legal-explanation h4 {
    color: var(--primary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
}

.calc-legal p,
.legal-explanation p {
    color: #78350f;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===================================
   DADOS FORNECIDOS - DENTRO DO CARD EXPLANATION
   ================================== */
.dados-fornecidos {
    background: linear-gradient(135deg, var(--light), rgba(245, 158, 11, 0.08)) !important;
    border-radius: 12px !important;
    padding: 1.8rem !important;
    margin: 1.5rem 0 !important;
    border: 2px solid rgba(245, 158, 11, 0.2) !important;
    border-left: 5px solid var(--primary) !important;
    box-shadow: inset 0 2px 8px rgba(245, 158, 11, 0.05) !important;
}

.dados-fornecidos p {
    margin: 0.8rem 0 !important;
    color: var(--primary) !important;
    font-weight: 600 !important;
    font-size: 1.05rem !important;
    padding: 0.3rem 0 !important;
    border-bottom: 1px dotted rgba(245, 158, 11, 0.3) !important;
    display: block !important;
}

.dados-fornecidos p:last-child {
    border-bottom: none !important;
}

.dados-fornecidos strong {
    color: var(--secondary) !important;
    font-weight: 700 !important;
}

/* ===================================
   FÓRMULAS DESTACADAS (PARA CARDS DINÂMICOS)
   ================================== */
.calc-explanation .formula-highlight,
.calc-legal .formula-highlight,
.explanation .formula-highlight,
.legal-explanation .formula-highlight {
    background: linear-gradient(135deg, var(--light) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.calc-explanation .formula-highlight::before,
.calc-legal .formula-highlight::before,
.explanation .formula-highlight::before,
.legal-explanation .formula-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ===================================
   CONTEÚDO EDUCACIONAL - CLASSES ESPECÍFICAS
   ================================== */
.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 específicos - EVITA DETECÇÃO PELOS ADS */
.proporcao-ingredientes-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;
}

.proporcao-ingredientes-content-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.proporcao-ingredientes-content-block h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proporcao-ingredientes-content-block h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.proporcao-ingredientes-content-block p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ===================================
   ELEMENTOS VISUAIS ESPECIAIS
   ================================== */
/* Destaque de fórmulas */
.formula-highlight {
    background: linear-gradient(135deg, var(--light) 0%, rgba(245, 158, 11, 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(245, 158, 11, 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(245, 158, 11, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.example-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.15);
}

.example-item h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.example-calculation {
    background: var(--light);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.example-calculation p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

/* Lista de dicas */
.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 0 6px 6px 0;
}

/* Elementos especiais dos cards expandidos */
.professional-tip {
    background: linear-gradient(135deg, var(--accent) 0%, rgba(5, 150, 105, 0.8) 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    position: relative;
}

.professional-tip::before {
    content: '🏆';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 2rem;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.professional-tip h4 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    color: white !important;
}

.professional-tip p {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 500;
}

.detailed-info {
    background: rgba(245, 158, 11, 0.05);
    border-left: 3px solid var(--primary);
    border-radius: 0 8px 8px 0;
    padding: 1.2rem;
    margin-top: 1rem;
}

.detailed-info p {
    margin-bottom: 0.8rem;
}

.detailed-info p:last-child {
    margin-bottom: 0;
}

.importance-note {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(245, 158, 11, 0.05));
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.importance-note h4 {
    color: var(--secondary);
    margin-bottom: 1rem;
}

.importance-note p {
    color: #721c24;
    font-weight: 500;
}

/* Grid de aplicações */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.application-item {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(5, 150, 105, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    height: fit-content;
}

.application-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.2);
    border-color: var(--primary);
}

.application-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0.5rem;
}

.application-item > p {
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* Lista de referências */
.references-list {
    background: rgba(245, 158, 11, 0.03);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.references-list li {
    margin-bottom: 0.8rem;
    color: #4b5563;
}

.accuracy-note {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1.2rem;
    margin-top: 1rem;
}

.accuracy-note h5 {
    color: #92400e;
    margin-bottom: 0.8rem;
}

.accuracy-note p {
    color: #78350f;
    font-size: 0.9rem;
    margin: 0;
}

/* ===================================
   RESPONSIVIDADE
   ================================== */
@media (max-width: 768px) {
    .proporcao-ingredientes-header h1 {
        font-size: 2rem;
    }
    
    .proporcao-ingredientes-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .proporcao-ingredientes-ingrediente-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .proporcao-ingredientes-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .proporcao-ingredientes-examples-buttons {
        flex-direction: column;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .professional-tip::before {
        position: static;
        margin: 0 auto 1rem auto;
    }
    
    .detailed-info {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .proporcao-ingredientes-container {
        padding: 1rem;
    }
    
    .proporcao-ingredientes-header h1 {
        font-size: 1.8rem;
    }
    
    .proporcao-ingredientes-content-block {
        padding: 1.5rem;
    }
    
    .application-item {
        padding: 1.5rem;
    }
    
    .professional-tip {
        padding: 1.2rem;
    }
    
    .proporcao-ingredientes-ingrediente-row {
        padding: 0.8rem;
    }
}