/* ========================================
   Список услуг
   ======================================== */

.services-list-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
    font-family: "Ubuntu", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Поиск */
.services-search {
    position: relative;
    margin-bottom: 24px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #EA594D;
    box-shadow: 0 0 0 3px rgba(234, 89, 77, 0.1);
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Группа */
.service-group {
    background: white;
    border-radius: 16px;
    margin-bottom: 8px;
    border: 1px solid #f3f4f6;
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(234, 89, 77, 0.12);
    border-color: #EA594D;
}

.service-group-header {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.group-icon {
    width: 24px;
    height: 24px;
    color: #EA594D;
    flex-shrink: 0;
}

.group-name {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.group-count {
    font-size: 13px;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 500;
}

.group-expand-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.group-expand-btn:hover {
    color: #374151;
}

.service-group.expanded .group-expand-btn {
    transform: rotate(180deg);
}

.group-expand-btn svg {
    width: 20px;
    height: 20px;
}

.service-group-body {
    display: none;
    border-top: 1px solid #f3f4f6;
}

.service-group.expanded .service-group-body {
    display: block;
}

/* Карточка услуги */
.service-card {
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s;
}

.service-card:last-child {
    border-bottom: none;
}

.service-card:hover {
    background: #fdf2f1;
}

.service-row {
    display: flex;
    align-items: center;
    padding: 14px 24px 14px 40px;
    gap: 16px;
    cursor: pointer;
    user-select: none;
}

.service-article {
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
    font-family: monospace;
    flex-shrink: 0;
    min-width: 90px;
}

.service-name {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    flex: 1;
}

.service-price-action {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.service-price {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
}

.service-expand-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.service-expand-btn:hover {
    color: #374151;
}

.service-card.expanded .service-expand-btn {
    transform: rotate(180deg);
}

.service-expand-btn svg {
    width: 16px;
    height: 16px;
}

/* Детали услуги */
.service-details {
    display: none;
    background: #fafafa;
    border-top: 1px solid #f3f4f6;
}

.service-card.expanded .service-details {
    display: block;
}

.service-preparation {
    padding: 16px 24px 16px 40px;
    text-align: justify;
}

.service-preparation h4 {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.service-preparation p {
    font-size: 14px;
    color: #374151;
    margin: 0;
    line-height: 1.6;
}

/* Пусто */
.no-services {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 16px;
}

/* Пагинация */
.services-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}

.services-pagination .pagination-btn,
.pagination-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
}

.pagination-btn.active {
    background: #111827;
    border-color: #111827;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    padding: 0 4px;
    color: #9ca3af;
    font-size: 14px;
}

/* Загрузка */
.services-loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 2px solid #f0f0f0;
    border-top-color: #EA594D;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 640px) {
    .services-list-container {
        padding: 24px 12px;
    }
    
    .service-group-header {
        padding: 14px 16px;
        gap: 10px;
    }
    
    .group-name {
        font-size: 15px;
    }
    
    .service-row {
        padding: 12px 12px 12px 12px;
        gap: 10px;
        flex-wrap: nowrap;
        align-items: flex-start;
    }
    
    .service-article {
        font-size: 11px;
        flex-shrink: 0;
        padding-top: 2px;
        min-width: 40px;
    }
    
    .service-name {
        font-size: 14px;
        flex: 1;
        min-width: 0;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .service-price-action {
        flex-shrink: 0;
        padding-top: 2px;
    }
    
    .service-price {
        font-size: 14px;
    }
    
    .service-preparation {
        padding: 12px 12px 12px 12px;
        text-align: justify;
    }
}