/* assets/css/fracoes.css */
/* CSS ISOLADO - Apenas para Calculadora de Frações */

/* ===================================
   SEÇÃO DA CALCULADORA FRAÇÕES
   ================================== */
.fracoes-calculator-section {
    margin-bottom: 3rem;
}

.fracoes-header {
    text-align: center;
    margin-bottom: 2rem;
}

.fracoes-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.fracoes-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
}

.fracoes-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;
}

.fracoes-inputs h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ===================================
   SISTEMA DE ABAS ESPECÍFICO FRAÇÕES
   ================================== */
.fracoes-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e6ed;
    padding-bottom: 1rem;
}

.fracoes-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: 110px;
}

.fracoes-tab-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.fracoes-tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #764ba2;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* ===================================
   CONTEÚDO DAS ABAS FRAÇÕES
   ================================== */
.fracoes-tab-content {
    display: none;
}

.fracoes-tab-content.active {
    display: block;
    animation: fadeInFracaoTab 0.3s ease;
}

@keyframes fadeInFracaoTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   REPRESENTAÇÃO VISUAL DAS FRAÇÕES
   ================================== */
.fracoes-visual {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9ff;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
}

.fracoes-visual-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.fracoes-circles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.fracoes-circle-row {
    display: flex;
    gap: 3px;
    justify-content: center;
}

.fracoes-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #667eea;
    background: white;
    transition: all 0.3s ease;
}

.fracoes-circle.filled {
    background: #667eea;
}

.fracoes-circle.active {
    background: #28a745;
    border-color: #28a745;
    transform: scale(1.1);
}

.fracoes-operation {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
    text-align: center;
}

.fracoes-decimal-display {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #155724;
    min-width: 80px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

/* ===================================
   INPUTS HORIZONTAIS FRAÇÕES
   ================================== */
.fracoes-inputs-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 2px solid #e0e6ed;
}

.fracoes-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.8rem;
    background: #f8f9ff;
    border-radius: 8px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
    min-width: 80px;
}

.fracoes-input-group:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.fracoes-input-group input {
    width: 60px;
    padding: 0.5rem;
    border: 2px solid #667eea;
    border-radius: 6px;
    font-size: 1.1rem;
    text-align: center;
    font-weight: 600;
    background: white;
    transition: all 0.3s ease;
}

.fracoes-input-group input:focus {
    outline: none;
    border-color: #764ba2;
    transform: scale(1.05);
    background: #f8f9ff;
}

.fracoes-input-group input:valid:not(:placeholder-shown) {
    border-color: #28a745;
    background: #f8fff8;
}

.fracoes-divisor {
    width: 40px;
    height: 2px;
    background: #667eea;
    margin: 2px 0;
}

.fracoes-operation-symbol {
    font-size: 1.8rem;
    font-weight: bold;
    color: #667eea;
    min-width: 40px;
    text-align: center;
    padding: 0.5rem;
}

/* ===================================
   RESULTADO DISPLAY FRAÇÕES
   ================================== */
.fracoes-result-display {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 80px;
    transition: all 0.3s ease;
}

.fracoes-result-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

.fracoes-result-fraction {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.fracoes-result-fraction span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #155724;
    font-family: 'Courier New', monospace;
}

.fracoes-decimal-result {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.fracoes-decimal-result span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #155724;
    font-family: 'Courier New', monospace;
}

.fracoes-percentage {
    font-size: 0.9rem;
    color: #155724;
    font-style: italic;
}

/* ===================================
   EXEMPLOS E AJUDA FRAÇÕES
   ================================== */
.fracoes-examples {
    text-align: center;
    margin: 1.5rem 0;
}

.fracoes-examples p {
    margin-bottom: 1rem;
    color: #5a6c7d;
}

.fracoes-example-btn {
    background: #f8f9ff;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
}

.fracoes-example-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.fracoes-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

/* ===================================
   EXPLICAÇÃO DO CÁLCULO
   ================================== */
.fracoes-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 12px;
}

.fracoes-explanation h3 {
    color: #667eea;
    margin-bottom: 1rem;
    text-align: center;
}

.fracoes-step {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.fracoes-step h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.fracoes-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

/* ===================================
   CONTEÚDO EDUCACIONAL FRAÇÕES
   ================================== */
.fracoes-educational-content {
    margin-top: 3rem;
}

.fracoes-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;
}

.fracoes-content-block h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.fracoes-content-block p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.fracoes-content-block strong {
    color: #667eea;
}

/* ===================================
   FORMULA DISPLAY FRAÇÕES
   ================================== */
.fracoes-formula-display {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.fracoes-formula-display h4 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.fracoes-formula-display .formula p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.1rem;
}

/* ===================================
   GRIDS OPERAÇÕES E DICAS
   ================================== */
.fracoes-operations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fracoes-operation-item {
    background: #f8f9ff;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.fracoes-operation-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.fracoes-operation-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.fracoes-operation-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.fracoes-operation-item p {
    color: #5a6c7d;
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.fracoes-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.fracoes-tip-item {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.fracoes-tip-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fracoes-tip-item h4 {
    color: #856404;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.fracoes-tip-item p {
    color: #856404;
    margin: 0;
    font-size: 0.95rem;
}

/* ===================================
   EXEMPLO DE SOLUÇÃO FRAÇÕES
   ================================== */
.fracoes-example-solution {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.fracoes-example-solution h4 {
    color: #667eea;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.fracoes-solution-step {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.fracoes-solution-step h5 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.fracoes-solution-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

.fracoes-solution-final {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.fracoes-solution-final h5 {
    color: #155724;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.fracoes-solution-final p {
    color: #155724;
    margin: 0;
    font-family: inherit;
}

/* ===================================
   FAQ, REFERÊNCIAS E CREDIBILIDADE
   ================================== */

/* FAQ Container */
.faq-container {
    margin-top: 0;
}

.faq-container h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.faq-item {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.faq-question {
    background: #f8f9ff;
    color: #667eea;
    padding: 1.2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    padding-right: 3rem;
}

.faq-question:hover {
    background: #667eea;
    color: white;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 1.2rem 1.2rem 1.2rem;
    background: white;
}

.faq-answer p {
    margin: 0.8rem 0;
    color: #444;
    line-height: 1.6;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Referências Container */
.referencias-container {
    background: white;
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
}

.referencias-titulo {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.referencias-content {
    color: #444;
}

.referencias-intro {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #5a6c7d;
}

.referencias-lista {
    list-style: none;
    padding: 0;
    margin: 0;
}

.referencia-item {
    background: #f8f9ff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.referencia-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.referencia-item strong {
    color: #667eea;
    font-weight: 600;
}

.referencias-observacao {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #856404;
    text-align: center;
    font-style: italic;
}

/* Credibilidade Container */
.credibilidade-container {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.credibilidade-icon {
    font-size: 2.5rem;
    color: #667eea;
}

.credibilidade-title {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.credibilidade-content {
    color: #444;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.credibilidade-logo {
    color: #667eea;
    font-weight: bold;
    font-size: 1.2rem;
}

.credibilidade-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.credibilidade-badge {
    background: white;
    color: #667eea;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 2px solid #667eea;
    transition: all 0.3s ease;
}

.credibilidade-badge:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* ===================================
   RESPONSIVIDADE FRAÇÕES
   ================================== */
@media (max-width: 768px) {
    .fracoes-header h1 {
        font-size: 2rem;
    }
    
    .fracoes-tabs {
        gap: 0.3rem;
    }
    
    .fracoes-tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 90px;
    }
    
    .fracoes-inputs-horizontal {
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .fracoes-input-group {
        padding: 0.5rem;
        min-width: 70px;
    }
    
    .fracoes-input-group input {
        width: 50px;
        font-size: 1rem;
    }
    
    .fracoes-operation-symbol {
        font-size: 1.5rem;
        min-width: 30px;
    }
    
    .fracoes-visual-item {
        gap: 0.5rem;
    }
    
    .fracoes-circle {
        width: 16px;
        height: 16px;
    }
    
    .fracoes-operations-grid,
    .fracoes-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .fracoes-header h1 {
        font-size: 1.8rem;
    }
    
    .fracoes-container {
        padding: 1rem;
    }
    
    .fracoes-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .fracoes-tab-btn {
        width: 160px;
    }
    
    .fracoes-inputs-horizontal {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .fracoes-visual {
        padding: 1rem;
    }
    
    .fracoes-visual-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .fracoes-input-group input {
        width: 45px;
        padding: 0.4rem;
    }
    
    .fracoes-result-display,
    .fracoes-decimal-result {
        min-width: 70px;
        padding: 0.8rem;
    }
    
    .credibilidade-container,
    .referencias-container {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .credibilidade-title {
        font-size: 1.2rem;
    }
    
    .credibilidade-icon {
        font-size: 2rem;
    }
    
    .faq-question {
        padding: 1rem;
        padding-right: 2.5rem;
        font-size: 0.95rem;
    }
    
    .faq-answer {
        padding: 0 1rem 1rem 1rem;
    }
}