/* Swiper Gallery Plugin Custom Styles */

.swiper-container-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden; /* Hide overflow to create edge effect */
    margin: 0 auto;
}

.swiper.gallery-wp {
    width: 100%;
    height: 100%;
    padding: 30px 0;
    overflow: hidden; /* Clip slides beyond visible area */
}

/* Disable 3D perspective that causes display issues */
.swiper.gallery-wp.swiper-3d {
    perspective: none !important;
}

.swiper.gallery-wp .swiper-slide {
    background-position: center;
    background-size: cover;
    /*width: 80vw; /* One-third of viewport width */
    /*height: 40vw;*//* Adjusted height for image + description */
    max-width: calc(100dvw / 3); /* Maximum size limit */
    max-height: 1000px;
    display: flex;
    flex-direction: column; /* Stack image and description vertically */
    align-items: center;
    justify-content: flex-start;
    border-radius: 50px;
    background: var(--sf-primary-yellow); /* white frame look */
    border: 20px solid #fff; /* remove border */
    overflow: hidden; /* Ensure content stays within borders */
}

/* Make center slide larger */
.swiper.gallery-wp .swiper-slide-active {
    /*width: 80vw; /* Slightly larger for center */
    /*height: 40vw;*/ /* Adjusted height for image + description */
    max-width: calc(100dvw / 3);
    max-height: 1000px;
    z-index: 2;
    border-radius: 50px;
}

.swiper.gallery-wp .swiper-slide img {
    display: block;
    width: 100%;
    height: 80%; /* Image takes 80% of slide height */
    object-fit: cover;
    border-radius: 30px 30px 80px 80px;
}

/* *** Promotions  *** */
.promotions .swiper.gallery-wp .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 50px;
    background: var(--sf-primary-yellow);
    border: 20px solid #fff;
    overflow: hidden;
}

.promotions .swiper.gallery-wp .swiper-slide-active {
    z-index: 2;
    border-radius: 50px;
}

.promotions .swiper.gallery-wp .swiper-slide img {
    height: 420px;
}


/* *** Media-release  *** */
.mediarelease .swiper-container-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden; /* Hide overflow to create edge effect */
    height:700px;
}

.mediarelease .swiper.gallery-wp .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 30px;
    background: #bbb;
    border: 20px solid #bbb;
    overflow: hidden;
}

.mediarelease .swiper.gallery-wp .swiper-slide-active {
    z-index: 2;
    border-radius: 30px;
    background: #fff;
    border: 20px solid #fff;
}

.mediarelease .swiper.gallery-wp .swiper-slide img {
    height: 460px;
    border-radius: 30px;
}

.mediarelease .swiper-3d .swiper-slide-shadow-left,
.mediarelease .swiper-3d .swiper-slide-shadow-right {
    background: none;
}

.mediarelease .swiper.gallery-wp .swiper-slide .slide-info {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mediarelease .swiper.gallery-wp .swiper-slide .slide-info .slide-title {
    text-align: left;
    font-size: 18px;
    padding: 5px;
}
.mediarelease .swiper.gallery-wp .swiper-slide  .slide-info .slide-description {
    text-align: right;
    font-size: 14px;
    background: none;
    font-weight: 500;
    display: block;
    font-family: 'ITCAvantGardeStd-Md';
    padding: 5px;
}

/* Description area styling */
.swiper.gallery-wp .swiper-slide .slide-description {
    width: 100%;
    height: 20%; /* Description takes 20% of slide height */
    background-color: var(--sf-primary-yellow);
    color: var(--sf-primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
    font-size: 1.7em;
    font-weight: 500;
    border-radius: 0 0 10px 10px; /* Rounded bottom corners only */
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swiper.gallery-wp .swiper-slide-active img {
    /*transform: scale(1.05);*/
}

/* Responsive adjustments */
@media (min-width: 769px) {
    .swiper.gallery-wp .swiper-slide {
        width: 30vw; /* Viewport-based sizing */
        max-width: 400px; /* Prevent slides from getting too large on wide screens */
        max-height: 1000px;
    }
    
    .swiper.gallery-wp .swiper-slide-active {
        width: 32vw; /* Slightly larger for center */
        max-width: 420px;
        max-height: 1000px;
    }
}

@media (min-width: 2500px) {
    .swiper-container-wrapper {
        max-width: 100%; /* Remove constraint on ultra-wide screens */
    }
    
    .swiper.gallery-wp .swiper-slide {
        width: 400px; /* Fixed width on ultra-wide screens */
        max-width: 400px;
    }
    
    .swiper.gallery-wp .swiper-slide-active {
        width: 420px;
        max-width: 420px;
    }
}

@media (max-width: 768px) {
    .swiper.gallery-wp {
        padding: 30px 0;
    }
    
    .swiper.gallery-wp .swiper-slide {
        width: 40vw; /* Larger on mobile for mobile-like effect */
        height: 100%; /* Adjusted for image + description */
        max-width: 250px;
        max-height: 100%;
    }
    
    .swiper.gallery-wp .swiper-slide-active {
        width: 45vw; /* Even larger center on mobile */
        height: 100%; /* Adjusted for image + description */
        max-width: 280px;
        max-height: 100%;
    }
    
    .swiper.gallery-wp .swiper-slide .slide-description {
        font-size: 1.5rem!important;
        padding: 6px 8px;
    }
}

/* Mouse interaction enhancements */
.swiper.gallery-wp {
    cursor: grab;
}

.swiper.gallery-wp:active {
    cursor: grabbing;
}

@media (max-width: 480px) {
    .swiper.gallery-wp .swiper-slide {
        width: 50vw; /* Half viewport on small mobile */
        height: 100%; /* Adjusted for image + description */
        max-width: 200px;
        max-height: 100%;
    }
    
    .swiper.gallery-wp .swiper-slide-active {
        width: 55vw; /* Larger center on small mobile */
        height: 100%; /* Adjusted for image + description */
        max-width: 220px;
        max-height: 100%;
    }
    
    .swiper.gallery-wp .swiper-slide .slide-description {
        font-size: 11px;
        padding: 4px 6px;
    }
}