/* =========================
   GRID
========================= */
.ts-gallery-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.ts-gallery-item img {
    width: 100%;
    display: block;
}

/* =========================
   OVERLAY
========================= */
.ts-gallery-popup {
    display: flex;
    align-items: center;
    justify-content: center;
	flex-direction: column;
	text-align:center;
  position: absolute;
      inset: 0;
    z-index: 2;
  top: 50%;
  left: 50%;
  width:100%;
  height:100%;
  transform: translate(-50%, -50%);
    padding: 20px;
	gap:10px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    opacity: 0;
    transition: .3s ease;
	pointer-events: auto;
}
.ts-gallery-popup > *{
    width:100%;
}
.ts-gallery-item:hover .ts-gallery-popup {
    opacity: 1;
}

/* CONTENT ANIMATION */
.ts-gallery-item .ts-gallery-title,
.ts-gallery-item .ts-gallery-desc,
.ts-gallery-item .ts-gallery-btn {
    transform: translateY(20px);
    opacity: 0;
    transition: .3s ease;
	color:#fff;
}

.ts-gallery-item:hover .ts-gallery-title,
.ts-gallery-item:hover .ts-gallery-desc,
.ts-gallery-item:hover .ts-gallery-btn {
    transform: translateY(0);
    opacity: 1;
}

.ts-gallery-item .ts-gallery-title { transition-delay: .1s; font-size:20px; margin-bottom:0;}
.ts-gallery-item .ts-gallery-desc { transition-delay: .2s;margin-bottom:0;}
.ts-gallery-item .ts-gallery-btn  { transition-delay: .3s; }

/* BUTTON */
.ts-gallery-item .ts-gallery-btn {
	width:45px;
	height:45px;
    background: #fff;
    color: #000;
    text-decoration: none;
	border-radius:50%;
}
.tsg-filter {display:flex; gap:10px; margin-bottom:20px;}
.tsg-filter button {
        background: #f4f4f4;
    color: var(--text-color);
	padding:8px 15px;
	border-radius:34px;
	transition: .3s ease;
}
.tsg-filter button.active {
	background: var(--theme-color);
    color: #fff;
}

/* =========================
   LIGHTBOX BASE
========================= */
.ts-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}

.ts-gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.ts-gallery-lightbox .ts-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    opacity: 0;
    transition: opacity .4s ease;
}
.ts-gallery-lightbox.active .ts-lightbox-overlay {
    opacity: 1;
}
.ts-gallery-lightbox .ts-lightbox-content {
    display: flex;
    align-items: stretch;
    height: 100vh;
    max-width: 1400px;
    margin: auto;

    transform: scale(.9) translateY(40px);
    opacity: 0;

    transition: 
        transform .45s cubic-bezier(.22,1,.36,1),
        opacity .35s ease;
}
.ts-gallery-lightbox.active .ts-lightbox-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}
/* =========================
   MEDIA
========================= */
.ts-gallery-lightbox .ts-lightbox-media iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ts-gallery-lightbox .ts-lightbox-media {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.ts-gallery-lightbox .ts-lightbox-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
    transition: transform .3s ease;
    cursor: zoom-in;
	background: #00000094;
	    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================
   DESCRIPTION
========================= */
.ts-gallery-lightbox .ts-lightbox-desc {
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255,255,255,0.2);
    padding: 30px;
    overflow-y: auto;
	    transition: 
        transform .5s cubic-bezier(.22,1,.36,1),
        opacity .4s ease;
    width: auto;
    max-width: 400px;
    flex-shrink: 0;	
    display: flex;
    align-items: start;
    justify-content: start;
    flex-direction: column;
    gap: 10px;
}
.ts-gallery-lightbox .ts-lightbox-desc .ts-lightbox-title {font-size: 20px;margin-top:20px; margin-bottom:0;}
.ts-gallery-lightbox .ts-lightbox-desc .ts-lightbox-text{ color:#000}
/* =========================
   LAYOUT POSITIONS
========================= */
.ts-gallery-lightbox.pos-right .ts-lightbox-content{
    flex-direction: row;
}

.ts-gallery-lightbox.pos-left .ts-lightbox-content{
    flex-direction: row-reverse;
}

.ts-gallery-lightbox.pos-top .ts-lightbox-content{
    flex-direction: column-reverse;
}

.ts-gallery-lightbox.pos-bottom .ts-lightbox-content{
    flex-direction: column;
}
/* =========================
   DESCRIPTION ANIMATION
========================= */
.ts-gallery-lightbox.pos-right .ts-lightbox-desc {
    transform: translateX(100%);
    opacity: 0;
}

.ts-gallery-lightbox.active.pos-right .ts-lightbox-desc {
    transform: translateX(0);
    opacity: 1;
}

.ts-gallery-lightbox.pos-left .ts-lightbox-desc {
    transform: translateX(-100%);
    opacity: 0;
}

.ts-gallery-lightbox.active.pos-left .ts-lightbox-desc {
    transform: translateX(0);
    opacity: 1;
}

.ts-gallery-lightbox.pos-top .ts-lightbox-desc {
    transform: translateY(-100%);
    opacity: 0;
}

.ts-gallery-lightbox.active.pos-top .ts-lightbox-desc {
    transform: translateY(0);
    opacity: 1;
}

.ts-gallery-lightbox.pos-bottom .ts-lightbox-desc {
    transform: translateY(100%);
    opacity: 0;
}

.ts-gallery-lightbox.active.pos-bottom .ts-lightbox-desc {
    transform: translateY(0);
    opacity: 1;
}

/* =========================
   HIDE DESCRIPTION
========================= */
.ts-gallery-lightbox.no-desc .ts-lightbox-desc {
    display: none;
}

.ts-gallery-lightbox.no-desc .ts-lightbox-media {
    width: 100% !important;
}

/* =========================
   NAVIGATION
========================= */
.ts-gallery-lightbox .ts-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 20px;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    z-index: 999;
    background: #111;
	display:flex;
	align-items:center;
	justify-content:center;
}

.ts-gallery-lightbox .ts-lightbox-prev,
.ts-gallery-lightbox .ts-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    cursor: pointer;
	width:60px;
	height:60px;
	background:var(--theme-color);
	border-radius:50%;
	z-index: 999;
	box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:clamp(16px, 45%, 28px);
}
.ts-lightbox-prev i,
.ts-lightbox-next i{
    font-size:1em;
    line-height:1;
}
.ts-gallery-lightbox .ts-lightbox-prev { left: 20px; }
.ts-gallery-lightbox .ts-lightbox-next { right: 20px; }

/* =========================
   THUMBNAILS
========================= */
.ts-gallery-lightbox .ts-lightbox-thumbs {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
	    z-index: 99;
}

.ts-gallery-lightbox .ts-lightbox-thumbs img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    opacity: .6;
    cursor: pointer;
	border-radius:6px;
}

.ts-gallery-lightbox .ts-lightbox-thumbs img.active,
.ts-gallery-lightbox .ts-lightbox-thumbs img:hover {
    opacity: 1;
}
.ts-gallery-lightbox .ts-lightbox-prev,.ts-gallery-lightbox  .ts-lightbox-next {
    transition: transform .2s ease;
}

.ts-gallery-lightbox .ts-lightbox-prev:hover, .ts-gallery-lightbox .ts-lightbox-next:hover {
    transform: translateY(-50%) scale(1.2);
}
.elementor-editor-active .ts-gallery-slider,
.elementor-editor-active .ts-gallery-slider .swiper-wrapper,
.elementor-editor-active .ts-gallery-slider .swiper-slide{
    height:auto !important;
}

.elementor-editor-active .ts-gallery-slider .swiper-slide img{
    height:400px;
    object-fit:cover;
}
.ts-gallery-slider {
 overflow: hidden;	
}
.ts-gallery-slider .swiper-slide {
    padding: 0px;
}

.ts-gallery-slider img {
    width: 100%;
    display: block;
}
.ts-gallery-slider .swiper-slide {
	    overflow: hidden;
    border-radius: 15px;
	position:relative;
	
}
.tsg-gallery-slider-wrap .tsg-pagination {
  position: relative;
display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
  height: 25px;
  gap:5px;
}
.tsg-gallery-slider-wrap .swiper-pagination.swiper-pagination {
  bottom: 0;
}

.tsg-gallery-slider-wrap .swiper-pagination-bullet {
  background: tomato;
  width: 22px;
  height: 4px;
  border-radius: 0;
  transition: opacity 1s ease;
}
.tsg-gallery-slider-wrap .swiper-pagination-bullet.swiper-pagination-bullet.swiper-pagination-bullet {
  margin: 0;
}
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-title, 
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-desc
{opacity:0; display:none;}

.ts-gallery-slider-wraper {
  background: #fff;
   transition: 0.5s all;
    overflow: hidden;
    position: relative;
}
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-slider-wraper:hover img {
  transform: scale3d(1.3, 1.3, 1);
}
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-popup p,
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-popup .ts-gallery-title
 {
display:none;
}
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-popup,
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-popup a {
opacity:1;	
}

.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-slider-wraper:hover .ts-gallery-popup {
    background: rgba(0,0,0,0.15);
    border-left:0px solid rgba(255,255,255,0.2);
}
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-popup a {
	    display: flex;
    justify-content: center;
    align-items: center;
	width:60px; 
	height:60px;
	font-size:20px; 
	background:#000; 
	border-radius:50%; 
	color:#fff;  
	opacity:0;
	-webkit-transform: scale(1);
	transform: scale(1);
	  transition: transform 0.14s ease-in, 
	}
.ts-gallery-popup a {
    pointer-events: auto;
}	
.tsg-gallery-slider-wrap {position:relative;}
.tsg-gallery-slider-wrap .ts-gallery-slider .ts-gallery-popup:hover a {
		-webkit-transform: scale(1.2);
	transform: scale(1.2);
	opacity:1;
	}	

.tsg-gallery-slider-wrap .swiper-slide.swiper-slide-active img, 
.tsg-gallery-slider-wrap .swiper-slide.swiper-slide-duplicate-active img {
  transform: scale3d(1.3, 1.3, 1);
}
.ts-gallery-slider-wraper img
{
transform: scale3d(1, 1, 1);
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 1400ms ease;
  transition: transform 0.14s ease-in, 
}
.ts-gallery-slider-wraper .ts-gallery-slider-wraper:hover img
{
transform: scale3d(1.3, 1.3, 1);
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 1400ms ease;
}
.ts-gallery-slider .tsg-next,
.ts-gallery-slider .tsg-prev {
  z-index: 999;
  position: absolute;
  top: auto;
  bottom:18px;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  color:#fff;
  border-radius:50%;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-transition: all 0.35s;
  transition: all 0.35s;
}
.ts-gallery-slider .tsg-next svg path,
.ts-gallery-slider .tsg-prev svg path{
	fill:#000;
}
.ts-gallery-slider .tsg-prev.tsg-rotate-icon {transform: rotate(180deg);}
.ts-gallery-slider .tsg-prev
{
 left: 0px;	
transform: translateX(0%) rotate(180deg);
}
.ts-gallery-slider .tsg-next
{
right:0px;	
transform: translateX(0%) rotate(0deg);
}