/* ===== ОСНОВНЫЕ СТИЛИ ГАЛЕРЕИ ===== */

.paragraph-galery-images__carousel-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  margin-bottom: 40px;
  padding: 0 40px; /* Место для стрелок */
}

.paragraph-galery-images__carousel-wrapper::before,
.paragraph-galery-images__carousel-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  width: 40px;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.paragraph-galery-images__carousel-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,1), transparent);
}

.paragraph-galery-images__carousel-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,1), transparent);
}

.paragraph-galery-images__carousel-container {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.paragraph-galery-images__items {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 5px;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.paragraph-galery-images__items::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.paragraph-galery-images__items:active {
  cursor: grabbing;
  scroll-behavior: auto;
}

.paragraph-galery-images__item {
  flex: 0 0 auto;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.paragraph-galery-images__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.paragraph-galery-images__item img {
  width: 320px;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.paragraph-galery-images__item img.loaded {
  opacity: 1;
}

.paragraph-galery-images__item:hover img {
  transform: scale(1.05);
}

/* Overlay с иконкой zoom */
.paragraph-galery-images__item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paragraph-galery-images__item:hover::after {
  background: rgba(0, 0, 0, 0.2);
}

/* ===== СТРЕЛКИ НАВИГАЦИИ ===== */

.paragraph-galery-images__carousel-arrows {
  position: absolute;
  top: 57%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.paragraph-galery-images__arrow {
  position: relative;
  width: 50px;
  height: 50px;
  background-color: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  transition: all 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.paragraph-galery-images__arrow:hover {
  background-color: #f5f5f5;
  border-color: #000;
  transform: scale(1.1);
}

.paragraph-galery-images__arrow:active {
  transform: scale(0.95);
}

.paragraph-galery-images__arrow.left {
left: -5px;
  top: 25px;
  transform: translateY(-50%) rotate(180deg);
}

.paragraph-galery-images__arrow.left:hover {
  transform: translateY(-50%) rotate(180deg) scale(1.1);
}

.paragraph-galery-images__arrow.right {
right: 65px;
}

.paragraph-galery-images__arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.paragraph-galery-images__arrow:disabled:hover {
  transform: scale(1);
  background-color: #fff;
  border-color: #e0e0e0;
}

/* SVG иконка стрелки */
.paragraph-galery-images__arrow svg {
  width: 20px;
  height: 24px;
}

/* ===== ТОЧКИ-ИНДИКАТОРЫ ===== */

.paragraph-galery-images__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.paragraph-galery-images__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e0e0e0;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.paragraph-galery-images__dot:hover {
  background-color: #bdbdbd;
  transform: scale(1.2);
}

.paragraph-galery-images__dot.active {
  background-color: #000;
  transform: scale(1.3);
}

/* ===== ПРОГРЕСС-БАР ===== */

.paragraph-galery-images__progress {
  width: 100%;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 2px;
  margin-top: 15px;
  overflow: hidden;
}

.paragraph-galery-images__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #333, #000);
  border-radius: 2px;
  transition: width 0.2s ease;
  width: 0%;
}

/* ===== ОПИСАНИЕ ===== */

.paragraph-galery-images__description {
  text-align: center;
  margin-bottom: 30px;
  padding: 0 20px;
}

.paragraph-galery-images__description p {
  font-size: 18px;
  color: #333;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== LIGHTBOX ===== */

.paragraph-galery-images__lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.paragraph-galery-images__lightbox.active {
  opacity: 1;
  visibility: visible;
}

.paragraph-galery-images__lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.paragraph-galery-images__lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paragraph-galery-images__lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.paragraph-galery-images__lightbox-prev,
.paragraph-galery-images__lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paragraph-galery-images__lightbox-prev {
  left: 20px;
}

.paragraph-galery-images__lightbox-next {
  right: 20px;
}

.paragraph-galery-images__lightbox-prev:hover,
.paragraph-galery-images__lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.paragraph-galery-images__lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.1);
  padding: 8px 20px;
  border-radius: 20px;
}

/* ===== КНОПКА ===== */

.paragraph-galery-images__button {
  text-align: center;
  margin-top: 30px;
}

.paragraph-galery-images__button > .paragraph-button {
  display: inline-block;
  padding: 15px 40px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.paragraph-galery-images__button > .paragraph-button:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 1024px) {
  .paragraph-galery-images__carousel-wrapper {
    padding: 0 30px;
  }
  
  .paragraph-galery-images__carousel-wrapper::before,
  .paragraph-galery-images__carousel-wrapper::after {
    width: 30px;
  }
  
  .paragraph-galery-images__arrow {
    width: 44px;
    height: 44px;
  }
  
  .paragraph-galery-images__item img {
    width: 280px;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .paragraph-galery-images__carousel-wrapper {
    padding: 0 15px;
  }
  
  .paragraph-galery-images__carousel-wrapper::before,
  .paragraph-galery-images__carousel-wrapper::after {
    display: none;
  }
  
  .paragraph-galery-images__arrow {
    width: 40px;
    height: 40px;
    opacity: 1;
  }
  
  .paragraph-galery-images__arrow.left {
    left: 0;
  }
  
  .paragraph-galery-images__arrow.right {
    right: 15px;
  }
  
  .paragraph-galery-images__item img {
    width: 260px;
    height: 100%;
  }
  
  .paragraph-galery-images__description p {
    font-size: 16px;
  }
  
  .paragraph-galery-images__dots {
    gap: 6px;
  }
  
  .paragraph-galery-images__dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .paragraph-galery-images__carousel-wrapper {
    padding: 0 10px;
  }
  
  .paragraph-galery-images__arrow {
    width: 36px;
    height: 36px;
  }
  
  .paragraph-galery-images__arrow svg {
    width: 16px;
    height: 20px;
  }
  
  .paragraph-galery-images__item {
    border-radius: 8px;
    max-height: 50vh;
  }
  
  .paragraph-galery-images__item img {
    width: 85vw;
    height: 100%;
  }
  
  .paragraph-galery-images__description {
    margin-bottom: 20px;
  }
  
  .paragraph-galery-images__description p {
    font-size: 14px;
  }
  
  .paragraph-galery-images__progress {
    height: 3px;
  }
  
  .paragraph-galery-images__lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
  
  .paragraph-galery-images__lightbox-prev,
  .paragraph-galery-images__lightbox-next {
    width: 50px;
    height: 50px;
  }
  
  .paragraph-galery-images__lightbox-prev {
    left: 10px;
  }
  
  .paragraph-galery-images__lightbox-next {
    right: 10px;
  }
}

@media (max-width: 400px) {
  .paragraph-galery-images__arrow.right {
    right: 25px;
  }
}