body {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  line-height: 1.4;
  color: #000;
  min-width: 320px;
  overflow-x: hidden;
  height: 700px;
}

.animate__animated.animate__fadeIn {
  --animate-duration: 2s; 
}


body.overlay-active {
  overflow: hidden;
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.slide-in-left {
  animation: slideInFromLeft 0.5s ease-out forwards; /* Изменено с 0.3s на 0.5s */
}

.slide-out-right {
  animation: slideOutToRight 0.5s ease-in forwards; /* Изменено с 0.3s на 0.5s */
}

.slide-in-right {
  animation: slideInFromRight 0.5s ease-out forwards; /* Изменено с 0.3s на 0.5s */
}

.slide-out-left {
  animation: slideOutToLeft 0.5s ease-in forwards; /* Изменено с 0.3s на 0.5s */
}

@keyframes slideInFromBottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutToTop {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-100%);
    opacity: 0;
  }
}

@keyframes slideInFromTop {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutToBottom {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.slide-in-bottom {
  animation: slideInFromBottom 0.5s ease-out forwards; /* Изменено с 0.3s на 0.5s */
}

.slide-out-top {
  animation: slideOutToTop 0.5s ease-in forwards; /* Изменено с 0.3s на 0.5s */
}

.slide-in-top {
  animation: slideInFromTop 0.5s ease-out forwards; /* Изменено с 0.3s на 0.5s */
}

.slide-out-bottom {
  animation: slideOutToBottom 0.5s ease-in forwards; /* Изменено с 0.3s на 0.5s */
}


.burger-menu {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: black;
  cursor: pointer;
  perspective: 1000px; /* Для 3D-эффекта */

}

  .burger-menu.clicked {
    animation: flip 0.5s ease-in-out; /* Запускаем анимацию */
  }

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}
@keyframes flipOpen {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-180deg);
  }
}

@keyframes flipClose {
  from {
    transform: rotate(-180deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes swipeDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

.navbar {
  width: 100%;
  height: 70px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .1);
}

.navbar .container {
  height: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-menu {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.navbar-menu li {
  display: inline-block;

}


.navbar-menu li a{
  display: inline-block;
  color: black;
  opacity: 0.6;
  text-decoration: none;
  padding: 10px;
  transition: all .09s ease-in-out;
}

.navbar-menu li a:hover{
  opacity: 1;
  color: #FFC512; 

}

.navbar-wrap {
  display: flex;
  flex-flow: row nowrap;
}

.callback {
  margin-left: 30px;
  padding: 10px 30px;
  background-color: #FFC512;
  border-radius: 100px;
  color: white;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(255, 127, 80 .2);
  transition: all .1s ease-out;

}

.callback:hover {
  transform: scale(1.04) ;
  color: white;
  box-shadow: 0 9px 9px rgba(255, 127, 80 .5);

}

.navbar-brand {
  font-weight: 700;
  font-size: 30px;
  text-decoration: none;
  color: black;
  transition: all .09s ease-in-out;

}

.navbar-brand:hover {
  color: #FFC512;

}

h1{
  margin-top: 60px;
  color: #FFC512;
  font-size: 40px;
  font-weight: 800;
}
/*НАШИ РАБОТЫ (ГАЛЕРЕЯ)*/
/* Стили для увеличенного изображения */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform-origin: center;
    will-change: transform;
    touch-action: none;
}

.overlay.active {
    display: flex;
}

/* Кнопки навигации */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1010;
    display: none; /* Скрыты по умолчанию, только для ПК */
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.6);
    color: black;
}

.nav-button.prev {
    left: 20px;
}

.nav-button.next {
    right: 20px;
}

/* Кнопка-крестик для закрытия */
.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1010;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: black;
}

/* Подсказка для свайпа */
.swipe-hint {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 1010;
    text-align: center;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

/* Анимация подсказки */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Показываем кнопки на ПК */
@media (min-width: 1024px) {
    .nav-button {
        display: block;
    }
}

/* Общие стили галереи */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.gallery img {
    width: 500px;
    height: 350px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.gallery img:hover {
    transform: scale(1.05);
    border-color: #FFC512;
}

/* Анимация для перехода изображения */
@keyframes swipeUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Анимация для перехода изображения вверх */
@keyframes swipeUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Анимация для перехода изображения вниз */
@keyframes swipeDown {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Применение анимаций */
.swipe-up {
    animation: swipeUp 0.5s ease-out; /* Изменено с 0.3s на 0.5s */
}

.swipe-down {
    animation: swipeDown 0.5s ease-out; /* Изменено с 0.3s на 0.5s */
}


@media (max-width: 992px) {
  /* Бургер-меню: выезжает справа, занимает 40% ширины.
    Фон блока – серый, без дополнительных фонов вокруг текста ссылок. */
  .navbar-wrap {
    position: fixed;
    top: 70px; /* Оставляем место под верхнее меню */
    right: 0;
    width: 50%; /* Меню занимает 50% экрана */
    height: calc(100vh - 70px); /* Меню растягивается до конца экрана снизу */
    flex-direction: column;
    background: #f0f0f0;
    align-items: flex-end;
    padding: 10px;
    display: none;
    z-index: 1000;
    transition: transform 0.3s ease;
    transform: translateX(100%);
    text-align: center;
}

.navbar-wrap.active {
    display: flex;
    transform: translateX(0);
}

.navbar-menu {
    flex-direction: column;
    width: 100%;
}

.navbar-menu li {
    width: 100%;
    text-align: right;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-menu li a {
    padding: 10px 15px;
    font-size: 16px;
    opacity: 1;
    background: none;
    margin: 5px 0;
}

.callback {
    margin: 15px auto;
    text-align: center;
    width: 100%;
    padding: 8px 15px;
    font-size: 16px;
}

.burger-menu {
    display: block;
}
  
  .container{
    padding: 0;
    margin: 0 auto;
    width: 100%;
  }

  /* Корректировка header */
  .header {
    min-height: 500px;
    background-attachment: scroll;
    position: relative;
  }

  .header-content{
    width: 100%;
    text-align: center;
  }

  .header-content h1 {
    font-size: 32px;
  }
  .header-content h4 {
    font-size: 18px;
  }
  
  /* Блок Новинка */
  .newalls h2 {
    font-size: 70px;
  }
  .newalls h3 {
    font-size: 28px;
  }
  .newalls p {
    font-size: 20px;
    width: 90%;
  }
  
  /* Преимущества (.svoistva) — вертикальное расположение и центрирование */
  .svoistva {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }
  .svoistva .container1 .row > div {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }
  
  /* Галерея (rooms) — центрирование фото и подписей */
  .rooms .row > div {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .rooms .row > div img {
    margin: 0 auto;
  }

  .rooms h1{
    text-align: center;
  }
  
  /* Видео */
  .preobraz h1 {
    font-size: 32px;
  }
  .responsive-video {
    width: 100%;
    height: auto;
  }
  
  /* Блок Image-Text — вертикальный вариант */
  .image-text-block {
    flex-direction: column;
    height: auto;
  }
  .image-part,
  .text-part {
    flex: unset;
    width: 100%;
  }
  .image-part {
    height: 300px;
  }
  
  /* Форма — вертикальное расположение блоков,
    поля ввода делаем немного уже */
  .form-container {
    flex-direction: column;
  }
  .logo-section,
  .form-section {
    width: 100%;
  }
  .logo-section img {
    max-width: 60%;
    height: auto;
  }
  .form-group input {
    width: 90%;
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
    .gallery img {
        width: 85%; /* Картинки занимают 70% ширины экрана */
        height: 350px; /* Пропорциональная высота */
        margin-bottom: 10px; /* Добавляем отступ между картинками */
        border-radius: 5px; /* Легкое закругление углов */
    }

    .gallery {
        gap: 5px;
    }
}

/* Для маленьких экранов (до 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 24px;
    }

    .gallery img {
        border: none;
        border-radius: 5px;
    }
}
