.services {
    background: #f9f9f9;
    padding: 80px 20px;
    text-align: center;
    color: #333;
}

.services h2 {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.decor-line {
    width: 50px;
    height: 3px;
    background: #8000FF;
    margin: 0 auto 30px;
}

.description {
    font-size: 16px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

.service-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: left;
    width: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service-card .image-block-features {
    width: 100%;
    min-height: 335px; /* Минимальная высота для всех изображений */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Обрезаем всё, что выходит за рамки */
    background-color: #f0f0f0; /* Фон для пустых участков */
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 15px;
    box-sizing: border-box;
}

.service-card .image-block-features img {
    max-width: 100%; /* Изображение не превышает ширину контейнера */
    max-height: 260px; /* Изображение не превышает высоту контейнера */
    object-fit: contain; /* Сохраняет пропорции без обрезки */
}

.service-card h3 {
    font-size: 20px;
    font-weight: bold;
    color: #8000FF;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.service-card .features {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #333;
}

.service-card .features li {
    font-size: 14px;
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    text-align: left;
}

.service-card .features li::before {
    content: "✔";
    color: #8000FF;
    position: absolute;
    left: 0;
    font-size: 16px;
    top: 0;
}

.btn-primary {
    background: linear-gradient(135deg, #8000FF, #5d00b5);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 20px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5d00b5, #8000FF);
    transform: scale(1.05);
}

/* --- Стили кнопки "Подробнее" в карточке --- */
.service-card .btn-primary {
    margin-top: auto; /* Располагает кнопку внизу карточки */
    align-self: center;
    margin-top: 40px;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
    .service-cards {
        flex-direction: column;
        align-items: center;
    }

    .service-card {
        width: 90%;
    }
}
