*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: var(--accent2);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-weight: 700;
  color: var(--ink);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px; /* 20px слева и справа */
}

.section {
  /* Задаем отступы только сверху и снизу, не трогая бока */
  padding-top: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.grid {
  display: grid;
  gap: var(--space-md);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #6f4630;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-green {
  background: var(--accent2);
  color: #fff;
}

.btn-green:hover {
  background: #2e523c;
  color: #fff;
}

/* Ссылки-стрелки */
.link-arrow {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.link-arrow::after {
  content: '→';
  transition: transform 0.2s;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* =========================================
   Адаптивные сетки (замена инлайн-стилей)
   ========================================= */

/* Сетка из 2 равных колонок (для блока "Добро пожаловать", "Контакты") */
.grid-2 {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

/* Сетка 2/3 и 1/3 (для страниц с турами, где слева текст, справа сайдбар) */
.grid-sidebar {
  display: grid;
  gap: var(--space-lg);
  align-items: start;
}

/* Включаем колонки только на экранах шире 768px (планшеты и десктопы) */
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  
  .grid-sidebar {
    grid-template-columns: 2fr 1fr;
  }

  /* Делаем сайдбар "липким" на десктопе */
  .grid-sidebar aside {
    position: sticky;
    top: 100px;
  }
}

/* Защита от горизонтального скролла */
body {
  overflow-x: hidden;
}

/* Убеждаемся, что картинки никогда не вылезают за пределы родителя */
img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* =========================================
   Баннер Cookie
   ========================================= */
.cookie-banner {
  position: fixed;
  bottom: -100%; /* Изначально скрыт за нижним краем экрана */
  left: 0;
  width: 100%;
  background: var(--card);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: 20px;
  z-index: 9999; /* Поверх всего контента */
  transition: bottom 0.4s ease-in-out;
  border-top: 1px solid var(--line);
}

/* Класс для показа баннера */
.cookie-banner.show {
  bottom: 0;
}

.cookie-content {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cookie-content p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.cookie-content a {
  color: var(--accent2);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* На больших экранах текст слева, кнопки справа */
@media (min-width: 768px) {
  .cookie-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .cookie-content p {
    max-width: 70%;
  }
}

/* Немного уменьшим кнопки в баннере для аккуратности */
.cookie-buttons .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}