.scrolling-gallery-section {
  padding: 60px 0;
  background: #f9f9fb;
  position: relative;
  overflow: hidden;
}

.scrolling-gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.scrolling-gallery-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 15px;
  letter-spacing: -0.02em;
}

.scrolling-gallery-subtitle {
  font-size: 1.1rem;
  color: #6e6e73;
  max-width: 700px;
  margin: 0 auto;
}

.scrolling-gallery-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
  overflow: hidden;
}

.scrolling-gallery-gradient {
  position: absolute;
  top: 0;
  height: 100%;
  width: 80px;
  z-index: 10;
  pointer-events: none;
}

.scrolling-gallery-gradient-left {
  left: 0;
  background: linear-gradient(to right, #f9f9fb 0%, rgba(249, 249, 251, 0) 100%);
}

.scrolling-gallery-gradient-right {
  right: 0;
  background: linear-gradient(to left, #f9f9fb 0%, rgba(249, 249, 251, 0) 100%);
}

.scrolling-gallery-track {
  position: relative;
  overflow: visible;
  padding: 30px 10px;
  cursor: grab;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.scrolling-gallery-wrapper {
  position: relative;
  display: flex;
  will-change: transform;
  transition: transform 0.1s linear;
}

.scrolling-gallery-track:active,
.scrolling-gallery-wrapper:active {
  cursor: grabbing;
}

.scrolling-gallery-item {
  flex: 0 0 auto;
  width: 300px;
  margin-right: 30px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateY(0) scale(0.98);
  background: transparent;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
  opacity: 0.95;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
              box-shadow 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.5s ease;
}

.scrolling-gallery-item:hover {
  transform: translateY(-10px) scale(1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  z-index: 2;
  opacity: 1;
}

.scrolling-gallery-img-container {
  position: relative;
  overflow: hidden;
  height: 200px;
  cursor: pointer;
  border-radius: 12px;
}

.scrolling-gallery-img-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scrolling-gallery-img-container::before {
  content: '\f00e';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  color: white;
  font-size: 2rem;
  z-index: 2;
  opacity: 0;
  transition: all 0.3s ease;
}

.scrolling-gallery-img-container:hover::after {
  opacity: 1;
}

.scrolling-gallery-img-container:hover::before {
  opacity: 0.9;
  transform: translate(-50%, -50%) scale(1);
}

.scrolling-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
              filter 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform;
  -webkit-filter: brightness(1) contrast(1);
  filter: brightness(1) contrast(1);
  -webkit-transform: scale(1);
  transform: scale(1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.scrolling-gallery-item:hover .scrolling-gallery-img {
  transform: scale(1.08);
  filter: brightness(1.08) contrast(1.02);
}

/* Caption removed */

.scrolling-controls {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 20px;
}

.scrolling-control {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.scrolling-control:hover {
  background: #f0f0f5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.scrolling-control:active {
  transform: translateY(0);
}

.scrolling-control i {
  color: #1d1d1f;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .scrolling-gallery-container {
    padding: 0 30px;
  }
  
  .scrolling-gallery-item {
    width: 240px;
    margin-right: 20px;
  }
  
  .scrolling-gallery-img-container {
    height: 160px;
  }
  
  .scrolling-gallery-gradient {
    width: 50px;
  }
  
  .scrolling-gallery-title {
    font-size: 2rem;
  }
  
  .scrolling-gallery-subtitle {
    font-size: 1rem;
  }
}