/* Галерея */
.gallery-container {
    position: relative;
    padding: 40px 0;
}

.gallery-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 30px 20px;
    margin: -30px -20px;
}

.gallery-item {
    flex: 0 0 85%;
    max-width: 350px;
    scroll-snap-align: center;
}

.gallery-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 450px;
    position: relative;
}

.gallery-image-container {
    height: 90%;
    overflow: hidden;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-image {
    transform: scale(1.05);
}

/* ОБЛАСТЬ С ОПИСАНИЕМ - ПОЛУПРОЗРАЧНАЯ */
.gallery-caption {
    padding: 15px;
    background: rgba(0, 0, 0, 0.25); /* Полупрозрачный черный */
    backdrop-filter: blur(8px);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    transition: all 0.3s ease;
    height: 10%; /* Фиксированная высота для подписи */
}

.gallery-card:hover .gallery-caption {
    background: rgba(0, 0, 0, 0.85); /* Чуть темнее при наведении */
}

.gallery-caption h3 {
    margin-top: -10px;
    margin-bottom: 8px;
    font-size: 1.3rem;
    color: #fff;
    font-weight: 600;
}

/*.gallery-caption p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 0;
}*/

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

.gallery-btn:hover {
    background: #3498db;
    color: white;
}

.gallery-btn.prev {
    left: -25px;
}

.gallery-btn.next {
    right: -25px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gallery-item {
        flex: 0 0 92%;
    }
    
    .gallery-card {
        height: 350px;
    }
    
    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .gallery-btn.prev {
        left: 5px;
    }
    
    .gallery-btn.next {
        right: 5px;
    }
    
    .gallery-caption {
        padding: 15px;
    }
    
    .gallery-caption h3 {
        font-size: 1.1rem;
    }
    
    .gallery-caption p {
        font-size: 0.9rem;
    }
}