/* assets/css/emprestimo.css */
/* CSS ISOLADO - Apenas para Calculadora de Empréstimo */
/* CORES MATEMÁTICA FINANCEIRA APLICADAS */

/* ===================================
   SEÇÃO DA CALCULADORA EMPRÉSTIMO
   ================================== */
.emprestimo-calculator-section {
    margin-bottom: 3rem;
}

.emprestimo-header {
    text-align: center;
    margin-bottom: 2rem;
}

.emprestimo-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.emprestimo-header p {
    color: #5a6c7d;
    font-size: 1.1rem;
}

.emprestimo-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;
}

/* ===================================
   INPUTS DO EMPRÉSTIMO
   ================================== */
.emprestimo-input-section {
    margin-bottom: 2rem;
}

.emprestimo-input-section h3 {
    color: #34495e;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.emprestimo-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.emprestimo-input-group {
    flex: 1;
}

.emprestimo-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.emprestimo-input-group label i {
    margin-right: 0.3rem;
}

.emprestimo-input-group input,
.emprestimo-input-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.emprestimo-input-group input:focus,
.emprestimo-input-group select:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.emprestimo-input-group small {
    display: block;
    margin-top: 0.3rem;
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* ===================================
   OPÇÕES ADICIONAIS EMPRÉSTIMO
   ================================== */
.emprestimo-opcoes {
    background: #e8f5e8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #27ae60;
}

.emprestimo-opcoes h4 {
    color: #27ae60;
    margin-bottom: 1rem;
}

.emprestimo-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.emprestimo-checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emprestimo-checkbox-group label:hover {
    color: #27ae60;
}

.emprestimo-checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* ===================================
   BOTÃO CALCULAR EMPRÉSTIMO
   ================================== */
.emprestimo-calculate-section {
    text-align: center;
    margin: 2rem 0;
}

.emprestimo-calculate-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.emprestimo-calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.emprestimo-calculate-btn:active {
    transform: translateY(-1px);
}

/* ===================================
   RESULTADO DO EMPRÉSTIMO
   ================================== */
.emprestimo-resultado {
    background: #e8f5e8;
    border: 2px solid #27ae60;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    animation: slideInUp 0.5s ease;
}

.emprestimo-resultado h3 {
    color: #27ae60;
    margin-bottom: 1.5rem;
    text-align: center;
}

.emprestimo-resultado-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.emprestimo-resultado-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #27ae60;
    transition: all 0.3s ease;
}

.emprestimo-resultado-card.simples {
    border-left: 4px solid #4caf50;
}

.emprestimo-resultado-card.compostos {
    border-left: 4px solid #ff9800;
}

.emprestimo-resultado-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.emprestimo-resultado-card h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.emprestimo-resultado-card.simples h4 {
    color: #4caf50;
}

.emprestimo-resultado-card.compostos h4 {
    color: #ff9800;
}

.emprestimo-valor-principal {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.emprestimo-valor-secundario {
    font-size: 1.1rem;
    color: #5a6c7d;
    margin: 0.3rem 0;
}

/* ===================================
   CET - CUSTO EFETIVO TOTAL
   ================================== */
.emprestimo-cet {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    animation: slideInUp 0.5s ease;
}

.emprestimo-cet h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.emprestimo-cet-valor {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0;
}

.emprestimo-cet-descricao {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ===================================
   CRONOGRAMA DE PAGAMENTOS
   ================================== */
.emprestimo-cronograma {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.emprestimo-cronograma thead {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.emprestimo-cronograma th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.emprestimo-cronograma td {
    padding: 0.8rem;
    border-bottom: 1px solid #ecf0f1;
}

.emprestimo-cronograma tbody tr:hover {
    background: #e8f5e8;
}

.emprestimo-cronograma tbody tr:nth-child(even) {
    background: #f5f7fa;
}

/* ===================================
   EXPLICAÇÃO DO EMPRÉSTIMO
   ================================== */
.emprestimo-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e8f5e9;
    border: 2px solid #4caf50;
    border-radius: 12px;
    animation: slideInUp 0.5s ease;
}

.emprestimo-explanation h3 {
    color: #2e7d32;
    margin-bottom: 1rem;
}

.emprestimo-explanation-step {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid #4caf50;
}

.emprestimo-explanation-step h4 {
    color: #388e3c;
    margin-bottom: 0.5rem;
}

.emprestimo-explanation-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

/* ===================================
   AVISO LEGAL EMPRÉSTIMO
   ================================== */
.emprestimo-aviso-legal {
    background: #fff3cd;
    border: 2px solid #f1c40f;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    animation: slideInUp 0.5s ease;
}

.emprestimo-aviso-legal h4 {
    color: #856404;
    margin-bottom: 1rem;
}

.emprestimo-aviso-legal p {
    color: #856404;
    margin: 0.5rem 0;
    line-height: 1.6;
}

/* ===================================
   COMPARAÇÃO JUROS
   ================================== */
.emprestimo-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.emprestimo-comparison-card {
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.emprestimo-comparison-card.simples {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.emprestimo-comparison-card.compostos {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

.emprestimo-comparison-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.emprestimo-comparison-card h3 {
    margin-bottom: 1rem;
}

.emprestimo-comparison-card.simples h3 {
    color: #2e7d32;
}

.emprestimo-comparison-card.compostos h3 {
    color: #ef6c00;
}

.emprestimo-comparison-card .formula {
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    margin: 1rem 0;
    text-align: center;
}

.emprestimo-comparison-card ul {
    list-style: none;
    padding: 0;
}

.emprestimo-comparison-card li {
    padding: 0.5rem 0;
}

/* ===================================
   INFO CARDS IOF E CET
   ================================== */
.emprestimo-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.emprestimo-info-card {
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.emprestimo-info-card.iof {
    background: #e3f2fd;
    border: 2px solid #2196f3;
}

.emprestimo-info-card.cet {
    background: #e8f5e8;
    border: 2px solid #27ae60;
}

.emprestimo-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.emprestimo-info-card h3 {
    margin-bottom: 1rem;
}

.emprestimo-info-card.iof h3 {
    color: #1976d2;
}

.emprestimo-info-card.cet h3 {
    color: #27ae60;
}

/* ===================================
   EXEMPLOS E AJUDA EMPRÉSTIMO
   ================================== */
.emprestimo-examples {
    text-align: center;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.emprestimo-examples.hidden {
    display: none;
}

.emprestimo-examples p {
    margin-bottom: 1rem;
    color: #5a6c7d;
}

.emprestimo-example-btn {
    background: #e8f5e8;
    border: 2px solid #27ae60;
    color: #27ae60;
    padding: 0.6rem 1.2rem;
    margin: 0.3rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.emprestimo-example-btn:hover {
    background: #27ae60;
    color: white;
    transform: translateY(-2px);
}

.emprestimo-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 8px;
    border: 1px solid #27ae60;
    transition: all 0.3s ease;
}

.emprestimo-help.hidden {
    display: none;
}

/* ===================================
   CONTEÚDO EDUCACIONAL EMPRÉSTIMO
   ================================== */
.emprestimo-educational-content {
    margin-top: 3rem;
}

.emprestimo-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;
}

.emprestimo-content-block h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #27ae60;
    padding-bottom: 0.5rem;
}

.emprestimo-content-block p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #34495e;
}

/* Exemplo Detalhado */
.emprestimo-example-detail {
    background: #e8f5e8;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #27ae60;
}

.emprestimo-example-detail h4 {
    color: #27ae60;
    margin-bottom: 1rem;
}

.emprestimo-example-detail ul {
    list-style: none;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.emprestimo-example-detail li {
    padding: 0.3rem 0;
}

.emprestimo-example-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.result-simples,
.result-compostos {
    padding: 1rem;
    border-radius: 8px;
}

.result-simples {
    background: #e8f5e9;
    border: 1px solid #4caf50;
}

.result-compostos {
    background: #fff3e0;
    border: 1px solid #ff9800;
}

.result-simples h5 {
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.result-compostos h5 {
    color: #ef6c00;
    margin-bottom: 0.5rem;
}

.emprestimo-example-conclusion {
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 1.2rem;
    color: #c62828;
}

/* Dicas Grid */
.emprestimo-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.emprestimo-tip {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e6ed;
    transition: all 0.3s ease;
}

.emprestimo-tip:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background: #e8f5e8;
    border-color: #27ae60;
}

.emprestimo-tip i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.emprestimo-tip h4 {
    color: #27ae60;
    margin-bottom: 0.5rem;
}

/* Alertas Grid */
.emprestimo-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.emprestimo-alert {
    padding: 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.emprestimo-alert.danger {
    background: #ffebee;
    border: 2px solid #f44336;
}

.emprestimo-alert.warning {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

.emprestimo-alert.success {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.emprestimo-alert:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.emprestimo-alert.danger h4 {
    color: #c62828;
    margin-bottom: 1rem;
}

.emprestimo-alert.warning h4 {
    color: #ef6c00;
    margin-bottom: 1rem;
}

.emprestimo-alert.success h4 {
    color: #2e7d32;
    margin-bottom: 1rem;
}

.emprestimo-alert ul {
    list-style: none;
    padding-left: 1rem;
}

.emprestimo-alert li {
    padding: 0.3rem 0;
}

/* ===================================
   FAQ, REFERÊNCIAS E CREDIBILIDADE
   ================================== */

/* Containers dos novos elementos */
.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;
}

.content-block h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #27ae60;
    padding-bottom: 0.5rem;
}

/* FAQ Específico */
.faq-container {
    margin-top: 1rem;
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    background: #e8f5e8;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #27ae60;
    border: none;
    list-style: none;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #27ae60;
    color: white;
}

.faq-question::marker {
    display: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-answer {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e0e6ed;
}

.faq-answer p {
    margin: 0.8rem 0;
    line-height: 1.6;
    color: #444;
}

.faq-answer strong {
    color: #27ae60;
}

/* Referências Específicas */
.referencias-container {
    margin-top: 1rem;
}

.referencias-lista {
    list-style: none;
    padding: 0;
}

.referencia-item {
    background: #e8f5e8;
    margin-bottom: 0.8rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
    transition: all 0.3s ease;
}

.referencia-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.1);
}

.referencia-item em {
    color: #27ae60;
    font-style: italic;
}

/* Credibilidade Específica */
.credibilidade-container {
    background: linear-gradient(135deg, #e8f5e8, #ffffff);
    border: 2px solid #27ae60;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.credibilidade-icon {
    font-size: 2rem;
    color: #27ae60;
}

.credibilidade-title {
    color: #27ae60;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.credibilidade-content {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.1rem;
    line-height: 1.6;
}

.credibilidade-logo {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1em;
}

.credibilidade-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.credibilidade-badge {
    background: #27ae60;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.credibilidade-badge:hover {
    background: #2ecc71;
    transform: translateY(-2px);
}

/* ===================================
   ANIMAÇÕES EMPRÉSTIMO
   ================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVIDADE EMPRÉSTIMO
   ================================== */
@media (max-width: 1024px) {
    .emprestimo-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .emprestimo-comparison-grid,
    .emprestimo-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .emprestimo-header h1 {
        font-size: 2rem;
    }
    
    .emprestimo-container {
        padding: 1rem;
    }
    
    .emprestimo-resultado-grid {
        grid-template-columns: 1fr;
    }
    
    .emprestimo-example-results {
        grid-template-columns: 1fr;
    }
    
    .emprestimo-tips-grid,
    .emprestimo-alert-grid {
        grid-template-columns: 1fr;
    }
    
    .emprestimo-calculate-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .emprestimo-cet-valor {
        font-size: 2rem;
    }

    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .emprestimo-header h1 {
        font-size: 1.5rem;
    }
    
    .emprestimo-valor-principal {
        font-size: 1.5rem;
    }
    
    .emprestimo-cronograma {
        font-size: 0.85rem;
    }
    
    .emprestimo-cronograma th,
    .emprestimo-cronograma td {
        padding: 0.5rem;
    }

    .content-block {
        padding: 1.5rem;
    }

    .faq-question {
        padding: 0.8rem 1rem;
    }

    .faq-answer {
        padding: 1rem;
    }

    .credibilidade-container {
        padding: 1.5rem;
    }
}

/* ===================================
   SOBRESCREVER CSS BASE - TÍTULO
   ================================== */
/* Regra específica para sobrescrever o CSS base que usa !important */

/* Estratégia 1: Maior especificidade */
.main-container .content section.emprestimo-calculator-section .emprestimo-header h1 {
    color: #27ae60 !important;
    font-weight: 700 !important;
    text-shadow: 0 2px 4px rgba(39, 174, 96, 0.2) !important;
}

/* Estratégia 2: Sobrescrever a variável CSS no contexto específico */
.emprestimo-calculator-section {
    --primary: #27ae60;
    --primary-financeiro: #27ae60;
}