/* Основные стили */
.main-content {
    max-width: 1374px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.main-title {
    font-size: 45px;
    font-weight: 500;
    margin-bottom: 50px;
    margin-top: 60px;
    line-height: 1.2;
    color: #333;
}

/* Карусель для десктопа */
@media (min-width: 1025px) {
    .services-carousel {
        position: relative;
        width: 100%;
        max-width: 1374px;
        margin: 0 auto 50px;
        padding: -10px 0;
    }
    
    .carousel-container {
        overflow: hidden;
        width: calc(100% - 60px); /* Оставляем место для кнопок */
        margin: 0 auto;
        padding: 30px 0;
    }
    
    .carousel-track {
        display: flex;
        transition: transform 0.5s ease;
        width: max-content;
    }
    
    .service-card {
        width: 400px;
        height: 550px; /* Фиксированная высота */
        flex-shrink: 0;
        margin-right: 30px;
        padding: 30px;
        box-sizing: border-box;
        background: #fff;
        border: 2px solid #d0d0d0;
        border-radius: 50px;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
    }
    
    .service-card:last-child {
        margin-right: 0;
    }
    
    .service-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-color: #333;
    }
    
    .service-title {
        font-size: 35px;
        font-weight: 500;
        line-height: 1.3;
        color: #000;
        flex: 1; /* Занимает все доступное пространство */
        display: flex;
        align-items: center; /* Центрирование по вертикали */
        margin-bottom: 25px;
        min-height: 120px; /* Минимальная высота для текста */
    }
    
    .service-image {
        width: 100%;
        height: 300px;
        object-fit: cover;
        border-radius: 25px;
        flex-shrink: 0; /* Фиксированный размер */
    }
    
    /* Кнопки навигации */
    .carousel-button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        background: #fcfcfc;
        border: 2px solid #d0d0d0;
        border-radius: 50%;
        font-size: 24px;
        cursor: pointer;
        z-index: 10;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .carousel-button:hover {
        background: #333;
        color: #f8f8f8;
        border-color: #333;
    }
    
    .prev {
        left: -40px;
    }
    
    .next {
        right: -30px;
    }
}

/* Мобильная версия калькулятора (≤1024px) */
@media (max-width: 1024px) {
    .calculator-table table {
        display: none; /* Скрываем таблицу */
    }
    
    .mobile-options-container {
        display: block;
        margin-top: 20px;
    }
    
    .mobile-service-options {
        display: none; /* По умолчанию скрыты все варианты */
        background: #f9f9f9;
        border-radius: 25px;
        padding: 20px;
        margin-top: 15px;
    }
    
    /* Показываем только активный вариант */
    .calculator-table[data-active-service="design"] [data-service="design"],
    .calculator-table[data-active-service="house"] [data-service="house"] {
        display: block;
    }
    
    .mobile-option-group {
        margin-bottom: 25px;
    }
    
    .mobile-option-group:last-child {
        margin-bottom: 0;
    }
    
    .mobile-option-title {
        font-family: "Vela Sans-Medium", Helvetica;
        font-size: 20px;
        font-weight: 500;
        color: #333;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .mobile-options-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    /* Стили кнопок такие же как в десктопе */
    .mobile-option-button {
        width: 100%;
        padding: 12px 8px;
        background: #fcfcfc;
        border: 2px solid #d0d0d0;
        border-radius: 54.5px;
        font-family: "Vela Sans-Medium", Helvetica;
        font-size: 16px;
        color: #333;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
    }
    
    .mobile-option-button:hover {
        border-color: #333;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .mobile-option-button.active {
        background: #333;
        color: #fff;
        border-color: #333;
    }
    
    /* Адаптация кнопок выбора услуги */
    .service-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .service-button {
        width: 100%;
    }

    .mobile-option-button {
        width: 100%;
        padding: 12px 8px;
        background: #fcfcfc;
        border: 2px solid #d0d0d0;
        border-radius: 54.5px;
        font-family: "Vela Sans-Medium", Helvetica;
        font-size: 16px;
        color: #333;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
    }
    
    .mobile-option-button:hover {
        border-color: #333;
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .mobile-option-button.active {
        background: #333 !important;
        color: #fff !important;
        border-color: #333 !important;
    }
}

/* В десктопной версии скрываем мобильные элементы */
@media (min-width: 1025px) {
    .mobile-options-container {
        display: none !important;
    }
}

/* Мобильная версия */
@media (max-width: 1024px) {
    .main-content {
        padding: 40px 20px;
        width: 100%;
        box-sizing: border-box; /* Добавлено */
        overflow: hidden; /* Добавлено */
    }

    .main-title {
        font-size: 45px !important;
    }
    
    .services-carousel {
        position: relative;
        width: 100vw;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        padding: 20px 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 30px;
    }
    
    .services-carousel::-webkit-scrollbar {
        display: none;
    }
    
    .carousel-container {
        width: auto;
        padding: 0 20px;
        display: inline-block;
        white-space: nowrap;
    }
    
    .carousel-track {
        display: inline-flex;
        gap: 18px;
        white-space: nowrap;
    }
    
    .service-card {
        display: inline-flex;
        width: 51vw;
        max-width: 400px;
        height: auto;
        min-height: 310px; /* Минимальная высота */
        padding: 12px;
        border: 2px solid #d0d0d0;
        border-radius: 24px;
        flex-direction: column;
        white-space: normal;
    }
    
    .service-title {
        color: #000;
        font-size: 16.8px;
        margin-bottom: 2px;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 5px; /* Небольшие боковые отступы */
        flex-grow: 1; /* Занимает доступное пространство */
    }
    
    .service-image {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 15px;
        flex-shrink: 0;
        margin-top: auto; /* Прижимаем изображение к низу */
        margin-bottom: 15px;
    }
    
    .carousel-button {
        display: none !important;
    }
    
    .main-title {
        font-size: 36px;
        margin-bottom: 30px;
        margin-top: -10px;
    }
    
    .cta-button {
        font-size: 24px;
        margin: 40px auto 0;
    }
}

/* Кнопка заказа */
.cta-button {
    display: block;
    width: max-content;
    padding: 12px 30px;
    margin: 50px 0 0;
    font-size: 30px;
    font-weight: 500;
    color: #000;
    background: #fcfcfc;
    border: 2px solid #d0d0d0;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #000;
    color: #f8f8f8;
    border-color: #000;
}

/* Calculator Styles */
.calculator-section {
    max-width: 1374px;
    margin: -40px auto;
    padding: 0 20px;
}

.calculator-title {
    font-family: "Vela Sans-Medium", Helvetica;
    font-size: 45px;
    font-weight: 500;
    margin-bottom: 50px;
    line-height: 1.2;
    color: #333;
}

.calculator-table {
    background: #fff;
    border-radius: 50px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Поле ввода площади */
.area-input-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.area-label {
    font-family: "Vela Sans-Medium", Helvetica;
    font-weight: 500;
    font-size: 24px;
    color: #333;
    white-space: nowrap;
}

.area-input {
    width: 150px;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid #d0d0d0;
    font-family: "Vela Sans-Medium", Helvetica;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
    -moz-appearance: textfield;
}
.area-input:focus {
    outline: none;
    border-bottom-color: #333;
}

.area-input::-webkit-outer-spin-button,
.area-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Кнопки выбора услуги */
.service-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.service-button {
    flex: 1;
    padding: 20px;
    background: #f6f6f6;
    border: 2px solid #d0d0d0;
    border-radius: 54.5px;
    font-family: "Vela Sans-Medium", Helvetica;
    font-size: 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.service-button:hover {
    border-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-button.active {
    background: #333;
    color: #fff;
    border-color: #333;
    font-weight: 500;
}

.service-button span {
    font-size: 16px;
    color: inherit;
    opacity: 0.8;
}

/* Таблица */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #d0d0d0;
    border-right: 1px solid #d0d0d0;
    vertical-align: middle;
}

th:first-child, td:first-child {
    width: 120px;
    background-color: #fff;
    text-align: center;
    font-family: "Vela Sans-Medium", Helvetica;
    font-weight: 500;
    font-size: 18px;
    color: #333;
}

th:last-child, td:last-child {
    border-right: none;
}

th {
    font-family: "Vela Sans-Medium", Helvetica;
    font-weight: 500;
    font-size: 18px;
    color: #333;
    background-color: #fff !important;
}

.active-column {
    background-color: #f9f9f9 !important;
}

.empty-cell {
    background-color: #fff;
}

/* Кнопки опций */
.options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-button {
    width: 100%;
    padding: 12px 20px;
    background: #fcfcfc;
    border: 2px solid #d0d0d0;
    border-radius: 54.5px;
    font-family: "Vela Sans-Medium", Helvetica;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option-button:hover {
    border-color: #333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.option-button.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

/* Результат расчета */
.calculation-result {
    margin: 30px 0;
    text-align: left;
}

.estimated-cost {
    font-family: "Vela Sans-Medium", Helvetica;
    font-size: 30px;
    color: #333;
}

#cost {
    font-family: "Vela Sans-SemiBold", Helvetica;
    font-size: 36px;
    color: #000;
}

/* Форма заявки */
.request-form {
    position: relative;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #d0d0d0;
    height: 500px;
}

.form-title {
    position: absolute;
    top: 30px;
    left: 72px;
    font-family: "Vela Sans-Medium", Helvetica;
    font-weight: 500;
    color: #333333;
    font-size: 30px;
    line-height: 30px;
    margin: 0;
}

.form-group.name {
    position: absolute;
    top: 120px;
    left: 72px;
    width: 280px;
}

.form-group.phone {
    position: absolute;
    top: 220px;
    left: 72px;
    width: 334px;
}

.form-group.request {
    position: absolute;
    top: 120px;
    left: 475px;
    width: 654px;
}

.form-label {
    display: block;
    margin-bottom: 15px;
    font-family: "Vela Sans-Medium", Helvetica;
    font-weight: 500;
    color: #333333;
    font-size: 20px;
    line-height: 20px;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 15px 25px;
    background-color: #f6f6f6;
    border-radius: 36.93px;
    border: none;
    font-family: "Vela Sans-Medium", Helvetica;
    font-size: 18px;
    color: #333333;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #d0d0d0;
}

.form-textarea {
    height: 182px;
    resize: none;
}

.submit-button {
    position: absolute;
    top: 350px;
    left: 72px;
    width: 334px;
    height: 66px;
    background-color: #fcfcfc;
    border-radius: 54.5px;
    border: 2px solid #d0d0d0;
    font-family: "Vela Sans-Medium", Helvetica;
    font-weight: 500;
    color: #333333;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #333333;
    color: #f8f8f8;
    border-color: #333333;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.direct-contact {
    margin-top: 10px;
    margin-left: 80px;
    text-align: left;
}

.contact-email {
    display: block;
    margin-top: 15px;
    font-family: "Vela Sans-SemiBold", Helvetica;
    font-weight: 600;
    color: #333333;
    font-size: 30px;
    text-decoration: underline;
}

@media (max-width: 1325px) {
    /* Мобильная версия формы */
    .request-form {
        height: auto;
        padding-top: 20px;
    }
    
    .form-title {
        position: static;
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .form-group.name,
    .form-group.phone,
    .form-group.request {
        position: static;
        width: 100%;
        margin-bottom: 15px;
    }

    .form-group.request {
        margin-top: 20px;
    }
    
    .submit-button {
        position: static;
        width: 100%;
        margin-top: 15px;
    }

    .direct-contact {
        margin-top: 40px;
        margin-left: 20px;
    }
    
    .contact-email {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .calculator-section {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .calculator-title {
        font-size: 36px;
        margin-bottom: 20px;
    }
    
    .calculator-table {
        padding: 20px;
    }
    
    .service-buttons {
        flex-direction: column;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    .params-column,
    .params-cell {
        width: 100px;
        font-size: 16px;
        padding: 10px;
    }
    
    .estimated-cost {
        font-size: 24px;
    }
    
    #cost {
        font-size: 28px;
    }
    
    /* Мобильная версия формы */
    .request-form {
        height: auto;
        padding-top: 20px;
    }
    
    .form-title {
        position: static;
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .form-group.name,
    .form-group.phone,
    .form-group.request {
        position: static;
        width: 100%;
        margin-bottom: 15px;
    }

    .form-group.request {
        margin-top: 20px;
    }
    
    .submit-button {
        position: static;
        width: 100%;
        margin-top: 15px;
    }

    .direct-contact {
        margin-top: 40px;
        margin-left: 20px;
    }
    
    .contact-email {
        font-size: 24px;
    }
}

@media (max-width: 720px) {
    .main-title,
    .calculator-title {
        font-size: 25.2px; /* Уменьшено на 30% от 36px + дополнительные 10% */
        margin-bottom: 15px;
        margin-top: 15px;
    }

    .main-title {
        margin-top: -20px;
    }
    
    .cta-button {
        font-size: 23.4px; /* Уменьшено на 10% от 26px */
        padding: 9px 22px;
        margin-top: 20px;
    }
    
    .area-label,
    .area-input {
        font-size: 18px; /* Уменьшено на 10% от 20px */
    }
    
    .service-button {
        font-size: 16.2px; /* Уменьшено на 10% от 18px */
        padding: 13px;
    }
    
    .estimated-cost {
        font-size: 23.4px; /* Уменьшено на 10% от 26px */
    }
    
    #cost {
        font-size: 27px; /* Уменьшено на 10% от 30px */
    }
    
    .form-title {
        font-size: 23.4px; /* Уменьшено на 10% от 26px */
    }
    
    .form-label {
        font-size: 16.2px; /* Уменьшено на 10% от 18px */
    }
    
    .contact-email {
        font-size: 23.4px; /* Уменьшено на 10% от 26px */
    }
    
    /* Ширина калькулятора и кнопок */
    .calculator-section {
        max-width: 95%;
        margin: 10px auto;
    }
    
    .mobile-option-button {
        font-size: 14.4px; /* Уменьшено на 10% от 16px */
        padding: 10px 6px;
    }
}

@media (max-width: 480px) {
    .main-title,
    .calculator-title {
        font-size: 19.6px; /* Уменьшено на 30% от 28px + дополнительные 10% */
        margin-bottom: 10px;
        margin-top: 10px;
    }

    .main-title {
        margin-top: -20px;
    }
    
    .cta-button {
        font-size: 19.8px; /* Уменьшено на 10% от 22px */
        padding: 7px 18px;
        margin-top: 15px;
    }
    
    .area-label,
    .area-input {
        font-size: 16.2px; /* Уменьшено на 10% от 18px */
    }
    
    .service-button {
        font-size: 14.4px; /* Уменьшено на 10% от 16px */
        padding: 10px;
    }
    
    .estimated-cost {
        font-size: 19.8px; /* Уменьшено на 10% от 22px */
    }
    
    #cost {
        font-size: 23.4px; /* Уменьшено на 10% от 26px */
    }
    
    .form-title {
        font-size: 19.8px; /* Уменьшено на 10% от 22px */
    }
    
    .form-label {
        font-size: 14.4px; /* Уменьшено на 10% от 16px */
        margin-bottom: 8px;
    }
    
    .form-input, 
    .form-textarea {
        padding: 10px 18px;
        font-size: 14.4px; /* Уменьшено на 10% от 16px */
    }
    
    .submit-button {
        height: 50px;
        font-size: 16.2px; /* Уменьшено на 10% от 18px */
    }
    
    .contact-email {
        font-size: 19.8px; /* Уменьшено на 10% от 22px */
    }
    
    /* Ширина калькулятора и кнопок */
    .calculator-section {
        max-width: 98%;
        margin: 5px auto;
        padding: 0 10px;
    }
    
    .mobile-options-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .mobile-option-button {
        font-size: 12.6px; /* Уменьшено на 10% от 14px */
        padding: 8px 4px;
        white-space: normal;
    }
    
    .mobile-option-title {
        font-size: 16.2px; /* Уменьшено на 10% от 18px */
    }

    .area-input {
        width: 105px; /* Было 150px, уменьшили на 30% */
    }
    
    /* 2. Делаем секцию калькулятора шире, убираем большие отступы */
    .calculator-section {
        max-width: 100%;
        padding: 0 0px;
        margin: 5px auto;
    }
    
    .calculator-table {
        padding: 15px;
        width: 100%;
        margin: 0 auto;
    }

    .area-input-group {
        gap: 10px;
        margin-bottom: 20px;
    }
    
    /* Улучшение отображения кнопок услуг */
    .service-buttons {
        gap: 8px;
        margin-bottom: 20px;
    }
    
    /* Улучшение отображения таблицы */
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

}