/* ============================================
   SERVICES PAGE STYLES
   ============================================ */
.services-page {
    padding-top: 0;
}

/* Анимации */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }

.service-block {
    min-height: 100vh;
    padding: 60px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
}

.service-block:last-child {
    border-bottom: none;
}

.service-block__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
    align-items: center;
}

.service-block__gallery {
    flex: 1;
    min-width: 280px;
    overflow: visible;
    border-radius: 16px;
    background: transparent;
    min-height: 0;
    display: block;
}

.service-block__content {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Чередование — меняем порядок */
.service-block--reverse .service-block__gallery {
    order: 2;
}

.service-block--reverse .service-block__content {
    order: 1;
}

.service-block__title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: normal;
    letter-spacing: 2px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-block__text {
    color: var(--gray-300);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 16px;
}

/* Список преимуществ — выравнивание по левому краю */
.service-block__list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.service-block__list li {
    padding: 8px 0;
    color: var(--gray-400);
    font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: left;
}

.service-carousel {
    width: 100%;
    position: relative;
    display: block;
}

.carousel-viewport {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
    aspect-ratio: 16 / 9;
}

.carousel-viewport.is-scroll-mode {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.carousel-viewport.is-scroll-mode::-webkit-scrollbar {
    display: none;
}

.carousel-viewport.is-scroll-mode .carousel-slides {
    transform: none !important;
    transition: none !important;
}

.carousel-viewport.is-scroll-mode .carousel-slide {
    flex: 0 0 var(--carousel-slide-width, 100%);
    width: var(--carousel-slide-width, 100%);
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.carousel-slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    min-height: 0;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.carousel-video {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.carousel-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.6);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.carousel-play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 0 8px 14px;
    border-color: transparent transparent transparent #fff;
}

.carousel-video:hover .carousel-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0,0,0,0.8);
}

.carousel-placeholder {
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 14px;
}

.service-carousel > .carousel-btn-prev,
.service-carousel > .carousel-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50%;
    color: white;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 30;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    margin: 0;
    padding: 0;
}

.carousel-btn-prev {
    left: 10px;
}

.carousel-btn-next {
    right: 10px;
}

.carousel-btn-prev:hover,
.carousel-btn-next:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.8);
}

.primary-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fbbf24;
    color: #000;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

@media (min-width: 769px) {
    .service-block__gallery {
        min-height: 280px;
        display: flex;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .service-block {
        min-height: auto;
        height: auto;
        padding: 40px 0;
    }
    
    .service-block__inner {
        flex-direction: column;
        gap: 24px;
        padding: 0 clamp(16px, 4vw, 24px);
    }
    
    .service-block--reverse .service-block__gallery,
    .service-block--reverse .service-block__content {
        order: unset;
    }
    
    .service-block__gallery {
        width: 100%;
        flex: none;
        min-height: 0;
        height: auto;
        padding: 0;
        margin: 0;
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }

    .service-block__gallery.reveal,
    .service-block__gallery.reveal.visible {
        transform: none;
    }

    .service-carousel {
        width: 100%;
        height: auto;
    }

    .carousel-viewport {
        aspect-ratio: 16 / 9;
        height: auto;
        width: 100%;
    }

    .carousel-slides {
        height: 100%;
    }
    
    .service-block__content {
        text-align: left;
    }
    
    .service-block__list,
    .service-block__list li {
        text-align: left;
    }
    
    .service-carousel > .carousel-btn-prev,
    .service-carousel > .carousel-btn-next {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
        background: rgba(0, 0, 0, 0.7);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .service-carousel > .carousel-btn-prev {
        left: 6px;
    }

    .service-carousel > .carousel-btn-next {
        right: 6px;
    }

    .service-carousel > .carousel-btn-prev:active,
    .service-carousel > .carousel-btn-next:active {
        background: rgba(0, 0, 0, 0.88);
        border-color: rgba(255, 255, 255, 0.95);
        transform: translateY(-50%);
        opacity: 1;
    }
    
    .carousel-play-btn {
        width: 45px;
        height: 45px;
    }
    
    .carousel-play-btn::after {
        border-width: 6px 0 6px 10px;
    }
}