body {
    font-family: 'Georgia', serif;
    background-color: #e0d8c3; /* Фон газеты */
    color: #333;
    margin: 0;
    padding: 0;
    overflow-y: scroll; /* Добавляем вертикальную прокрутку */
}

.container {
    width: 95%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем по горизонтали */
}

.header {
    text-align: center;
    margin-bottom: 10px; /* Уменьшаем отступ после заголовка */
    border-bottom: 3px solid #8b4513; /* Коричневая граница */
    padding-bottom: 15px;
    width: 80%; /* Ширина заголовка */
    display: flex;
    align-items: center;
    justify-content: center; /* Центрируем заголовок и логотип */
}

.header h1 {
    font-size: 3.5em;
    color: #8b0000; /* Темно-красный */
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    animation: flicker 3s infinite;
    margin-left: 15px; /* Отступ между логотипом и заголовком */
}

.header img {
    height: 10vh; /* Установили высоту логотипа через viewport height */
    width: auto; /* Чтобы сохранить пропорции */
    margin-right: 15px; /* Отступ справа от логотипа (для выравнивания) */
}

@keyframes flicker {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.nav-links {
    display: flex;
    justify-content: center;
    width: 80%;
    margin-bottom: 20px; /* Отступ после навигации */
}

.nav-links a {
    color: #556b2f;
    text-decoration: none;
    font-size: 1.2em;
    margin: 0 15px;
    border-bottom: 1px dashed #8b4513; /* Подчеркивание ссылок */
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #8b0000; /* Цвет при наведении */
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
    color: #8b0000;
    font-size: 2.5em;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    scroll-margin-top: 80px; /* Отступ при прокрутке к заголовку */
}

.intro {
    background-color: rgba(245, 245, 220, 0.9); /* Светло-желтый с прозрачностью */
    border: 2px solid #8b4513;
    padding: 20px;
    margin-bottom: 30px;
    width: 80%;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    text-align: justify;
    font-size: 1.2em;
    line-height: 1.6;
}

.fact-container {
    display: flex;
    flex-direction: row; /* Выстраиваем факты в ряд */
    justify-content: space-around; /* Равномерное распределение фактов */
    align-items: flex-start; /* Выравнивание по верхнему краю */
    width: 100%;
    margin-bottom: 40px;
}

.fact {
    background-color: rgba(245, 245, 220, 0.9); /* Светло-желтый с прозрачностью */
    border: 2px solid #8b4513;
    padding: 20px;
    margin: 10px;
    width: 30%; /* Ширина фактов */
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: transform 0.3s ease; /* Плавное изменение масштаба */
    position: relative; /* Для размещения флажка */
    display: flex;
    flex-direction: column; /* Для размещения картинки сверху */
}

.fact:hover {
    transform: scale(1.05); /* Увеличение при наведении */
}

.fact h2 {
    font-size: 1.8em;
    color: #556b2f; /* Темно-оливковый */
    margin-bottom: 15px;
}

.fact p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-top: 15px; /* Отступ между картинкой и текстом */
}

.fact img {
    max-width: 100%; /* Максимальная ширина картинки внутри факта */
    height: auto;
    border: 2px solid #8b4513;
    border-radius: 5px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px; /* Отступ между картинкой и текстом */
}

.image-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

.image-container iframe {
    max-width: 80%; /* Максимальная ширина iframe */
    width: 560px; /* Ширина по умолчанию */
    height: 315px; /* Высота по умолчанию */
    border: 3px solid #8b4513;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    animation: zoomIn 2s ease; /* Анимация увеличения видео */
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0.5;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Стили для галереи */
.gallery-container {
    width: 80%;
    margin: 20px auto;
    overflow: hidden;
    position: relative;
    border: 2px solid #8b4513;
    border-radius: 10px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
    display: flex;
}

.gallery-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.gallery-item {
    width: 300px; /* Ширина одного изображения */
    flex-shrink: 0;
    margin: 10px;
    border: 2px solid #8b4513;
    border-radius: 5px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.gallery-control {
    background-color: rgba(139, 69, 19, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.gallery-control:hover {
    background-color: rgba(139, 69, 19, 0.8);
}

/* Стили для управления звуком */
.audio-control {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(139, 69, 19, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
    z-index: 1000; /* Чтобы иконка была над всем контентом */
}

.audio-control:hover {
    background-color: rgba(139, 69, 19, 0.8);
}

.map-container {
    width: 80%;
    margin: 20px auto;
    border: 2px solid #8b4513;
    border-radius: 10px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
}

.map-container h3 {
    color: #556b2f;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.map-container img {
    max-width: 100%; /* Чтобы картинка не выходила за границы контейнера */
    height: auto;
    border: 2px solid #8b4513;
    border-radius: 5px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.footer {
    text-align: center;
    padding: 15px;
    background-color: #8b4513;
    color: #fff;
    font-size: 0.9em;
    width: 100%;
}

.menu {
    text-align: center;
    padding: 15px;
    background-color: #8b4513;
    color: gold;
    font-size: 1.1em;
    width: 100%;
    display: flex;
}

.menu a:link {
    color: gold; 
    text-decoration: none;
   }
   
.menu a:visited {
    color: gold; 
    text-decoration: none;
   }
   
.menu a:hover {
    color: gold; 
    text-decoration: none;
   }   

 .carousel-container {
            max-width: 800px;
            margin: 50px auto;
            position: relative;
            overflow: hidden;
        }
        
        .carousel {
            display: flex;
            width: 100%;
            height: 400px;
            transition: transform 0.5s ease-in-out;
        }
        
        .carousel-item {
            flex-shrink: 0;
            width: 100%;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            text-align: center;
        }
        
        .carousel-item img {
            max-height: 300px;
            object-fit: cover;
            margin-bottom: 20px;
        }
        
        .info {
            margin-top: 15px;
        }
        
        h3 {
            color: #8b0000;
            margin-bottom: 5px;
        }
        
        button {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: transparent;
            border: none;
            font-size: 30px;
            cursor: pointer;
            outline: none;
        }
        
        .prev-btn {
            left: 25px;
        }
        
        .next-btn {
            right: 25px;
        }   
   

* {
            box-sizing: border-box;
        }
        .carousel-container {
            max-width: 800px;
            margin: 0 auto;
            position: relative;
            overflow: hidden;
            border: 5px solid #8b4513; /* Коричневая рамка */
            padding: 10px;
        }
        .carousel-title {
            text-align: center;
            color: #8b0000; /* Темно-красный заголовок */
            font-size: 24px;
            margin-bottom: 20px;
        }
        .carousel {
            white-space: nowrap;
            transition: transform 0.5s ease;
        }
        .carousel-item {
            display: inline-block;
            width: 100%;
            text-align: center;
            font-size: 16px;
        }
        .carousel-item img {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 0 auto;
        }
        .info {
            margin-top: 10px;
        }
        .prev-btn, .next-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background-color: rgba(0, 0, 0, 0.5);
            color: white;
            border: none;
            font-size: 16px;
            padding: 10px 20px;
            cursor: pointer;
            outline: none;
        }
        .prev-btn:hover, .next-btn:hover {
            background-color: rgba(0, 0, 0, 0.7);
        }
        .prev-btn {
            left: 0;
        }
        .next-btn {
            right: 0;
        }
/* Центрирование памятников внутри факта */
.fact-container.monuments {
    justify-content: center; /* Центрируем элементы по горизонтали */
}
