/* ===================================================================== */
/*               🍳 CALCULADORA DE CONVERSÃO MEDIDAS CULINÁRIAS          */
/* ===================================================================== */

/* ===================================
   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;
}

.conversao-medidas-culinarias-calculator-section,
.conversao-medidas-culinarias-container,
.conversao-medidas-culinarias-input-row,
.conversao-medidas-culinarias-buttons,
.conversao-medidas-culinarias-examples {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   LAYOUT PRINCIPAL
   ================================== */
.conversao-medidas-culinarias-calculator-section {
    margin-bottom: 3rem;
}

.conversao-medidas-culinarias-header {
    text-align: center;
    margin-bottom: 2rem;
}

.conversao-medidas-culinarias-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;
}

.conversao-medidas-culinarias-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.conversao-medidas-culinarias-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
   ================================== */
.conversao-medidas-culinarias-dados-basicos {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.conversao-medidas-culinarias-dados-basicos h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conversao-medidas-culinarias-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.conversao-medidas-culinarias-input-group {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.conversao-medidas-culinarias-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.conversao-medidas-culinarias-input-group input,
.conversao-medidas-culinarias-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;
}

.conversao-medidas-culinarias-input-group input:focus,
.conversao-medidas-culinarias-input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.conversao-medidas-culinarias-input-group select {
    cursor: pointer;
}

/* ===================================
   BOTÕES
   ================================== */
.conversao-medidas-culinarias-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.conversao-medidas-culinarias-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: 180px;
}

.conversao-medidas-culinarias-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.4);
}

.conversao-medidas-culinarias-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;
}

.conversao-medidas-culinarias-clear:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* ===================================
   RESULTADO
   ================================== */
.conversao-medidas-culinarias-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);
    }
}

.conversao-medidas-culinarias-resultado-header h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conversao-medidas-culinarias-resultado-content {
    color: #2c3e50;
    line-height: 1.6;
}

.conversao-medidas-culinarias-resultado-content .resultado-principal {
    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-size: 1.1rem;
    font-weight: 600;
}

.conversao-medidas-culinarias-resultado-content .resultado-equivalencias {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.conversao-medidas-culinarias-resultado-content .resultado-equivalencias h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Grid de equivalências */
.equivalencias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.equivalencia-item {
    background: rgba(5, 150, 105, 0.05);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
}

.equivalencia-item:hover {
    background: rgba(5, 150, 105, 0.1);
    transform: translateY(-2px);
}

.equivalencia-item .valor {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.equivalencia-item .unidade {
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 500;
}

/* Fórmula de resultado */
.conversao-medidas-culinarias-resultado-content .resultado-formula {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.conversao-medidas-culinarias-resultado-content .resultado-formula h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.conversao-medidas-culinarias-resultado-content .resultado-formula code {
    background: rgba(245, 158, 11, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* ===================================
   EXEMPLOS
   ================================== */
.conversao-medidas-culinarias-examples {
    background: rgba(245, 158, 11, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.conversao-medidas-culinarias-examples h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.conversao-medidas-culinarias-examples-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.conversao-medidas-culinarias-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;
}

.conversao-medidas-culinarias-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 - 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 específicos - ESSENCIAL para visual bonito */
.conversao-medidas-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;
}

.conversao-medidas-content-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.conversao-medidas-content-block h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.conversao-medidas-content-block h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.conversao-medidas-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;
}

/* Novos elementos 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;
}

.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: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.application-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.application-item h4 {
    color: var(--primary);
    margin-bottom: 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) {
    .conversao-medidas-culinarias-header h1 {
        font-size: 2rem;
    }
    
    .conversao-medidas-culinarias-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .conversao-medidas-culinarias-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .conversao-medidas-culinarias-examples-buttons {
        flex-direction: column;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .equivalencias-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    .professional-tip::before {
        position: static;
        margin: 0 auto 1rem auto;
    }
    
    .detailed-info {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .conversao-medidas-culinarias-container {
        padding: 1rem;
    }
    
    .conversao-medidas-culinarias-header h1 {
        font-size: 1.8rem;
    }
    
    .conversao-medidas-content-block {
        padding: 1.5rem;
    }
    
    .application-item {
        padding: 1.5rem;
    }
    
    .equivalencias-grid {
        grid-template-columns: 1fr;
    }
    
    .professional-tip {
        padding: 1.2rem;
    }
}