/* assets/css/estequiometria.css */
/* CALCULADORA DE ESTEQUIOMETRIA - CLASSES ESPECÍFICAS ISOLADAS */

/* ===================================
   CORREÇÃO BARRA HORIZONTAL
   ================================== */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.estequiometria-calculator-section,
.estequiometria-container,
.estequiometria-inputs,
.content {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   CONTAINER PRINCIPAL DA CALCULADORA
   ================================== */
.estequiometria-calculator-section {
    margin-bottom: 2rem;
}

.estequiometria-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.estequiometria-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.estequiometria-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===================================
   CONTAINER DE INPUTS
   ================================== */
.estequiometria-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.estequiometria-inputs h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* ===================================
   DADOS BÁSICOS DA ESTEQUIOMETRIA
   ================================== */
.estequiometria-dados-basicos {
    margin-bottom: 2rem;
}

.estequiometria-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.estequiometria-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.estequiometria-input-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===================================
   INPUTS ESPECÍFICOS DE SUBSTÂNCIAS
   ================================== */
.estequiometria-substance-input {
    display: flex;
    gap: 0.5rem;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.estequiometria-substance-input:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.estequiometria-substance-input input:first-child {
    flex: 2;
    padding: 0.8rem;
    border: none;
    font-size: 1rem;
    background: transparent;
    outline: none;
    font-weight: 600;
    color: #2c3e50;
}

.estequiometria-substance-input input:last-child {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-left: 1px solid #e0e6ed;
    background: #f8f9fa;
    font-size: 0.9rem;
    outline: none;
    text-align: center;
}

/* ===================================
   INPUTS DE NÚMEROS
   ================================== */
.estequiometria-number-input {
    display: flex;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.estequiometria-number-input:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.estequiometria-number-input input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    font-size: 1rem;
    background: transparent;
    outline: none;
}

.estequiometria-number-input select {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-left: 1px solid #e0e6ed;
    background: #f8f9fa;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
}

.estequiometria-number-input .unit-label {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background: #f8f9fa;
    border-left: 1px solid #e0e6ed;
    font-size: 0.9rem;
    color: #5a6c7d;
    font-weight: 600;
}

/* ===================================
   BOTÃO CALCULAR
   ================================== */
.estequiometria-calculate-section {
    text-align: center;
    margin: 2rem 0;
}

.estequiometria-calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    min-width: 250px;
}

.estequiometria-calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.estequiometria-calculate-btn:active {
    transform: translateY(0);
}

/* ===================================
   ÁREA DE RESULTADO
   ================================== */
.estequiometria-resultado {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 2px solid #667eea;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.estequiometria-resultado h3 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.estequiometria-resultado-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* ===================================
   RESULTADO PRINCIPAL
   ================================== */
.estequiometria-resultado-principal {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.estequiometria-resultado-principal h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.estequiometria-valor-principal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.estequiometria-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.estequiometria-unit {
    font-size: 1.2rem;
    color: #5a6c7d;
    font-weight: 600;
}

.estequiometria-formula {
    color: #5a6c7d;
    font-style: italic;
}

/* ===================================
   DETALHAMENTO DOS VALORES
   ================================== */
.estequiometria-detalhamento {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.estequiometria-detalhamento h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.estequiometria-item-grid {
    display: grid;
    gap: 0.5rem;
}

.estequiometria-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
}

.estequiometria-item-label {
    color: #2c3e50;
    font-weight: 500;
}

.estequiometria-item-value {
    color: #667eea;
    font-weight: 600;
}

/* ===================================
   BOTÃO LIMPAR
   ================================== */
.estequiometria-clear-btn {
    background: #f8f9fa;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.estequiometria-clear-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* ===================================
   EXPLICAÇÃO DETALHADA
   ================================== */
.estequiometria-detailed-explanation {
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 15px;
    padding: 2rem;
    margin: 1.5rem 0;
    animation: slideIn 0.5s ease-out;
}

.estequiometria-detailed-explanation h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.estequiometria-calculation-steps {
    display: grid;
    gap: 1rem;
}

.estequiometria-step {
    padding: 1rem;
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    border-radius: 5px;
}

.estequiometria-step h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.estequiometria-step p {
    color: #5a6c7d;
    margin: 0;
    line-height: 1.5;
}

/* ===================================
   FUNDAMENTAÇÃO TEÓRICA
   ================================== */
.estequiometria-theoretical-foundation {
    background: #f8f9ff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.estequiometria-theoretical-foundation h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.theory-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.theory-highlight p {
    margin: 0.5rem 0;
    color: white;
}

/* ===================================
   AVISO LEGAL (APÓS RESULTADO)
   ================================== */
.estequiometria-legal-disclaimer {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    animation: slideIn 0.5s ease-out;
}

.estequiometria-legal-disclaimer h4 {
    color: #856404;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.estequiometria-legal-disclaimer p {
    color: #856404;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    text-align: center;
}

/* ===================================
   EXEMPLOS RÁPIDOS
   ================================== */
.estequiometria-examples-section {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.estequiometria-examples-section h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.estequiometria-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.estequiometria-example-btn {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    color: #667eea;
    border: 2px solid #e0e6ed;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
}

.estequiometria-example-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

/* ===================================
   CONTEÚDO EDUCACIONAL
   ================================== */
.educational-content {
    margin-top: 3rem;
}

.educational-content h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 1rem;
}

.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;
}

.content-block h3 {
    color: #667eea;
    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;
}

.content-block ul {
    color: #5a6c7d;
    line-height: 1.6;
    padding-left: 1.5rem;
}

.content-block li {
    margin-bottom: 0.5rem;
}

/* ===================================
   FÓRMULAS E DESTAQUES
   ================================== */
.formula-highlight {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    margin: 1.5rem 0;
}

.formula-main {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.formulas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.formula-item {
    background: #f8f9ff;
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.formula-item h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
    margin: 0;
}

/* ===================================
   DADOS FORNECIDOS (SEM BOLINHAS)
   ================================== */
.dados-fornecidos p {
    margin: 0.3rem 0;
    padding-left: 1rem;
    color: #2c3e50;
    font-weight: 500;
}

/* ===================================
   EXEMPLOS PRÁTICOS
   ================================== */
.example-item {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    border-radius: 0 10px 10px 0;
    padding: 1.5rem;
    margin: 1rem 0;
}

.example-calculation {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #e0e6ed;
}

.example-calculation p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* ===================================
   DICAS E LISTAS
   ================================== */
.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    background: #f8f9ff;
    border-left: 4px solid #667eea;
    border-radius: 0 8px 8px 0;
    padding: 0.8rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

.tips-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.1);
}

/* ===================================
   APLICAÇÕES
   ================================== */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.application-item {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 1px solid #e0e6ed;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.application-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
}

.application-item h4 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* ===================================
   REFERÊNCIAS
   ================================== */
.references-list {
    list-style: none;
    padding: 0;
}

.references-list li {
    background: #f8f9fa;
    border-left: 3px solid #667eea;
    border-radius: 0 5px 5px 0;
    padding: 0.8rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* ===================================
   ESTADOS DE ERRO/VALIDAÇÃO
   ================================== */
.estequiometria-input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.estequiometria-error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ===================================
   RESPONSIVIDADE CORRIGIDA
   ================================== */
@media (max-width: 768px) {
    /* Previne scroll horizontal em mobile */
    body {
        overflow-x: hidden;
    }
    
    .main-container {
        overflow-x: hidden;
    }
    
    .estequiometria-header h1 {
        font-size: 2rem;
    }
    
    .estequiometria-header p {
        font-size: 1rem;
    }
    
    .estequiometria-input-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .estequiometria-resultado-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .estequiometria-examples-grid {
        grid-template-columns: 1fr;
    }
    
    .formulas-grid {
        grid-template-columns: 1fr;
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
    
    .estequiometria-container {
        padding: 1rem;
        margin: 0;
    }
    
    .content-block {
        padding: 1.5rem;
        margin: 0 0 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .estequiometria-header {
        padding: 1.5rem;
    }
    
    .estequiometria-header h1 {
        font-size: 1.8rem;
    }
    
    .estequiometria-value {
        font-size: 1.5rem;
    }
    
    .estequiometria-calculate-btn {
        padding: 0.8rem 1.5rem;
        min-width: 200px;
        font-size: 1rem;
    }
}

/* ===================================
   ANIMAÇÕES E TRANSIÇÕES
   ================================== */
.estequiometria-container,
.content-block,
.estequiometria-examples-section {
    transition: all 0.3s ease;
}

.estequiometria-container:hover,
.content-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Classe para esconder elementos */
.hidden {
    display: none !important;
}