/**
 * Стили для блока карточек услуг
 *
 * @package Empty_Theme
 */

/* Контейнер блока карточек услуг */
.service-cards-section {
    padding: 40px 0;
    margin-top: 30px;
}

.service-cards-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #0071CE, #004b96, #0090ff, #00a1ff, #0071CE);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #0071CE; /* Запасной цвет для браузеров, не поддерживающих градиент */
    margin-bottom: 30px;
    text-shadow: 0 2px 10px rgba(0, 113, 206, 0.15);
    position: relative;
    display: inline-block;
    width: 100%;
    animation: gradient-animation 5s ease infinite;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.service-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px 30px; /* первое значение - вертикальный отступ, второе - горизонтальный */
    row-gap: 50px; /* увеличиваем расстояние между строками */
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Стили для карточки услуги */
.service-card {
    position: relative;
    aspect-ratio: 1/1; /* Квадратная форма */
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* Эффект при наведении */
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Неоновая обводка при наведении */
.service-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    box-shadow: 0 0 15px 2px rgba(0, 113, 206, 0.7); /* Неоновый синий цвет */
    pointer-events: none;
    z-index: 2;
}

/* Стили для изображения в карточке */
.service-card-image {
    height: 60%;
    width: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Эффект блюра на изображении */
.service-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
}

/* Усиление блюра при наведении */
.service-card:hover .service-card-image::before {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
}

/* Кнопка "Подробнее" */
.service-card-more {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    background-color: #0071CE;
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 113, 206, 0.3);
    transition: all 0.3s ease;
    z-index: 3;
    white-space: nowrap;
}

/* Появление кнопки "Подробнее" при наведении */
.service-card:hover .service-card-more {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.service-card-more:hover {
    background-color: #005baa;
    box-shadow: 0 4px 15px rgba(0, 113, 206, 0.5);
}

/* Стили для контента карточки */
.service-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.service-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.service-card:hover .service-card-title {
    color: #0071CE;
}

.service-card-description {
    font-size: 14px;
    color: #666;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Стили для карточки "Все услуги" */
.all-services-card {
    background-color: #f2f2f2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px dashed #ccc;
}

.all-services-card:hover {
    background-color: #e5e5e5;
    border-color: #0071CE;
}

.all-services-card .service-card-title {
    margin-top: 15px;
    margin-bottom: 0;
}

.all-services-icon {
    font-size: 36px;
    color: #0071CE;
    margin-bottom: 10px;
}

/* Адаптивные стили */
@media (max-width: 1400px) {
    .service-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 1200px) {
    .service-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 25px;
        row-gap: 45px; /* увеличиваем расстояние между строками */
    }
}

@media (max-width: 992px) {
    .service-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
        row-gap: 40px; /* увеличиваем расстояние между строками */
    }

    .service-cards-title {
        font-size: 32px;
        background: linear-gradient(135deg, #0071CE, #004b96, #0090ff);
        -webkit-background-clip: text;
        background-clip: text;
    }

    .service-card-more {
        padding: 6px 18px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .service-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        row-gap: 35px; /* увеличиваем расстояние между строками */
    }

    .service-cards-title {
        font-size: 28px;
    }

    .service-card-title {
        font-size: 16px;
    }

    .service-card-description {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .service-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        row-gap: 25px; /* увеличиваем расстояние между строками */
        padding: 10px;
    }

    .service-cards-title {
        font-size: 24px;
    }

    .service-card-more {
        padding: 5px 15px;
        font-size: 12px;
    }
}
