

/* Контейнер галереи */
.gallery-container {
    max-width: 1400px;
    margin: auto;
    text-align: center;
}

/* Контейнер фильтров */
.filters_f {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Стили для выпадающих списков */
.filters select {
    padding: 10px;
    border: 1px solid #5c5c5c;
    background: white;
    font-size: 16px;
    width: 100%;
}

/* Галерея */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.gallery img {
    width: 30%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.gallery img.show {
    opacity: 1;
    transform: scale(1);
}

/* Кнопка "Показать ещё" */
#loadMore {
    background: #3483ca;
    color: white;
    border: none;
    padding: 10px 40px;
    cursor: pointer;
    margin: 10px 0;
    border-radius: 10px;
    font-size: 20px;
}

#loadMore:hover {
    background: #29CE90;
}

/* Лайтбокс */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.lightbox img {
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 0px;
    right: 15px;
    font-size: 30px;
    cursor: pointer;
    color: white;
    transition: color 0.3s;
    z-index: 10;
}

.close:hover {
    color: #ff4747;
}

/* 🔹 Кнопки переключения изображений */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    user-select: none;
    transition: background 0.3s;
    z-index: 10;
    background: #efefef4d;
    border: none;
    color: white;
    padding: 50px 15px;
    cursor: pointer;
    font-size: 20px;
    backdrop-filter: blur(4px);
}

.prev { 
    left: 0px; 
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
.next {
    right: 0px; 
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.prev:hover, .next:hover {
    background: #5C5C5C4d;
}


/* 🔹 Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .filters_f {
        grid-template-columns: repeat(1, 1fr);
        gap: 10px;
        padding-right: 15px;
        padding-left: 15px;
    }

    .gallery {
        padding-right: 10px;
        padding-left: 10px;
        gap: 5px;
    }

    .gallery img {
        width: 45%; /* Более удобное расположение фото */
    }
}

@media (max-width: 480px) {
 .filters select {
        font-size: 14px;
        padding: 8px;
    }

    .gallery img {
        width: 48%;
    }
}
