/* Галерея для просмотра изображений */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease;
}

.gallery-content {
  position: relative;
  margin: 2% auto;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery-main-image {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.gallery-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
  z-index: 10001;
}

.gallery-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.gallery-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

.gallery-close:hover {
  background: rgba(255, 71, 87, 0.8);
  transform: scale(1.1);
}

.gallery-thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  max-width: 90%;
  overflow-x: auto;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.gallery-thumb:hover {
  transform: scale(1.1);
  border-color: #6e48aa;
}

.gallery-thumb.active {
  border-color: #ffdd59;
  transform: scale(1.1);
}

.gallery-counter {
  position: absolute;
  top: 20px;
  left: 20px;
  color: white;
  font-size: 16px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 15px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

/* Анимации */
@keyframes slideInLeft {
  from { transform: translateX(-100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-left {
  animation: slideInLeft 0.3s ease;
}

.slide-right {
  animation: slideInRight 0.3s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
  .gallery-content {
    width: 95%;
    height: 95%;
    margin: 5% auto;
  }
  
  .gallery-main-image {
    max-width: 95%;
    max-height: 70vh;
  }
  
  .gallery-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }
  
  .gallery-close {
    width: 40px;
    height: 40px;
    font-size: 24px;
    top: 10px;
    right: 10px;
  }
  
  .gallery-thumb {
    width: 60px;
    height: 60px;
  }
  
  .gallery-thumbnails {
    max-width: 95%;
  }
  
  .gallery-counter {
    top: 10px;
    left: 10px;
    font-size: 14px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .gallery-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
    padding: 0;
  }
  
  .gallery-thumb {
    width: 50px;
    height: 50px;
  }
  
  .gallery-thumbnails {
    gap: 5px;
    padding: 8px;
  }
}