﻿/* ===== ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ РАЗДЕЛА УСЛУГ (АДАПТИВНЫЕ) ===== */
#services {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(to bottom, #f9f7ff, #f0f4ff);
    overflow: hidden;
}

    #services .decorative {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.15;
        z-index: 0;
    }

    #services .blob {
        position: absolute;
        border-radius: 50%;
        mix-blend-mode: multiply;
        filter: blur(70px);
        z-index: -1;
        animation: float 15s infinite ease-in-out;
    }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(20px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-15px, 20px) scale(0.9);
    }

    75% {
        transform: translate(10px, 15px) scale(1.05);
    }
}

#services .particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(167, 139, 250, 0.1);
    animation: particleFloat 20s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

/* Уменьшаем размеры декораций на мобильных */
@media (max-width: 767px) {
    #services .blob-purple {
        width: 180px;
        height: 180px;
        top: 5%;
        left: 10%;
    }

    #services .blob-blue {
        width: 200px;
        height: 200px;
        bottom: 5%;
        right: 10%;
    }

    #services .blob-pink {
        width: 150px;
        height: 150px;
        top: 30%;
        right: 30%;
    }

    #services .particle-1,
    #services .particle-2,
    #services .particle-3 {
        width: 8px;
        height: 8px;
    }
}

/* Заголовок */
#services .heading {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
}

#services .icon-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #7e22ce, #4f46e5);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px -5px rgba(126, 34, 206, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

    #services .icon-container:hover {
        transform: rotate(15deg) scale(1.1);
        box-shadow: 0 12px 25px -5px rgba(126, 34, 206, 0.4);
    }

#services h2 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#services .heading-gradient {
    background: linear-gradient(90deg, #7e22ce, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#services .divider {
    width: 70px;
    height: 4px;
    background: linear-gradient(to right, #7e22ce, #4f46e5);
    margin: 15px auto;
    border-radius: 2px;
}

#services .subheading {
    font-size: 1.05rem;
    color: #4b5563;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Фильтры - горизонтальный скролл на мобильных */
.filters {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
    overflow-x: auto;
    padding: 10px 5px 15px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .filters::-webkit-scrollbar {
        display: none;
    }

.service-filter {
    padding: 10px 20px;
    background: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
}

    .service-filter::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, #7e22ce, #4f46e5);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
        border-radius: 30px;
    }

    .service-filter:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
        color: #fff;
    }

        .service-filter:hover::before {
            opacity: 1;
        }

    .service-filter.active {
        background: linear-gradient(to right, #7e22ce, #4f46e5);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(126, 34, 206, 0.35);
    }

/* Карточки услуг - адаптивные */
.services-carousel {
    position: relative;
    overflow: hidden;
    padding: 0 15px;
}

.services-slides {
    display: flex;
    transition: transform 0.6s ease;
    gap: 20px;
    padding: 10px 0;
    align-items: stretch;
}

.service-card {
    flex: 0 0 calc(100% - 20px);
    min-width: 0;
    perspective: 1000px;
    position: relative;
    z-index: 1;
    transition: z-index 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card-inner {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
    position: relative;
    z-index: 5;
    border: 1px solid transparent;
    background-clip: padding-box;
}

    .service-card-inner::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, #f5f3ff, #eef2ff, #f5f3ff);
        z-index: -1;
        border-radius: 20px;
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .service-card-inner:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    }

        .service-card-inner:hover::before {
            opacity: 1;
        }

        .service-card-inner:hover .service-icon {
            transform: translateY(-5px) rotate(5deg);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        }

/* Заголовок карточки */
.service-card-header {
    padding: 20px 20px 12px;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 22px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #f5f3ff;
    color: #7e22ce;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: #1f2937;
}

.service-price {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 8px 0;
    color: #7e22ce;
}

/* Особенности услуги */
.service-features {
    padding: 15px 20px;
    flex-grow: 1;
    flex-shrink: 0;
}

    .service-features li {
        padding: 7px 0;
        color: #4b5563;
        position: relative;
        padding-left: 20px;
        font-size: 0.92rem;
        line-height: 1.45;
    }

        .service-features li:before {
            content: "✓";
            color: #7e22ce;
            position: absolute;
            left: 0;
            font-weight: bold;
        }

/* Футер карточки */
.service-card-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-direction: column;
}

.service-details-btn, .service-book-btn {
    padding: 12px 15px;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 1rem;
}

.service-details-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .service-details-btn:hover {
        background: #f3f4f6;
        border-color: #d1d5db;
    }

.service-book-btn {
    background: linear-gradient(to right, #7e22ce, #4f46e5);
    color: white;
    box-shadow: 0 4px 10px rgba(126, 34, 206, 0.2);
}

    .service-book-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(126, 34, 206, 0.3);
    }

/* Детали услуги */
.service-details {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
    z-index: 5;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

    .service-details.active {
        opacity: 1;
        visibility: visible;
        transform: scale(1);
    }

    .service-details h4 {
        font-size: 1.25rem;
        margin: 5px 0 15px;
        color: #1f2937;
        padding-right: 30px;
    }

    .service-details ul {
        padding-left: 20px;
        margin-bottom: 20px;
        flex-grow: 1;
    }

    .service-details li {
        padding: 8px 0;
        color: #4b5563;
        line-height: 1.5;
        font-size: 0.95rem;
    }

.details-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    font-size: 18px;
    color: #4b5563;
}

    .details-close-btn:hover {
        background: #e5e7eb;
        transform: rotate(90deg);
    }

/* Карусель */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
}

    .carousel-btn:hover {
        background: linear-gradient(to right, #7e22ce, #4f46e5);
        color: white;
        transform: translateY(-50%) scale(1.1);
    }

.carousel-prev {
    left: 5px;
}

.carousel-next {
    right: 5px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    gap: 8px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .indicator::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to right, #7e22ce, #4f46e5);
        border-radius: 50%;
        transform: scale(0);
        transition: transform 0.3s ease;
    }

    .indicator.active::after {
        transform: scale(1);
    }

    .indicator.active {
        transform: scale(1.15);
    }

/* Анимация карточек */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

/* Адаптивность */
@media (min-width: 768px) {
    #services {
        padding: 120px 0;
    }

    .filters {
        justify-content: center;
        padding: 0;
        overflow-x: visible;
    }

    .service-card {
        flex: 0 0 calc(50% - 15px);
    }

    .service-card-footer {
        flex-direction: row;
    }

    .service-details-btn,
    .service-book-btn {
        width: auto;
        font-size: 0.95rem;
    }
}

@media (min-width: 992px) {
    .service-card {
        flex: 0 0 calc(33.333% - 20px);
    }

    #services .icon-container {
        width: 80px;
        height: 80px;
    }

    #services h2 {
        font-size: 2.8rem;
    }

    .service-card h3 {
        font-size: 1.4rem;
    }
}

/* ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 767px) {
    #services {
        padding: 70px 0;
    }

        #services h2 {
            font-size: 2rem;
        }

    .service-card {
        flex: 0 0 calc(100% - 20px);
        height: auto;
    }

    .service-card-inner {
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
    }

    .service-card-header {
        padding: 0 0 12px 0;
        border-bottom: 1px solid #f3f4f6;
        flex-shrink: 0;
    }

    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 18px;
        margin-bottom: 12px;
    }

    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }

    .service-price {
        font-size: 1.2rem;
        margin: 4px 0 8px;
    }

    .service-features {
        padding: 12px 0;
        flex-grow: 1;
        flex-shrink: 0;
    }

        .service-features li {
            font-size: 0.85rem;
            padding: 6px 0 6px 18px;
            line-height: 1.4;
        }

    .service-card-footer {
        padding: 10px 0 0 0;
        gap: 8px;
        flex-direction: column;
    }

    .service-details-btn,
    .service-book-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .carousel-btn {
        width: 38px;
        height: 38px;
    }

    /* НОВЫЕ СТИЛИ ДЛЯ ФИЛЬТРОВ НА МОБИЛЬНЫХ */
    .filters {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
        padding: 0 8px;
        overflow-x: visible;
    }

    .service-filter {
        flex: 0 1 calc(33.333% - 12px);
        text-align: center;
        padding: 8px 5px;
        font-size: 0.85rem;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: normal;
    }

        .service-filter:nth-child(-n+2) {
            flex: 0 1 calc(50% - 12px);
        }
}

/* Дополнительные правки для очень маленьких экранов */
@media (max-width: 480px) {
    .service-card-inner {
        padding: 1.2rem;
    }

    .service-icon {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .service-card h3 {
        font-size: 1.05rem;
    }

    .service-price {
        font-size: 1.15rem;
    }

    .service-features li {
        font-size: 0.82rem;
        padding: 5px 0 5px 16px;
    }

    .service-details-btn,
    .service-book-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    /* Дополнительные правки для фильтров */
    .service-filter {
        font-size: 0.8rem;
        padding: 6px 4px;
        min-height: 36px;
    }
}

@media (max-width: 767px) {
    .services-slides.single-card-view {
        justify-content: center;
    }
}

/* Отключаем карусель на мобильных */
@media (max-width: 767px) {
    .services-carousel {
        overflow: visible !important;
        padding: 0;
    }

    .services-slides {
        flex-direction: column;
        transform: none !important;
        gap: 20px;
    }

    .carousel-btn,
    .carousel-indicators {
        display: none !important;
    }
}
