/* === ПОДКЛЮЧЕНИЕ ШРИФТОВ === */
@import url('https://fonts.googleapis.com/css2?family=Old+Standard+TT&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Forum&display=swap');

/* === ОСНОВНЫЕ СТИЛИ === */
body {
    font-family: 'Old Standard TT', 'Forum', serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f9f5e1;
    color: #333;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: #f9f5e1;
    color: #8b5e3c;
    padding: 2em 0;
    text-align: center;
}

header h1 {
    font-size: 3em;
    font-weight: bold;
    color: #8b5e3c;
}

header p {
    font-size: 1.2em;
    color: #8b5e3c;
}

nav {
    background-color: #f9f5e1;
    padding: 1em;
    text-align: center;
}

nav a {
    color: #8b5e3c;
    margin: 0 1em;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav a.break {
  display: block;
  margin-top: 10px; /* по желанию, для отступа сверху */
}


nav a:hover {
    color: #dcae4c;
    text-decoration: underline;
}

.container {
    padding: 2em;
    background-color: #ffffff;
    max-width: 720px; /* сузил */
    margin: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h2 {
    color: #8b5e3c;
}

p {
    line-height: 1.6;
    color: #333;
}

.intro p {
    font-style: italic;
}

.section {
    margin-bottom: 2em;
    animation: fadeInUp 1s ease-out;
}

footer {
    background-color: #f9f5e1;
    color: #8b5e3c;
    padding: 1em 0;
    text-align: center;
}

footer p {
    font-size: 0.9em;
}

/* === CHATBOT === */
#chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #8b5e3c;
    color: #fff;
    border: 2px solid #dcae4c;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.3);
    font-family: 'Forum', serif;
}

#chatbot {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px #aaa;
    max-width: 300px;
    width: 280px;
    z-index: 1000;
}

#chatResponse {
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid #ddd;
    padding-top: 5px;
}

/* === ГАЛЕРЕЯ === */
.slider-container {
    position: relative;
    max-width: 800px;
    margin: auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-img {
    width: 100%;
    object-fit: cover;
    cursor: pointer;
    user-select: none;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255,255,255,0.7);
    border: 2px solid #dcae4c;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
    z-index: 1;
    font-family: 'Forum', serif;
    color: #40220f;
    border-radius: 10px;
    transition: background 0.3s;
}

.slider-btn:hover {
    background-color: #f9e4b7;
}

.slider-btn.left { left: 10px; }
.slider-btn.right { right: 10px; }

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* === ТЁМНАЯ ТЕМА === */
body.dark-mode {
    background-color: #2e2e2e; /* чуть светлее, чтобы текст не терялся */
    color: #e6d8b8;
}

body.dark-mode header,
body.dark-mode nav,
body.dark-mode footer {
    background-color: #3a3a3a; /* чуть светлее */
    color: #d4af7f;
}

body.dark-mode .container {
    background-color: #424242; /* светлее для контраста */
    color: #e6d8b8;
}

body.dark-mode nav a {
    color: #d4af7f;
}

/* === КНОПКА ПЕРЕКЛЮЧЕНИЯ ТЕМЫ === */
#themeToggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #8b5e3c;
    color: #fff;
    border: 2px solid #dcae4c;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 1002;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0,0,0,0.3);
    font-family: 'Forum', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

#themeToggle:hover {
    background-color: #dcae4c;
    color: #40220f;
}

/* === АНИМАЦИЯ === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 768px) {
    nav a {
        display: block;
        margin: 0.5em 0;
    }

    .container {
        padding: 1em;
        width: 90%;
    }
}


.responsive-video {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  padding-top: 25px;
  height: 0;
  overflow: hidden;
}

.responsive-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

