/* ── Intro (white header) ─────────────────────────────────────── */

.boxes-content-2 {
    overflow: hidden;
}

.bc2-intro {
    background: var(--wp--preset--color--white);
    padding-top: 96px;
    padding-bottom: 56px;
}

.bc2-intro .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

/* ── Intro: pink headline (same treatment as .ps-label in process-steps) ──
   Only applies when the block has NO custom last box (see $has_custom_last_box
   in index.php) - otherwise the headline keeps its original purple styling,
   inherited from the shared .sec-headline rules in assets/css/style.css. ── */

.bc2-intro--pink-headline .sec-headline-bar {
    width: 4px;
    height: 24px;
    flex-shrink: 0;
    background: var(--wp--preset--color--pink-500, #DF006E);
}

.bc2-intro--pink-headline .sec-headline-icon,
.bc2-intro--pink-headline .sec-headline {
    color: var(--wp--preset--color--pink-500, #DF006E);
}

.bc2-intro--pink-headline .sec-headline {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bc2-intro .sec-desc {
    color: var(--wp--preset--color--dark, #2E2E39);
}

/* ── Intro: dark mode ────────────────────────────────────────── */

html[data-theme="dark"] .bc2-intro {
    background: var(--wp--preset--color--black, #1A1A25);
}

/* Pink headline stays pink in dark mode too (same as .ps-label). */
html[data-theme="dark"] .bc2-intro--pink-headline .sec-headline-icon,
html[data-theme="dark"] .bc2-intro--pink-headline .sec-headline {
    color: var(--wp--preset--color--pink-500, #DF006E);
}

/* Original (non-custom-last-box) headline: back to the previous yellow-in-dark-mode look. */
html[data-theme="dark"] .bc2-intro:not(.bc2-intro--pink-headline) .sec-headline-icon,
html[data-theme="dark"] .bc2-intro:not(.bc2-intro--pink-headline) .sec-headline {
    color: var(--wp--preset--color--yellow, #FFE500);
}

html[data-theme="dark"] .bc2-intro .sec-title {
    color: var(--wp--preset--color--white);
}

html[data-theme="dark"] .bc2-intro .sec-desc {
    color: rgba(255, 255, 255, .7);
}

/* ── Dark section ─────────────────────────────────────────────── */

.bc2-dark {
    position: relative;
}

.bc2-bg--default {
    position: absolute;
    inset: 0;
    background-image: url('bg-default.jpg');
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 0;
}
/* 
.bc2-bg--default::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(27, 0, 62, 0.65);
} */

/* ── Swiper z-index above backgrounds ────────────────────────── */

.bc2-swiper.swiper {
    position: relative;
    z-index: 1;
}

/* ── Box ──────────────────────────────────────────────────────── */

.bc2-box {
    position: relative;
    display: block;
    height: 380px;
    padding: 64px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    cursor: default;
}

a.bc2-box {
    cursor: pointer;
}

/* Per-box hover overlay */
.bc2-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 37, 0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

@media (hover: hover) {
    .bc2-box:hover::before {
        opacity: 1;
    }
}

/* ── Ghost number ─────────────────────────────────────────────── */

.bc2-box-num {
    position: absolute;
    right: 64px;
    top: 0;
    font-size: 200px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    user-select: none;
    transition: opacity 0.25s ease;
    z-index: 1;
}

@media (hover: hover) {
    .bc2-box:hover .bc2-box-num {
        opacity: 0;
    }
}

/* ── Box inner (content) ──────────────────────────────────────── */

.bc2-box-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    padding-top: 96px;
}

/* ── Default content ──────────────────────────────────────────── */

.bc2-box-default {
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.25s ease;
}

@media (hover: hover) {
    .bc2-box:hover .bc2-box-default {
        opacity: 0;
        pointer-events: none;
    }
}

.bc2-box-title {
    margin: 0;
    color: var(--wp--preset--color--white);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
}

.bc2-box-bar {
    display: block;
    width: 80px;
    height: 4px;
    flex-shrink: 0;
    background: var(--wp--preset--color--yellow);
}

.bc2-box-bar--center {
    margin-left: auto;
    margin-right: auto;
}

.bc2-box-desc {
    margin: 0;
    color: var(--wp--preset--color--neutral-100);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

/* ── Hover wysiwyg content ────────────────────────────────────── */

.bc2-box-hov {
    position: absolute;
    inset: 0;
    padding: 64px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
}

@media (hover: hover) {
    .bc2-box:hover .bc2-box-hov {
        opacity: 1;
    }
}

.bc2-box:focus-within .bc2-box-hov {
    opacity: 1;
}

.bc2-box-hov,
.bc2-box-hov p,
.bc2-box-hov li {
    color: var(--wp--preset--color--neutral-100);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.bc2-box-hov ul,
.bc2-box-hov ol {
    padding-left: 20px;
    margin: 8px 0;
}

.bc2-box-hov li {
    margin-bottom: 4px;
}

/* ── Last box ─────────────────────────────────────────────────── */

.bc2-box--last {
    padding: 48px;
}

.bc2-last-deco {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

@media (hover: hover) {
    .bc2-box--last:hover .bc2-last-deco {
        opacity: 0;
    }
}

.bc2-last-text {
    display: block;
    width: 195px;
    height: auto;
    color: var(--wp--preset--color--neutral-100);
    position: relative;
    bottom: -36px;
}

.bc2-last-arrow {
    display: block;
    width: 140px;
    height: auto;
    margin-top: 8px;
    color: var(--wp--preset--color--white);
    opacity: 0.9;
    position: relative;
    top: -36px;
}

/* Last box hover content */
.bc2-last-hov {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px 56px;
    text-align: center;
    z-index: 2;
}

@media (hover: hover) {
    .bc2-box--last:hover .bc2-last-hov {
        opacity: 1;
    }
}

.bc2-box--last:focus-within .bc2-last-hov {
    opacity: 1;
}

.bc2-last-hov-title {
    display: block;
    color: var(--wp--preset--color--white);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
}

.bc2-last-hov-desc {
    margin: 0;
    color: var(--wp--preset--color--neutral-100);
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

/* ── First box (un-numbered, section-headline style) ─────────────
   Rendered as a sibling OUTSIDE the swiper (.bc2-track > .bc2-first-box),
   not as a swiper-slide - on mobile this keeps it from being counted as a
   pagination dot / dragged into the horizontal carousel; it stacks as its
   own full-width block above the swiper instead (see .bc2-track below). ── */

.bc2-first-box {
    position: relative;
    z-index: 2;
    padding: 40px 24px 0;
}

.bc2-first-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bc2-first-label-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bc2-first-label-bar {
    width: 4px;
    height: 24px;
    flex-shrink: 0;
    background: var(--wp--preset--color--yellow, #FFE500);
}

.bc2-first-label {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: var(--wp--preset--color--yellow, #FFE500);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bc2-first-title {
    display: block;
    color: var(--wp--preset--color--white);
    font-size: 32px;
    font-weight: 400;
    line-height: 1.25;
}

.bc2-first-desc {
    margin: 0;
    color: var(--wp--preset--color--neutral-100, #F5F5FC);
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
}

/* ── Desktop: CSS grid (992px+) ───────────────────────────────── */

@media (min-width: 992px) {
    /* .bc2-track is the actual grid; .bc2-swiper/.bc2-grid just become
       transparent wrappers (display: contents) so their slide children
       become direct grid items sitting alongside .bc2-first-box. */
    .bc2-track {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .bc2-swiper.swiper,
    .bc2-grid.swiper-wrapper {
        display: contents;
    }

    .bc2-swiper .swiper-slide {
        width: auto !important;
        margin: 0 !important;
    }

    .bc2-first-box {
        height: 380px;
        padding: 64px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .bc2-first-inner {
        max-width: 352px;
    }

    .bc2-pagination {
        display: none;
    }
}

/* ── Mobile: Swiper (≤991px) ──────────────────────────────────── */

@media (max-width: 991px) {
    .bc2-intro {
        padding-top: 48px;
        padding-bottom: 32px;
    }

    .bc2-swiper.swiper {
        overflow: visible;
    }

    .bc2-box {
        height: 360px;
        padding: 32px;
    }

    .bc2-box-hov {
        padding: 32px;
    }

    .bc2-box-num {
        font-size: 140px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        top: 20px;
    }

    .bc2-box-inner {
        padding-top: 60px;
    }

    .bc2-box-title {
        font-size: 28px;
    }

    .bc2-box--last {
        padding: 32px;
    }

    .bc2-first-box {
        padding: 40px 24px;
    }

    .bc2-last-text {
        width: 140px;
    }

    .bc2-last-arrow {
        width: 100px;
    }

    .bc2-last-hov-title {
        font-size: 28px;
    }

    .bc2-last-hov {
        padding: 24px 32px;
    }

    .bc2-pagination {
        position: static !important;
        margin-top: 0;
        padding: 16px 0 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .bc2-pagination .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
        background-color: rgba(255, 255, 255, 0.5);
        opacity: 1;
        border-radius: 50%;
        transform: scale(0.667);
        transition: transform 0.2s ease, background-color 0.2s ease;
    }

    .bc2-pagination .swiper-pagination-bullet-active {
        transform: scale(1);
        background-color: var(--wp--preset--color--white);
    }
}