:root {
    --stack-padding-top: 50px;
    --stack-blur: 10px;
    --stack-scale: 0.9;
}

.esc-stack-wrapper {
    position: relative;
    width: 100%;
}

.esc-stack {
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
}

.esc-card {
    position: sticky;
    top: var(--stack-padding-top);
    width: 100%;
    min-height: 300px;
    margin-bottom: 50px;
    overflow: visible;
    transform-origin: center top;
    will-change: transform;
}

.esc-card__inner {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    will-change: filter, transform;
    backface-visibility: hidden;
}


.esc-card__content {
    display: flex;
    padding: 40px;
    gap: 40px;
    align-items: center;
    flex-direction: row;
}

.esc-card__text {
    flex: 1;
    order: 1;
}

.esc-card__image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    order: 2;
}

.esc-card__image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.esc-card__title {
    margin-top: 0;
    font-size: 2rem;
    margin-bottom: 15px;
}

.esc-card__description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.esc-card__button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

/* Mobile */
@media (max-width: 767px) {
    .esc-card__content {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .esc-card__text {
        order: 2;
    }

    .esc-card__image-wrapper {
        order: 1;
    }

    .esc-card__title {
        font-size: 1.5rem;
    }

    .esc-mobile-equal-height .esc-card__inner {
        height: var(--mobile-card-height, 400px);
        overflow-y: auto;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .esc-card {
        transform: none !important;
    }

    .esc-card__inner {
        filter: none !important;
    }
}