/* ==========================================================================
   Stacked Cards for WPBakery — Styles  v2.0
   GSAP ScrollTrigger powered — no click interactions
   Cards fade away on scroll, last card stays, section unpins.
   ========================================================================== */

/* ---- Custom-property defaults ---- */
.sc-wrapper {
    --sc-card-width: 520px;
    --sc-card-height: 580px;
    --sc-card-bg: #F5EDE3;
    --sc-heading-color: #1A1A1A;
    --sc-text-color: #4A4A4A;
    --sc-border-radius: 20px;

    position: relative;
    width: 100%;
    max-width: var(--sc-card-width);
    margin: 60px auto;
    padding: 40px 20px 20px;
}

/* ---- Stack container ---- */
.sc-stack {
    position: relative;
    width: 100%;
    min-height: var(--sc-card-height);
}

/* ---- Card base ---- */
.sc-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: var(--sc-card-height);
    background: var(--sc-card-bg);
    border-radius: var(--sc-border-radius);
    overflow: hidden;
    box-shadow:
        0 2px 12px rgba(160, 140, 110, 0.10),
        0 1px 3px  rgba(0, 0, 0, 0.04);

    /* GPU acceleration — prevents jank during GSAP transforms */
    will-change: transform, opacity;
    -webkit-transform: translateZ(0);
            transform: translateZ(0);
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
}

/* ---- Card inner layout ---- */
.sc-card__inner {
    display: flex;
    flex-direction: column;
    min-height: var(--sc-card-height);
    padding: 36px 32px 0; /* 0 bottom padding so image can touch the bottom */
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* ---- Active state for background gradient ---- */
.sc-card.sc-card--active {
    background: linear-gradient(-63deg, var(--sc-card-bg) 5%, #AD5D36 114%);
}

/* ---- Visible state for inner content ---- */
.sc-card.sc-card--visible .sc-card__inner {
    opacity: 1;
    pointer-events: auto;
}

/* White text only when card is fully active (has gradient) */
.sc-card.sc-card--active .sc-card__heading,
.sc-card.sc-card--active .sc-card__text {
    color: #ffffff;
}

/* ---- Heading (centered) ---- */
.sc-card__heading {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--sc-heading-color);
    text-align: center;
    margin: 0 0 12px;
}

/* ---- Description text (centered) ---- */
.sc-card__text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--sc-text-color);
    text-align: center;
    margin: 0 0 24px;
    flex-shrink: 0;
}

.sc-card__text p {
    margin: 0 0 10px;
}
.sc-card__text p:last-child {
    margin-bottom: 0;
}

/* ---- Image — centered and touches bottom ---- */
.sc-card__image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin: auto 0 0 0; /* Push to bottom, keep normal left/right padding */
    position: relative;
    background: transparent;
}

.sc-card__image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 0 !important;
}

/* ---- Optional link ---- */
.sc-card__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    align-self: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--sc-heading-color);
    text-decoration: none;
    border-bottom: 1.5px solid transparent;
    transition: gap 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.sc-card__link:hover {
    gap: 12px;
    color: #8B7355;
    border-bottom-color: #8B7355;
}

.sc-card__link svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sc-card__link:hover svg {
    transform: translateX(3px);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .sc-wrapper {
        margin: 32px auto;
        padding: 30px 10px 14px;
    }

    .sc-card__inner {
        padding: 28px 20px 22px;
    }

    .sc-card__heading {
        font-size: 21px;
    }

    .sc-card__text {
        font-size: 14px;
    }

    .sc-card__image {
        min-height: 150px;
    }
}
