/* Современная галерея изображений в стиле слайдера */
.article-gallery-slider {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
}

.article-gallery-info {
    margin-bottom: 20px;
    font-size: 15px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-gallery-info i {
    color: #3498db;
}

.article-gallery-info strong {
    color: #2c3e50;
}

.gallery-slider-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
    /* Добавляем строгий border-radius для контейнера */
    border-radius: 15px;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.gallery-slider-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* Убираем gap, чтобы избежать сдвигов */
}

.gallery-slide {
    flex: 0 0 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Добавляем margin для отступа между слайдами */
    margin-right: 0;
}

.gallery-slide:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-slide img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.gallery-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
		border-radius: 0 0 15px 15px;
}

.gallery-slide-caption .caption-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.gallery-slide-caption .caption-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

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

.gallery-nav-btn:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

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

.gallery-nav-btn.prev {
    left: 20px;
}

.gallery-nav-btn.next {
    right: 20px;
}

.gallery-nav-btn i {
    font-size: 20px;
    color: #333;
}

.gallery-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-nav-btn:disabled:hover {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Индикаторы слайдов (точки) */
.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 0;
}

.gallery-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.gallery-indicator:hover {
    background: #94a3b8;
    transform: scale(1.2);
}

.gallery-indicator.active {
    background: #3b82f6;
    width: 24px;
    border-radius: 4px;
}

/* Счетчик слайдов */
.gallery-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(10px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .article-gallery-slider {
        margin: 15px -20px;
        padding: 15px;
        border-radius: 0;
    }

    .gallery-slide img {
        max-height: 300px;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
    }

    .gallery-nav-btn.prev {
        left: 10px;
    }

    .gallery-nav-btn.next {
        right: 10px;
    }

    .gallery-nav-btn i {
        font-size: 16px;
    }

    .gallery-counter {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .gallery-slide-caption {
        padding: 12px 16px;
    }

    .gallery-slide-caption .caption-title {
        font-size: 14px;
    }

    .gallery-slide-caption .caption-subtitle {
        font-size: 12px;
    }
}

/* Анимация появления */
@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-gallery-slider {
    animation: fadeInSlide 0.5s ease-out;
}

/* Поддержка touch-событий */
.gallery-slider-wrapper {
    touch-action: pan-y pinch-zoom;
}

/* Прелоадер для изображений */
.gallery-slide.loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.gallery-slide.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
