/* =============================================
   WATERFALL BLOCK v1.1 — CSS
   ============================================= */

.wfb-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* bg-color set inline via shortcode */
}

/* ── Background grid ── */
.wfb-bg {
    position: absolute;
    inset: 0;
    display: flex;
    gap: var(--wfb-gap, 12px);
    padding: 0 var(--wfb-gap, 12px);
    pointer-events: none;
    overflow: hidden;
}

/* Each column is a vertically scrolling strip */
.wfb-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* The track holds the images — duplicated for seamless loop */
.wfb-track {
    display: flex;
    flex-direction: column;
    gap: var(--wfb-gap, 12px);
    /* JS animates translateY on the column wrapper */
}

/* ── Individual image tiles — all equal squares ── */
.wfb-img-wrap {
    width:  var(--wfb-img-size, 240px);
    height: var(--wfb-img-size, 240px);
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
}

.wfb-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ── Overlay sits between images and text ── */
.wfb-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

/* ── Foreground text panel ── */
.wfb-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    padding: 60px 40px;
    text-align: center;
    color: #ffffff;
}

.wfb-heading {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 22px;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.wfb-body {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.75;
    margin: 0 0 34px;
    opacity: 0.92;
}

.wfb-body p { margin: 0 0 12px; }
.wfb-body p:last-child { margin-bottom: 0; }

.wfb-btn {
    display: inline-block;
    padding: 15px 38px;
    background: #ffffff;
    color: #2D1B69;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 50px;
    letter-spacing: 0.04em;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.wfb-btn:hover {
    background: #f0ebff;
    color: #1a0f42;
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .wfb-col:nth-child(n+5) { display: none; }
    .wfb-content { padding: 50px 28px; }
}
@media (max-width: 640px) {
    .wfb-col:nth-child(n+4) { display: none; }
    .wfb-section { min-height: 85vh; }
}
@media (max-width: 420px) {
    .wfb-col:nth-child(n+3) { display: none; }
}
