/* =============================================================
   RE Work Section 2 Block  –  remedy-edge-global/re-work-section-2
   ============================================================= */

/* ── Wrapper ────────────────────────────────────────────────── */
.block-editor-block-list__block.re-work-section-2 {
    background-color: #0a1628;
}
.re-work-section-2 {
    width: 100%;
    padding: 2rem 2rem 4rem 2rem;
    box-sizing: border-box;
    color: #ffffff;
    margin-bottom: 4rem;
}

/* ── Section description (below title) ─────────────────────── */
.re-work-section-2 .header-text-pair {
    padding: 0 0 3.5rem 0;
}

.re-ws2__description {
}

/* ── Track ──────────────────────────────────────────────────── */
.re-work-section-2 .re-ws__track__wrap {
    position: relative;
    max-width: 1224px;
    margin: 0 auto;
}
.re-work-section-2 .re-ws__track {
    display: grid;
    grid-template-columns: 1fr;
    position: relative;
    max-width: 1224px;
    margin: 0 auto;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

/* ── Individual card ────────────────────────────────────────── */
.re-work-section-2 .re-ws__card {
    grid-row: 1;
    grid-column: 1;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateX( 100% );
    transition: transform 0.5s cubic-bezier( 0.4, 0, 0.2, 1 ),
                opacity   0.4s ease;
    z-index: 0;
}

.re-work-section-2 .re-ws__card.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX( 0 );
    z-index: 1;
}

/* ── 16:9 image container ───────────────────────────────────── */
.re-work-section-2 .re-ws__card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 0;
    background-color: #111e33;
}

.re-work-section-2 .re-ws__card-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* ── Video play trigger (when a Vimeo ID is set) ───────────── */
.re-work-section-2 .re-ws__card-video-trigger {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    background: none;
    border: 0;
    cursor: pointer;
    appearance: none;
    color: #ffffff;
}

.re-work-section-2 .re-ws__card-video-trigger .re-ws__card-image {
    transition: transform 0.4s ease, filter 0.3s ease;
}

.re-work-section-2 .re-ws__card-video-trigger:hover .re-ws__card-image,
.re-work-section-2 .re-ws__card-video-trigger:focus-visible .re-ws__card-image {
    transform: scale( 1.03 );
    filter: brightness( 0.85 );
}

.re-work-section-2 .re-ws__card-video-trigger:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.re-work-section-2 .re-ws__card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate( -50%, -50% );
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba( 0, 0, 0, 0.55 );
    border: 0; /* 2px solid rgba( 255, 255, 255, 0.9 ) */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.35 );
    opacity: 0;
}

.re-work-section-2 .re-ws__card-play svg {
    display: block;
    margin-left: 4px; /* nudge play glyph optically centered */
}

.re-work-section-2 .re-ws__card-video-trigger:hover .re-ws__card-play,
.re-work-section-2 .re-ws__card-video-trigger:focus-visible .re-ws__card-play {
    background: var( --reg-color-accent, rgba( 0, 0, 0, 0.75 ) );
    transform: translate( -50%, -50% ) scale( 1.06 );
    opacity: 1;
}

/* ── Vimeo modal ───────────────────────────────────────────── */
.re-work-section-2 .re-ws__modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.re-work-section-2 .re-ws__modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.re-work-section-2 .re-ws__modal-dialog {
    transform: scale( 0.96 );
    transition: transform 0.25s ease;
}

.re-work-section-2 .re-ws__modal.is-open .re-ws__modal-dialog {
    transform: scale( 1 );
}

@media ( prefers-reduced-motion: reduce ) {
    .re-work-section-2 .re-ws__modal,
    .re-work-section-2 .re-ws__modal-dialog {
        transition: none;
    }
}

.re-work-section-2 .re-ws__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(64, 7, 26, 0.75);
    cursor: pointer;
}

.re-work-section-2 .re-ws__modal-dialog {
    position: relative;
    width: 100%;
    max-width: 1100px;
    z-index: 1;
}

.re-work-section-2 .re-ws__modal-frame-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: 0 10px 40px rgba( 0, 0, 0, 0.6 );
}

.re-work-section-2 .re-ws__modal-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.re-work-section-2 .re-ws__modal-close {
    border: 0;
    position: absolute;
    top: -3rem;
    right: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--reg-color-accent);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.re-work-section-2 .re-ws__modal-close:hover,
.re-work-section-2 .re-ws__modal-close:focus-visible {
    background: rgba( 255, 255, 255, 0.15 );
    border-color: #ffffff;
    outline: none;
}

body.re-ws__modal-open {
    overflow: hidden;
}

/* Disable the trigger's interactivity inside the block editor. */
.block-editor-block-list__block.re-work-section-2 .re-ws__card-video-trigger {
    pointer-events: none;
}
.block-editor-block-list__block.re-work-section-2 .re-ws__modal {
    display: none !important;
}

/* ── Card body (description + link) ────────────────────────── */
.re-work-section-2 .re-ws__card-body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: 30px;
    width: 100%;
    margin-top: 10px;
    background-color: var(--reg-color-accent);
}

.re-work-section-2 .re-ws__card-body-empty {
    height: 0; /* 30px; */
    width: 100%;
    margin-top: 10px;
}

.re-work-section-2 .re-ws__card-description,
.re-work-section-2 .re-ws__card-link {
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 0.25rem;
    text-align: center;
}

/* ── Work link ──────────────────────────────────────────────── */
.re-work-section-2 .re-ws__card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    text-decoration: none;
    border-bottom: 2px solid rgba( 255, 255, 255, 0.35 );
    padding-bottom: 0.1rem;
    transition: border-color 0.2s ease;
}

.re-work-section-2 .re-ws__card-link:hover,
.re-work-section-2 .re-ws__card-link:focus-visible {
    border-color: #ffffff;
    outline: none;
}

.re-work-section-2 .re-ws__card-link-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.re-work-section-2 .re-ws__card-link:hover .re-ws__card-link-arrow {
    transform: translateX( 4px );
}

/* ── Prev / Next arrows ────────────────────────────────────── */
.re-work-section-2 .re-ws__arrow {
    top: 50%;
    transform: translateY( -50% );
    z-index: 2;
    position: absolute;
    appearance: none;
    padding: 0;
}

.re-work-section-2 .re-ws__arrow--prev { left:  1.25rem; }
.re-work-section-2 .re-ws__arrow--next { right: 1.25rem; }

.re-work-section-2 .re-ws__track:has( > .re-ws__card:only-of-type ) .re-ws__arrow {
    display: none;
}

.block-editor-block-list__block.re-work-section-2 .re-ws__arrow {
    pointer-events: none;
    opacity: 0.4;
}

/* ── Bullet navigation ──────────────────────────────────────── */
.re-work-section-2 .re-ws__nav {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 20px;
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    z-index: 3;
}

.re-work-section-2 .re-ws__bullet {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    width: 14px;
    border-radius: 6px;
    transition: width 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.75);

    &.is-active {
        width: 30px;
    }
}

.re-work-section-2 .re-ws__bullet:focus-visible {
    outline: 2px solid rgba( 255, 255, 255, 1);
    outline-offset: 4px;
    border-radius: 6px;
}

.re-work-section-2 .re-ws__bullet.is-active .re-ws__bullet-label,
.re-work-section-2 .re-ws__bullet:hover .re-ws__bullet-label,
.re-work-section-2 .re-ws__bullet:focus-visible .re-ws__bullet-label {
    color: var(--reg-color-accent);
}

/* ── Progress bar track ─────────────────────────────────────── */
.re-work-section-2 .re-ws__bullet-progress {
    display: block;
    width: 100%;
    height: 12px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

/* ── Progress bar fill ──────────────────────────────────────── */
.re-work-section-2 .re-ws__bullet-bar {
    display: block;
    height: 100%;
    width: 0;
    background: var(--reg-color-accent);
    border-radius: 2px;
}

.re-work-section-2 .re-ws__bullet.is-active .re-ws__bullet-bar {
    animation: re-ws-fill var( --re-ws-duration, 5s ) linear forwards;
}

.re-work-section-2.is-paused .re-ws__bullet.is-active .re-ws__bullet-bar {
    animation-play-state: paused;
}

@keyframes re-ws-fill {
    from { width: 0%; }
    to   { width: 100%; }
}

/* ── Editor styles ──────────────────────────────────────────── */
.re-work-section-2.is-editor .re-ws__editor-controls {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba( 255, 255, 255, 0.05 );
    border: 1px solid rgba( 255, 255, 255, 0.15 );
    border-radius: 4px;
}

.re-work-section-2 .re-ws__editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.re-work-section-2 .re-ws__editor-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: rgba( 255, 255, 255, 0.08 );
    border-radius: 4px;
}

.re-work-section-2 .re-ws__editor-image {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.re-work-section-2 .re-ws__editor-image-preview {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.re-work-section-2 .re-ws__editor-actions {
    margin-top: 1rem;
}

.re-work-section-2 .re-ws__editor-empty {
    color: rgba( 255, 255, 255, 0.6 );
    font-style: italic;
    margin: 0;
}

/* ── Footer text ────────────────────────────────────────────── */
.re-work-section-2 .re-ws__footer-text {
    max-width: 1224px;
    margin: calc( 1.5rem + 60px) auto 0;
    padding: 0 0.75rem;
    text-align: center;
    color: rgba( 255, 255, 255, 1);
    font-size: 1.5rem;
    font-weight: 600;
}

.re-work-section-2 .re-ws__editor-footer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba( 255, 255, 255, 0.05 );
    border: 1px solid rgba( 255, 255, 255, 0.15 );
    border-radius: 4px;
}

.re-work-section-2 .re-ws__editor-footer-label {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba( 255, 255, 255, 0.5 );
}

.re-work-section-2 .re-ws__editor-footer .re-ws__footer-text {
    margin: 0;
    min-height: 1.5em;
}

.block-editor-block-list__block.re-work-section-2 .re-ws__bullet-bar {
    animation: none !important;
}

/* ── Play / pause button ────────────────────────────────────── */
.re-work-section-2 .re-ws__playpause-btn {
    position: absolute;
    bottom: 18px; /* card-body (30px height + 10px margin-top) + 8px inset */
    left: 8px;
    z-index: 10;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    color: #000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 8px rgba( 0, 0, 0, 0.4 );
}

.re-work-section-2 .re-ws__playpause-btn:hover {
    background: rgba(255, 255, 255, 0.95);
}

.re-work-section-2 .re-ws__playpause-btn:focus-visible {
    outline: 2px solid rgba( 0, 0, 255, 1);
    outline-offset: 2px;
}

.re-work-section-2 .re-ws__pp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

/* Show pause icon by default (carousel is playing) */
.re-work-section-2 .re-ws__pp-play {
    display: none;
}

/* When carousel is paused, swap to play icon */
.re-work-section-2.is-paused .re-ws__pp-pause {
    display: none;
}
.re-work-section-2.is-paused .re-ws__pp-play {
    display: flex;
}

/* Hide in block editor */
.block-editor-block-list__block.re-work-section-2 .re-ws__playpause-btn {
    display: none;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media ( max-width: 768px ) {
    .re-work-section-2 .re-ws__track__wrap {
        width: 85%;
        transform: translateX(5px);
    }

    .re-work-section-2 .re-ws__nav {
        margin-top: 12px;
    }

    .re-work-section-2 .re-ws__track__wrap {
        z-index: 4;
    }

    .re-work-section-2 .re-ws__arrow--prev, .re-work-section-2 .re-ws__arrow--next {
        top: calc(100% + 20px);
    }
    .re-work-section-2 .re-ws__arrow--prev {
        left: 0;
    }
    .re-work-section-2 .re-ws__arrow--next {
        right: 0;
    }

    .re-work-section-2 {
        padding: 1.5rem 0 3rem 0;
    }

    .re-work-section-2 .re-ws__card-body,
    .re-work-section-2 .re-ws__card-body-empty {
        height: 0;
    }

    .re-work-section-2 .re-ws__bullet-label {
        font-size: 0.75rem;
    }

    .re-ws2__description {
        font-size: 0.9375rem;
    }

    .re-work-section-2 .re-ws__modal {
        padding: 1rem;
    }
    .re-work-section-2 .re-ws__modal-close {
        top: 0.5rem;
        right: 0.5rem;
        background: rgba( 0, 0, 0, 0.6 );
    }
    .re-work-section-2 .re-ws__card-play {
        width: 56px;
        height: 56px;
    }
    .re-work-section-2 .re-ws__playpause-btn {
        bottom: 18px; /* card-body is height: 0 on mobile; 10px margin-top + 8px inset */
    }
}
