/* =========================================
   Базовые переменные
========================================= */
:root {
  --font-serif: "Playfair Display", serif;
  --font-sans: "Inter", sans-serif;

  --color-bg: #f8f8fc;
  --color-text: #1a1a1a;
  --color-text-light: #666;
  --color-primary: #9b51e0; /* Фиолетовый акцент */
  --color-wa: #25d366; /* WhatsApp */
  --color-tg: #0088cc; /* Telegram */
  --color-white: #ffffff;

  --container-width: 1400px;
  --transition: all 0.3s ease;
}

/* =========================================
   Сброс и базовые стили
========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================
   Кнопки
========================================= */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-primary);
  /* Фиолетовый цвет линий */
  transition: all 0.3s ease-in-out;
}

/* Десктопная раскладка: меняем порядок, чтобы навигация была по центру */
@media (min-width: 993px) {
  .header__menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
    gap: 3rem;
  }

  .header__nav {
    order: 1;
    /* Навигация слева от кнопок */
    margin-right: auto;
    padding-left: 3rem;
  }

  .header__actions {
    order: 2;
    /* Кнопки справа */
  }
}

.btn--lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px !important;
  border: 1.5px solid var(--color-gold, #c9a84c);
  color: var(--color-gold, #c9a84c);
  border-radius: 6px;
  font-size: 1.4rem !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  box-shadow:
    0 2px 8px rgba(201, 168, 76, 0.25),
    inset 0 0 0 1px rgba(201, 168, 76, 0.15);
  outline: 1px solid rgba(201, 168, 76, 0.2);
  outline-offset: 2px;
}

.btn--lang:hover {
  background: var(--color-gold, #c9a84c);
  color: #fff;
  box-shadow:
    0 4px 16px rgba(201, 168, 76, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  outline-color: rgba(201, 168, 76, 0.4);
}
@media (max-width: 992px) {
  .burger {
    display: flex;
  }

  .header__menu {
    position: absolute;
    top: 100%;
    /* Сразу под шапкой */
    left: 0;
    width: 100%;
    background-color: #f8f8fc;
    /* Цвет фона как на скрине */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;

    /* Анимация появления */
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
    z-index: 100;
  }

  /* Когда меню активно */
  .header__menu.is-active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Кнопки на мобилке */
  .header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
  }

  /* Селектор языка на мобилке */
  .header__lang {
    width: 100%;
    margin-left: 0;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    max-width: 110px;
    color: #333;
  }

  /* Вертикальное меню */
  .header__nav {
    flex-direction: column;
    gap: 1.5rem;
  }

  .header__nav a {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #1a1a1a;
  }

  /* Анимация бургера (превращение в крестик) */
  .burger.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .burger.is-active span:nth-child(2) {
    opacity: 0;
  }

  .burger.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-transform: uppercase;
}

.btn--wa {
  background-color: var(--color-wa);
  color: var(--color-white);
}
.btn--tg {
  background-color: var(--color-tg);
  color: var(--color-white);
}
.btn--purple {
  background-color: var(--color-primary);
  color: var(--color-white);
}
.btn--white {
  background-color: var(--color-white);
  color: var(--color-text);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #eaeaea;
}

/* =========================================
   Шапка сайта (Header)
========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
  transition:
    background-color 0.3s,
    box-shadow 0.3s;
  background-color: rgba(255, 255, 255, 0.98);
}

.header.is-sticky {
  position: fixed;
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 1rem 0;
}

.header__container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1rem;
  gap: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header__logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 2px;
  color: #c4a47c;
}

.header__nav {
  display: flex;
  gap: 2.5rem;
}
.header__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
}
.header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header__lang {
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  margin-left: 1rem;
}

/* =========================================
   Главный экран (Hero Section)
========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__content {
  width: 50%;
  padding-left: calc(max(2rem, (100vw - var(--container-width)) / 2 + 2rem));
  padding-right: 4rem;
  z-index: 2;
}

.hero__title {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}
.hero__title span {
  color: var(--color-primary);
  font-style: italic;
}
.hero__text {
  font-size: 1.125rem;
  color: var(--color-text-light);
  margin-bottom: 3rem;
  max-width: 500px;
}

.hero__features {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.feature-badge {
  background: var(--color-white);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-align: center;
}

.feature-badge strong {
  display: block;
  color: var(--color-text);
  font-size: 1.25rem;
  font-weight: 600;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__image {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* =========================================
   Адаптив Главного экрана (Hero)
========================================= */
@media (max-width: 992px) {
  .hero {
    min-height: auto;
    padding-top: 100px; /* Отступ под липкую шапку */
    flex-direction: column;
  }

  .hero__content {
    width: 100%;
    padding: 2rem 1.5rem;
    text-align: center;
  }

  .hero__title {
    font-size: 3rem;
  }

  .hero__text {
    margin: 0 auto 2rem;
  }

  .hero__features {
    justify-content: center;
    flex-wrap: wrap; /* Чтобы бейджики переносились на узких экранах */
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__image {
    position: relative;
    width: 100%;
    height: 50vh; /* Картинка будет занимать половину экрана снизу */
    margin-top: 2rem;
    display: none;
  }
}

@media (max-width: 450px) {
  .hero__title {
    font-size: 2.2rem;
  }

  .feature-badge {
    padding: 0.8rem 1rem;
    font-size: 0.75rem;
  }

  .hero__buttons {
    flex-direction: column; /* Кнопки друг под другом на телефоне */
    width: 100%;
  }
}
/* Скрываем слайдер на мобильных (до 768px), чтобы браузер не тратил ресурсы */
@media (max-width: 768px) {
  .hero__image {
    display: none !important;
  }
  .header__logo {
    font-size: 18px;
  }
}

.hero__image {
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  z-index: 1;
  transition:
    opacity 1.5s ease-in-out,
    transform 7s linear;
  transform: scale(1);
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
  transform: scale(1.05);
}
