@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1p:wght@100;300;400;500;700;800;900&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* padding тепер не додається поверх ширини */
}

body {
  font-family: "Alegreya Sans", sans-serif;
  font-weight: 400;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
header {
  width: 100%;
}

/* Верхня біла смуга з лого */
.top-bar {
  background-color: #fff;
  padding: 20px 0;
}

.top-bar .logo {
  text-transform: uppercase;
  font-size: 29px;
  font-weight: 800;
  color: #333;
}

/* Нижня синя смуга — вища, з меню і мовою */
.nav-bar {
  background-color: rgb(114, 214, 189);
  color: white;
  border-radius: 10px;
  padding: 20px 1vw; /* ← збільшена висота */
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
}

header nav ul li a {
  color: #fff;
  font-size: 18px;
  white-space: nowrap;
  display: inline-block;
}

header nav ul li a:hover {
  opacity: 0.8;
}

/* Перемикач мови */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-divider {
  color: rgba(255, 255, 255, 0.5);
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px;
}

.lang-btn.active {
  color: #fff;
}

.lang-btn:hover {
  color: #fff;
}
.hero {
  width: 100%;
  line-height: 0; /* прибирає зайвий відступ під картинкою */
}

.slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  user-select: none;
  touch-action: pan-y;
  cursor: grab;
}
.slider.dragging { cursor: grabbing; }

.slider-track {
  display: flex;
  transition: transform 0.45s ease;
}
.slide { flex: 0 0 100%; }
.slide img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none; /* щоб картинку не "перетягувало" браузером */
}
#about .about-grid {
  display: block;          /* якщо була двоколонкова сітка — прибираємо */
}

#about .about-text {
  text-align: center;
  max-width: 800px;        /* щоб текст не розтягувався на весь екран */
  margin: 0 auto;          /* центрує сам блок */
}
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #1f2f3d;
  font-size: 18px;
  line-height: 44px;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s, background 0.25s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.slider-arrow:hover { background: #fff; }
.slider:hover .slider-arrow { opacity: 1; }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider-dots {
  position: absolute;
  left: 0; right: 0; bottom: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(31, 47, 61, 0.3);
  cursor: pointer;
}
.slider-dots button.active { background: #5bb381; }

/* на телефонах стрілки видно завжди, бо там немає hover */
@media (hover: none) {
  .slider-arrow { opacity: 1; width: 36px; height: 36px; line-height: 36px; }
}
/* ===== АДАПТИВНІСТЬ ===== */
@media (max-width: 1400px) {
  .nav-bar {
    padding: 25px 0;   /* було 25px 4vw */
  }
  header nav ul {
    gap: 15px;
  }
  header nav ul li a {
    font-size: 16px;   /* font-size на ul не діяв на посилання */
  }
}

@media (max-width: 480px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  header nav ul {
    gap: 10px;
  }
  .top-bar .logo {
    font-size: 22px;
  }
}
.section { padding: 80px 0; }
.section-gray { background: #f5f6fa; }

.section-title {
  font-size: 34px;
  font-weight: 800;
  color: #333;
  text-align: center;
  margin-bottom: 45px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.about-text p { font-size: 18px; line-height: 1.7; color: #555; margin-bottom: 15px; }

.video-wrap, .tour-item, .map-wrap {
  position: relative;
  padding-top: 56.25%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
.video-wrap iframe, .tour-item iframe, .map-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.tour-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  background: #e4e6f5;
  border-radius: 6px;
  overflow: hidden;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 40px;
}
.contacts-list { list-style: none; }
.contacts-list li { padding: 16px 0; border-bottom: 1px solid #ddd; }
.contacts-list strong {
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  color: rgb(103,113,247);
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .about-grid, .contacts-grid { grid-template-columns: 1fr; }
  .tour-grid { grid-template-columns: 1fr; }
}
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.nav-spacer {
  height: 0; /* висоту виставить JS */
}
/* Пункти меню: ширина під довший варіант (EN/UA), щоб текст не з'їжджав */
header nav ul {
  flex-wrap: nowrap;
}
header nav ul li a {
  text-align: left;
}
header nav ul li:nth-child(1) a { min-width: 3.9em; }  /* Home / Головна */
header nav ul li:nth-child(2) a { min-width: 3.9em; }  /* About / Про нас */
header nav ul li:nth-child(3) a { min-width: 3.9em; }  /* Catalog / Каталог */
header nav ul li:nth-child(4) a { min-width: 3.9em; }  /* Gallery / Галерея */
header nav ul li:nth-child(5) a { min-width: 4.4em; }  /* Contacts / Контакти */
header nav ul li:nth-child(6) a { min-width: 6.6em; }  /* Documentation / Документація */

.lang-switch {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  header nav ul {
    flex-wrap: wrap;
  }
  header nav ul li a {
    min-width: 0;
  }
}
header {
  user-select: none;
  -webkit-user-select: none; /* для Safari */
}