/* Estilos para o Simulador de Financiamento Imobiliário */

:root {
    --santander-color: #ec0000;
    --bradesco-color: #cc092f;
    --itau-color: #ec7000;
    --inter-color: #ff7a00;
    --primary-color: #23285f;
    --secondary-color: #1e1e33;
    --text-color: #000;
    --light-text: #6c757d;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --success-color: #38b000;
    
    /* Cores do cabeçalho (novo design) */
    --header-gradient-start: #27293d;
    --header-gradient-end: #1d1f32;
    --header-accent-color: #7b68ee;
    --header-text-color: #ffffff;
    --header-fallback: #1d1f32;
    --header-shadow-color: rgba(0, 0, 0, 0.2);
    
    /* Cores das ondas SVG */
    --wave-color1: #1d1f32;
    --wave-color2: #2e3144;
    --wave-color3: #ffffff;
    --wave-background: var(--header-gradient-start);
    
    /* Cores do footer */
    --footer-gradient-start: #23285f;
    --footer-gradient-end: #1e1e33;
    --footer-shadow-color: rgba(0, 0, 0, 0.1);
}

/* Estilos gerais */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background);
    color: var(--text-color);
    line-height: 1.6;
}


/* Removido o estilo do header anterior */

/* Removido estilo da onda anterior - agora está no header-styles.css */

.display-4 {
    font-weight: 800;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    color: var(--card-bg);
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
}

.display-4::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--header-accent-color);
    border-radius: 2px;
}

.lead {
    font-weight: 400;
    font-size: 1.25rem;
    opacity: 1;
    color: var(--card-bg);
    margin-top: 1.2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Card do formulário */
.form-card {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
    position: relative;
}

.form-header {
    height: 80px;
    position: relative;
    margin-bottom: 2vh;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
}

.form-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.form-icon i {
    font-size: 32px;
    color: var(--primary-color);
}

/* Estilo para os inputs */
.form-control, .form-select {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.input-group-text {
    background-color: var(--background);
    border-color: var(--light-text);
    border-radius: 10px 0 0 10px;
}

/* Botão de calcular */
.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    font-weight: 600;
    margin-top: 2vh;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.6);
}

/* Efeito Pulse para o botão */
.pulse-button {
    position: relative;
}

.pulse-button:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background-color: rgba(var(--primary-color), 0.4);
    z-index: -1;
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    70% {
        transform: scale(1.05);
        opacity: 0;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

/* Cards de resultado */
.result-card {
    border-radius: 20px;
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    background-color: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.result-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Headers específicos para cada banco */
.bank-header {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background-color: var(--card-bg);
    border-bottom: none;
    transition: all 0.3s ease;
}

.bank-logo {
    max-height: 45px;
    max-width: 80%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.result-card:hover .bank-logo {
    transform: scale(1.05);
}

/* Cores e estilos específicos dos bancos */
.santander {
    border-top: 4px solid var(--santander-color);
}

.bradesco {
    border-top: 4px solid var(--bradesco-color);
}

.itau {
    border-top: 4px solid var(--itau-color);
}

.inter {
    border-top: 4px solid var(--inter-color);
}

.santander .card-title {
    color: var(--santander-color);
}

.bradesco .card-title {
    color: var(--bradesco-color);
}

.itau .card-title {
    color: var(--itau-color);
}

.inter .card-title {
    color: var(--inter-color);
}

/* Taxa de juros */
.taxa-juros {
    background-color: rgba(248, 249, 250, 0.7);
    border-radius: 12px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-left: 3px solid var(--light-text);
}

.result-card:hover .taxa-juros {
    border-left-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
}

.taxa-label {
    color: var(--light-text);
    font-weight: 500;
}

.taxa-valor {
    color: var(--text-color);
    font-weight: 700;
}

/* Informações sobre parcela */
.parcela-valor {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.result-card:hover .parcela-valor {
    transform: scale(1.05);
}

.parcela-label {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0.2rem;
    font-weight: 500;
}

/* Detalhes adicionais */
.detalhes {
    background-color: rgba(248, 249, 250, 0.7);
    border-radius: 12px;
    padding: 1.2rem;
    transition: all 0.3s ease;
}

.result-card:hover .detalhes {
    background-color: rgba(67, 97, 238, 0.05);
}

.detalhe-label {
    font-size: 0.85rem;
    color: var(--light-text);
    font-weight: 500;
}

.detalhe-valor {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Alerta de policy restriction - UI Enhancement */
.policy-restriction {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.97);
    padding: 20px;
    text-align: center;
    z-index: 10;
    border-radius: 20px;
    animation: fadeIn 0.5s ease forwards;
    box-shadow: inset 0 0 0 3px rgba(231, 76, 60, 0.15);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    overflow: hidden;
    /* Garantir que o overlay seja removido e não persista entre simulações */
    pointer-events: auto;
}

.policy-restriction:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #e74c3c, #c0392b);
}

.policy-restriction-icon {
    font-size: 2.8rem;
    color: #e74c3c;
    margin-bottom: 1.2rem;
    animation: pulseWarning 1.5s infinite;
}

@keyframes pulseWarning {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.policy-restriction-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #e74c3c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.policy-restriction-message {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    max-width: 90%;
}

.policy-restriction-details {
    font-size: 0.9rem;
    color: var(--light-text);
    font-style: italic;
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 15px;
    border-radius: 20px;
    margin-top: 0.5rem;
}

/* Estilos para as informações adicionais */
.custos-adicionais {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    background-color: rgba(248, 250, 252, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h16v16H0V0zm1 1v14h14V1H1z' fill='%23f0f0f0' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.custos-adicionais.show {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    animation: pulseHighlight 1.5s ease-out;
}

@keyframes pulseHighlight {
    0% { box-shadow: 0 0 0 0 rgba(var(--primary-color), 0.2); }
    70% { box-shadow: 0 0 0 10px rgba(var(--primary-color), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--primary-color), 0); }
}

.custos-titulo {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 1.2rem;
    position: relative;
    padding: 12px 0;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.custos-titulo i {
    color: #6c5ce7;
    margin-right: 8px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-6px);}
    60% {transform: translateY(-3px);}
}

.custos-titulo:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.custos-titulo:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.info-adicionais-link {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-width: 1.5px;
}

.info-adicionais-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.info-adicionais-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.list-group-item {
    border-left: none;
    border-right: none;
    padding: 0.85rem 1.25rem;
    transition: all 0.2s ease;
    background-color: transparent;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-bottom: 2px;
}

.list-group-item:first-child {
    border-top: none;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.list-group-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    margin-bottom: 0;
}

.list-group-item:hover {
    background-color: rgba(var(--primary-color), 0.03);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.list-group-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.list-group-item:hover::before {
    opacity: 1;
}

/* Estilo para valores destacados */
.fw-medium {
    position: relative;
    font-weight: 500 !important;
    padding: 4px 10px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50px;
    color: #4361ee;
    display: inline-block;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(67, 97, 238, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.08);
    transition: all 0.3s ease;
}

.fw-medium:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.15);
    background-color: rgba(67, 97, 238, 0.15);
}

/* Estilo específico para cada banco */
.santander .fw-medium {
    background-color: rgba(236, 0, 0, 0.08);
    color: var(--santander-color);
    box-shadow: 0 2px 4px rgba(236, 0, 0, 0.08);
    border-color: rgba(236, 0, 0, 0.08);
}

.bradesco .fw-medium {
    background-color: rgba(204, 9, 47, 0.08);
    color: var(--bradesco-color);
    box-shadow: 0 2px 4px rgba(204, 9, 47, 0.08);
    border-color: rgba(204, 9, 47, 0.08);
}

.itau .fw-medium {
    background-color: rgba(236, 112, 0, 0.08);
    color: var(--itau-color);
    box-shadow: 0 2px 4px rgba(236, 112, 0, 0.08);
    border-color: rgba(236, 112, 0, 0.08);
}

.inter .fw-medium {
    background-color: rgba(255, 122, 0, 0.08);
    color: var(--inter-color);
    box-shadow: 0 2px 4px rgba(255, 122, 0, 0.08);
    border-color: rgba(255, 122, 0, 0.08);
}

/* Estilos para a seção de contato */
.contato-cta {
    margin-bottom: 3rem;
}

.contato-card {
    border-radius: 24px;
    background: linear-gradient(120deg, #f8f9fa, #ffffff, #f8f9fa);
    overflow: hidden;
    position: relative;
    border: none;
    transition: all 0.3s ease;
    animation: cardGlow 3s infinite alternate;
}

@keyframes cardGlow {
    0% {
        box-shadow: 0 10px 30px rgba(40, 167, 69, 0.15);
    }
    100% {
        box-shadow: 0 15px 60px rgba(40, 167, 69, 0.25);
    }
}

.contato-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, #28a745, #20c997);
}

.contato-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2328a745' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.contato-content {
    display: flex;
    align-items: center;
    padding: 2.5rem;
    gap: 2rem;
}

.contato-icon {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(32, 201, 151, 0.3);
    position: relative;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.contato-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(32, 201, 151, 0.3);
    animation: ripple 2s linear infinite;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.contato-icon i {
    font-size: 2.8rem;
    color: white;
    animation: headsetWiggle 5s ease-in-out infinite;
    transform-origin: 50% 80%;
}

@keyframes headsetWiggle {
    0%, 70%, 100% { transform: rotate(0deg); }
    75% { transform: rotate(10deg); }
    80% { transform: rotate(-10deg); }
    85% { transform: rotate(8deg); }
    90% { transform: rotate(-8deg); }
    95% { transform: rotate(5deg); }
}

.contato-text {
    flex-grow: 1;
}

.contato-text h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contato-text p {
    margin-bottom: 1.5rem;
    color: var(--light-text);
    max-width: 500px;
}

.fale-com-gerente-btn {
    padding: 0.85rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 1.1rem;
}

.fale-com-gerente-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
}

.fale-com-gerente-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease-in-out;
    z-index: -1;
    transform: skewX(-15deg);
}

.fale-com-gerente-btn:hover::before {
    width: 100%;
}

.fale-com-gerente-btn i {
    animation: pulse 1.5s infinite;
    display: inline-block;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Estilo para valores destacados no custos-adicionais */
.list-group-item span:last-child:not(.fw-medium) {
    font-weight: 600;
    color: var(--text-color);
    background-color: rgba(248, 249, 250, 0.6);
    padding: 4px 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    display: inline-block;
}

.list-group-item:hover span:last-child:not(.fw-medium) {
    transform: scale(1.02);
    background-color: rgba(248, 249, 250, 0.9);
}

.santander .list-group-item.fw-bold span:last-child {
    color: var(--santander-color);
}

.bradesco .list-group-item.fw-bold span:last-child {
    color: var(--bradesco-color);
}

.itau .list-group-item.fw-bold span:last-child {
    color: var(--itau-color);
}

.inter .list-group-item.fw-bold span:last-child {
    color: var(--inter-color);
}

/* Melhorar legibilidade dos valores */
#seguroSantander, #seguroBradesco, #seguroItau, #seguroInter, 
#registroSantander, #registroBradesco, #registroItau, #registroInter,
#itbiSantander, #itbiBradesco, #itbiItau, #itbiInter,
#totalCustosSantander, #totalCustosBradesco, #totalCustosItau, #totalCustosInter,
#avaliacaoSantander, #avaliacaoBradesco, #avaliacaoItau, #avaliacaoInter {
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.3px;
}

@media (max-width: 768px) {
    .contato-content {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    
    .contato-text p {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e9ecef;
        --light-text: #adb5bd;
        --background: #212529;
        --card-bg: #2b2d42;
        
        /* Sobrescrever cores do cabeçalho para o tema escuro */
        --header-gradient-start: #0d253f;
        --header-gradient-end: #1c4678;
        --header-accent-color: #3d84df;
        --header-fallback: #1c4678;
        --header-shadow-color: rgba(0, 0, 0, 0.5);
        --header-particle-color: rgba(255, 255, 255, 0.07);
        
        /* Cores das ondas SVG no modo escuro */
        --wave-color1: #1c4678;
        --wave-color2: #0d253f;
        --wave-color3: #212529;
        --wave-background: #212529;
    }
    
    .form-control, .form-select, .input-group-text {
        background-color: #343a40;
        border-color: #495057;
        color: var(--text-color);
    }
    
    .form-control::placeholder {
        color: var(--light-text);
    }
    
    .alert-info {
        background-color: rgba(67, 97, 238, 0.2);
    }
    
    .policy-restriction {
        background: rgba(33, 37, 41, 0.95);
    }
    
    .policy-restriction-details {
        background: rgba(255, 255, 255, 0.07);
    }
}
