/*
  Index - стили для страницы index.php
  Чистые русские комментарии, UTF‑8. Логика: шапка, промо‑секция,
  адаптивное меню, сообщения, нижний блок и футер с прижатием к низу.
*/

/* Шрифты */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

/* Базовый сброс и коробочная модель */
* { margin: 0; padding: 0; box-sizing: border-box; transition: all 0.7s ease; }

/* Фон страницы */
body {
  height: 100%;
  font-family: 'Inter', serif;
  background-image: url('../img/dragon-scales.svg');
  background-color: #330055;
  background-position: center; background-repeat: repeat;
  overflow-x: hidden;
}

/* Каркас страницы */
.wrapper { display: flex; flex-direction: column; min-height: 100vh; }

/* Шапка */
.header-blok {
  position: sticky; top: 0; left: 0; right: 0; z-index: 1000;
  height: 80px;
  background: linear-gradient(#c08bff, #943bff);
  display: flex; justify-content: center; align-items: center;
}

/* Контейнер содержимого в шапке */
.content-header-blok-1 {
  position: relative; max-width: 1200px; width: 100%; height: 100%;
  margin: 0 auto; padding: 0 30px; display: flex; align-items: center; justify-content: space-between;
}

/* Логотип в шапке */
.logo-header-blok-2 { display: flex; align-items: center; }
.logo-img { height: 60px; width: auto; }

/* Кнопки навигации в шапке */
.knopki-header-blok-3 { display: flex; align-items: center; gap: 8px; }
.dop-kpopki-header-blok-4 { display: flex; align-items: center; }

/* Универсальная кнопка */
.knopka {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; margin: 3px;
  background: linear-gradient(#fb8cff, #f934ff); color: #fff;
  border: 1px solid #943bff; border-radius: 5px; text-decoration: none;
  font-size: clamp(12px, 1.6vw, 16px); line-height: 1; cursor: pointer;
  white-space: nowrap; word-break: keep-all; hyphens: none;
}
.knopka:hover { color: #000; background: linear-gradient(#a6fbff, #659d00); }
.knopka i { margin-right: 6px; }

/* Переключатель языка */
.language-switcher { position: relative; display: inline-block; }
.language-btn {
  background: linear-gradient(#392525, #9034ff); border: 1px solid #60185f; border-radius: 5px;
  padding: 8px 12px; font-size: clamp(12px, 1.4vw, 14px); color: #ffffff; display: inline-flex; align-items: center; cursor: pointer; white-space: nowrap;
}
.language-btn img { margin-right: 8px; }
.language-btn i { margin-left: 8px; transition: transform 0.3s ease; transform: rotate(0deg); }
.language-btn:hover { background: linear-gradient(#000, #4234ff); color: #fbff00; }
.language-menu {
  opacity: 0; visibility: hidden; position: absolute; top: 100%; right: 0;
  background: #fff; border: 1px solid #e1e5eb; border-radius: 5px; margin-top: 8px; list-style: none;
  padding: 0; width: 150px; box-shadow: 0 2px 5px rgba(0,0,0,0.15); transition: opacity 0.3s ease, visibility 0.3s ease;
}
.language-menu li { padding: 8px 12px; }
.language-menu li a { text-decoration: none; color: #333; display: flex; align-items: center; }
.language-menu li a img { margin-right: 8px; }
.language-menu li:hover { background-color: #a6effb; }
.language-switcher.active .language-btn i { transform: rotate(180deg); }
.language-switcher.active .language-menu { opacity: 1; visibility: visible; }

/* Кнопка мобильного меню (бургер) */
.menu-toggle { position: relative; width: 40px; height: 32px; display: none; background: none; border: 0; padding: 0; cursor: pointer; }
.menu-toggle .bar { position: absolute; left: 6px; right: 6px; height: 3px; background: #fff; border-radius: 2px; transition: transform .3s ease, opacity .2s ease, top .3s ease; }
.menu-toggle .bar:nth-child(1) { top: 8px; }
.menu-toggle .bar:nth-child(2) { top: 14px; }
.menu-toggle .bar:nth-child(3) { top: 20px; }
.header-blok.menu-open .menu-toggle .bar:nth-child(1) { top: 14px; transform: rotate(45deg); }
.header-blok.menu-open .menu-toggle .bar:nth-child(2) { opacity: 0; }
.header-blok.menu-open .menu-toggle .bar:nth-child(3) { top: 14px; transform: rotate(-45deg); }

/* Промо‑секция */
.promo-blok {
  width: 100%;
  background: linear-gradient(rgba(90, 0, 140, 0.5), rgba(132, 30, 255, 0.5));
  overflow: hidden; z-index: 0; text-align: center !important; padding: 30px; flex: 1;
}

/* Центральный логотип */
.main-logo { width: min(500px, 90vw); max-width: 90vw; height: auto; display: block; margin: 0 auto; }
@media (max-width: 380px) { .main-logo { width: 85vw; max-width: 85vw; } }

/* Ракета и лучи */
.parent-container { display: flex; justify-content: center; align-items: center; margin: 10px; }
.container-img { position: relative; width: 150px; height: 150px; }
.rocket-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.rays-img { position: absolute; top: 50%; left: 50%; width: 150%; height: 150%; transform: translate(-50%,-50%) rotate(0deg); transform-origin: center; z-index: 0; animation: rotateRays 50s linear infinite; }
@keyframes rotateRays { from { transform: translate(-50%,-50%) rotate(0deg);} to { transform: translate(-50%,-50%) rotate(360deg);} }

/* Заголовок и текст */
.promo-title { font-weight: 500; margin-bottom: 0.5rem; color: #fff; font-size: 3.5rem; }
.promo-text  { color: #c1d9f8; font-size: 1.2rem; font-weight: 700; }

/* Сообщения (alert) */
.message-container { text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; }
.alert { padding: 7px; margin: 3px; border: 1px solid transparent; border-radius: 4px; width: 100%; display: block; text-align: left; position: relative; }
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.alert-warning { color: #856404; background-color: #fff3cd; border-color: #ffeeba; border-left: 6px solid #ffcdcd; }
.close { float: right; font-size: 25px; font-weight: bold; line-height: 17px; color: #000; text-shadow: 0 1px 0 #fff; opacity: 0.5; border: none; background: none; cursor: pointer; padding-left: 20px; }
.close:hover { color: #000; text-decoration: none; opacity: 0.75; }

/* Информационный блок над футером */
.blok-vnizy { width: 100%; background: rgba(255,255,255,0.5); padding: 20px 0; }
.stolbiki   { display: flex; justify-content: center; align-items: center; max-width: 1200px; margin-right: auto; margin-left: auto; text-align: center; }
@media (max-width: 576px) { .stolbiki { display: block; } }
.column     { flex: 1 1 200px; box-sizing: border-box; }
.column h3  { font-size: 1.2em; margin-bottom: 10px; color: #000; }
.column ul  { list-style: none; padding: 0; }
.column li  { margin-bottom: 5px; }
.column a   { color: #000; text-decoration: none; }
.column a:hover { text-decoration: underline; }

/* Футер */
.kopirait {
  width: 100%;
  background: linear-gradient(#003521,#003b3e);
  display: flex;
  flex-direction: column; /* располагать строки вертикально */
  justify-content: center;
  align-items: center;
  min-height: 60px; /* допускаем рост по высоте */
  padding: 6px 0;   /* небольшие отступы сверху/снизу */
  gap: 2px;         /* расстояние между строками */
}
.kopirait p { margin: 0; color: #fff; }
.kopirait .footer-meta { font-size: 12px; opacity: .85; margin-bottom: 2px; }

/* ПК: отключаем принудительную высоту промо‑блока */
@media (min-width: 769px) { .promo-blok { min-height: auto; } }

/* Мобайл: растягиваем промо‑блок по высоте экрана */
@media (max-width: 768px) {
  .knopki-header-blok-3,
  .dop-kpopki-header-blok-4 { overflow: hidden; }

  /* На мобилке меню языков должно раскрываться поверх — но только когда открыто мобильное меню */
  .header-blok.menu-open .dop-kpopki-header-blok-4 { overflow: visible; }

  .menu-toggle { display: inline-block; z-index: 1100; }
  .header-blok { height: auto; padding: 8px 0; }
  .content-header-blok-1 { flex-wrap: wrap; }
  .knopki-header-blok-3, .dop-kpopki-header-blok-4 {
    display: flex; width: 100%; justify-content: center; flex-direction: column; align-items: center; gap: 8px; padding: 0;
    max-height: 0; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px);
    transition: max-height .35s ease, opacity .25s ease, transform .35s ease;
  }
  .header-blok.menu-open .knopki-header-blok-3,
  .header-blok.menu-open .dop-kpopki-header-blok-4 {
    max-height: 480px; opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); padding: 8px 0;
  }
  .knopki-header-blok-3 .knopka { width: 100%; max-width: 260px; text-align: center; }
  .language-switcher { width: 100%; }
  .language-btn { width: 100%; justify-content: center; }
  .language-menu { z-index: 2000; }
}
