.masonry-gallery {
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 equal columns */
  gap: 25px; /* space between images */
}
.masonry-item {
  break-inside: avoid;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: #000;
  border-radius: 16px;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  -webkit-transition: all 0.5s ease-out 0s;
  -moz-transition: all 0.5s ease-out 0s;
  -ms-transition: all 0.5s ease-out 0s;
  -o-transition: all 0.5s ease-out 0s;
  transition: all 0.5s ease-out 0s;
}

.masonry-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  background: #000;
  position: relative;
  /* border-radius: 16px; */
  transition: transform 0.3s ease;
  -webkit-transition: all 0.5s ease-out 0s;
  -moz-transition: all 0.5s ease-out 0s;
  -ms-transition: all 0.5s ease-out 0s;
  -o-transition: all 0.5s ease-out 0s;
  transition: all 0.5s ease-out 0s;
}

.masonry-item img::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #000;
  top: 0;
  left: 0;
}

.masonry-item.gallery {
  background: #000;
}
.gallery-slider .masonry-item img {
    height: 400px;
}

.masonry-item.video::before,
.masonry-item.video::after {
  display: none;
}

.masonry-item a {
  cursor: zoom-in !important;
}

p.video-title {
  font-family: "Sora", sans-serif;
  margin-bottom: 0;
  padding-bottom: 10px;
  font-weight: 500;
}

.fancybox__thumbs .carousel__slide .fancybox__thumb::after {
  border-color: #ff7f01 !important;
}

.masonry-item.video:hover img {
  transform: scale(1);
  opacity: 0.8;
}

.masonry-item:hover img {
  transform: scale(1.05);
  opacity: 0.8;
}

.gallery-details {
  display: flex;
  position: absolute;
  top: 0;
  background: rgb(0 0 0 / 40%);
  color: #fff;
  width: 100%;
  height: 84%;
  padding: 30px;
  box-sizing: border-box;
  transition: transform 0.3s ease;
  text-align: center;
  opacity: 1;
  -webkit-transition: all 0.5s ease-out 0s;
  -moz-transition: all 0.5s ease-out 0s;
  -ms-transition: all 0.5s ease-out 0s;
  -o-transition: all 0.5s ease-out 0s;
  transition: all 0.5s ease-out 0s;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

.gallery-details h4 {
  font-size: 26px;
  color: var(--color-ffffff);
}

.gallery-details p {
  color: var(--color-ffffff);
}

.masonry-item:hover .gallery-details {
  opacity: 1;
}

.gallery-details ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  text-align: left;
  font-size: 14px;
  gap: 10px 0;
}

.gallery-details ul li {
  width: 50%;
  color: var(--color-ffffff);
}

.gallery-details ul li i {
  color: var(--color-eb2327);
  margin-right: 10px;
}

.masonry-item {
  transition: all 0.5s ease;
  /* smooth transition */
  transform: scale(1);
}

.masonry-item.hide {
  transform: scale(0.8);
  pointer-events: none;
  width: 0;
  height: 0;
  /* display: none; */
  position: absolute;
  z-index: -9999;
}

.filter-buttons button {
  position: relative;
  padding: 10px 35px;
  background: #ffffff;
  border: none;
  border-left: 2px solid #eb2327;
  border-right: 2px solid #eb2327;
  color: #000;
  overflow: hidden;
  transition: color 0.3s ease;
  cursor: pointer;
}

/* ::before for top line, ::after for bottom line (underline effect) */
.filter-buttons button::before,
.filter-buttons button::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: #eb2327;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.filter-buttons button::before {
  top: 0;
  transform-origin: left;
}

.filter-buttons button::after {
  bottom: 0;
  transform-origin: right;
}

.filter-buttons button:hover::before,
.filter-buttons button:hover::after {
  transform: scaleX(1);
}

.filter-buttons button:hover {
  color: #eb2327;
}

.filter-buttons button.active {
  background: var(--color-ff7f01);
  color: #fff;
}

.filter-buttons button.active::after {
  transform: scaleX(1);
  background: var(--color-ff7f01)
}

.filter-buttons {
  display: flex;
  margin-top: 35px;
  margin-bottom: 35px;
  gap: 50px;
  border-bottom: 1px solid #efefef;
  justify-content: center;
}


.masonry-item {
  position: relative;
  overflow: hidden;
}

.project-heading::before {
  display: none;
}

.project-heading::after {
  display: none;
}


/* Top and Bottom borders */
.masonry-item::before {
  height: 2px;
  width: 100%;
  top: 20px;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  z-index: 9;
}

.masonry-item::after {
  height: 2px;
  width: 100%;
  bottom: 20px;
  left: 0;
  transform: scaleX(0);
  transform-origin: right;
}

/* Left and Right borders using inner div */
.masonry-item .border-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  right: 20px;
  pointer-events: none;
}

.masonry-item .border-line::before,
.masonry-item .border-line::after {
  content: '';
  position: absolute;
  background: #fff;
  /* Border color */
  transition: transform 0.5s ease;
}

/* On hover - animate all borders */
.masonry-item:hover::before,
.masonry-item:hover::after {
  transform: scaleX(1);
}

.masonry-item:hover .border-line::before,
.masonry-item:hover .border-line::after {
  transform: scaleY(1);
}

.magnifier-icon img { 
  width: 100%;
  height: 100%;
  background: none;
}

.magnifier-icon {
  width: 35px;
  height: 35px;
  display: flex;
  position: absolute;
  bottom: 45%;
  right: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 8px;
  border-radius: 50%;
  font-size: 16px;
  opacity: 0; /* Default hidden */
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

/* Hover pai show hoga */
.zoom-container:hover .magnifier-icon {
  opacity: 1;
}
.masonry-item:hover .magnifier-icon {
  opacity: 1;
}
/* Parent ko relative banana zaroori hai */
.zoom-container {
  position: relative;
  display: inline-block;
}
