/* assets/css/ir-investimentos-detalhado.css */
/* CSS ISOLADO - Apenas para Calculadora de IR sobre Investimentos */
/* CORES FINANCEIRO: Verde dinheiro + dourado riqueza */

/* ===================================
   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.ir-calculator-section .ir-header h1 {
    color: #27ae60 !important; /* Verde dinheiro */
    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 */
.ir-calculator-section {
    --primary: #27ae60; /* Verde dinheiro */
    --primary-financeiro: #27ae60;
}

/* ===================================
   SEÇÃO DA CALCULADORA IR INVESTIMENTOS
   ================================== */
.ir-calculator-section {
    margin-bottom: 3rem;
}

.ir-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ir-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.ir-header p {
    font-size: 1.2rem;
    color: #5a6c7d;
}

.ir-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;
}

.ir-inputs h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* ===================================
   SISTEMA DE ABAS IR INVESTIMENTOS - FINANCEIRO
   ================================== */
.ir-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e6ed;
    padding-bottom: 1rem;
}

.ir-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;
}

.ir-tab-btn:hover {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    border-color: #27ae60;
    transform: translateY(-2px);
}

.ir-tab-btn.active {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    border-color: #2ecc71; /* Verde crescimento */
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

/* ===================================
   CONTEÚDO DAS ABAS IR - FINANCEIRO
   ================================== */
.ir-tab-content {
    display: none;
}

.ir-tab-content.active {
    display: block;
    animation: fadeInIrTab 0.3s ease;
}

@keyframes fadeInIrTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   DADOS DO INVESTIMENTO - FINANCEIRO
   ================================== */
.ir-dados-investimento {
    background: #e8f5e8; /* Verde claro financeiro */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ir-input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.ir-input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ir-input-group label {
    font-weight: 600;
    color: #27ae60; /* Verde dinheiro */
    font-size: 0.95rem;
}

.ir-input-group input,
.ir-input-group select {
    padding: 0.8rem;
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.ir-input-group input:focus,
.ir-input-group select:focus {
    outline: none;
    border-color: #2ecc71; /* Verde crescimento */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.ir-money-input {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ir-money-input:focus-within {
    border-color: #2ecc71; /* Verde crescimento */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.ir-money-input span {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    padding: 0.8rem 1rem;
    font-weight: bold;
    font-size: 1rem;
}

.ir-money-input input {
    border: none;
    padding: 0.8rem;
    flex: 1;
    font-size: 1rem;
    background: transparent;
}

.ir-money-input input:focus {
    outline: none;
    transform: none;
    box-shadow: none;
}

/* ===================================
   BOTÃO CALCULAR IR - FINANCEIRO
   ================================== */
.ir-calculate-section {
    text-align: center;
    margin: 2rem 0;
}

.ir-calculate-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71); /* Gradiente verde financeiro */
    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);
}

.ir-calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.ir-calculate-btn:active {
    transform: translateY(-1px);
}

/* ===================================
   RESULTADO DO IR INVESTIMENTOS - FINANCEIRO
   ================================== */
.ir-resultado {
    background: #e8f5e8; /* Verde claro financeiro */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    animation: slideInUp 0.5s ease;
}

.ir-resultado h3 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 1.5rem;
    text-align: center;
}

.ir-resultado-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Resultado Principal - FINANCEIRO */
.ir-resultado-principal {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.ir-resultado-principal h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.ir-valor-principal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.8rem;
}

.ir-currency {
    font-size: 1.3rem;
    opacity: 0.8;
}

.ir-value {
    font-size: 2.2rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.ir-aliquota {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ir-percent {
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.ir-unit {
    font-size: 1rem;
    opacity: 0.8;
}

.ir-tipo {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Detalhamento - FINANCEIRO */
.ir-detalhamento {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e0e6ed;
}

.ir-detalhamento h4 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 1rem;
    border-bottom: 2px solid #27ae60; /* Verde dinheiro */
    padding-bottom: 0.5rem;
}

.ir-item-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ir-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: #e8f5e8; /* Verde claro financeiro */
    border-radius: 8px;
    border-left: 4px solid #27ae60; /* Verde dinheiro */
    transition: all 0.3s ease;
}

.ir-item:hover {
    transform: translateX(5px);
    background: #d5f4e6;
}

.ir-item.destaque {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    border-left-color: #2ecc71; /* Verde crescimento */
    font-weight: bold;
}

.ir-item.destaque:hover {
    background: #2ecc71; /* Verde crescimento */
}

.ir-item-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.ir-item.destaque .ir-item-label {
    color: white;
}

.ir-item-value {
    font-weight: bold;
    color: #1e8449; /* Verde escuro financeiro */
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

.ir-item.destaque .ir-item-value {
    color: white;
}

/* Informações Tributárias - FINANCEIRO */
.ir-informacoes {
    background: #fff8e1; /* Fundo dourado suave */
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #f1c40f; /* Dourado riqueza */
}

.ir-informacoes h4 {
    color: #f39c12; /* Dourado escuro */
    margin-bottom: 1rem;
    border-bottom: 2px solid #f1c40f; /* Dourado riqueza */
    padding-bottom: 0.5rem;
}

.ir-info-content p {
    margin: 0.5rem 0;
    color: #f39c12; /* Dourado escuro */
    font-size: 0.95rem;
}

.ir-info-content strong {
    color: #e65100;
}

/* ===================================
   EXPLICAÇÃO DO CÁLCULO IR - FINANCEIRO
   ================================== */
.ir-explanation {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 12px;
    animation: slideInUp 0.5s ease;
}

.ir-explanation h3 {
    color: #1976d2;
    margin-bottom: 1rem;
    text-align: center;
}

.ir-step {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #2196f3;
}

.ir-step h4 {
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.ir-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

/* ===================================
   EXEMPLOS E AJUDA IR - FINANCEIRO
   ================================== */
.ir-examples {
    text-align: center;
    margin: 1.5rem 0;
    transition: all 0.3s ease;
}

.ir-examples.hidden {
    display: none;
}

.ir-examples p {
    margin-bottom: 1rem;
    color: #5a6c7d;
}

.ir-example-btn {
    background: #e8f5e8; /* Verde claro financeiro */
    border: 2px solid #27ae60; /* Verde dinheiro */
    color: #1e8449; /* Verde escuro */
    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;
}

.ir-example-btn:hover {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    transform: translateY(-2px);
}

.ir-help {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    transition: all 0.3s ease;
}

.ir-help.hidden {
    display: none;
}

/* ===================================
   CONTEÚDO EDUCACIONAL IR INVESTIMENTOS - FINANCEIRO
   ================================== */
.ir-educational-content {
    margin-top: 3rem;
}

.ir-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;
}

.ir-content-block h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #27ae60; /* Verde dinheiro */
    padding-bottom: 0.5rem;
}

.ir-content-block h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 3px solid #27ae60; /* Verde dinheiro */
    padding-bottom: 0.5rem;
}

.ir-content-block p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444;
}

.ir-content-block strong {
    color: #27ae60; /* Verde dinheiro */
}

/* Formula Display IR - FINANCEIRO */
.ir-formula-display {
    background: #e8f5e8; /* Verde claro financeiro */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
}

.ir-formula-display h4 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.ir-formula-display .formula p {
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
    color: #1e8449; /* Verde escuro financeiro */
    font-weight: 600;
    font-size: 0.95rem;
}

/* Grids Exemplos IR - FINANCEIRO - MELHORADO */
.ir-examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ir-example-item {
    background: linear-gradient(135deg, #e8f5e8, #f1f8e9); /* Gradiente verde claro */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.ir-example-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #27ae60, #2ecc71, #f1c40f); /* Gradiente financeiro */
}

.ir-example-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(39, 174, 96, 0.2);
    border-color: #2ecc71; /* Verde crescimento */
    background: linear-gradient(135deg, #d5f4e6, #e8f5e8);
}

.ir-example-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #27ae60; /* Verde dinheiro */
    background: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
    transition: all 0.3s ease;
}

.ir-example-item:hover .ir-example-icon {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    transform: scale(1.1);
}

.ir-example-item h4 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.ir-example-item p {
    color: #2c3e50;
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

.ir-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.ir-tip-item {
    background: linear-gradient(135deg, #ffffff, #f8fffe); /* Gradiente branco suave */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.1);
}

.ir-tip-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #27ae60, #2ecc71, #f1c40f); /* Gradiente financeiro */
}

.ir-tip-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(39, 174, 96, 0.15);
    border-color: #2ecc71; /* Verde crescimento */
    background: linear-gradient(135deg, #f8fffe, #e8f5e8);
}

.ir-tip-item h4 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8f5e8; /* Verde claro financeiro */
}

.ir-tip-item h4::before {
    content: '💰';
    background: #27ae60; /* Verde dinheiro */
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.ir-tip-item p {
    color: #2c3e50;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 500;
}

.ir-tip-item strong {
    color: #1e8449; /* Verde escuro financeiro */
    font-weight: 700;
}

/* Estilos específicos para diferentes tipos de tips */
.ir-tip-item:nth-child(1) h4::before { content: '🏦'; }
.ir-tip-item:nth-child(2) h4::before { content: '📈'; }
.ir-tip-item:nth-child(3) h4::before { content: '🏢'; }
.ir-tip-item:nth-child(4) h4::before { content: '🛡️'; }
.ir-tip-item:nth-child(5) h4::before { content: '💎'; }
.ir-tip-item:nth-child(6) h4::before { content: '🧮'; }

/* Exemplo de Solução IR - FINANCEIRO */
.ir-example-solution {
    background: #e8f5e8; /* Verde claro financeiro */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.ir-example-solution h4 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.ir-solution-step {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #27ae60; /* Verde dinheiro */
}

.ir-solution-step h5 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.ir-solution-step p {
    margin: 0.3rem 0;
    font-family: 'Courier New', monospace;
    color: #444;
}

.ir-solution-final {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.ir-solution-final h5 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.ir-solution-final p {
    margin: 0;
    font-family: inherit;
}

/* ===================================
   FAQ - FINANCEIRO
   ================================== */
.faq-container {
    margin-top: 1.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 {
    border-color: #27ae60; /* Verde dinheiro */
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.1);
}

.faq-question {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e6ed;
}

.faq-question:hover {
    background: #e8f5e8; /* Verde claro financeiro */
    color: #1e8449; /* Verde escuro */
}

.faq-answer {
    padding: 1.5rem;
    background: white;
}

.faq-answer p {
    margin-bottom: 1rem;
    color: #444;
    line-height: 1.6;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* ===================================
   REFERÊNCIAS - FINANCEIRO
   ================================== */
.referencias-container {
    margin-top: 1.5rem;
}

.referencias-lista {
    list-style: none;
    padding: 0;
}

.referencia-item {
    background: #f8f9fa;
    padding: 1rem;
    margin-bottom: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid #27ae60; /* Verde dinheiro */
    transition: all 0.3s ease;
}

.referencia-item:hover {
    background: #e8f5e8; /* Verde claro financeiro */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.1);
}

/* ===================================
   CARD DINÂMICO - FUNDAMENTAÇÃO LEGAL - MELHORADO
   ================================== */
/* Estilização específica para o card gerado via JS */
#irDetailedExplanation {
    margin-top: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #fff8e1, #fff3e0); /* Fundo dourado suave */
    border: 3px solid #f1c40f; /* Dourado riqueza */
    border-radius: 20px;
    animation: slideInUp 0.5s ease;
    box-shadow: 0 10px 30px rgba(241, 196, 15, 0.15);
    position: relative;
    overflow: hidden;
}

#irDetailedExplanation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #f1c40f, #f39c12, #27ae60); /* Gradiente dourado-verde */
}

#irDetailedExplanation h3 {
    color: #f39c12; /* Dourado escuro */
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    border-bottom: 3px solid #f1c40f; /* Dourado riqueza */
    padding-bottom: 1rem;
    position: relative;
}

#irDetailedExplanation h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #27ae60; /* Verde dinheiro */
    border-radius: 2px;
}

/* Seções legais melhoradas */
#irDetailedExplanation .ir-legal-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid #e8f5e8; /* Verde claro financeiro */
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#irDetailedExplanation .ir-legal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #27ae60, #2ecc71); /* Gradiente verde */
}

#irDetailedExplanation .ir-legal-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(39, 174, 96, 0.15);
    border-color: #27ae60; /* Verde dinheiro */
}

#irDetailedExplanation .ir-legal-section h4 {
    color: #1e8449; /* Verde escuro financeiro */
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8f5e8; /* Verde claro financeiro */
}

/* Items legais melhorados */
#irDetailedExplanation .ir-legal-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fffe, #f1f8e9); /* Gradiente verde muito claro */
    border-radius: 12px;
    border: 2px solid #e8f5e8; /* Verde claro financeiro */
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

#irDetailedExplanation .ir-legal-item:hover {
    background: linear-gradient(135deg, #e8f5e8, #d5f4e6); /* Gradiente verde hover */
    border-color: #27ae60; /* Verde dinheiro */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.1);
}

/* Artigos legais melhorados */
#irDetailedExplanation .ir-legal-artigo {
    background: linear-gradient(135deg, #27ae60, #2ecc71); /* Gradiente verde dinheiro */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#irDetailedExplanation .ir-legal-item:hover .ir-legal-artigo {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Conteúdo legal melhorado */
#irDetailedExplanation .ir-legal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#irDetailedExplanation .ir-legal-content p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 500;
}

#irDetailedExplanation .ir-legal-content strong {
    color: #1e8449; /* Verde escuro financeiro */
    font-weight: 700;
}

/* Detalhes específicos do cálculo melhorados */
.ir-calculo-detalhe {
    background: linear-gradient(135deg, #ffffff, #f8fffe); /* Gradiente branco-verde */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ir-calculo-detalhe::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #27ae60, #f1c40f); /* Gradiente verde-dourado */
}

.ir-calculo-detalhe:hover {
    background: linear-gradient(135deg, #f8fffe, #e8f5e8); /* Gradiente hover */
    border-color: #2ecc71; /* Verde crescimento */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.15);
}

.ir-calculo-detalhe p {
    margin: 0.5rem 0;
    color: #2c3e50;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 500;
}

.ir-calculo-detalhe p:first-child {
    font-weight: 700;
    color: #1e8449; /* Verde escuro financeiro */
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e8f5e8; /* Verde claro financeiro */
    font-size: 1.1rem;
}

.ir-calculo-detalhe strong {
    color: #27ae60; /* Verde dinheiro */
    font-weight: 700;
}

/* Estilo especial para valores de alíquota */
.ir-calculo-detalhe p:contains("22,5%"),
.ir-calculo-detalhe p:contains("20,0%"),
.ir-calculo-detalhe p:contains("17,5%"),
.ir-calculo-detalhe p:contains("15,0%") {
    background: #e8f5e8; /* Verde claro financeiro */
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    margin: 0.3rem 0;
    border-left: 3px solid #27ae60; /* Verde dinheiro */
}

/* Footer legal melhorado */
#irDetailedExplanation .ir-legal-footer {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7); /* Gradiente amarelo aviso */
    border: 2px solid #f39c12; /* Dourado escuro */
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#irDetailedExplanation .ir-legal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f39c12, #f1c40f, #27ae60); /* Gradiente aviso */
}

#irDetailedExplanation .ir-legal-footer p {
    margin: 0.8rem 0;
    color: #856404;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

#irDetailedExplanation .ir-legal-footer p:first-child {
    font-weight: 700;
    color: #854d0e;
    font-size: 1.1rem;
}

#irDetailedExplanation .ir-legal-footer strong {
    color: #854d0e;
    font-weight: 700;
}

/* ===================================
   CREDIBILIDADE - FINANCEIRO
   ================================== */
.credibilidade-container {
    background: linear-gradient(135deg, #e8f5e8, #d5f4e6); /* Verde claro financeiro */
    border: 2px solid #27ae60; /* Verde dinheiro */
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.1);
}

.credibilidade-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.credibilidade-icon {
    font-size: 2.5rem;
    color: #f1c40f; /* Dourado riqueza */
}

.credibilidade-title {
    color: #1e8449; /* Verde escuro financeiro */
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.credibilidade-content {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.credibilidade-logo {
    color: #27ae60; /* Verde dinheiro */
    font-weight: 700;
    text-decoration: underline;
}

.credibilidade-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.credibilidade-badge {
    background: white;
    color: #1e8449; /* Verde escuro financeiro */
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    border: 2px solid #27ae60; /* Verde dinheiro */
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.credibilidade-badge:hover {
    background: #27ae60; /* Verde dinheiro */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.2);
}

/* ===================================
   ANIMAÇÕES IR
   ================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVIDADE IR INVESTIMENTOS
   ================================== */
@media (max-width: 1024px) {
    .ir-input-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .credibilidade-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .ir-header h1 {
        font-size: 2rem;
    }
    
    .ir-container {
        padding: 1rem;
    }
    
    .ir-dados-investimento {
        padding: 1rem;
    }
    
    .ir-input-group {
        min-width: auto;
    }
    
    .ir-tabs {
        gap: 0.3rem;
    }
    
    .ir-tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-width: 90px;
    }
    
    .ir-calculate-btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
    
    .ir-value {
        font-size: 1.8rem;
    }
    
    .ir-percent {
        font-size: 1.3rem;
    }
    
    .ir-examples-grid,
    .ir-tips-grid {
        grid-template-columns: 1fr;
    }
    
    .credibilidade-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .ir-header h1 {
        font-size: 1.8rem;
    }
    
    .ir-container {
        padding: 0.8rem;
    }
    
    .ir-dados-investimento {
        padding: 0.8rem;
    }
    
    .ir-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .ir-tab-btn {
        width: 140px;
    }
    
    .ir-calculate-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .ir-value {
        font-size: 1.5rem;
    }
    
    .ir-percent {
        font-size: 1.1rem;
    }
    
    .ir-currency {
        font-size: 1.1rem;
    }
    
    .ir-item {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .ir-example-icon {
        font-size: 2rem;
    }
    
    .credibilidade-container {
        padding: 1.5rem;
    }
    
    .credibilidade-title {
        font-size: 1.3rem;
    }
    
    /* ===== FUNDAMENTAÇÃO LEGAL - MOBILE ===== */
    #irDetailedExplanation {
        padding: 0.5rem;
        border-radius: 15px;
    }
    
    #irDetailedExplanation h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.8rem;
    }
    
    #irDetailedExplanation .ir-legal-section {
        padding: 1.2rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }
    
    #irDetailedExplanation .ir-legal-section h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
        flex-wrap: wrap;
    }
    
    /* CRÍTICO: Empilhar item legal verticalmente */
    #irDetailedExplanation .ir-legal-item {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    /* Artigo legal adaptado */
    #irDetailedExplanation .ir-legal-artigo {
        min-width: auto;
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Conteúdo legal */
    #irDetailedExplanation .ir-legal-content {
        width: 100%;
    }
    
    #irDetailedExplanation .ir-legal-content p {
        font-size: 0.9rem;
    }
    
    /* Detalhes do cálculo */
    .ir-calculo-detalhe {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .ir-calculo-detalhe p {
        font-size: 0.9rem;
        margin: 0.4rem 0;
    }
    
    .ir-calculo-detalhe p:first-child {
        font-size: 1rem;
        margin-bottom: 0.8rem;
        padding-bottom: 0.6rem;
    }
    
    /* Footer legal */
    #irDetailedExplanation .ir-legal-footer {
        padding: 1.2rem;
        border-radius: 12px;
    }
    
    #irDetailedExplanation .ir-legal-footer p {
        font-size: 0.9rem;
        margin: 0.6rem 0;
    }
    
    #irDetailedExplanation .ir-legal-footer p:first-child {
        font-size: 1rem;
    }
    
    /* Ajustes gerais de espaçamento */
    .ir-resultado {
        padding: 1.2rem;
    }
    
    .ir-resultado h3 {
        font-size: 1.2rem;
    }
    
    .ir-resultado-principal {
        padding: 1.2rem;
    }
    
    .ir-detalhamento,
    .ir-informacoes {
        padding: 1.2rem;
    }
    
    .ir-detalhamento h4,
    .ir-informacoes h4 {
        font-size: 1.1rem;
    }
    
    /* Grids */
    .ir-examples-grid,
    .ir-tips-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .ir-example-item,
    .ir-tip-item {
        padding: 1.5rem;
    }
    
    .ir-example-item h4,
    .ir-tip-item h4 {
        font-size: 1.1rem;
    }
    
    .ir-example-item p,
    .ir-tip-item p {
        font-size: 0.95rem;
    }
}