/* landing/css/layout.css - Стили шапки и подвала */

/* Header - Glassmorphism style */
.header {
  position: fixed;
  top: 15px; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none; /* Пропускаем клики мимо плашки */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.header.header-hidden {
  opacity: 0;
  transform: translateY(-20px);
}

.header-inner {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 24px;  /* Было 12px 30px, сделали тоньше */
  border-radius: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* Постоянное сияние: */
  box-shadow: 0 10px 40px rgba(0,0,0,0.06), 0 0 20px rgba(74, 144, 226, 0.25);
  border: 1px solid rgba(255,255,255,0.5);
  width: auto;
  gap: 24px; /* Было 40px, уплотнили */
  pointer-events: auto; /* Включаем клики на самой плашке */
}

.logo { display:flex; align-items:center; height: 48px; } /* Явно увеличиваем высоту логотипа */
.logo img { height: 100%; transition: transform 0.2s; }
.logo:hover img { transform: scale(1.05); }

.nav {
  display: flex; gap: 24px; /* Уменьшили gap с 30 до 24 */
}
.nav a {
  color: var(--c-text);
  font-weight: 500;
  font-size: 14px; /* Уменьшили шрифт с 15 до 14 */
  position: relative;
  transition: color 0.2s;
}
.nav a:hover, .nav a.active {
  color: var(--c-blue);
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--c-blue); transition: width 0.3s;
}
.nav a:hover::after, .nav a.active::after { width: 100%; }

.header-actions {
  display: flex; align-items: center; gap: 16px;
}

.btn-login {
  font-weight: 500;
  color: var(--c-text-muted);
  transition: color 0.2s;
}

.btn-login:hover {
  color: var(--c-text);
}

/* Footer */
.footer {
  background-color: #fff;
  padding: 60px 0 40px;
  margin-top: 60px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--c-text);
}

.footer-col a {
  display: block;
  color: var(--c-text-muted);
  margin-bottom: 12px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--c-blue);
}

.footer-txt {
  color: var(--c-text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.legal-links a {
  font-size: 13px;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════
   БУРГЕР-КНОПКА (скрыта на десктопе)
   ══════════════════════════════════════════ */
.burger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--c-text);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  z-index: 1002;
  transition: color 0.2s;
}

/* ══════════════════════════════════════════
   МОБИЛЬНОЕ МЕНЮ (overlay + sidebar)
   ══════════════════════════════════════════ */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999;
  background: rgba(30, 27, 58, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0; right: -280px;
  width: 280px;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1001;
  padding: 80px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: right 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.mobile-menu-overlay.open .mobile-menu {
  right: 0;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--c-text);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.mobile-menu a {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--c-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: color 0.2s, padding-left 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a:active {
  color: var(--c-blue);
  padding-left: 8px;
}

.mobile-menu .btn {
  margin-top: 24px;
  text-align: center;
}

/* ══════════════════════════════════════════
   RESPONSIVE: ПЛАНШЕТ (≤ 1024px)
   ══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .header-inner {
    padding: 8px 20px;
    gap: 16px;
  }

  .nav { gap: 16px; }
  .nav a { font-size: 13px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE: МОБИЛЬНЫЙ (≤ 768px)
   ══════════════════════════════════════════ */
@media (max-width: 768px) {
  .header {
    top: 10px;
  }

  .header-inner {
    padding: 6px 16px;
    gap: 12px;
  }

  .logo { height: 38px; }

  .nav { display: none; }
  .header-actions { display: none; }

  .burger-btn {
    display: block;
  }

  .mobile-menu-overlay {
    display: block;
  }

  /* Footer — 1 колонка */
  .footer {
    padding: 40px 0 30px;
    margin-top: 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-col a { margin-bottom: 8px; }
  .footer-col h4 { margin-bottom: 12px; }

  /* ══════════════════════════════════════════
     НИЖНЕЕ ЛИПКОЕ МЕНЮ (МОБИЛЬНОЕ)
     ══════════════════════════════════════════ */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 24px;
    left: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 100px;
    padding: 8px;
    z-index: 998;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.6);
    gap: 8px;
  }

  .bot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
  }

  .bot-btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    background: white;
    color: var(--c-text);
    border: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
  }

  .bot-btn-write {
    flex: 1;
    background: linear-gradient(135deg, #4A90E2, #1E1B3A);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
  }

  /* ══════════════════════════════════════════
     ВОТ ЭТО ВОТ МЕНЮ ТЕЛЕГРАММОВ И ТД (BottomSheet)
     ══════════════════════════════════════════ */
  .bs-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(30,27,58,0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1005;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
  }
  .bs-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }
  .bs-content {
    width: 100%;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 24px 24px 40px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
  }
  .bs-overlay.open .bs-content {
    transform: translateY(0);
  }
  .bs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }
  .bs-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--c-text);
  }
  .bs-close {
    background: rgba(0,0,0,0.05);
    border: none;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    color: var(--c-text-muted);
    cursor: pointer;
  }
  .bs-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .msg-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-decoration: none;
  }
  .msg-tg { background: #2AABEE; }
  .msg-wa { background: #25D366; }
  .msg-vk { background: #0077FF; }
  .msg-max { background: linear-gradient(135deg, #833AB4, #FD1D1D, #FCB045); }
  .msg-icon {
    display: flex; align-items: center; justify-content: center;
  }

  /* Отступ снизу для футера чтобы меню не перекрывало текст */
  .footer {
    padding-bottom: 120px;
  }
}
