/* assets/css/funcao-quadratica.css */
/* CSS ISOLADO - Apenas para Calculadora de Função Quadrática */

/* ===================================
   VARIÁVEIS DE COR - ÁREA MATEMÁTICA
   ================================== */
:root {
    --primary: #667eea;        /* Azul lógico */
    --secondary: #764ba2;      /* Roxo precisão */
    --accent: #f093fb;         /* Rosa suave */
    --light: #f8f9ff;          /* Fundo azul claro */
    --gradient: linear-gradient(135deg, #667eea, #764ba2);
    --danger: #dc2626;         /* Vermelho para avisos */
    --warning: #f59e0b;        /* Amarelo para atenção */
    --success: #22c55e;        /* Verde para sucesso */
}

/* ===================================
   PREVENIR SCROLL HORIZONTAL
   ================================== */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.quad-calculator-section,
.quad-container,
.quad-input-row,
.quad-buttons,
.quad-examples {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   SEÇÃO DA CALCULADORA FUNÇÃO QUADRÁTICA
   ================================== */
.quad-calculator-section {
    margin-bottom: 3rem;
}

.quad-header {
    text-align: center;
    margin-bottom: 2rem;
}

.quad-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;
}

.quad-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.quad-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%;
}

.quad-inputs h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ===================================
   SISTEMA DE ABAS ESPECÍFICO QUAD
   ================================== */
.quad-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e6ed;
    padding-bottom: 1rem;
}

.quad-tab-btn {
    background: #f8f9fa;
    border: 2px solid #e0e6ed;
    color: #5a6c7d;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 100px;
}

.quad-tab-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quad-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--secondary);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* ===================================
   CONTEÚDO DAS ABAS QUAD
   ================================== */
.quad-tab-content {
    display: none;
}

.quad-tab-content.active {
    display: block;
    animation: fadeInQuadTab 0.3s ease;
}

@keyframes fadeInQuadTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   DISPLAY DA FUNÇÃO QUADRÁTICA
   ================================== */
.quad-function-input,
.quad-problem-input {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
}

.quad-function-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 12px;
    border: 2px solid var(--primary);
}

.quad-function-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary);
    min-width: 60px;
}

.quad-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
    min-width: 70px;
}

.quad-input-group:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quad-input-group label {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.8rem;
    text-align: center;
}

.quad-input-group input {
    width: 60px;
    padding: 0.6rem;
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
}

.quad-input-group input:focus {
    outline: none;
    border-color: var(--secondary);
    transform: scale(1.05);
    background: var(--light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.quad-input-group input:valid:not(:placeholder-shown) {
    border-color: var(--secondary);
    background: #ede7f6;
}

.quad-operation-symbol {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    min-width: 30px;
    text-align: center;
    padding: 0.3rem;
}

/* ===================================
   RESULTADO DISPLAY QUAD
   ================================== */
.quad-result-display {
    background: #ede7f6;
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.quad-result-display:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.quad-result-display.wide {
    min-width: 300px;
    padding: 1rem;
}

/* ===================================
   RESULTADOS ESPECÍFICOS QUAD
   ================================== */
.quad-roots-result,
.quad-vertex-result,
.quad-discriminant-result,
.quad-graph-result,
.quad-factored-result,
.quad-problem-result {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.quad-root-item,
.quad-vertex-item,
.quad-discriminant-item,
.quad-graph-item,
.quad-factored-item,
.quad-problem-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--primary);
    transition: all 0.3s ease;
}

.quad-root-item:hover,
.quad-vertex-item:hover,
.quad-discriminant-item:hover,
.quad-graph-item:hover,
.quad-factored-item:hover,
.quad-problem-item:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.15);
}

.quad-root-label,
.quad-vertex-label,
.quad-discriminant-label,
.quad-graph-label,
.quad-factored-label,
.quad-problem-label {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.quad-root-value,
.quad-vertex-value,
.quad-discriminant-value,
.quad-graph-value,
.quad-factored-value,
.quad-problem-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary);
    font-family: 'Courier New', monospace;
}

/* ===================================
   PROBLEMA PRÁTICO QUAD
   ================================== */
.quad-problem-text {
    background: #e8f5e8;
    padding: 1.5rem;
    border-radius: 10px;
    border: 2px solid #4caf50;
    text-align: center;
    margin-bottom: 1rem;
}

.quad-problem-text h4 {
    color: #2e7d32;
    margin-bottom: 1rem;
}

.quad-problem-text p {
    color: #388e3c;
    margin: 0;
    font-weight: 600;
}

/* ===================================
   FÓRMULA ESPECÍFICA QUAD
   ================================== */
.quad-formula {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ===================================
   EXEMPLOS E AJUDA QUAD
   ================================== */
.quad-examples {
    text-align: center;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.quad-examples.hidden {
    display: none;
}

.quad-examples p {
    margin-bottom: 1rem;
    color: #5a6c7d;
}

.quad-example-btn {
    background: var(--light);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.quad-example-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.quad-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    transition: all 0.3s ease;
}

.quad-help.hidden {
    display: none;
}

/* ===================================
   EXPLICAÇÃO DO CÁLCULO QUAD
   ================================== */
.quad-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    animation: slideInUpQuad 0.5s ease;
}

.quad-explanation h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.quad-step {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.quad-step h4 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.quad-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

/* ===================================
   CONTEÚDO EDUCACIONAL QUAD
   ================================== */
.quad-educational-content {
    margin-top: 3rem;
}

.quad-content-block {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ed;
}

.quad-content-block h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.5rem;
}

h2{

  /* Alinhamento e Cor */
  text-align: center;
  color: aliceblue; /* Azul primário do Bootstrap */
  
  /* Tipografia */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 2.25rem; /* Tamanho do título */
  font-weight: 700; /* Negrito */
  
  /* Espaçamento */
  margin-bottom: 1.5rem; /* Espaço abaixo do título */
}


.quad-content-block p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.quad-content-block strong {
    color: var(--primary);
}

/* ===================================
   FORMULA DISPLAY QUAD
   ================================== */
.quad-formula-display {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.quad-formula-display h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.quad-formula-display .formula p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: var(--secondary);
    font-weight: 600;
}

/* ===================================
   GRIDS EXEMPLOS E DICAS QUAD
   ================================== */
.quad-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.quad-example-item {
    background: var(--light);
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUpQuad 0.6s ease-out;
}

.quad-example-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.quad-example-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.quad-example-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.quad-example-item p {
    color: #5a6c7d;
    font-size: 0.95rem;
    margin: 0;
}

.quad-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.quad-tip-item {
    background: #ede7f6;
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.quad-tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quad-tip-item h4 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.quad-tip-item p {
    color: var(--secondary);
    margin: 0;
    font-size: 0.95rem;
}

/* ===================================
   EXEMPLO DE SOLUÇÃO QUAD
   ================================== */
.quad-example-solution {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.quad-example-solution h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.quad-solution-step {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.quad-solution-step h5 {
    color: var(--secondary);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.quad-solution-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

.quad-solution-final {
    background: #ede7f6;
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.quad-solution-final h5 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.quad-solution-final p {
    color: var(--secondary);
    margin: 0;
    font-family: inherit;
}/* ===================================
   ANIMAÇÕES QUAD
   ================================== */
@keyframes fadeInUpQuad {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUpQuad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVIDADE QUAD
   ================================== */
@media (max-width: 768px) {
    .quad-header h1 {
        font-size: 2rem;
    }
    
    .quad-tabs {
        gap: 0.3rem;
    }
    
    .quad-tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 85px;
    }
    
    .quad-function-display {
        gap: 0.8rem;
        padding: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .quad-function-text {
        font-size: 1.5rem;
    }
    
    .quad-input-group {
        padding: 0.6rem;
        min-width: 60px;
    }
    
    .quad-input-group input {
        width: 50px;
        font-size: 0.9rem;
    }
    
    .quad-operation-symbol {
        font-size: 1.3rem;
        min-width: 25px;
    }
    
    .quad-result-display {
        min-width: 180px;
        padding: 1.2rem;
    }
    
    .quad-result-display.wide {
        min-width: 250px;
    }
    
    .quad-examples-grid,
    .quad-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .quad-root-item,
    .quad-vertex-item,
    .quad-discriminant-item,
    .quad-graph-item,
    .quad-factored-item,
    .quad-problem-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .quad-header h1 {
        font-size: 1.8rem;
    }
    
    .quad-container {
        padding: 1rem;
    }
    
    .quad-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .quad-tab-btn {
        width: 140px;
    }
    
    .quad-function-display {
        gap: 0.6rem;
        padding: 0.8rem;
    }
    
    .quad-function-text {
        font-size: 1.3rem;
    }
    
    .quad-input-group {
        min-width: 50px;
        padding: 0.5rem;
    }
    
    .quad-input-group input {
        width: 45px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .quad-operation-symbol {
        font-size: 1.1rem;
    }
    
    .quad-result-display {
        min-width: 160px;
        padding: 1rem;
    }
    
    .quad-result-display.wide {
        min-width: 200px;
    }
    
    .quad-example-icon {
        font-size: 2rem;
    }
    
    .quad-problem-text {
        padding: 1rem;
    }
    
    .quad-root-value,
    .quad-vertex-value,
    .quad-discriminant-value,
    .quad-graph-value,
    .quad-factored-value,
    .quad-problem-value {
        font-size: 1rem;
    }
}