.services-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: var(--m60-rem);
}

/* Блок */
.service-item {
    display: flex;
    align-items: stretch;
    gap: 30px;
}

/* Контейнер картинки фиксируем */
.service-image {
    flex: 0 0 300px;
    /* фиксированная ширина колонки под фото */
    max-width: 100%;
    height: 220px;
    /* фиксированная высота */
    overflow: hidden;
    border-radius: 8px;
}

/* Само изображение */
.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* обрезает лишнее, но картинка не деформируется */
    display: block;
}

/* Текст */
.service-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-text h3 {
    margin-bottom: var(--m30-rem);
}



/* Чередование */
.service-item.left .service-image {
    order: 1;
}

.service-item.left .service-text {
    order: 2;
}

.service-item.right .service-text {
    order: 1;
}

.service-item.right .service-image {
    order: 2;
}

.service-desc{
    margin-bottom: 10px;
}

/* 📱 Адаптив */
@media (max-width: 768px) {
    .service-item {
        flex-direction: column;
        text-align: center;
    }

    .service-image {
        width: 100%;
        height: 200px;
    }

    /* На мобилке всегда сначала картинка, потом текст */
    .service-item .service-image {
        order: 1 !important;
        width: 100%;
        height: 200px;
    }

    .service-item .service-text {
        order: 2 !important;
        text-align: left;
    }
}


/* затемнение фона */
#service-popup {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6) !important;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* контейнер попапа */
.popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: popup-fade 0.3s ease-out;

    margin: 150px auto 0;
}

/* крестик */
.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
}

.popup-close:hover {
    color: #000;
}

/* заголовок */
#popup-title {
    margin: 0 0 15px;
    font-size: 22px;
    font-weight: bold;
    color: #000;
}

/* стили формы */
#service-form .form-group {
    margin-bottom: 15px;
}

#service-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

#service-form input,
#service-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#service-form input:focus,
#service-form textarea:focus {
    border-color: #007bff;
    outline: none;
}

/* кнопка */
#service-form button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#service-form button:hover {
    background: #0056b3;
}

/* анимация появления */
@keyframes popup-fade {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


#form-message {
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

@media (max-width: 767px) {

    #service-popup{
        padding: 0 20px;
        box-sizing: border-box;
    }
    .popup-content{
        max-width: 100%;
        width: auto;
    }
}