.wif-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 52px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.wif-carousel *,
.wif-carousel *::before,
.wif-carousel *::after {
    box-sizing: border-box;
}

/* Overflow containment: Divi wraps the shortcode in a 1-col CSS Grid section.
   The grid item (.et_pb_row) and the flex column (.et_pb_column) default to
   min-width:auto, which prevents them from shrinking below the carousel track
   min-content and pushes width outward. Force min-width:0 + overflow:hidden ONLY
   on the Divi containers that actually contain the carousel. */
.et_pb_row:has(.wif-carousel),
.et_pb_column:has(.wif-carousel),
.et_pb_code:has(.wif-carousel),
.et_pb_code_inner:has(.wif-carousel) {
    min-width: 0;
    overflow: hidden;
}

.wif-carousel--empty {
    text-align: center;
    padding: 40px 20px;
    color: #676767;
    font-size: 16px;
}

.wif-carousel__heading {
    text-align: center;
    margin-bottom: 30px;
}

.wif-carousel__eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    color: #A02ACA;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.wif-carousel__title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.wif-carousel__viewport {
    overflow: hidden;
    position: relative;
    min-width: 0;
}

.wif-carousel__track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

.wif-carousel__track--no-transition {
    transition: none !important;
}

.wif-carousel__slide {
    flex: 0 0 33.3333%;
    min-width: 0;
    padding: 0 10px;
}

.wif-carousel__card {
    background: #A02ACA;
    border-radius: 30px 6px 30px 6px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.wif-carousel__card-body {
    padding: 22px 22px 14px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    color: #fff;
    min-height: 0;
}

.wif-carousel__card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px;
    align-self: flex-start;
}

.wif-carousel__card-badge-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.wif-carousel__card-title {
    font-family: 'Lora', serif;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.3;
    color: #fff;
}

.wif-carousel__card-excerpt {
    font-family: 'Archivo', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0 0 8px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wif-carousel__card-period {
    font-family: 'Archivo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    opacity: 0.85;
    color: #fff;
    margin-top: auto;
    margin-bottom: 4px;
}

.wif-carousel__card-image {
    margin: 0 22px;
    overflow: hidden;
}

.wif-carousel__card-image .wif-carousel__image {
    width: 100%;
    max-height: 170px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.wif-carousel__card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 16px 22px 22px;
    padding: 12px 20px;
    background-color: transparent !important;
    color: #fff !important;
    text-decoration: none !important;
    border: 1px solid #fff;
    border-radius: 15px 7px 15px 7px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    cursor: pointer;
    align-self: flex-start;
    line-height: 1.2;
}

.wif-carousel__card-cta:hover,
.wif-carousel__card-cta:focus,
.wif-carousel__card-cta:active,
.wif-carousel__card-cta:visited {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border-color: #fff;
    text-decoration: none !important;
}

.wif-carousel__card-cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform 0.2s;
}

.wif-carousel__card-cta-arrow svg {
    display: block;
    color: inherit;
}

.wif-carousel__card-cta:hover .wif-carousel__card-cta-arrow {
    transform: translateX(3px);
}

.wif-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border: 1.5px solid #A02ACA;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border-color 0.3s;
    padding: 0;
    color: #A02ACA;
}

.wif-carousel__arrow:hover {
    background: #A02ACA;
    border-color: #A02ACA;
    color: #fff;
}

.wif-carousel__arrow:focus-visible {
    outline: 2px solid #A02ACA;
    outline-offset: 2px;
}

.wif-carousel__arrow--prev {
    left: 0;
}

.wif-carousel__arrow--next {
    right: 0;
}

.wif-carousel__arrow-icon {
    display: block;
    color: black;
}

.wif-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
}

.wif-carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #A02ACA;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s;
}

.wif-carousel__dot--active {
    background: #A02ACA;
}

.wif-carousel__dot:hover {
    background: #A02ACA;
}

@media (max-width: 1024px) {
    .wif-carousel {
        padding: 20px 44px;
    }

    .wif-carousel__slide {
        flex: 0 0 50%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .wif-carousel {
        padding: 20px 40px;
    }

    .wif-carousel__slide {
        flex: 0 0 100%;
        min-width: 0;
    }

    .wif-carousel__arrow {
        width: 36px;
        height: 36px;
    }

    .wif-carousel__arrow-icon {
        width: 16px;
        height: 16px;
    }

    .wif-carousel__heading {
        margin-bottom: 20px;
    }

    .wif-carousel__title {
        font-size: 22px;
    }

    .wif-carousel__card-badge {
        padding: 3px 10px;
        font-size: 10px;
    }

    .wif-carousel__card-title {
        font-size: 15px;
    }

    .wif-carousel__card-cta {
        margin: 12px 16px 16px;
        padding: 10px 16px;
        font-size: 12px;
    }
}