/* =========================================================
   Benefits Carousel Block Group – EXTR-526
   ========================================================= */

/* ── Section wrapper: matches .sign-up-benefit-new width ── */
.benefits-carousel-section {
    padding: 60px 0;
    background-color: #f5f7f7;
}

.benefits-carousel__container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Header ── */
.benefits-carousel__header {
    text-align: center;
    padding-bottom: 32px;
    max-width: 760px;
    margin: 0 auto;
}

.benefits-carousel__title {
    font-size: 2rem;
    font-weight: 700;
    color: #1c355e;
    margin-bottom: 12px;
    line-height: 1.25;
}

.benefits-carousel__subtitle {
    font-size: 1rem;
    color: #444444;
    line-height: 1.6;
}

/* ── Tab Navigation ── */
.benefits-carousel__tabs-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 0;
}

.benefits-carousel__tabs {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 12px;
    gap: 0;
    max-width: min(1000px, 100%);
    /* scroll when tabs overflow */
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #1c355e transparent;
    white-space: nowrap;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
}

.benefits-carousel__tabs::-webkit-scrollbar {
    height: 4px;
}

.benefits-carousel__tabs::-webkit-scrollbar-track {
    background: transparent;
}

.benefits-carousel__tabs::-webkit-scrollbar-thumb {
    background-color: #1c355e;
    border-radius: 2px;
}

.benefits-carousel__tab-item {
    flex-shrink: 0;
}

.benefits-carousel__tab-btn {
    display: inline-block;
    padding: 14.5px 20px;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: #444444;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
    outline: none;
    position: relative;
    margin-bottom: 0;
}

.benefits-carousel__tab-btn:hover {
    color: #1c355e;
}

.benefits-carousel__tab-btn.is-active {
    background-color: #1c355e;
    color: #ffffff;
    border-radius: 8px;
}

.benefits-carousel__tab-btn:focus-visible {
    outline: 2px solid #1c355e;
    outline-offset: 2px;
}

/* ── Slider ── */
.benefits-carousel__slider-wrapper {
    padding-top: 24px;
    overflow: hidden;
}

.benefits-carousel__slider {
    display: flex;
    gap: 20px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ── Individual Card ── */
.benefits-carousel__card {
    flex: 0 0 calc(66.667% - 14px);
    min-height: 420px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    /* Navy fallback until a background image is set in the CMS */
    background-color: #1c355e;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;   /* CMS image fills the full card */
}

/* Benefit person/lifestyle image – sits on top of the background, right-aligned */
.benefits-carousel__card-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 65%;            /* covers right portion, leaves text readable on left */
    object-fit: cover;
    object-position: center top;
    display: block;
    pointer-events: none;
}

/* ── Card content: top-left ── */
.benefits-carousel__card-content {
    position: relative;
    z-index: 1;
    padding: 32px 38px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;   /* TOP aligned */
    max-width: 50%;
}

/* Icon + benefit name on one line */
.benefits-carousel__card-icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.benefits-carousel__card-icon {
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Vertical separator between icon and name */
.benefits-carousel__card-separator {
    display: inline-block;
    width: 1px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    display: none;
}

.benefits-carousel__card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    display: none;
}

/* Title without icon still needs top margin reset */
.benefits-carousel__card-content > .benefits-carousel__card-title {
    margin-bottom: 14px;
}

.benefits-carousel__card-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.55;
    margin-bottom: 24px;
    margin-top: 8px;
}

/* CTA: override link-with-arrow colours for dark card */
.benefits-carousel__card .link-with-arrow {
    color: #ffffff;
    background-image: url('/assets/icons/icon_arrow_in_circle_white_next.svg');
    background-size: 23px;
    background-position: center right 0;
    padding-right: 40px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 400;
}

.benefits-carousel__card .link-with-arrow:hover {
    color: #ffffff;
    background-image: url('/assets/icons/icon_arrow_in_circle_white_next.svg');
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .benefits-carousel__card {
        flex: 0 0 calc(80% - 10px);
        min-height: 300px;
    }

    .benefits-carousel__card-content {
        max-width: 65%;
    }

    .benefits-carousel__title {
        font-size: 1.5rem;
    }
}

@media (max-width: 575px) {
    .benefits-carousel__card {
        flex: 0 0 calc(100% - 4px);
        min-height: 280px;
    }

    .benefits-carousel__card-content {
        max-width: 72%;
        padding: 24px 20px;
    }

    .benefits-carousel__card-bg-image {
        width: 55%;
    }

    .benefits-carousel__tab-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .benefits-carousel__container {
        padding: 0 16px;
    }
}

