-/* Секция галереи */
.gallery-section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 40px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    border-radius: 15px;
    background-color: transparent;
    position: relative;
    color: #fff;
    overflow: hidden;
}

/* Затемнение фона */
.gallery-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    z-index: -1;
}

/* Контейнер с изображениями */
.gallery-container {
    position: relative;
    z-index: 1;
    padding: 20px 0;
}

/* Контейнер для грида */
.gallery-inner {
    display: grid;
    gap: 20px;
    transition: all 0.3s ease;
}

/* На десктопе: 3 колонки */
@media (min-width: 769px) {
    .gallery-inner {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* На мобильных: 1 колонка */
@media (max-width: 768px) {
    .gallery-inner {
        grid-template-columns: 1fr;
    }
}

/* Стили для изображений */
.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Эффект при наведении */
.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
}

/* Классы для видимости элементов */
.gallery-item.visible {
    display: block;
}

.gallery-item.hidden {
    display: none;
}

/* Кнопка "Показать еще" */
.show-more-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 20px auto;
    padding: 12px 24px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
	
.show-more-btn:hover {
    background-color: #218838;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Позиционирование изображения */
.modal-content img {
    width: 100%;
    height: auto;
}

/* Кнопка закрытия */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ff4444;
}

/* Адаптивные стили для мобильных */
@media (max-width: 768px) {
    .gallery-item.visible:nth-child(n+4) {
        display: none;
    }
}

/* Адаптивные настройки */
@media (max-width: 768px) {
    /* Показываем только первые 3 изображения на мобильных */
    .gallery-item.visible {
        display: block;
    }

    .gallery-item.visible:nth-child(n+4) {
        display: none;
    }
	
	.gallery-item.hidden {
        display: none;
    }
}

    /* Размер изображений на мобильных */
    .gallery-item img {
        height: 150px;
    }

    /* Модальное окно */
    .modal-content {
        max-width: 100%;
        max-height: 100%;
    }
}

@media (max-width: 480px) {
    /* Дополнительные настройки для маленьких экранов */
    .gallery-section {
        padding: 20px;
    }

    .show-more-btn {
        font-size: 14px;
    }
}