.post-content div + div{margin-top:0}
.photogallery-modern {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Основной слайдер */
.gallery-main {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.gallery-slide {
  display: none;
  width: 100%;
  min-height: 400px;
  max-height: 70vh;
  background: #1a1a1a;
  position: relative;
}

.gallery-slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slide img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  transition: opacity 0.3s ease;
}

.gallery-slide img.loading {
  opacity: 0.5;
}

.gallery-slide img.loaded {
  opacity: 1;
}

/* Кнопки навигации */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  color: #333;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
  left: 20px;
}

.gallery-next {
  right: 20px;
}

/* Индикаторы */
.gallery-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  background: rgba(0,0,0,0.4);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.gallery-dot.active {
  background: #fff;
  transform: scale(1.2);
}

.gallery-dot:hover {
  background: rgba(255,255,255,0.8);
}

/* Миниатюры */
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  padding: 4px;
}

.gallery-thumb {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  position: relative;
  aspect-ratio: 1/1;
  background: #e9ecef;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.gallery-thumb.active {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.3);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb .thumb-index {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

/* Адаптивность */
@media (max-width: 768px) {
  .photogallery-modern {
    padding: 10px;
  }
  
  .gallery-slide {
    min-height: 250px;
    max-height: 50vh;
  }
  
  .gallery-slide img {
    max-height: 50vh;
  }
  
  .gallery-nav {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  
  .gallery-prev {
    left: 10px;
  }
  
  .gallery-next {
    right: 10px;
  }
  
  
  .gallery-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .gallery-slide {
    min-height: 200px;
  }
  
  .gallery-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 6px;
  }
  
  .gallery-indicators {
    padding: 4px 12px;
    bottom: 10px;
  }
  
  .gallery-dot {
    width: 6px;
    height: 6px;
  }
}