/* Project Gallery Slider Block */
.block8.project-gallery-slider {
  position: relative;
  padding: 80px 0 40px 0;
  background: #ffffff;
  overflow: visible;
}

.project-gallery-carousel {
  position: relative;
  width: calc(100% - 3.2vw);
  margin: 0;
  margin-left: 3.2vw;
  z-index: 2;
}

.project-gallery-carousel .owl-stage-outer {
  overflow: visible !important;
}

/* Peak Effect - Show teaser of next item on desktop */
@media (min-width: 769px) {
  .project-gallery-carousel .owl-stage-outer {
    overflow: visible !important;
    padding-right: 0 !important;
  }

  .project-gallery-carousel .owl-stage {
    padding-right: 25% !important;
  }

  /* Remove peak effect when at the end */
  .project-gallery-carousel.at-end .owl-stage {
    padding-right: 0 !important;
  }
}

.project-gallery-carousel .owl-stage {
  display: flex !important;
}

/* Every second owl-item gets margin-top offset */
.project-gallery-carousel .owl-item:nth-child(odd) .project-gallery-item {
  margin-top: 0;
}

.project-gallery-carousel .owl-item:nth-child(even) .project-gallery-item {
  margin-top: 150px;
}

.project-gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  width: 100%;
  height: 622px;
}

.gallery-image-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
}

.project-gallery-item:hover .gallery-image-bg {
  /* No scale transform - removed as requested */
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 15px 20px;
  font-size: 14px;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.project-gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Owl Carousel Navigation */
.project-gallery-carousel .owl-nav {
  position: absolute;
  bottom: 150px;
  left: 0;
  width: 100%;
  height: 50px;
  pointer-events: none;
}

.project-gallery-carousel .owl-nav button {
  pointer-events: all;
  background: #da5841 !important;
  color: #fff !important;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: absolute;
  bottom: 0;
}

.project-gallery-carousel .owl-nav button.disabled {
  background: #999999 !important;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 1 !important;
}

.project-gallery-carousel .owl-nav button.owl-prev {
  left: 0;
}

.project-gallery-carousel .owl-nav button.owl-next {
  right: 3.2vw;
}

.project-gallery-carousel .owl-nav button:hover {
  background: #515050 !important;
  /* No scale transform - removed as requested */
}

.project-gallery-carousel .owl-nav button span {
  font-size: 36px;
  line-height: 1;
}

/* Custom Arrow Styles */
.owl-custom-arrow {
  background: url(../images/white-arrow.svg) no-repeat center !important;
  background-size: contain !important;
  width: 15px;
  height: 21px;
  display: block !important;
  align-self: center;
  margin: 0 auto !important;
}

.owl-custom-arrow.custom-owl-prev {
  transform: rotate(180deg);
}

/* Owl Carousel Dots */
.project-gallery-carousel .owl-dots {
  text-align: center;
  margin-top: 30px;
}

.project-gallery-carousel .owl-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background: #ddd;
  border-radius: 50%;
  margin: 0 5px;
  transition: all 0.3s ease;
}

.project-gallery-carousel .owl-dot.active {
  background: #da5841;
  width: 30px;
  border-radius: 6px;
}

/* No Gallery Message */
.no-gallery-message {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .block8.project-gallery-slider {
    padding: 20px 0 0 0;
    overflow-x: hidden;
  }

  /* Override global .mbm margin for this block only */
  .block8.project-gallery-slider.mbm {
    margin-bottom: 0;
  }

  .project-gallery-item {
    width: 100%;
    height: 450px;
  }

  .project-gallery-carousel {
    width: 95%;
    margin: 0 auto;
    max-width: 95vw;
    overflow: hidden;
  }

  /* Mobile: Reset peak effect */
  .project-gallery-carousel .owl-stage-outer {
    overflow: hidden !important;
  }

  .project-gallery-carousel .owl-stage {
    padding-right: 0 !important;
  }

  /* Remove offset on mobile */
  .project-gallery-carousel .owl-item:nth-child(2n) .project-gallery-item {
    margin-top: 0;
  }

  .project-gallery-carousel .owl-nav button {
    width: 45px;
    height: 45px;
  }

  .project-gallery-carousel .owl-nav {
    bottom: 20px;
  }

  .project-gallery-carousel .owl-nav button.owl-prev {
    left: 2.5vw;
  }

  .project-gallery-carousel .owl-nav button.owl-next {
    right: 2.5vw;
  }
}

@media (min-width: 769px) and (max-width: 1000px) {
  .project-gallery-item {
    height: 500px;
  }

  /* Keep offset but reduce it on tablet */
  .project-gallery-carousel .owl-item:nth-child(2n) .project-gallery-item {
    margin-top: 75px;
  }

  .project-gallery-carousel .owl-nav {
    bottom: 75px;
  }
}
