/* Scoped styles for Gritch Advanced Carousel widget */
.gritch-adv-section {
    padding: 100px 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.gritch-adv-container-inner {
    position: relative;
    overflow: visible;
    width: 1347px;
    max-width: 1347px;
    margin: 0 auto;
    padding: 35px 13px;
    box-sizing: border-box;
    border-radius: 26px !important;
    background: transparent;
    display: block;
}

.gritch-adv-container-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 26px !important;
    background: #e8e8e800;
    z-index: -1;
    pointer-events: none;
}

.gritch-adv-container {
    width: 1321px;
    max-width: 1321px;
    margin: 0 auto;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.gritch-adv-container::before {
    position: absolute;
    top: 0px;
    left: -13px;
    content: '';
    background: #ffffff;
    z-index: 2;
    width: 26px;
    height: 26px;
    -webkit-mask: radial-gradient(circle at 100% 100%, transparent 26px, #fff 27px);
    mask: radial-gradient(circle at 100% 100%, transparent 26px, #fff 27px);
}

.gritch-adv-container::after {
    position: absolute;
    top: 0px;
    right: -13px;
    content: '';
    background: #ffffff;
    z-index: 2;
    width: 26px;
    height: 26px;
    
    -webkit-mask: radial-gradient(circle at 0% 100%, transparent 26px, #fff 27px);
    mask: radial-gradient(circle at 0% 100%, transparent 26px, #fff 27px);
}

.gritch-adv-swiper::before {
    position: absolute;
    bottom: 0px;
    left: -13px;
    content: '';
    background: #ffffff;
    z-index: 2;
    width: 26px;
    height: 26px;
    -webkit-mask: radial-gradient(circle at 100% 0%, transparent 26px, #fff 0);
    mask: radial-gradient(circle at 100% 0%, transparent 26px, #fff 0);
}

.gritch-adv-swiper::after {
    position: absolute;
    bottom: 0px;
    right: -13px;
    content: '';
    background: #ffffff;
    z-index: 2;
    width: 26px;
    height: 26px;
    -webkit-mask: radial-gradient(circle at 0% 0%, transparent 26px, #fff 0);
    mask: radial-gradient(circle at 0% 0%, transparent 26px, #fff 0);
}


.gritch-adv-swiper {
    overflow: visible !important;
    position: relative;
    background: transparent;
    width: 100%;
    max-width: 100%;
    border-radius: 26px !important;
}

.gritch-adv-section .swiper-slide {
    width: 380px;
    height: 520px;
    border-radius: 26px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 26px) !important;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    background: #1a1a1a;
    cursor: pointer;
    z-index: 1;
}

.gritch-adv-section .swiper-slide-active {
    z-index: 10 !important;
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gritch-adv-section .swiper-slide-next,
.gritch-adv-section .swiper-slide-prev {
    z-index: 5 !important;
    transform: scale(1);
}

.gritch-adv-media-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 26px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 26px) !important;
}

.gritch-adv-thumb {
    width: 100%;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute;
    z-index: 2;
    transition: opacity 0.4s;
    border-radius: 26px !important;
    clip-path: inset(0 round 26px) !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.gritch-adv-video-container {
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px !important;
    overflow: hidden !important;
    clip-path: inset(0 round 26px) !important;
}

.gritch-adv-section .swiper-slide-active .gritch-adv-thumb {
    opacity: 0;
}

.gritch-adv-section .swiper-slide img.gritch-adv-thumb {
    border-radius: 26px !important;
    clip-path: inset(0 round 26px) !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
    mask-image: radial-gradient(white, black) !important;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.gritch-adv-section .swiper-slide .gritch-adv-media-wrapper img {
    border-radius: 26px !important;
    clip-path: inset(0 round 26px) !important;
}

iframe,
video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    border-radius: 26px !important;
    display: block;
    clip-path: inset(0 round 26px) !important;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.gritch-adv-section .swiper-slide .gritch-adv-video-container iframe {
    border-radius: 26px;
    clip-path: inset(0 round 26px);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.gritch-adv-section .swiper-slide .gritch-adv-video-container video {
    border-radius: 26px;
    clip-path: inset(0 round 26px);
}

.gritch-adv-player-box video {
    object-fit: contain !important;
}

.gritch-adv-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    transition: background 0.25s ease, opacity 0.25s ease;
}

/* Dim inactive slides using an overlay instead of changing slide opacity */
.gritch-adv-section .swiper-slide:not(.swiper-slide-active) .gritch-adv-overlay {
    background: #00000033;
}

.gritch-adv-content-top {
    position: absolute;
    top: 25px;
    left: 20px;
    right: 20px;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.4s;
}

.gritch-adv-section .swiper-slide-active .gritch-adv-content-top {
    opacity: 1;
}

.gritch-adv-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.gritch-adv-bars {
    display: flex;
    gap: 4px;
    flex: 1;
    align-items: center;
    width: 100%;
}

.gritch-adv-bar {
    height: 4px;
    flex: 1;
    background: #FFFFFF99;
    border: none;
    border-radius: 2px;
    min-width: 0;
}

.gritch-adv-bar.active {
    height: 4px;
    flex: 1.5;
    background: #fff;
    border: none;
    border-radius: 2px;
    min-width: 0;
}

.gritch-adv-title {
    margin: 0;
    margin-top: 0;
    font-family: Saans VF-TRIAL;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.4;
    color: #ffffff;
}

.gritch-adv-badge {
    background: #E6FE52;
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: Saans VF-TRIAL;
    font-weight: 550;
    font-size: 10px;
    line-height: 100%;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.gritch-adv-plus-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #B3B3A5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    color: #000000;
    line-height: 1;
    text-align: center;
    transition: opacity 0.3s, transform 0.12s ease;
}

.gritch-adv-plus-btn span {
    font-size: 40px;
    font-family: auto;
}

.gritch-adv-section .swiper-slide-active .gritch-adv-plus-btn {
    opacity: 0;
    pointer-events: none;
}

.gritch-adv-explore-btn {
    position: absolute;
    width: fit-content;
    bottom: 12px;
    left: 12px;
    right: 20px;
    z-index: 5;
    background: #E6FE52;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 32px 12px 32px;
    border-radius: 40px;
    font-weight: 550;
    font-size: 13px;
    line-height: 1;
    min-height: 40px;
    opacity: 0;
    transform: translateY(15px);
    transition: 0.5s, opacity 0.25s;
}

.gritch-adv-section .swiper-slide-active .gritch-adv-explore-btn {
    opacity: 1;
    transform: translateY(0);
}

/* White box container for arrows - positioned at bottom of swiper */
.gritch-adv-swiper::before {
    position: absolute;
    bottom: 0px;
    left: -13px;
    content: '';
    background: #ffffff;
    z-index: 2;
    width: 26px;
    height: 26px;
    -webkit-mask: radial-gradient(circle at 100% 0%, transparent 26px, #fff 0);
    mask: radial-gradient(circle at 100% 0%, transparent 26px, #fff 0);
}

.gritch-adv-swiper::after {
    position: absolute;
    bottom: 0px;
    right: -13px;
    content: '';
    background: #ffffff;
    z-index: 2;
    width: 26px;
    height: 26px;
    -webkit-mask: radial-gradient(circle at 0% 0%, transparent 26px, #fff 0);
    mask: radial-gradient(circle at 0% 0%, transparent 26px, #fff 0);
}

/* White box wrapper for navigation arrows */
.gritch-adv-nav-wrapper {
    position: absolute;
    bottom: -90px;
    left: 74%;
    transform: translateX(-50%);
    width: 90px;
    height: 50px;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Swiper navigation arrows - positioned at bottom inside white box */
.gritch-adv-nav-wrapper .swiper-button-prev,
.gritch-adv-nav-wrapper .swiper-button-next {
    position: absolute;
    width: 39px;
    height: 39px;
    margin-top: 0;
    z-index: 10;
    color: #EDEDE6;
    background: transparent;
    border: 1px solid #EDEDE6;
    border-radius: 50%;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.gritch-adv-nav-wrapper .swiper-button-prev {
    left: -5px;
    transform: translateY(-50%);
}

.gritch-adv-nav-wrapper .swiper-button-next {
    right: 9px;
    transform: translateY(-50%);
}

.gritch-adv-nav-wrapper .swiper-button-prev:hover,
.gritch-adv-nav-wrapper .swiper-button-next:hover {
    border-color: rgb(0 0 0 / 30%);
    background: rgb(245 244 244 / 5%);
    color: rgb(0 0 0 / 30%);
}

.gritch-adv-nav-wrapper .swiper-button-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.gritch-adv-nav-wrapper .swiper-button-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.gritch-adv-nav-wrapper .swiper-button-prev:active,
.gritch-adv-nav-wrapper .swiper-button-next:active {
    transform: translateY(-50%) scale(0.95);
}

.gritch-adv-nav-wrapper .swiper-button-prev::after,
.gritch-adv-nav-wrapper .swiper-button-next::after {
    font-size: 16px;
    font-weight: bold;
}

.gritch-adv-nav-wrapper .swiper-button-prev.swiper-button-disabled,
.gritch-adv-nav-wrapper .swiper-button-next.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.gritch-adv-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.97);
    align-items: center;
    justify-content: center;
}

.gritch-adv-modal.open {
    display: flex;
}

.gritch-adv-modal-box {
    width: 90%;
    max-height: 85vh;
    height: 100%;
    max-width: 1000px;
    position: relative;
}

.gritch-adv-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    font-size: 40px;
    cursor: pointer;
    color: white;
}

/* Hide pagination on desktop; show only on mobile */
.gritch-adv-swiper .swiper-pagination {
    display: none;
}

@media (max-width: 1400px) {
    .gritch-adv-container-inner {
        max-width: calc(100% - 40px);
        width: 100%;
    }
    
    .gritch-adv-container {
        width: calc(100% - 26px);
        max-width: calc(100% - 26px);
    }


    .gritch-adv-container::before {
        left: -46px;
    }
    
    .gritch-adv-container::after {
        right: -46px;
    }
    
    .gritch-adv-swiper::before {
        left: -46px;
    }
    
    .gritch-adv-swiper::after {
        right: -46px;
    }    

}

@media (max-width:768px) {
    .gritch-adv-container-inner {
        padding: 20px 10px;
    }
    .gritch-adv-section .swiper-slide {
        width: 250px !important;
        height: 350px !important;
    }

    .gritch-adv-plus-btn,
    .gritch-adv-explore-btn {
        display: none !important;
    }

    .gritch-adv-swiper .swiper-pagination {
        display: block !important;
        position: relative;
        margin-top: 35px;
    }

    .swiper-pagination-bullet-active {
        background: var(--gritch-adv-primary, #D9FF50) !important;
    }

    .gritch-adv-container::before {
        left: -43px;
    }
    
    .gritch-adv-container::after {
        right: -43px;
    }
    
    .gritch-adv-swiper::before {
        left: -43px;
        bottom: 59px;
    }
    
    .gritch-adv-swiper::after {
        right: -43px;
        bottom: 59px;
    }   

    .gritch-adv-nav-wrapper {
        display: none;
    }

}

@media (max-width: 490px) {
    /* 1st image style for 490px and below - centered, scaled slides */
    .gritch-adv-section .swiper-slide-active {
        transform: scale(1.1) !important;
        opacity: 1 !important;
    }

    .gritch-adv-section .swiper-slide-next,
    .gritch-adv-section .swiper-slide-prev {
        transform: scale(0.95) !important;
        opacity: 1 !important;
    }

    /* Side slides (further from center) - partially visible like 1st image */
    .gritch-adv-section .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-next):not(.swiper-slide-prev) {
        transform: scale(0.9) !important;
        opacity: 1 !important;
    }
    
    /* Additional overlay for side slides to match 1st image style */
    .gritch-adv-section .swiper-slide:not(.swiper-slide-active)::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 26px;
        z-index: 3;
        pointer-events: none;
        transition: background 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    }

    .gritch-adv-section .swiper-slide-active::after {
        display: none;
    }
    
    /* Use overlay for inactive slides (like 1st image style) - override global */
    .gritch-adv-section .swiper-slide:not(.swiper-slide-active) .gritch-adv-overlay {
        background: rgba(0, 0, 0, 0.3) !important;
    }
    
    .gritch-adv-container::before {
        top: 8px;
    }

    .gritch-adv-container::after {
        top: 8px;
    }

    .gritch-adv-swiper::before {
        bottom: 67px;
    }
    
    .gritch-adv-swiper::after {
        bottom: 67px;
    } 

}