/**
 * RSGT Gallery Slider Widget - Swiper Grid Layout
 * Based on UI team design with alternating slide heights
 *
 * @package RSGT_Elementor_Addons
 * @version 2.15.1
 */

.rsgt-gallery-swiper .swiper{
  width: 100%;
  height: 496px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden !important;
}

.rsgt-gallery-slide {
    position: relative;
    background: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 496px !important;
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
	cursor: pointer;
}

.rsgt-gallery-slide img,
.rsgt-gallery-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rsgt-gallery-slider-item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 79.24%, rgba(23, 33, 54, 0.8) 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.rsgt-gallery-slide:hover .rsgt-gallery-slider-item-title {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================================
   Navigation Buttons
   ========================================================================= */

.rsgt-gallery-swiper .rsgt-gallery-nav-button {
    position: absolute;
    bottom: -77px;
    left: 0;
    border: 1px solid #91DCD5;
    border-radius: 15px;
    padding: 12px;
    background: transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rsgt-gallery-swiper .rsgt-gallery-nav-button:hover {
    background: #91DCD5;
    border-color: #91DCD5;
    color:#172136;

}

.rsgt-gallery-swiper .rsgt-gallery-nav-next {
    left: 65px;
}

.rsgt-gallery-swiper .rsgt-gallery-nav-button:disabled,
.rsgt-gallery-swiper .rsgt-gallery-nav-button.swiper-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.rsgt-gallery-swiper .rsgt-gallery-nav-button svg {
    width: 25px;
    height: 25px;
    fill: #91DCD5;
}
.rsgt-gallery-swiper .rsgt-gallery-nav-button:hover svg {
    fill: #172136;
}   
.rsgt-gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

.rsgt-gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #333;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

@media screen and (min-width: 768px) {
    .rsgt-gallery-swiper .swiper {
      height: 688px;
    }
    .rsgt-gallery-slide {
         height: calc(257px - 12px) !important;
    }
    .rsgt-gallery-slide:nth-child(4n + 2),
    .rsgt-gallery-slide:nth-child(4n + 3) {
        height: calc(431px - 12px) !important;
    }
    .rsgt-gallery-slide:nth-child(even) {
     margin-top: 24px !important;
    }
}


.rsgt-gallery-slider-lightbox {
    /* Position as portal - independent of parent containers */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    z-index: 999999;

    /* Hidden by default */
    display: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    /* Override any parent container styles */
    transform: none;
    flex: none;
    grid-column: initial;
    grid-row: initial;

    /* Smooth transitions */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rsgt-gallery-slider-lightbox.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
}

.rsgt-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #17213694;
    backdrop-filter: blur(19.600000381469727px);
    -webkit-backdrop-filter: blur(19.600000381469727px);
    z-index: 0;
}

.rsgt-lightbox-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1;
    max-width: 1264px;
    margin: 0 auto;
}

.rsgt-lightbox-media-wrapper {
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Allow clicks to pass through empty space in wrapper */
    pointer-events: none;
}

.rsgt-lightbox-media-wrapper > * {
    /* Re-enable pointer events on actual media content */
    pointer-events: auto;
}

.rsgt-lightbox-media-wrapper img,
.rsgt-lightbox-media-wrapper video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
	width:auto;
}

/* Lightbox Title */
.rsgt-lightbox-title {
    padding: 0;
    align-self: center;
}

.rsgt-lightbox-title h3 {
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;
}

.rsgt-lightbox-media-wrapper-main {
    width: 100%;
    position: relative;
    z-index: 0;
    /* Allow clicks to pass through empty space */
    pointer-events: none;
}

.rsgt-lightbox-media-wrapper-main > * {
    /* Re-enable pointer events on actual content */
    pointer-events: auto;
}

/* Override: wrapper itself should allow clicks to pass through */
.rsgt-lightbox-media-wrapper-main .rsgt-lightbox-media-wrapper {
    pointer-events: none !important;
}

.rsgt-lightbox-bottom {
    display: flex;
    justify-content: space-between;
    padding: 17px 0 0;
    align-items: flex-start;
    gap: 8px;
}
html[dir="rtl"] .rsgt-lightbox-prev, html[dir="rtl"] .rsgt-lightbox-next {
  transform: rotate(-180deg);
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Lightbox Controls - Glassmorphism (Matches News Filter) */
.rsgt-lightbox-close,
.rsgt-lightbox-prev,
.rsgt-lightbox-next {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 10px !important;
    background: transparent !important;
    border: 1px solid #91DCD5 !important;
    border-radius: 8px;
    color: #91DCD5 !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.rsgt-lightbox-close:hover,
.rsgt-lightbox-prev:hover,
.rsgt-lightbox-next:hover {
    background: #91DCD5 !important;
    border-color: #91DCD5 !important;
    color: #172136 !important;
}

.rsgt-lightbox-close svg,
.rsgt-lightbox-prev svg,
.rsgt-lightbox-next svg {
    width: 20px;
    height: 20px;
    /* stroke: currentColor;
    stroke-width: 2.5;
    fill: none; */
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rsgt-lightbox-close:hover svg,
.rsgt-lightbox-prev:hover svg,
.rsgt-lightbox-next:hover svg {
    fill: #172136;
}

.rsgt-lightbox-close {
    top: 10px;
    right: 10px;
}

.rsgt-lightbox-prev {
    /* left: 0;
    bottom: -5px;
    /* transform: translateY(-50%); */
    position: initial;
}

.rsgt-lightbox-next {
    /* right: 0;
    bottom: -5px; */
    /* transform: translateY(-50%); */
    position: initial;
}

.rsgt-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 1);
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    display: none;
}

/* Play Icon Pulse */
.rsgt-gallery-play-icon {
    animation: playIconPulse 2s ease-in-out infinite;
}
html[dir=rtl] .rsgt-gallery-swiper .rsgt-gallery-nav-prev{
	left: auto;
	right:0;
	transform: rotate(180deg);
   
}
html[dir=rtl] .rsgt-gallery-swiper .rsgt-gallery-nav-next{
	left: auto;	
	right: 65px;
	transform: rotate(180deg);
}
@keyframes playIconPulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.9;
    }
}