/* client/css/style_index.css */
/* ===== Шрифты ===== */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@400;600;700&display=swap');

/* ===== Общие сбросы ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: "Source Serif Pro", Georgia, serif;
  background: #F5F7FA; /* новый светло-голубой фон */
  color: #1A1A1A;
  /* display: flex;
  flex-direction: column; */
  overflow-x: hidden;
}

/* ===== HEADER & FOOTER (фиксированные) ===== */
:root {
  --header-height: 70px;
  --footer-height: 70px;
}

/* ===== Фиксированная структура страницы ===== */
body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  /* overflow: hidden; /* убираем скролл */
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0; 
  left: 0; 
  right: 0;
  height: var(--header-height);
  background-color: #F5F7FA;
  /* width: 100%;  */
  border-bottom: 1px solid #ddd; 
  font-weight: 600; 
  font-display: flex;
  /* flex-shrink: 0; */
  align-items: center;
  z-index: 1000;
}

.site-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  padding: 0px 40px;
  /* gap: 20px; */
}

.nav-left,
.nav-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-left { justify-content: flex-start; }
.nav-right { justify-content: flex-end; }
.nav-center { text-align: center; }

.nav-link {
  text-decoration: none;
  color: #333;
  font-size: 16px;
  line-height: var(--header-height);
  transition: color 0.2s;
}
.nav-link:hover { color: #c05a7c; }

.brand {
  font-family: "Source Serif Pro", Georgia, serif;
  font-size: 34px;
  font-weight: 700;
  text-decoration: none;
  color: #000;
  display: block;
  letter-spacing: 1px;
  text-align: center; 
  /* margin-bottom: 10px;  */
  line-height: var(--header-height);
}

.brand-sub {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  /* margin-top: 2px; */
  color: #666;
  font-family: "Source Serif Pro", Georgia, serif;
}

.lang-select {
  padding: 3px 5px;
  font-size: 14px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  background-color: #F5F7FA; /* в цвет фона */
  color: #333;
  transition: all 0.3s ease;
  outline: none; /* убираем черный контур при клике */
}

.lang-select:hover {
  background-color: #E8EBF0; /* лёгкий hover-эффект */
}

/* При фокусе — без рамки, только мягкое затемнение */
.lang-select:focus,
.lang-select:focus-visible {
  outline: none;
  box-shadow: none;
  background-color: #E8EBF0;
}

/* ===== MOBILE MENU ===== */
.burger {
  display: none;
  font-size: 26px;
  cursor: pointer;
  -webkit-user-select: none; /* для Safari */
  user-select: none;          /* стандарт */
  padding: 10px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: #F5F7FA; /* единый цвет фона */
  border-top: 1px solid #ddd;
  /* top: 70px; /* высота хедера */
  padding: 15px 20px;
  gap: 10px;
  z-index: 999;
}

.mobile-menu.show {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

.mobile-menu a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.mobile-menu a:hover {
  color: #c05a7c;
}

/* ===== FOOTER ===== */
#site-footer {
  position: fixed;
  bottom: 0; 
  left: 0; 
  right: 0;
  height: var(--footer-height);
  /* height: 70px;
  width: 100%; */
  border-top: 1px solid #ddd;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F5F7FA;
  /* flex-shrink: 0; */
  font-family: "Source Serif Pro", Georgia, serif;
  z-index: 1000;
}

/* Левая часть: бренд */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 600;
  color: #1A1A1A;
}

.footer-brand-title {
  font-size: 10px;
  font-weight: 400;
  color: #555;
}

/* Правая часть: иконки */
.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-right a {
  display: flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: #333;
  line-height: 1;
}

.footer-right img {
  width: 22px;
  height: 22px;
  transition: opacity 0.2s;
  /* flex-shrink: 0;
  display: block;
  transition: opacity 0.2s; */
}

.footer-right img:hover {
  opacity: 0.7;
}

.footer-right .lang-label {
  font-size: 8px;
  /* line-height: 1; */
  color: #222;
  /* display: inline-block;  */
}

/* Текст возле Telegram */
.footer-right .telegram-text {
  font-size: 10px;
  color: #222;
}

/* Контент между хедером и футером фиксированной высоты */
.page-root {
  flex: 1;
  display: flex;
  justify-content: center;   /* по центру по вертикали */
  align-items: center;       /* по центру по горизонтали */
  padding-top: var(--header-height);
  padding-bottom: var(--footer-height);
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  max-height: calc(100vh - var(--header-height) - var(--footer-height));
  overflow: hidden;          /* убираем скролл */
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== ADAPTIVE FOOTER ===== */
@media (max-width: 768px) {
  #site-footer {
    flex-direction: column;
    height: auto;
    padding: 10px 20px;
    gap: 5px;
  }

  .footer-left {
    align-items: center;
    text-align: center;
  }

  .footer-right {
    gap: 8px;
  }

  .footer-right .telegram-text {
    display: none;
  }
}

/* ===== ADAPTIVE HEADER ===== */
@media (max-width: 900px) {
  .nav-left,
  .nav-right {
    display: none;
  }

  .burger {
    display: block;
  }

  .nav-center {
    text-align: left;
    margin-left: 10px;
  }
}