/* ── Boxes Content 1 ───────────────────────────────────────────── */

.boxes-content-1 {
    padding-top: 96px;
    padding-bottom: 96px;
    background: var(--wp--preset--color--white);
}

/* ── Header ───────────────────────────────────────────────────── */

.bc1-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 56px;
}

/* ── Header: bar-style variant ────────────────────────────────── */

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

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

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

.bc1-header--bar .sec-title {
    font-size: 32px;
    line-height: 1.25;
}

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

.bc1-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 25px;
    background-image: linear-gradient(150deg, var(--wp--preset--color--white) 0%, var(--wp--preset--color--neutral-100) 100%);
    border: 1px solid #f3f4f6;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    height: 100%;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
}

a.bc1-box {
    transition: box-shadow 0.2s ease;
}

a.bc1-box:hover {
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.14), 0 4px 8px -2px rgba(0, 0, 0, 0.08);
}

/* ── Box icon container ───────────────────────────────────────── */

.bc1-box-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: rgba(67, 11, 142, 0.1);
    border-radius: 4px;
    color: var(--wp--preset--color--purple-500);
    line-height: 0;
}

.bc1-box-icon svg {
    width: 28px;
    height: 28px;
}

.bc1-box-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--wp--preset--color--purple-500);
}

.bc1-box-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

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

.bc1-box-title {
    margin: 0;
    color: var(--wp--preset--color--black);
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.bc1-box-desc {
    margin: 0;
    color: var(--wp--preset--color--neutral-300);
    font-size: 14px;
    font-weight: 300;
    line-height: 20px;
}

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

@media (min-width: 992px) {
    .bc1-swiper.swiper {
        overflow: visible;
    }

    /* Flex (not grid) on purpose: a partial last row (4 or 5 boxes) centers
       itself as a group instead of stretching left-aligned across 3 columns.
       align-items: stretch overrides Swiper's own base CSS (swiper-bundle.
       min.css sets .swiper-wrapper { align-items: flex-start }), which is
       needed for .bc1-box's height:100% to equalize each row to its
       tallest card. */
    .bc1-swiper .swiper-wrapper {
        display: flex !important;
        flex-wrap: wrap;
        align-items: stretch;
        justify-content: center;
        gap: 24px;
        transform: none !important;
        will-change: auto;
    }

    .bc1-swiper .swiper-slide {
        width: calc((100% - 48px) / 3) !important;
        flex: 0 0 calc((100% - 48px) / 3);
        margin: 0 !important;
        height: auto;
    }

    .bc1-pagination {
        display: none;
    }
}

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

@media (max-width: 991px) {
    .boxes-content-1 {
        padding-top: 48px;
        padding-bottom: 64px;
        overflow: hidden;
    }

    .bc1-header {
        margin-bottom: 32px;
    }

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

    .bc1-swiper .swiper-wrapper {
        display: flex;
        align-items: stretch;
    }

    .bc1-swiper .swiper-slide {
        height: auto;
    }

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

    .bc1-pagination .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
        background-color: var(--wp--preset--color--neutral-200);
        opacity: 1;
        border-radius: 50%;
        transform: scale(0.667);
        transition: transform 0.2s ease, background-color 0.2s ease;
        margin: 0 !important;
    }

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

/* ── Dark mode ───────────────────────────────────────────────── */

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

html[data-theme="dark"] .boxes-content-1 .sec-headline-icon,
html[data-theme="dark"] .boxes-content-1 .sec-headline {
    color: var(--wp--preset--color--yellow, #FFE500);
}

html[data-theme="dark"] .boxes-content-1 .bc1-label-bar {
    background: var(--wp--preset--color--yellow, #FFE500);
}

html[data-theme="dark"] .boxes-content-1 .bc1-label {
    color: var(--wp--preset--color--yellow, #FFE500);
}

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

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

html[data-theme="dark"] .bc1-box {
    background-image: none;
    background-color: var(--wp--preset--color--dark, #2E2E39);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] a.bc1-box:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

html[data-theme="dark"] .bc1-box-icon {
    background: rgba(255, 229, 0, 0.16);
    color: var(--wp--preset--color--yellow, #FFE500);
}

html[data-theme="dark"] .bc1-box-icon svg,
html[data-theme="dark"] .bc1-box-icon .dashicons {
    color: var(--wp--preset--color--yellow, #FFE500);
}

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

html[data-theme="dark"] .bc1-box-desc {
    color: rgba(255, 255, 255, .6);
}

html[data-theme="dark"] .bc1-pagination .swiper-pagination-bullet {
    background-color: rgba(255, 255, 255, .2);
}

html[data-theme="dark"] .bc1-pagination .swiper-pagination-bullet-active {
    background-color: var(--wp--preset--color--white);
}
