/* Hero Slider Styles */
#hero-slider {
    position: relative;
    overflow: hidden;
    height: 800px !important;
    max-height: 800px !important;
    min-height: 450px;
    display: flex;
    align-items: center;
    background: #000;
}

#hero-slider.spad {
    padding-top: 30px;
    padding-bottom: 30px;
}

.slider-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    transform: none;
}

.slider-bg.active {
    opacity: 1;
    z-index: 1;
    /* Current slide stays behind glitch */
}

/* Glitch Effect Layer */
.glitch-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: none;
    z-index: 3;
    /* Glitch on top of everything */
    pointer-events: none;
    opacity: 0.1;

}

.glitch-active .glitch-layer {
    display: block;
    animation: digital-noise 0.2s steps(2) infinite;
}

@keyframes digital-noise {
    0% {
        clip-path: inset(80% 0 1% 0);
        transform: translate(-10px, -5px);
        filter: hue-rotate(90deg) contrast(1.5);
    }

    10% {
        clip-path: inset(10% 0 85% 0);
        transform: translate(10px, 5px);
    }

    20% {
        clip-path: inset(50% 0 45% 0);
        transform: translate(-5px, 10px);
        filter: invert(1);
    }

    30% {
        clip-path: inset(25% 0 70% 0);
        transform: translate(5px, -10px);
    }

    40% {
        clip-path: inset(70% 0 20% 0);
        transform: translate(-15px, 0);
    }

    50% {
        clip-path: inset(5% 0 90% 0);
        transform: translate(15px, 0);
        filter: saturate(3);
    }

    60% {
        clip-path: inset(40% 0 55% 0);
        transform: translate(-2px, -2px);
    }

    70% {
        clip-path: inset(15% 0 80% 0);
        transform: translate(2px, 2px);
    }

    80% {
        clip-path: inset(60% 0 35% 0);
        transform: translate(-8px, 4px);
    }

    90% {
        clip-path: inset(30% 0 65% 0);
        transform: translate(8px, -4px);
    }

    100% {
        clip-path: inset(0 0 0 0);
        transform: translate(0, 0);
    }
}

/* Static Noise Overlay during glitch */
.glitch-active#hero-slider::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.15;
    z-index: 4;
    pointer-events: none;
}

/* Text Stylings */
.hs-text-container {
    position: relative;
    z-index: 5;
    min-height: 250px;
    display: flex;
    align-items: center;
}

.hs-text-item {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.hs-text-item.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%);
}

.hs-text-item span {
    color: #e32879;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.hs-text-item h2 {
    color: #ffffff;
    font-size: 58px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
}

@media screen and (max-width: 768px) {
    .hs-text-container {
        text-align: center;
        justify-content: center;
    }

    .hs-text-item h2 {
        font-size: 36px;
    }

    .hs-text-item span {
        margin-left: 0 !important;
    }
}

/* Brightness Flicker only during transition */
.glitch-active#hero-slider::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    z-index: 6;
    pointer-events: none;
    animation: simple-flicker 0.05s infinite;
}

@keyframes simple-flicker {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Slider Navigation Dots */
.slider-dots {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
    align-items: flex-end;
}

.dot {
    width: 80px;
    height: 14px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
    opacity: 0.6;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.dot.active {
    height: 16px;
    background: rgba(255, 255, 255, 0.8);
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Services Section Styles */
.services-section {
    position: relative;
    z-index: 1;
}

.service-item {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 12px;
    padding: 40px 30px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: calc(100% - 30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-item:hover {
    /* transform: scale(1.05) translateY(-10px); - ОТКЛЮЧЕНО ДЛЯ ПЛАВНОГО JS PARALLAX */
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.service-item:hover::before {
    opacity: 1;
}

.service-item img {
    margin-bottom: 25px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-item:hover img {
    transform: scale(1.2) rotate(5deg);
}

.service-item h4 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.service-item:hover h4 {
    color: var(--accent-color, #e32879);
}

.service-item p {
    color: #b1b1b1;
    margin-bottom: 0;
    line-height: 1.6;
}