.hgs-stacked-services {
    --hgs-sticky-top: 20px;
    --hgs-stack-offset: 14px;
    --hgs-step-x: 34px;
    --hgs-card-bg: #0d69b8;
    --hgs-side-gap: 70px;

    width: calc(100vw - (var(--hgs-side-gap) * 2));
    max-width: calc(100vw - (var(--hgs-side-gap) * 2));
    margin-left: calc(50% - 50vw + var(--hgs-side-gap));
    margin-right: 0;
    position: relative;
    overflow: visible;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.hgs-stacked-services,
.hgs-stacked-services * {
    box-sizing: border-box;
}

.hgs-stacked-services__eyebrow {
    margin: 0;
    padding: 24px 28px 26px;
    text-align: center;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -.02em;
    text-transform: uppercase;
}

.hgs-stacked-services__cards {
    position: relative;
    width: 100%;
    overflow: visible;
}

.hgs-service-card {
    --hgs-card-top: var(--hgs-sticky-top);
    --hgs-step-shift: 0px;

    position: sticky;
    top: var(--hgs-card-top);
    z-index: calc(10 + var(--hgs-card-index));
    width: 100%;
    min-height: 500px;
    overflow: hidden;
    isolation: isolate;
    background-color: var(--hgs-card-bg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    margin: 0 0 18px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .08);
    transform: translateZ(0);
    font-family: "Plus Jakarta Sans", sans-serif;
    transition: width .45s ease, margin .45s ease, border-radius .45s ease, box-shadow .45s ease;
}

.hgs-service-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0,0,0,.35);
}

.hgs-service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: inherit;
    background-image: inherit;
    background-size: cover;
    background-position: inherit;
    transition: transform .8s cubic-bezier(.2,.7,.2,1);
}

.hgs-stacked-services--zoom .hgs-service-card:hover::after {
    transform: scale(1.035);
}

.hgs-service-card__inner {
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    position: relative;
    z-index: 3;
}

.hgs-service-card__content {
    width: 100%;
    max-width: 700px;
}

.hgs-service-card__title {
    margin: 0 0 22px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: clamp(34px, 4.2vw, 72px);
    line-height: .98;
    font-weight: 400;
    letter-spacing: -.035em;
}

.hgs-service-card__description {
    max-width: 720px;
    margin-bottom: 34px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
}

.hgs-service-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 13px 27px;
    border-radius: 30px;
    background: #ffd45e;
    color: #111;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.hgs-service-card__button:hover {
    background: #111;
    color: #fff;
    transform: translateY(-2px);
}

.hgs-service-card__step-edge {
    display: none;
}

/* Yürüyen merdiven görünümü */
.hgs-stacked-services--escalator .hgs-stacked-services__cards {
    padding-top: 6px;
    padding-bottom: 20px;
}

.hgs-stacked-services--escalator .hgs-service-card {
    width: calc(100% - var(--hgs-step-shift));
    border-radius: 34px 34px 12px 34px;
    border-top: 1px solid rgba(255,255,255,.26);
    box-shadow:
        -12px 12px 0 rgba(17,17,17,.07),
        0 26px 60px rgba(0,0,0,.12);
}

.hgs-stacked-services--escalator-right .hgs-service-card {
    margin-left: var(--hgs-step-shift);
    margin-right: 0;
}

.hgs-stacked-services--escalator-left .hgs-service-card {
    margin-left: 0;
    margin-right: var(--hgs-step-shift);
    border-radius: 34px 34px 34px 12px;
}

/* Basamak yüzeyi: yürüyen merdiven metal çizgilerini çağrıştırır. */
.hgs-stacked-services--escalator .hgs-service-card__step-edge {
    display: block;
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    height: 15px;
    pointer-events: none;
    opacity: .62;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(255,255,255,.6) 0 2px,
            rgba(255,255,255,.08) 2px 13px
        );
    border-top: 1px solid rgba(255,255,255,.35);
}

/* İnce hareket hissi */
@keyframes hgs-escalator-tread {
    from { background-position-x: 0; }
    to   { background-position-x: 30px; }
}

.hgs-stacked-services--escalator .hgs-service-card:hover .hgs-service-card__step-edge {
    animation: hgs-escalator-tread 1.1s linear infinite;
}

/* Elementor editörde sticky kartlar seçilebilir kalsın. */
.elementor-editor-active .hgs-service-card {
    scroll-margin-top: 120px;
}

@media (max-width: 1024px) {
    .hgs-stacked-services {
        --hgs-side-gap: 40px;
        width: calc(100vw - (var(--hgs-side-gap) * 2));
        max-width: calc(100vw - (var(--hgs-side-gap) * 2));
        margin-left: calc(50% - 50vw + var(--hgs-side-gap));
    }

    .hgs-stacked-services__eyebrow {
        font-size: 20px;
        padding: 20px 22px 22px;
    }

    .hgs-service-card__inner {
        padding: 36px;
    }

    .hgs-service-card__title {
        font-size: clamp(32px, 7vw, 54px);
    }
}

@media (max-width: 767px) {
    .hgs-stacked-services {
        --hgs-side-gap: 16px;
        width: calc(100vw - (var(--hgs-side-gap) * 2));
        max-width: calc(100vw - (var(--hgs-side-gap) * 2));
        margin-left: calc(50% - 50vw + var(--hgs-side-gap));
    }

    .hgs-stacked-services:not(.hgs-stacked-services--sticky-mobile) .hgs-service-card {
        position: relative;
        top: auto !important;
    }

    .hgs-stacked-services__eyebrow {
        font-size: 18px;
        padding: 18px 18px 20px;
    }

    .hgs-service-card {
        min-height: 380px;
        margin-bottom: 14px;
    }

    .hgs-service-card__inner {
        padding: 26px 22px 34px;
    }

    .hgs-service-card__title {
        font-size: clamp(30px, 11vw, 46px);
        margin-bottom: 16px;
    }

    .hgs-service-card__description {
        font-size: 14px;
        line-height: 1.55;
        margin-bottom: 24px;
    }

    .hgs-stacked-services--escalator .hgs-service-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 24px 24px 10px 24px;
    }

    .hgs-stacked-services--escalator-left .hgs-service-card {
        border-radius: 24px 24px 24px 10px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .hgs-service-card,
    .hgs-service-card::after,
    .hgs-service-card__button {
        transition: none !important;
    }

    .hgs-stacked-services--escalator .hgs-service-card:hover .hgs-service-card__step-edge {
        animation: none !important;
    }
}
