/* ============================================
   CALCULADORA / SIMULADOR SOLAR - CSS
   ============================================ */

/* === LAYOUT PRINCIPAL === */
.calc-section .container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.calc-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* === STEPS INDICATOR === */
.calc-header {
    text-align: center;
    padding: 2.5rem 2rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
}

.calc-header h2 {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
}

.calc-header p {
    opacity: 0.85;
    font-size: 0.95rem;
}

.calc-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
}

.step-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px rgba(245,158,11,0.3);
}

.step-dot.completed {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.step-line {
    width: 60px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    transition: all 0.3s ease;
}

.step-line.active {
    background: var(--primary);
}

/* === FORMULÁRIO === */
.calc-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.3rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.required {
    color: #EF4444;
}

.input-icon {
    display: flex;
    align-items: center;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0 1rem;
    transition: all 0.3s ease;
}

.input-icon:focus-within {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}

.input-icon span {
    font-size: 1.1rem;
    margin-right: 0.7rem;
    flex-shrink: 0;
}

.input-icon input,
.input-icon select,
.input-icon textarea {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.85rem 0;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--gray-800);
    outline: none;
    width: 100%;
}

.input-icon select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.textarea-icon {
    align-items: flex-start;
    padding-top: 0.85rem;
}

.textarea-icon span {
    margin-top: 0;
}

.input-icon textarea {
    resize: vertical;
    min-height: 70px;
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

/* === LOADING === */
.calc-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.calc-loading p {
    font-size: 1.1rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* === RESULTADO === */
.calc-result {
    padding: 2rem;
}

.result-greeting {
    text-align: center;
    margin-bottom: 2rem;
}

.result-greeting h3 {
    font-size: 1.5rem;
    color: var(--secondary);
}

.result-greeting p {
    color: var(--gray-600);
    margin-top: 0.3rem;
}

/* Cards de resultado */
.result-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.result-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease;
}

.result-card:hover {
    transform: translateY(-3px);
}

.result-card.highlight-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    grid-column: 1 / -1;
    padding: 2rem;
}

.result-card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.result-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
    margin-bottom: 0.3rem;
}

.result-card-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

.highlight-card .result-card-value {
    font-size: 2.8rem;
}

.result-card-sub {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 0.3rem;
}

/* Detalhes técnicos */
.result-details {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.result-details h4 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
}

.detail-icon {
    font-size: 1.5rem;
}

.detail-label {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 500;
}

.detail-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
}

/* Disclaimer */
.result-disclaimer {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    margin-bottom: 2rem;
}

.result-disclaimer p {
    font-size: 0.82rem;
    color: #92400E;
    line-height: 1.5;
}

/* CTA do resultado */
.result-cta {
    text-align: center;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    border-radius: var(--radius);
    padding: 2rem;
    color: var(--white);
}

.result-cta h3 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.result-cta p {
    opacity: 0.85;
    margin-bottom: 1.2rem;
}

.result-cta .btn {
    margin: 0.3rem;
}

.result-cta .btn-outline {
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.result-cta .btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

/* === SIDEBAR === */
.calc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.8rem;
    border: 1px solid var(--gray-100);
}

.sidebar-card h3 {
    font-size: 1.15rem;
    color: var(--secondary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary);
}

.sidebar-benefit {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    align-items: flex-start;
}

.sidebar-benefit:last-child {
    margin-bottom: 0;
}

.benefit-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.sidebar-benefit strong {
    display: block;
    color: var(--gray-800);
    font-size: 0.95rem;
    margin-bottom: 0.1rem;
}

.sidebar-benefit p {
    font-size: 0.82rem;
    color: var(--gray-500);
    line-height: 1.4;
}

/* Trust numbers */
.sidebar-trust {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: var(--white);
}

.sidebar-trust h3 {
    color: var(--white);
    border-bottom-color: var(--primary);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.trust-item:last-child {
    margin-bottom: 0;
}

.trust-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    min-width: 50px;
}

.trust-label {
    font-size: 0.85rem;
    opacity: 0.85;
}

/* === HIDDEN === */
.hidden {
    display: none !important;
}

/* === ANIMAÇÃO DE ENTRADA DOS CARDS DE RESULTADO === */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calc-result .result-card,
.calc-result .result-details,
.calc-result .result-disclaimer,
.calc-result .result-cta {
    animation: slideUp 0.5s ease forwards;
}

.calc-result .result-card:nth-child(1) { animation-delay: 0.1s; }
.calc-result .result-card:nth-child(2) { animation-delay: 0.2s; }
.calc-result .result-card:nth-child(3) { animation-delay: 0.3s; }
.calc-result .result-details { animation-delay: 0.4s; }
.calc-result .result-disclaimer { animation-delay: 0.5s; }
.calc-result .result-cta { animation-delay: 0.6s; }

/* === RESPONSIVO === */
@media (max-width: 1024px) {
    .calc-section .container {
        grid-template-columns: 1fr;
    }

    .calc-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .calc-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 100px 1fr;
    }

    .result-cards {
        grid-template-columns: 1fr;
    }

    .result-card.highlight-card {
        grid-column: auto;
    }

    .highlight-card .result-card-value {
        font-size: 2.2rem;
    }

    .details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calc-sidebar {
        grid-template-columns: 1fr;
    }

    .calc-result {
        padding: 1.5rem;
    }

    .result-cta {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calc-header {
        padding: 1.5rem 1rem 1rem;
    }

    .calc-header h2 {
        font-size: 1.3rem;
    }

    .step-dot {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .step-line {
        width: 40px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .result-cta .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}
