/* Gallery Auto-Scroll Styles */
.gallery.section {
  background: #f8f9fa;
  padding: 80px 0;
}

.gallery-window {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 30px;
  margin: 0 auto;
  max-width: 1200px;
  overflow: hidden;
  position: relative;
}

.gallery-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(135deg, #e3e3e3 0%, #f0f0f0 100%);
  border-radius: 20px 20px 0 0;
  z-index: 1;
}

.gallery-window-controls {
  position: absolute;
  top: 15px;
  left: 20px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.window-control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control-close { background: #ff5f57; }
.control-minimize { background: #ffbd2e; }
.control-maximize { background: #28ca42; }

.gallery-content {
  margin-top: 50px;
  height: 400px;
  overflow: hidden;
  position: relative;
}

.gallery-row {
  display: flex;
  animation: scrollHorizontal 30s linear infinite;
  margin-bottom: 15px;
  height: 180px;
}

@media (max-width: 600px) {
  .gallery-row {
    animation-duration: 6s !important;
  }
  .gallery-row:nth-child(2) {
    animation-duration: 6s !important;
  }
}


.gallery-row:nth-child(2) {
  animation-direction: reverse;
  animation-duration: 35s;
}

.gallery-scroll-item {
  flex: none;
  width: 300px;
  height: 180px;
  margin-right: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  position: relative;
}

.gallery-scroll-item:hover {
  transform: scale(1.05);
  z-index: 10;
}

.gallery-scroll-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-scroll-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white;
  padding: 15px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.gallery-overlay h5 {
  color: white !important;
  margin: 0;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.gallery-scroll-item:hover .gallery-overlay {
  transform: translateY(0);
}

@keyframes scrollHorizontal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Pause animation on hover */
.gallery-row:hover {
  animation-play-state: paused;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .gallery-window {
    margin: 0 15px;
    padding: 20px;
  }
  
  .gallery-content {
    height: 300px;
  }
  
  .gallery-row {
    height: 130px;
  }
  
  .gallery-scroll-item {
    width: 200px;
    height: 130px;
    margin-right: 15px;
  }
  
  .gallery-row {
    animation-duration: 25s;
  }
  
  .gallery-row:nth-child(2) {
    animation-duration: 30s;
  }
}