/* assets/css/polinomios.css */
/* CSS ISOLADO - Apenas para Calculadora de Polinômios */

/* ===================================
   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;
}

.poly-calculator-section,
.poly-container,
.poly-input-row,
.poly-examples {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===================================
   SEÇÃO DA CALCULADORA POLINÔMIOS
   ================================== */
.poly-calculator-section {
    margin-bottom: 3rem;
}

.poly-header {
    text-align: center;
    margin-bottom: 2rem;
}

.poly-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;
}

.poly-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.poly-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%;
}

.poly-inputs h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ===================================
   SISTEMA DE ABAS ESPECÍFICO POLY
   ================================== */
.poly-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e6ed;
    padding-bottom: 1rem;
}

.poly-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;
}

.poly-tab-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.poly-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 POLY
   ================================== */
.poly-tab-content {
    display: none;
}

.poly-tab-content.active {
    display: block;
    animation: fadeInPolyTab 0.3s ease;
}

@keyframes fadeInPolyTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   INPUTS DE POLINÔMIOS
   ================================== */
.poly-operation-input,
.poly-division-input,
.poly-roots-input,
.poly-factorization-input,
.poly-derivative-input,
.poly-evaluation-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;
}

.poly-operation-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.poly-operation-selector label {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.poly-operation-selector select {
    padding: 0.8rem;
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-weight: 600;
    background: white;
    color: var(--secondary);
    min-width: 150px;
}

.poly-input-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.poly-input-section h4 {
    color: var(--primary);
    text-align: center;
    margin: 0;
    font-size: 1.1rem;
}

.poly-input-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 10px;
    border: 2px solid var(--primary);
}

.poly-input-row input {
    width: 60px;
    padding: 0.6rem;
    border: 2px solid var(--primary);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
}

.poly-input-row 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);
}

.poly-input-row input:valid:not(:placeholder-shown) {
    border-color: var(--secondary);
    background: #ede7f6;
}

.poly-term {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1rem;
    font-style: italic;
    min-width: 30px;
    text-align: center;
}

.poly-op {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}

/* ===================================
   AVALIAÇÃO ESPECÍFICA
   ================================== */
.poly-evaluation-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: #fff3e0;
    border-radius: 8px;
    border: 2px solid #ff9800;
}

.poly-evaluation-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.poly-evaluation-input-group label {
    font-weight: 600;
    color: #f57c00;
}

.poly-evaluation-input-group input {
    width: 80px;
    padding: 0.6rem;
    border: 2px solid #ff9800;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

/* ===================================
   RESULTADO DISPLAY POLY
   ================================== */
.poly-result-display {
    background: var(--light);
    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;
}

.poly-result-display:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.poly-result-display.wide {
    min-width: 300px;
    padding: 1rem;
}

.poly-result-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
}

.poly-result-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4a148c;
    font-family: 'Courier New', monospace;
    text-align: center;
}

/* ===================================
   RESULTADOS ESPECÍFICOS POLY
   ================================== */
.poly-division-result,
.poly-roots-result,
.poly-factorization-result,
.poly-derivative-result,
.poly-evaluation-result {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
}

.poly-division-item,
.poly-roots-item,
.poly-factorization-item,
.poly-derivative-item,
.poly-evaluation-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;
}

.poly-division-item:hover,
.poly-roots-item:hover,
.poly-factorization-item:hover,
.poly-derivative-item:hover,
.poly-evaluation-item:hover {
    transform: translateX(3px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.15);
}

.poly-division-label,
.poly-roots-label,
.poly-factorization-label,
.poly-derivative-label,
.poly-evaluation-label {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}

.poly-division-value,
.poly-roots-value,
.poly-factorization-value,
.poly-derivative-value,
.poly-evaluation-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #4a148c;
    font-family: 'Courier New', monospace;
}

/* ===================================
   FÓRMULA ESPECÍFICA POLY
   ================================== */
.poly-formula {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: #4a148c;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ===================================
   EXEMPLOS E AJUDA POLY
   ================================== */
.poly-examples {
    text-align: center;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.poly-examples.hidden {
    display: none;
}

.poly-examples p {
    margin-bottom: 1rem;
    color: #5a6c7d;
}

.poly-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;
}

.poly-example-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.poly-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    transition: all 0.3s ease;
}

.poly-help.hidden {
    display: none;
}

/* ===================================
   EXPLICAÇÃO DO CÁLCULO POLY
   ================================== */
.poly-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    animation: slideInUpPoly 0.5s ease;
}

.poly-explanation h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: center;
}

.poly-step {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.poly-step h4 {
    color: #4a148c;
    margin-bottom: 0.5rem;
}

.poly-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

/* ===================================
   CONTEÚDO EDUCACIONAL POLY
   ================================== */
.poly-educational-content {
    margin-top: 3rem;
}

.poly-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;
}

.poly-content-block h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.5rem;
}

.poly-content-block h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.poly-content-block p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.poly-content-block strong {
    color: var(--primary);
}

/* ===================================
   FORMULA DISPLAY POLY
   ================================== */
.poly-formula-display {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.poly-formula-display h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.poly-formula-display .formula p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #4a148c;
    font-weight: 600;
}

/* ===================================
   GRIDS EXEMPLOS E DICAS POLY
   ================================== */
.poly-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.poly-example-item {
    background: var(--light);
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUpPoly 0.6s ease-out;
}

.poly-example-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.poly-example-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.poly-example-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.poly-example-item p {
    color: #5a6c7d;
    font-size: 0.95rem;
    margin: 0;
}

.poly-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.poly-tip-item {
    background: #ede7f6;
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.poly-tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.poly-tip-item h4 {
    color: #4a148c;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.poly-tip-item p {
    color: #4a148c;
    margin: 0;
    font-size: 0.95rem;
}

/* ===================================
   EXEMPLO DE SOLUÇÃO POLY
   ================================== */
.poly-example-solution {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.poly-example-solution h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.poly-solution-step {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.poly-solution-step h5 {
    color: #4a148c;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.poly-solution-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

.poly-solution-final {
    background: #ede7f6;
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.poly-solution-final h5 {
    color: #4a148c;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.poly-solution-final p {
    color: #4a148c;
    margin: 0;
    font-family: inherit;
}

/* ===================================
   FAQ ESPECÍFICA MATEMÁTICA
   ================================== */
.faq-container {
    margin-top: 1.5rem;
}

.faq-item {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.faq-question {
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    background: var(--light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #ede7f6;
    color: var(--secondary);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    margin: 0;
    color: #444;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===================================
   CREDIBILIDADE MATEMÁTICA
   ================================== */
.credibilidade-container {
    background: var(--light);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.credibilidade-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.credibilidade-title {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.credibilidade-content {
    color: #444;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.credibilidade-logo {
    font-weight: 700;
    color: var(--secondary);
}

.credibilidade-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.credibilidade-badge {
    background: white;
    color: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--primary);
}

/* ===================================
   ANIMAÇÕES POLY
   ================================== */
@keyframes fadeInUpPoly {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUpPoly {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVIDADE POLY
   ================================== */
@media (max-width: 768px) {
    .poly-header h1 {
        font-size: 2rem;
    }
    
    .poly-tabs {
        gap: 0.3rem;
    }
    
    .poly-tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 85px;
    }
    
    .poly-input-row {
        gap: 0.5rem;
        padding: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .poly-input-row input {
        width: 50px;
        font-size: 0.9rem;
    }
    
    .poly-term,
    .poly-op {
        font-size: 1rem;
    }
    
    .poly-result-display {
        min-width: 180px;
        padding: 1.2rem;
    }
    
    .poly-result-display.wide {
        min-width: 250px;
    }
    
    .poly-examples-grid,
    .poly-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .poly-division-item,
    .poly-roots-item,
    .poly-factorization-item,
    .poly-derivative-item,
    .poly-evaluation-item {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .poly-operation-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .poly-evaluation-controls {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    
    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .poly-header h1 {
        font-size: 1.8rem;
    }
    
    .poly-container {
        padding: 1rem;
    }
    
    .poly-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .poly-tab-btn {
        width: 140px;
    }
    
    .poly-input-row {
        gap: 0.4rem;
        padding: 0.8rem;
    }
    
    .poly-input-row input {
        width: 45px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .poly-term,
    .poly-op {
        font-size: 0.9rem;
    }
    
    .poly-result-display {
        min-width: 160px;
        padding: 1rem;
    }
    
    .poly-result-display.wide {
        min-width: 200px;
    }
    
    .poly-result-value {
        font-size: 1.1rem;
    }
    
    .poly-example-icon {
        font-size: 2rem;
    }
    
    .poly-division-value,
    .poly-roots-value,
    .poly-factorization-value,
    .poly-derivative-value,
    .poly-evaluation-value {
        font-size: 1rem;
    }
}

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 */
}
