/* ==========================================================================
   Stacked Cards Widget — Stylesheet
   Version: 1.2.0

   GSAP pins the container and absolutely positions every card inside it, so
   the layout here only has to describe a single card; the scroll choreography
   lives in assets/js/stacked-cards.min.js.
   ========================================================================== */

/* GSAP's pinned container can push a transient horizontal scrollbar while a
   card is translated off-canvas. Clipping it keeps the page from jittering. */
body {
    overflow-x: hidden;
}

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.ew-stacked-cards {
    position: relative;
}

.ew-stacked-cards__container {
    position: relative;
    width: 100%;
    height: 100vh;
    will-change: position;
}

/* ── Card (vertical style) ──────────────────────────────────────────────── */
.ew-stacked-cards__item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    width: 100%;
    -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* ── Card (horizontal style) ────────────────────────────────────────────── */
.ew-stacked-cards__item_hr {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}

/* ── Media column ───────────────────────────────────────────────────────── */
.ew-stacked-cards__media {
    -webkit-box-flex: 0;
        -ms-flex: 0 0 60%;
            flex: 0 0 60%;
    margin-right: 30px;
}

.ew-stacked-cards__image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    -o-object-fit: cover;
       object-fit: cover;
}

/* ── Content column ─────────────────────────────────────────────────────── */
.ew-stacked-cards__content {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
}

.ew-stacked-cards__body {
    padding: 10px 0;
}

.ew-stacked-cards__title {
    margin: 0 0 15px;
}

/* ── Button ─────────────────────────────────────────────────────────────── */
.ew-stacked-cards__link {
    font-size: 15px;
    margin-top: 20px;
    display: inline-block;
    overflow: hidden;
    position: relative;
    z-index: 1;
    -webkit-transition: all 0.3s ease-in;
    transition: all 0.3s ease-in;
}

.ew-stacked-cards__link:hover {
    text-decoration: none;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media only screen and (max-width: 767px) {
    .ew-stacked-cards__item,
    .ew-stacked-cards__item_hr {
        -webkit-box-orient: vertical !important;
        -webkit-box-direction: normal !important;
            -ms-flex-direction: column !important;
                flex-direction: column !important;
    }

    .ew-stacked-cards__media {
        margin-right: 0;
    }
}
