/* #region MARK: section gallery */
#features .section_gallery .max-1440 {
  max-width: 1440px;
  margin-left: auto !important;
  margin-right: auto !important;
  position: relative;
  margin-top: 30px;
}

#features .section_gallery .row {
  margin-top: 30px;
}

#features .section_gallery .absolute-col {
  position: absolute;
  bottom: 0;
}

#features .section_gallery .gallery-header p {
  color: #333333!important;
  margin-bottom: 0;
  margin-top: 0;
  font-size: clamp(18px, 2vw, 28px);
  text-wrap: balance;
  text-align: center;
}

#features .section_gallery .gallery-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  position: relative;
  padding-bottom: 20px;
  padding: 0 3px;
  height: 70vh;
}

/* Add transparent fade effect at top and bottom */
#features .section_gallery .gallery-grid::before,
#features .section_gallery .gallery-grid::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: clamp(130px, 8.5vw, 200px);
  pointer-events: none;
  z-index: 2;
}

#features .section_gallery .gallery-grid::before {
  top: -1px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 20%, transparent 100%);
}

#features .section_gallery .gallery-grid::after {
  bottom: -1px;
  /* background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 50%, transparent 100%); */
  background: linear-gradient(to top, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 20%, transparent 100%);
  z-index: 1;
}

#features .section_gallery .gallery-column {
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 25%;
  max-width: 25%;
}

#features .section_gallery .gallery-content {
  display: flex;
  flex-direction: column;
  /* Animation properties now controlled by JavaScript */
}

/* Gallery animations are now controlled by JavaScript */
/* CSS animations removed - JavaScript handles the animation timing and direction */

.gallery-grid {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.gallery-grid.gallery-ready {
  opacity: 1;
  transform: translateY(0);
}

/* Seamless infinite scroll animations */
@keyframes seamlessScrollUp {
  0% {
    transform: translateY(0%);
  }

  100% {
    transform: translateY(-100%);
  }
}

@keyframes seamlessScrollDown {
  0% {
    transform: translateY(-100%);
  }

  100% {
    transform: translateY(0%);
  }
}

#features .section_gallery .gallery-txt {
  position: relative;
  z-index: 3;
  user-select: none;
}

#features .section_gallery .gallery-txt p {
  margin-top: 0;
  color: #000000!important;
  font-size: clamp(28px, 4.5vw, 64px);
  font-family: "Inter", graphie, sans-serif;
  margin-bottom: 10px;
  text-align: center;
}

#features .section_gallery .gallery-content img,
#features .section_gallery .gallery-content video {
  margin-top: 4px;
  vertical-align: middle;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  object-fit: cover;
}

/* Gallery image container for name overlay */
#features .section_gallery .gallery-image-container {
  position: relative;
}

/* Gallery image name overlay */
#features .section_gallery .gallery-image-name {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  line-height: 1.2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 10;
  max-width: calc(100% - 16px);
  word-break: break-word;
}

#features .section_gallery .gallery-column video {
  object-fit: cover;
  cursor: pointer;
  position: relative;
}

#features .section_gallery .gallery-content video {
  object-fit: cover;
  cursor: pointer;
  position: relative;
}

/* Add a subtle play indicator for videos */
#features .section_gallery .gallery-column video::before,
#features .section_gallery .gallery-content video::before,
#features .section_gallery .gallery-image-container video::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

#features .section_gallery .gallery-column video:hover::before,
#features .section_gallery .gallery-content video:hover::before,
#features .section_gallery .gallery-image-container video:hover::before {
  opacity: 1;
}

#features .section_gallery .gallery-column video[data-playing]::before,
#features .section_gallery .gallery-content video[data-playing]::before,
#features .section_gallery .gallery-image-container video[data-playing]::before {
  display: none;
}

/* High priority video loading optimizations */
#features .section_gallery .gallery-image-container video {
  /* Ensure videos start loading immediately */
  content-visibility: auto;
  contain-intrinsic-size: 300px 200px;
}

/* Reduce layout shift during loading */
#features .section_gallery .gallery-image-container {
  contain: layout style;
}

/* Performance hint for video containers */
#features .section_gallery .gallery-image-container video[data-loaded] {
  /* Video is ready, optimize for playback */
  will-change: transform, opacity;
}

#features .section_gallery .gallery-image-container video:not([data-loaded]) {
  /* Video is loading, prevent expensive operations */
  will-change: auto;
}

/* Video error fallback styling */
#features .section_gallery .video-error-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 14px;
  text-align: center;
}

/* Responsive adjustments for name overlay */
@media screen and (max-width: 767px) {
  #features .section_gallery .gallery-image-name {
    font-size: 6px;
    padding: 3px 6px;
    bottom: 6px;
    left: 6px;
    max-width: calc(100% - 12px);
  }
}

@media screen and (min-width: 768px) {
  #features .section_gallery .gallery-image-name {
    font-size: 12px;
    padding: 5px 10px;
    bottom: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

  /* Animation duration now controlled by JavaScript for responsive breakpoints */
}


/* Responsive layout - Small screens (768px-991px): 3 columns */
@media screen and (min-width: 768px) {

  #features .section_gallery #features .section_gallery .row {
    margin-top: 60px;
  }

  #features .section_gallery .gallery-grid {
    height: 100vh;
  }
}

/* Responsive layout - Medium screens (992px-1199px): 4 columns */
@media screen and (min-width: 992px) {

  #features .section_gallery .gallery-grid {
    padding: 0 4px;
  }


  #features .section_gallery .gallery-column {
    padding: 0 4px;
  }

  #features .section_gallery .gallery-column img,
  #features .section_gallery .gallery-column video {
    margin-top: 8px;
  }
}

@media screen and (min-width: 1200px) {
  #features .section_gallery .row {
    margin-top: 90px;
  }
}

@media screen and (min-width: 1920px) {
  #features .section_gallery .row {
    margin-top: 120px;
  }
}

/* #endregion section gallery grid*/

/* #region MARK: section review */
#features .section_review .max-1440 {
  max-width: 1440px;
  margin-left: auto !important;
  margin-right: auto !important;
}

#features .section_review .review-slider-1 {
  display: none;
  width: 100%;
}

#features .section_review .review-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 20px;
  margin: 0 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 200px;
}

#features .section_review .review-logo {
  margin-bottom: 15px;
  text-align: left;
}

#features .section_review .review-logo img {
  max-height: 40px;
  width: auto;
  object-fit: contain;
}

#features .section_review .review-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#features .section_review .review-text {
  font-size: 14px;
  line-height: 1.5;
  color: #333!important;
  margin-bottom: 15px;
  text-align: left;
  flex: 1;
}

#features .section_review .review-author {
  font-size: 13px;
  color: #666!important;
  font-style: italic;
  text-align: right;
  margin: 0;
  margin-top: auto;
}

@media screen and (min-width: 768px) {

  #features .section_review .review-slider-1 {
    margin-left: auto;
    margin-right: auto;
    max-width: 1170px;
    width: 90%;
  }

  #features .section_review .review-card {
    padding: 25px;
    margin: 0 15px;
    min-height: 220px;
  }

  #features .section_review .review-text {
    font-size: 15px;
  }

  #features .section_review .review-author {
    font-size: 14px;
  }
}

/* #region MARK: review slider control */

#features .section_review .review_container .slick-track {
  display: flex;
  align-items: stretch;
}

#features .section_review .review_container .slick-list {
  padding-bottom: 65px;
}

#features .section_review .review_container .slick-slider .slick-arrow {
  position: absolute;
  top: 43%;
  z-index: 19;
  height: 38px;
  width: 16px;
  margin-top: -19px;
  -webkit-transition: all .6s ease-in-out;
  transition: all .6s ease-in-out;
  cursor: pointer;
  display: block;
}

#features .section_review .review_container .slick-slider .slick-arrow svg {
  fill: #ccc;
  stroke: #ccc;
  stroke-width: 1px;
  width: 100%;
  height: 100%;
}

#features .section_review .review_container .slick-slider .slick-arrow svg:hover {
  fill: #474747;
  stroke: #474747;
}

#features .section_review .review_container .slick-slider .slick-arrow.prev {
  left: 5px;
}

#features .section_review .review_container .slick-slider .slick-arrow.next {
  transform: rotate(180deg);
  right: 5px;
}

/* dots */
#features .section_review .review_container .slick-dots {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  margin: 0;
}

#features .section_review .review_container .slick-dots li button:before {
  border: 1px solid #cecece;
  border-radius: 100%;
  color: transparent;
  opacity: 1;
}

#features .section_review .review_container .slick-dots li.slick-active button:before {
  border: 1px solid #ccc;
  background: #ccc;
}

@media screen and (min-width:768px) {
  #features .section_review .review_container .slick-dots {
    bottom: 0px;
  }

  #features .section_review .review_container .slick-slider .slick-arrow.prev {
    left: -20px;
  }

  #features .section_review .review_container .slick-slider .slick-arrow.next {
    right: -20px;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow {
    opacity: 1;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow.prev {
    left: -35px;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow.next {
    right: -35px;
  }

}

@media screen and (min-width:992px) {
  #features .section_review .review_container .slick-slider .slick-arrow {
    height: 56px;
    width: 16px;
    margin-top: -28px;
    opacity: 0;
  }

  #features .section_review .review_container .slick-slider .slick-arrow.prev {
    left: -20px;
  }

  #features .section_review .review_container .slick-slider .slick-arrow.next {
    right: -20px;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow {
    opacity: 1;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow.prev {
    left: -40px;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow.next {
    right: -40px;
  }
}

@media screen and (min-width:1600) {

  #features .section_review .review_container .slick-slider .slick-arrow.prev {
    left: -40px;
  }

  #features .section_review .review_container .slick-slider .slick-arrow.next {
    right: -40px;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow.prev {
    left: -80px;
  }

  #features .section_review .review_container:hover .slick-slider .slick-arrow.next {
    right: -80px;
  }
}


/* Responsive styling for gallery - hide 4th column on mobile */
@media screen and (max-width: 767px) {
  #features .section_gallery .gallery-column:nth-child(4) {
    display: none;
  }

  /* Adjust remaining columns to take full width on mobile */
  #features .section_gallery .gallery-column {
    flex: 33.333%;
    max-width: 33.333%;
  }
}

/* Responsive styling for review cards */
@media screen and (max-width: 767px) {
  #features .section_review .review-card {
    margin: 0 5px;
    padding: 15px;
    min-height: 180px;
  }

  #features .section_review .review-text {
    font-size: 13px;
  }

  #features .section_review .review-author {
    font-size: 12px;
  }

  #features .section_review .review-logo img {
    max-height: 35px;
  }
}