/* Image Gallery Component Styles */
.image-gallery {
  width: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}

.gallery-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.gallery-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.gallery-image.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.gallery-image img.loaded {
  opacity: 1;
}

.gallery-image img:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* Watermark */
.image-watermark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  /* Pašaliname foną - permatomam PNG nereikia */
}

.watermark-logo {
  width: 32px;
  height: 32px;
  opacity: 0.27; /* Triskart mažiau negu buvo 0.8 */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  transition: opacity 0.3s ease;
}

/* Hover efektas vandens ženklui */
.image-gallery:hover .watermark-logo {
  opacity: 0.4; /* Triskart mažiau negu buvo 1.0 */
}

/* Navigation Controls */
.gallery-controls {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 4;
  pointer-events: none;
}

.gallery-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: all;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}

.gallery-btn:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-btn i {
  font-size: 14px;
  color: #374151;
}

.gallery-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Indicators */
.gallery-indicators {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-dot.active {
  background: #3b82f6;
  transform: scale(1.2);
}

.gallery-dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* Counter */
.gallery-counter {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  z-index: 4;
  backdrop-filter: blur(4px);
}

/* Loading states */
.gallery-image img[loading] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery-container {
    height: 200px;
  }
  
  .gallery-btn {
    width: 36px;
    height: 36px;
  }
  
  .gallery-btn i {
    font-size: 12px;
  }
  
  .gallery-controls {
    padding: 0 8px;
  }
  
  .gallery-counter {
    top: 12px;
    right: 12px;
    font-size: 11px;
    padding: 3px 10px;
  }
  
  .gallery-indicators {
    bottom: 12px;
  }
  
  .gallery-dot {
    width: 6px;
    height: 6px;
  }
}

@media (max-width: 480px) {
  .gallery-container {
    height: 180px;
  }
  
  .gallery-btn {
    width: 32px;
    height: 32px;
  }
  
  .gallery-btn i {
    font-size: 10px;
  }
}

/* Touch/Swipe feedback */
.gallery-image.swiping {
  transition: transform 0.1s ease;
}

/* Error state */
.gallery-image img[src*="data:image/svg"] {
  opacity: 0.6;
  filter: grayscale(0.3);
}

/* Hover effects for desktop */
@media (hover: hover) {
  .image-gallery:hover .gallery-controls {
    opacity: 1;
  }
  
  .gallery-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .image-gallery:hover .gallery-counter {
    opacity: 1;
  }
  
  .gallery-counter {
    opacity: 0.8;
    transition: opacity 0.3s ease;
  }
}

/* Accessibility */
.gallery-btn:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.gallery-dot:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gallery-btn {
    background: white;
    border: 2px solid black;
  }
  
  .gallery-dot {
    border: 1px solid white;
  }
  
  .gallery-dot.active {
    background: white;
    border: 2px solid black;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .gallery-image {
    transition: opacity 0.2s ease;
    transform: none;
  }
  
  .gallery-image.active {
    transform: none;
  }
  
  .gallery-btn:hover {
    transform: none;
  }
  
  .gallery-dot:hover {
    transform: none;
  }
}
