body {
    margin: 0;
    font-family: Arial, sans-serif;
    /* background: linear-gradient(135deg, #f0f0f0, #d9d9d9); обычный градиент для фона */
    /* добавляем анимированный фон*/
    background: linear-gradient(135deg, #f0f0f0, #d9d9d9);
    animation: gradientAnimation 5s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
/* конец анимированного фона*/

/* стили для телефона и почты */
a {
    font-family: inherit; /* Наследует шрифт из родителя */
    text-decoration: none; /* Убирает подчёркивание */
    color: inherit; /* Наследует цвет текста */
    transition: color 0.3s ease; /* Добавляет плавный переход для цвета */
}

a:hover {
    color: #007BFF; /* Синий цвет при наведении */
}

/* конец стили для телефона и почты */


.container {
    width: 90%;
    margin: 0 auto;
}

.header {
    background-color: #333;
    color: #fff;
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Для корректного позиционирования меню */
    z-index: 10; /* Устанавливаем уровень слоя навбара */
}

.logo {
    font-size: 1.5em;
    text-decoration: none;
    color: white;
}

.menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    margin-left: 20px;
}

.menu a {
    text-decoration: none;
    color: white;
    transition: color 0.3s;
}

.menu a:hover {
    color: #ffcc00;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
}

@media (max-width: 768px) {
    .menu {
        display: none;
        flex-direction: column;
        background-color: #333;
        position: absolute;
        top: 50px;
        right: 0;
        width: 200px;
        border-radius: 0 0 5px 5px;
        z-index: 1000; /* Меню поверх остальных элементов */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Тень для выделения */
    }

    .menu.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

.main {
    padding: 20px 0;
}

.content-container {
    position: relative;
    overflow: hidden;
    background-color: white;
    margin: 5vh auto 20px; /* Отступ сверху в 5% от высоты экрана */
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
    background-repeat: no-repeat; /* Запрещаем повторение картинки */
    background-size: cover; /* Масштабируем картинку под размер контейнера */
    background-position: center; /* Центрируем картинку в контейнере */
    max-width: 80%; /* Фиксируем максимальную ширину контейнера в 80% экрана */
    height: 40vh; /* Восстанавливаем фиксированную высоту контейнера */
    scroll-behavior: smooth; /* Плавный скроллинг */

    height: auto; /* убираем фиксированную высоту */
    min-height: 40vh; /* минимум оставляем */
    padding-bottom: 40px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный слой */
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    color: white; /* Цвет текста для контраста */
    text-align: center;
}




.content ul {
    display: inline-block;            /* "центрируем" ul как элемент */
    text-align: left;                 /* а сам список — по левому краю */
    list-style-position: inside;
    padding-left: 0;
}

.content-container[data-bg] {
    background-image: url(var(--bg-image));
    background-size: cover;
    background-position: center;
}

.content-container.animated {
    opacity: 1;
    transform: translateY(0);
}

.content-container {
    animation: fadeIn 0.6s ease forwards;
}

/* стили галереи */
.gallery {
    position: relative;
    width: 100%;
    height: 70%; /* ограничим высоту относительно .content */
    aspect-ratio: 16 / 9; /* или 4/3 или 3/4 — на  выбор */
    max-width: 100%;
    margin: 20px auto 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.gallery-track img {
    height: 100%; /* пусть занимает всю доступную высоту */
    width: 100%;      /* теперь width будет = ширине .gallery */
    flex-shrink: 0;
    object-fit: cover; /* можно заменить на 'contain' если хочешь видеть всё изображение */
    border-radius: 12px;
    object-fit: contain;  /*масштабирование картинки в галерее */
}


.gallery-prev,
.gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /*background: rgba(255,255,255,0.7);*/
    background: rgba(0, 0, 0, 0.5);
    color: white;

    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
    padding: 8px 12px;
    border-radius: 50%;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-prev:hover,
.gallery-next:hover {
    background: rgba(0, 0, 0, 0.8);
}


/* обратная связь и модальное окно */

.callback-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2e7d32;
    color: white;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    font-size: 16px;
}

.modal.hidden { display: none; }
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); display: flex;
    align-items: center; justify-content: center;
    z-index: 2000;
}
.modal-content {
    background: white; padding: 20px; border-radius: 10px;
    width: 300px; max-width: 90%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
}
.modal-content .close {
    position: absolute;
    top: 10px; right: 10px;
    cursor: pointer;
    font-size: 20px;
}
.modal-content input,
.modal-content button,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    font-size: 14px;
    box-sizing: border-box; /* <== важно! */
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}