/* Общие стили */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f2eb; /* Тёплый фон */
    color: #4e4e4e; /* Тёмно-серый текст */
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Убираем горизонтальное переполнение */
}

a {
    text-decoration: none;
    color: #4e4e4e;
}

a:hover {
    color: #ff7043; /* Оранжевый оттенок для hover */
}

/* Основной контейнер */
.container {
    width: 90%;
    margin: 0 auto;
    padding: 2rem;
}

/* Главное меню */
nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

nav ul li {
    font-size: 1.2rem;
    padding: 10px;
}

nav ul li a {
    color: #4e4e4e;
}

nav ul li a:hover {
    color: #ff7043;
}

/* Стиль для раздела */
h1 {
    color: #ff7043;
    font-size: 2rem;
    text-align: center;
}

h2 {
    color: #333;
    font-size: 1.5rem;
}

/* Галерея */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.image-item {
    width: 300px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.image-item:hover {
    transform: scale(1.05);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Звуки природы */
.sounds {
    text-align: center;
    padding: 2rem;
}

.sounds audio {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
}

/* Игры */
.games {
    text-align: center;
}

.games iframe {
    width: 100%;
    max-width: 800px;
    height: 500px;
    border: none;
    border-radius: 8px;
}

/* Обмен */
.exchange {
    text-align: center;
    padding: 2rem;
}

.exchange form {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.exchange form textarea {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
}

.exchange form button {
    background-color: #ff7043;
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.exchange form button:hover {
    background-color: #e65c3f;
}

/* Анимация при загрузке страницы */
body {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Мобильная адаптивность */

/* Скрываем меню на мобильных устройствах и отображаем гамбургер */
@media (max-width: 768px) {

    nav ul li a {
        padding: 10px;
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: block;
        font-size: 30px;
        cursor: pointer;
        padding: 10px;
    }
}

/* Большие экраны (для десктопов) */
@media (min-width: 769px) {
    .container {
        width: 80%;
    }

    .gallery {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
}
/* Скрываем гамбургер-меню на больших экранах */
.menu-toggle {
    display: none; /* По умолчанию не показываем */
}

/* Отображаем гамбургер только на мобильных устройствах */
/* Убедитесь, что меню располагается правильно на мобильных устройствах */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        align-items: center;
        position: fixed; /* Используем fixed, чтобы меню не скроллировалось */
        top: 0;
        left: 0;
        width: 100%;
        background-color: #f7f2eb;
        padding: 20px;
        z-index: 1000; /* Чтобы меню было выше других элементов */
    }

    nav ul.show {
        display: flex; /* Показываем меню */
    }

    .menu-toggle {
        display: block; /* Показываем гамбургер на мобильных устройствах */
        font-size: 30px;
        cursor: pointer;
        padding: 10px;
        z-index: 1001; /* Убедитесь, что и гамбургер поверх */
    }
}

/* Стили для футера */
footer {
    background-color: #333; /* Тёмный фон */
    color: white; /* Белый текст */
    padding: 20px 0;
    margin-top: 50px;
    font-size: 0.9rem;
    height:auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 2rem;
}

.footer-left {
    flex: 1;
}

.footer-right {
    flex: 1;
    text-align: right;
}

footer a {
    color: #ff7043; /* Оранжевый цвет для ссылок */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    display: inline;
    margin-right: 15px;
}

/* Адаптивность для футера на мобильных устройствах */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .footer-left, .footer-right {
        text-align: center;
        margin-bottom: 1rem;
    }

    footer ul {
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }

    footer ul li {
        margin-right: 10px;
    }
}
a[data-lightbox] {
    cursor: pointer; /* Рука при наведении */
}

img {
    transition: transform 0.3s ease; /* Плавный эффект */
}

img:hover {
    transform: scale(1.1); /* Увеличение при наведении */
}
/* Увеличиваем размеры модального окна */
/* Устанавливаем размеры для изображения в модальном окне */
.lightbox .lb-image {
    max-width: 90% !important;  /* Максимальная ширина 90% */
    max-height: 80vh !important; /* Максимальная высота 80% от высоты экрана */
    object-fit: contain;        /* Сохраняем пропорции */
    margin: auto;               /* Центрируем изображение */
}

/* Для самого модального окна Lightbox */
#lightbox {
    max-width: 90% !important;  /* 90% от ширины экрана */
    max-height: 80% !important; /* 80% от высоты экрана */
    display: flex;
    justify-content: center; /* Центрируем окно */
    align-items: center;     /* Центрируем окно по вертикали */
}

/* Регулируем размер изображения внутри модального окна */
.lightbox img {
    max-width: 100%; /* Ширина картинки по максимуму */
    max-height: 80vh; /* Высота картинки не больше 80% от экрана */
    object-fit: contain; /* Сохраняем пропорции изображения */
}

/* Дополнительное улучшение */
.lightbox .lb-image {
    background-color: #fff; /* Белый фон */
    padding: 10px; /* Немного отступов */
    border-radius: 10px; /* Скругленные углы */
}
@media (max-width: 768px) {
    #lightbox {
        max-width: 100%; /* На маленьких экранах делаем окно на весь экран */
        max-height: 100%;
    }
}
/* Слайдер */
.image-slider {
    position: relative;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.image-full-view {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#slider-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 8px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

#slider-image:hover {
    transform: scale(1.02);
}

/* Кнопки слайдера */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-btn:hover {
    background: rgba(0,0,0,0.6);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

/* Кнопка во весь экран */
.fullscreen-btn {
    margin-top: 10px;
    background: #000;
    color: #fff;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
}

.fullscreen-btn:hover {
    background: #333;
}

/* Адаптивность */
@media (max-width: 768px) {
    #slider-image { max-height: 70vh; }
    .slider-btn { padding: 6px 10px; font-size: 1rem; }
}

@media (max-width: 480px) {
    #slider-image { max-height: 65vh; }
    .slider-btn { font-size: 0.9rem; padding: 5px 8px; }
}

/* Анимация смены изображения */
@keyframes fadeImage {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

#slider-image.fade {
    animation: fadeImage 0.5s ease-in-out;
}
/* Контейнер с перспективой для 3D */
.image-full-view {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1000px; /* для 3D эффекта */
}

/* Изображение с 3D анимацией */
#slider-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 8px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.6s ease, opacity 0.6s ease;
    transform-style: preserve-3d;
}

/* Класс для переворота */
#slider-image.flip {
    transform: rotateY(180deg);
    opacity: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    #slider-image { max-height: 70vh; }
}

@media (max-width: 480px) {
    #slider-image { max-height: 65vh; }
}

/* --- Слайдер внутри модального окна --- */
.modal-body .image-slider {
    position: relative;
    text-align: center;
    max-width: 100%;
    margin: 0 auto;
}

.modal-body .image-full-view {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1000px; /* для 3D */
}

.modal-body #slider-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border: 8px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.6s ease, opacity 0.6s ease;
    transform-style: preserve-3d;
}

/* Класс для переворота */
.modal-body #slider-image.flip {
    transform: rotateY(180deg);
    opacity: 0;
}

/* Кнопки */
.modal-body .slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.4);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-body .slider-btn:hover {
    background: rgba(0,0,0,0.6);
}

.modal-body .prev-btn { left: 0; }
.modal-body .next-btn { right: 0; }

.modal-body .fullscreen-btn {
    margin-top: 10px;
    background: #000;
    color: #fff;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
}

.modal-body .fullscreen-btn:hover {
    background: #333;
}

