:root {
    --secondary: #1A1A1A;
    --primary: #10824f;
    --tertiary: #9C6D10;
    --background: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--background);
}

h2 {
    font-size: 2.5rem;
}

h2 span {
    color: var(--tertiary);
}

/* ==================================
   MENU
================================== */
.menu-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%;
    z-index: 1000;
    transition: all 0.4s ease;
    background-color: var(--background); 
}

.menu-frame.scrolled {
    padding: 30px;
}

.menu-frame.scrolled li a {
     color: var(--background);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo img {
    max-height: 50px; 
    transition: 0.3s;
    margin-right: 40px;
}

/* ==================================
   ESTRUTURA PRINCIPAL DO SIMULADOR
================================== */
main {
    align-items: center;
    width: 100%;
    margin: 0 auto; 
}

.sim-pagina {
    min-height: 100vh;
    padding: 140px 5% 0 5%;
    background: var(--primary);
}

.simulador-split-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
    align-items: stretch;
}

.simulador-split-layout::after {
    content: "";
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: 0;
    height: 150px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    z-index: 0;
}

.split-left{
    display: flex;
    align-items: flex-end; 
    justify-content: center;
}

.split-left,
.split-right {
    position: relative;
    z-index: 1;
}

.split-right {
    flex: 1.5;
    position: relative;
    z-index: 1;
    flex: 1.5;
}

/* ==================================
   CABEÇALHO E IMAGEM
================================== */
.form-header {
    text-align: left;
    margin-bottom: 40px;
}

.form-header h1 {
    font-size: 2.5rem;
    color: var(--background);
    margin-bottom: 10px;
}

.form-header p {
    font-size: 1.1rem;
    color: var(--background);
}

.img-form img {
    width: 100%;
    max-width: 550px; 
    height: auto; 
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* ==================================
   CARD DO FORMULÁRIO E MOLDURA
================================== */
.info-moldura-wrapper {
    position: relative;
    width: 100%;
    z-index: 2;
}

.info-detalhe-visual {
    position: absolute;
    top: -15px; 
    right: -15px; 
    width: 100%;
    height: 100%;
    border: 3px solid; 
    z-index: 1; 
}

.border-vermelho { 
    border-color: var(--tertiary); 
}

.form-card-wizard {
    position: relative;
    z-index: 2; 
    background: #ffffff;
    padding: 50px 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

/* ==================================
   STEPPER (PROGRESSO)
================================== */
.progress-bar {
    height: 100%;
    background: var(--tertiary);
    transition: width 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cg-stepper { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 50px; 
}

.cg-step { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    position: relative; 
    z-index: 2; 
}

.cg-circle { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    background: #f4f4f5; 
    color: #a1a1aa; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 800; 
    transition: 0.4s; 
    border: 3px solid #ffffff; 
}

.cg-step-text { 
    font-size: 0.75rem; 
    color: #a1a1aa; 
    margin-top: 8px; 
    font-weight: 600; 
    text-transform: uppercase; 
}

.cg-step.active .cg-circle { 
    background: var(--background); 
    color: var(--primary); 
    transform: scale(1.1); 
    box-shadow: 0 0 0 3px var(--tertiary); 
}

.cg-step.active .cg-step-text { 
    color: var(--primary); 
    font-weight: 800; 
}

.cg-step.completed .cg-circle { 
    background: var(--tertiary); 
    color: #ffffff; 
}

.cg-line { 
    flex: 1; 
    height: 4px; 
    background: #f4f4f5; 
    margin: 0 -15px; 
    position: relative; 
    top: -12px; 
    z-index: 1; 
}

.cg-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--tertiary);
    transition: width 0.8s ease-in-out;
}

.cg-line.active::before { width: 100%; }
.cg-line.active { background: var(--tertiary); }

/* ==================================
   INPUTS E FORMULÁRIOS
================================== */
.form-step {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-step2 {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.flat-input-group {
    width: 100%;
}

.flat-input-group label {  
    font-size: 0.8rem; 
    font-weight: 700; 
    color: #333; 
    margin-bottom: 8px;
    display: block;
}

.flat-input-group input, 
.flat-input-group select,
.flat-input-group textarea {
    width: 100%; 
    padding: 10px; 
    border: none;
    border-bottom: 2px solid #e4e4e7;
    font-size: 1rem; 
    color: #333; 
    outline: none; 
    transition: 0.3s;
    background: transparent;
}

.flat-input-group textarea {
    border: 2px solid #e4e4e7;
    border-radius: 8px;
    resize: vertical;
    background: #fafafa;
}

.flat-input-group input:focus, 
.flat-input-group select:focus,
.flat-input-group textarea:focus {
    border-color: var(--tertiary); 
    background: #fff;
}

/* ==================================
   SLIDERS (VALORES E PARCELAS)
================================== */
.display-valor-clean { 
    width: 100%; 
    border: none; 
    background: transparent; 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--tertiary); 
    outline: none; 
    text-align: center; 
    margin: 10px 0; 
}

.cg-slider {
    -webkit-appearance: none; 
    appearance: none;        
    width: 100%;              
    height: 5px;              
    background: #e4e4e7;    
    border-radius: 4px;       
    outline: none;            
    margin: 15px 0;
}

.cg-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tertiary);
    cursor: pointer;
    transition: 0.2s ease;
}

.cg-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: var(--secondary);
}

.slider-minmax {
    display: flex;
    justify-content: space-between;
}

.slider-header {
    font-weight: 600;
    font-size: 1.2rem;
}

/* ==================================
   RESULTADOS E BOTÕES
================================== */
.resultado-flat-box { margin-top: 10px; }
.res-linha-flat { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 8px; 
}

.res-linha-flat span { font-weight: 600; color: var(--primary); }
.res-linha-flat strong { font-size: 1.5rem; font-weight: 800; }

.btn-form {
    align-items: center;
    justify-content: flex-end;
    display: flex;
    margin-top: 30px;
}

.btn-advance {
    text-decoration: none;
    background-color: transparent;
    color: var(--tertiary);
    padding: 18px 36px;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 3px solid var(--tertiary);
    cursor: pointer;
}

.btn-advance:hover {
    background-color: var(--tertiary);
    color: #fff;
}

/* ==================================
   ETAPAS FUTURAS (MANTIDO PARA EVITAR QUEBRA)
================================== */
#TED-group { display: flex; gap: 10px; }

.flat-input-group label[for^="file_"] {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: #f8f9fa; 
    border: 2px dashed #d4d4d8; 
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 15px;
}

.flat-input-group label[for^="file_"]:hover { background-color: #ffffff; }
.flat-input-group label[for^="file_"] div:first-child { font-size: 1.1rem; font-weight: 700; color: var(--primary); transition: color 0.3s; }
.flat-input-group label[for^="file_"]:hover div:first-child { color: var(--tertiary); }

.img-label { width: 100%; display: flex; justify-content: center; margin-top: 10px; }
.img-label img { max-width: 100%; height: 180px !important; object-fit: cover; border-radius: 12px; }
.img-label img[src=""] { display: none !important; }

.whats-finalizar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
    border: 2px solid var(--tertiary);
    padding: 15px;
}

.whats-finalizar p {
    font-weight: 600;
    text-align: center;
}

.btn-contato {
    text-decoration: none;
    background-color: var(--background); 
    color: var(--primary);
    padding: 12px 24px;
    font-weight: 600;
    transition: background 0.3s;
    border: 3px solid var(--primary);
}

.btn-contato:hover {
    background-color: var(--primary);
    color: var(--background);
}

.subtitle {
    border-left: 5px solid var(--primary);
    display: flex;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    align-items: center;
}

.subtitle p { margin-left: 10px; }

button:disabled, .btn-advance:disabled {
    opacity: 0.5; 
    cursor: not-allowed !important; 
    pointer-events: none; 
}

/* ==================================
   RESPONSIVIDADE 
================================== */

@media (max-width: 992px) {
    .nav-links, .desktop-only { display: none; }
    .mobile-toggle { display: block; }
    
    .simulador-split-layout {
        display: flex; 
        flex-direction: column-reverse;
        gap: 40px;
    }

    .form-step2 {
        flex-direction: column; 
        gap: 20px;
    }

    .img-form img {
        max-width: 400px;
        height: auto;
    }

    .cg-line { top: 0; }
    
    h2 {
        text-align: center;
        font-size: 2rem;
    }

    .subtitle {
        justify-content: center;
        margin-bottom: 30px;
        font-size: 0.85rem ;
    }

    .p-finalizar{
        text-align: center;
    }
    .btn-contato{
        text-align: center;
        font-size: 0.80rem;
    }

    .btn-form{
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* Ajustes para Celulares Pequenos */
@media (max-width: 768px) {
    .info-detalhe-visual {
        top: -10px;
        right: -10px;
    }

    .form-card-wizard { padding: 30px 20px; }
    .cg-step-text { display: none; } 
    .cg-circle { width: 30px; height: 30px; font-size: 0.9rem; }
    .display-valor-clean { font-size: 1.5rem; }
    .res-linha-flat{ flex-direction: column; padding: 10px; }
    .res-linha-flat strong{ font-size: 1rem;}
    .flat-input-group{ margin-bottom: 0 !important;}
    .form-header{
        text-align: center;
        h1{
            font-size: 2rem;
        }
    }
    .sim-pagina{padding: 140px 5% 0 5%;}

     .btn-form{
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}