/* Стили для каталога услуг - карточки категорий на Flexbox */
.catalog-services-categories {
    margin: 30px 0;
    width: 100%;
}

.catalog-services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
}

.catalog-services-category-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    flex: 0 0 calc(50% - 10px);
    min-height: 300px;
}

.catalog-services-category-card:hover {
    text-decoration: none;
    transform: translateY(-5px);
}

.catalog-services-category-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.catalog-services-category-card:hover .catalog-services-category-item {
    box-shadow: 0 8px 20px rgba(51, 51, 51, 0.15);
}

.catalog-services-category-image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #f8f9fa;
    flex-shrink: 0;
}

.catalog-services-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.catalog-services-category-card:hover .catalog-services-category-image img {
    transform: scale(1.05);
}

.catalog-services-category-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.catalog-services-category-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.3;
    flex-shrink: 0;
}

.catalog-services-category-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.catalog-services-category-count {
    color: #0cb28b;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.catalog-services-category-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: #0cb28b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.catalog-services-category-arrow svg {
    width: 16px;
    height: 16px;
}

.catalog-services-category-card:hover .catalog-services-category-arrow {
    background: #0cb28b;
    transform: translateX(3px);
}

/* Адаптивность на Flexbox */
@media (max-width: 1024px) {
    .catalog-services-category-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .catalog-services-grid {
        gap: 15px;
    }
    
    .catalog-services-category-card {
        flex: 0 0 calc(50% - 7.5px);
        min-height: 280px;
    }
    
    .catalog-services-category-image {
        height: 150px;
    }
    
    .catalog-services-category-content {
        padding: 15px;
    }
    
    .catalog-services-category-title {
        font-size: 1.1rem;
    }
    
    .catalog-services-category-arrow {
        width: 30px;
        height: 30px;
    }
    
    .catalog-services-category-arrow svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 576px) {
    .catalog-services-grid {
        gap: 12px;
        flex-direction: column;
    }
    
    .catalog-services-category-card {
        flex: 1 1 100%;
        min-height: 250px;
    }
    
    .catalog-services-category-image {
        height: 120px;
    }
    
    .catalog-services-category-content {
        padding: 12px;
    }
    
    .catalog-services-category-title {
        font-size: 1rem;
    }
    
    .catalog-services-category-arrow {
        width: 28px;
        height: 28px;
    }
    
    .catalog-services-category-arrow svg {
        width: 12px;
        height: 12px;
    }
}

/* Стили для пустого состояния */
.catalog-services-no-categories {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 1.1rem;
}

/* Дополнительные утилиты для Flexbox */
.catalog-services-grid::after {
    content: "";
    flex: auto;
}

/* Обеспечиваем равную высоту карточек */
.catalog-services-category-card {
    display: flex;
}

.catalog-services-category-item {
    width: 100%;
}
