/* Budi Gallery Slider Styles */

.budi-gallery-slider__wrapper {
    position: relative;
}

/* Desktop Grid Layout */
.budi-gallery-slider__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* grid-auto-rows: minmax(250px, auto); */
    gap: 30px;
    width: 100%;
}

.budi-gallery-slider__grid .budi-gallery-slider__item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    width: 100%;
    height: 100%;
    min-height: 160px;
    align-self: end; /* Align all items from bottom */
}

/* Fixed heights for specific items in pattern */
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(1) {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
}

.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(2) {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
}

.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(3) {
    height: 335px;
    min-height: 335px;
    max-height: 335px;
}

.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(4) {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
}

.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(5) {
    height: 335px;
    min-height: 335px;
    max-height: 335px;
}

.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(6) {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
}

.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(7) {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
}

/* Ensure images fill their containers */
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(1) .budi-gallery-slider__image,
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(2) .budi-gallery-slider__image,
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(3) .budi-gallery-slider__image,
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(4) .budi-gallery-slider__image,
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(5) .budi-gallery-slider__image,
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(6) .budi-gallery-slider__image,
.budi-gallery-slider__grid .budi-gallery-slider__item:nth-child(7) .budi-gallery-slider__image {
    height: 100%;
    object-fit: cover;
}

.budi-gallery-slider__grid .budi-gallery-slider__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.budi-gallery-slider__grid figure {
    margin: 0;
    width: 100%;
    height: 100%;
}

/* Mobile Slider Layout */
.budi-gallery-slider {
    display: none;
    position: relative;
    width: 100%;
}

.budi-gallery-slider .swiper-wrapper {
    display: flex;
    align-items: stretch;
}

.budi-gallery-slider .budi-gallery-slider__item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 430px;
    min-height: 430px;
    max-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.budi-gallery-slider .budi-gallery-slider__image {
    width: 100%;
    height: 430px;
    min-height: 430px;
    max-height: 430px;
    object-fit: cover;
    display: block;
}

.budi-gallery-slider figure {
    margin: 0;
    width: 100%;
    height: 100%;
}

/* Navigation Styles - Matching budi-swiper-navigation */
.budi-gallery-slider__wrapper .budi-swiper-navigation {
    gap: 25px;
    margin-top: 40px;
    margin-bottom: 32px;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button {
    width: 53px;
    height: 30px;
    position: relative;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    border: 1.5px solid #8A408D;
    border-radius: 100px;
    transition: all 0.3s ease;
    transform: unset;
    background-color: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button.swiper-button-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button.swiper-button-next {
    transform: rotate(180deg);
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button svg {
    display: block;
    width: 23px;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button svg path {
    fill: #8A408D;
    transition: all 0.3s ease;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button::after {
    display: none;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button:hover {
    background-color: #8A408D;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button:hover svg path {
    fill: #ffffff;
}

.budi-gallery-slider__wrapper .budi-swiper-navigation .budi-swiper-button:focus {
    outline: 0;
    box-shadow: none;
}

/* Accessibility Improvements */
.budi-gallery-slider__item:focus-within {
    outline: 2px solid var(--color-main);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Responsive Adjustments */
@media only screen and (min-width: 768px) {
    .budi-gallery-slider__grid {
        display: grid;
        margin-top: -50px;
    }
    
    .budi-gallery-slider {
        display: none !important;
    }
}

@media only screen and (max-width: 1200px) {
    .budi-gallery-slider__wrapper .budi-swiper-navigation {
        margin-top: 35px;
    }
}

@media only screen and (max-width: 767px) {
    .budi-gallery-slider__grid {
        display: none !important;
    }
    
    .budi-gallery-slider {
        display: block;
    }
    
    .budi-gallery-slider__wrapper .budi-swiper-navigation {
        margin-top: 30px;
    }

    .budi-gallery-slider .budi-gallery-slider__item {
        height: 430px;
        min-height: 430px;
        max-height: 430px;
    }
    
    .budi-gallery-slider .budi-gallery-slider__image {
        height: 430px;
        min-height: 430px;
        max-height: 430px;
    }
}

/* CTA */
.budi-cta {
    overflow: hidden;
    border-radius: 25px;
    max-width: 999px;
    margin: 0 auto !important;
}

.budi-cta::before {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.9;
    background: linear-gradient(90deg, rgba(50, 36, 71, 1) 0%, rgba(130, 64, 141, 1) 100%);
}

.budi-cta > .wpb_column > .vc_column-inner > .wpb_wrapper {
    padding: 50px 77px;
}

.budi-cta .budi-headline {
    font-size: 35px;
    font-weight: 600;
    line-height: normal;
    margin-bottom: 20px;
}

.budi-cta .wpb_text_column {
    margin: 0 auto 40px auto !important;
}

@media (min-width: 767px) {
    .budi-cta > .wpb_column > .vc_column-inner > .wpb_wrapper {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 0;
        align-items: stretch;
    }

    .budi-cta .budi-headline,
    .budi-cta .wpb_text_column {
        grid-column: 1;
    }

    .budi-cta .budi-button-container {
        grid-column: 2;
        grid-row: 1 / span 2; 
        display: flex;
        align-items: center;  
        justify-content: flex-end; 
    }

    .budi-cta .wpb_text_column {
        margin: 0 !important;
    }
}

@media (max-width: 1029px) {
    .budi-cta {
        margin: 15px !important;
    } 

    .budi-cta > .wpb_column > .vc_column-inner > .wpb_wrapper {
        padding: 76px 25px;
    }
}