.modern-gallery {
  padding: 60px 0;
  background: white;
  overflow: hidden;
}

.modern-gallery .container-fluid {
  max-width: 100%;
  padding: 0;
}

.gallery-wrapper {
  position: relative;
  padding: 0 70px;
  width: 100%;
}

.horizontal-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 20px 0;
  width: 100%;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-track {
  display: inline-flex;
  gap: 25px;
  padding: 0 20px;
  width: max-content;
}

.gallery-item {
  position: relative;
  width: 280px;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  border-radius: 20px;
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.95);
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.15);
  filter: brightness(1);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    transparent 0%, 
    transparent 40%, 
    rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .image-overlay {
  opacity: 1;
}

.gallery-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.gallery-item:hover .gallery-content {
  opacity: 1;
}

.view-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 26px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 2px solid transparent;
}

.view-btn:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  transform: scale(1.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.view-btn i {
  font-size: 22px;
  transition: transform 0.3s ease;
}

.view-btn:hover i {
  transform: rotate(90deg);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: #ef2853;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  opacity: 0.9;
}
.gallery-nav:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-nav.prev {
  left: 10px;
}

.gallery-nav.next {
  right: 10px;
}

/* Scroll Progress Bar */
.scroll-progress {
  width: calc(100% - 140px);
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  margin: 30px auto 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 1200px) {
  .gallery-item {
    width: 260px;
    height: 200px;
  }
}

@media (max-width: 992px) {
  .gallery-item {
    width: 240px;
    height: 190px;
  }
  
  .gallery-track {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .modern-gallery {
    padding: 40px 0;
  }
  
  .gallery-wrapper {
    padding: 0 60px;
  }
  
  .gallery-item {
    width: 220px;
    height: 170px;
  }
  
  .gallery-track {
    gap: 15px;
  }
  
  .gallery-nav {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .view-btn {
    padding: 14px 22px;
    font-size: 12px;
  }
  
  .view-btn i {
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .gallery-wrapper {
    padding: 0 50px;
  }
  
  .gallery-item {
    width: 200px;
    height: 160px;
    border-radius: 15px;
  }
  
  .gallery-track {
    gap: 12px;
    padding: 0 10px;
  }
  
  .gallery-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .gallery-nav.prev {
    left: 5px;
  }
  
  .gallery-nav.next {
    right: 5px;
  }
  
  .view-btn {
    padding: 12px 18px;
  }
  
  .view-btn span {
    display: none;
  }
  
  .scroll-progress {
    width: calc(100% - 100px);
  }
}

@media (max-width: 400px) {
  .gallery-item {
    width: 180px;
    height: 140px;
  }
}