/* calculator.css - УЛУЧШЕННАЯ ВЕРСИЯ */
.calculator-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.calculator-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.calculator-step {
    display: none;
    margin-bottom: 2rem;
}

.calculator-step.active {
    display: block;
}

.step-header {
    margin-bottom: 2rem;
}

.step-header h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
}

.step-description {
    color: var(--text-light);
    font-size: 0.95rem;
}

.form-options {
    display: grid;
    gap: 1rem;
}

.option-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.option-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.option-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.option-card input:checked {
    border-color: var(--primary-color);
}

.option-card input:checked ~ .option-content h4 {
    color: var(--primary-color);
}

.option-card input:checked ~ .option-icon {
    color: var(--primary-color);
}

.option-icon {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-right: 1rem;
    margin-top: 0.25rem;
    transition: color 0.3s ease;
}

.option-content {
    flex: 1;
}

.option-content h4 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.option-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.option-price {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.tax-multiplier {
    font-size: 0.8rem;
    color: var(--primary-color);
    background: var(--primary-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.range-container {
    margin: 2rem 0;
}

.range-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.operations-range,
.employees-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-light);
    outline: none;
    -webkit-appearance: none;
}

.operations-range::-webkit-slider-thumb,
.employees-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-value {
    text-align: center;
    margin-top: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.range-price {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.range-help {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 1rem;
    line-height: 1.4;
}

.range-help i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.checkbox-options {
    display: grid;
    gap: 1rem;
}

.checkbox-card {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.checkbox-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 4px;
    margin-right: 1rem;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

.checkbox-card input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-card input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-content {
    flex: 1;
}

.checkbox-content h4 {
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.checkbox-content p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.service-price {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.checkbox-card input:checked ~ .checkbox-content h4 {
    color: var(--primary-color);
}

.calculator-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.step-indicator {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Результат */
.calculator-result {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.result-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary-light);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-header h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.4rem;
}

.result-accuracy {
    font-size: 0.8rem;
    color: var(--secondary-color);
    background: var(--light-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.result-accuracy i {
    margin-right: 0.25rem;
}

.result-summary {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.total-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.total-price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.period {
    color: var(--text-light);
    font-size: 1rem;
}

.result-description {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Детализация стоимости */
.cost-breakdown {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 10px;
}

.cost-breakdown h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.breakdown-items {
    display: grid;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.cost-value {
    font-weight: 600;
    color: var(--text-color);
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 2px solid var(--primary-color);
    font-weight: 700;
}

.breakdown-total .cost-value {
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Списки услуг */
.included-services,
.additional-services-result {
    margin: 1.5rem 0;
}

.included-services h4,
.additional-services-result h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.services-list i {
    color: var(--secondary-color);
    margin-right: 0.75rem;
    font-size: 0.8rem;
}

.additional-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.additional-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1rem;
    font-size: 0.9rem;
}

.additional-list li:before {
    content: "+";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.additional-list li.empty {
    color: var(--text-light);
    font-style: italic;
}

.additional-list li.empty:before {
    content: "";
}

.result-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-large {
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.result-guarantee {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.result-guarantee i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

/* Модальное окно улучшения */
.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-light);
}

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

.order-summary {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.order-summary h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.summary-items {
    display: grid;
    gap: 0.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

/* Адаптив */
@media (max-width: 968px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .calculator-result {
        position: static;
    }

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

@media (max-width: 768px) {
    .calculator-section {
        padding: 60px 0;
    }

    .calculator-form {
        padding: 1.5rem;
    }

    .result-card {
        padding: 1.5rem;
    }

    .total-price .price {
        font-size: 2rem;
    }

    .calculator-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .step-indicator {
        order: -1;
    }

    .option-card {
        flex-direction: column;
        text-align: center;
    }

    .option-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }

    .checkbox-card {
        flex-direction: column;
        text-align: center;
    }

    .checkmark {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .calculator-section {
        padding: 40px 0;
    }

    .calculator-form {
        padding: 1rem;
    }

    .result-card {
        padding: 1rem;
    }

    .total-price .price {
        font-size: 1.8rem;
    }

    .range-labels {
        font-size: 0.8rem;
    }

    .range-value {
        flex-direction: column;
        gap: 0.25rem;
    }
}