/*
 * Lester Toolbox - Sticky Cards
 * v1.7.8 - Premium responsive, centered content on mobile, full-bleed
 */

/* ===== WRAPPER ===== */
.lester-sticky-wrapper {
    position: relative;
    width: 100%;
}

/* ===== CARDS CONTAINER ===== */
/* Height is set via inline style from the admin option (default 85vh) */
.lester-sticky-cards-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
}

/* ===== INDIVIDUAL CARD ===== */
.lester-sticky-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0f0f1a;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;

    will-change: transform;
    overflow: hidden;
}

/* Bottom gradient vignette for text readability (desktop) */
.lester-sticky-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.65) 0%,
            rgba(0, 0, 0, 0.30) 40%,
            transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Dark overlay that GSAP animates on previous cards (replaces opacity) */
.lester-sticky-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
}

/* Clickable card link */
.lester-sticky-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* z-index stacking */
.lester-sticky-card:nth-child(1) {
    z-index: 1;
}

.lester-sticky-card:nth-child(2) {
    z-index: 2;
}

.lester-sticky-card:nth-child(3) {
    z-index: 3;
}

.lester-sticky-card:nth-child(4) {
    z-index: 4;
}

.lester-sticky-card:nth-child(5) {
    z-index: 5;
}

.lester-sticky-card:nth-child(6) {
    z-index: 6;
}

.lester-sticky-card:nth-child(7) {
    z-index: 7;
}

.lester-sticky-card:nth-child(8) {
    z-index: 8;
}

.lester-sticky-card:nth-child(9) {
    z-index: 9;
}

.lester-sticky-card:nth-child(10) {
    z-index: 10;
}

/* ===== CARD CONTENT (bottom-center on desktop) ===== */
.lester-sticky-card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    padding: 4rem 3rem;
    text-align: center;
    pointer-events: none;
    box-sizing: border-box;
}

/* ===== TITLE ===== */
.lester-sticky-card-title {
    font-weight: 800;
    line-height: 1.05;
    margin: 0 0 0.7rem 0;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* ===== DESCRIPTION ===== */
/* Inherits the WordPress theme's paragraph font */
.lester-sticky-card-description {
    line-height: 1.7;
    margin: 0 auto;
    max-width: 640px;
}

.lester-sticky-card-description p {
    margin: 0;
}

/* =============================================================
   RESPONSIVE — Tablet
   ============================================================= */
@media (max-width: 1024px) {
    .lester-sticky-card-content {
        padding: 3rem 1.5rem;
    }
}

/* =============================================================
   RESPONSIVE — Mobile: Premium centered layout + full-bleed
   ============================================================= */
@media (max-width: 768px) {

    /*
     * Force the wrapper to break out of any WordPress parent
     * container padding (entry-content, wp-block-group, etc.)
     * This makes the cards go full-width / edge-to-edge.
     */
    .lester-sticky-wrapper {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        box-sizing: border-box;
    }

    .lester-sticky-cards-container {
        width: 100% !important;
        max-width: none !important;
    }

    /* Center content vertically instead of bottom */
    .lester-sticky-card {
        justify-content: center !important;
    }

    /* Replace bottom gradient with a centered radial vignette
       so text is readable when centered */
    .lester-sticky-card::after {
        height: 100%;
        background:
            radial-gradient(
                ellipse at center,
                rgba(0, 0, 0, 0.50) 0%,
                rgba(0, 0, 0, 0.25) 50%,
                rgba(0, 0, 0, 0.55) 100%
            );
    }

    .lester-sticky-card-content {
        padding: 1rem 0.5rem;
        max-width: 100%;
    }

    .lester-sticky-card-title {
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }

    .lester-sticky-card-description {
        max-width: 100%;
        line-height: 1.5;
    }
}

/* =============================================================
   RESPONSIVE — Small mobile: ultra-tight margins
   ============================================================= */
@media (max-width: 480px) {
    .lester-sticky-card-content {
        padding: 0.75rem 0.25rem;
    }

    .lester-sticky-card-title {
        letter-spacing: -0.02em;
    }
}