:root {
  --bg: #f3f3f3;
  --card: #fff;
  --line: #e6e6e6;
  --text: #121212;
  --muted: #6d6d6d;
  --red: #E11A2B;
  --header-bg: #000;
  --modal-bg: #fff;
  --input-border: #ddd;
  --contacts-small: #7a7a7a;
  --dropdown-bg: #1a1a1a;
}

.dark-theme {
  --bg: #121212;
  --card: #1e1e1e;
  --line: #2a2a2a;
  --text: #e0e0e0;
  --muted: #a0a0a0;
  --red: #E11A2B;
  --header-bg: #0a0a0a;
  --modal-bg: #1e1e1e;
  --input-border: #3a3a3a;
  --contacts-small: #a0a0a0;
  --dropdown-bg: #1a1a1a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body, header, .section-card, h1, h2, h3, p, span, a {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

button {
  font: inherit;
  cursor: pointer;
}

/* ============================================================================
   HEADER
   ============================================================================ */
.header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1400px;
  height: 56px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.header-logo {
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .4px;
  white-space: nowrap;
}
.header-logo span { color: var(--red); }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 600;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.h-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.h-icon-btn:hover { background: rgba(255, 255, 255, 0.16); }
.h-icon-btn:active { transform: scale(0.94); }
.h-icon-btn svg { width: 18px; height: 18px; stroke-width: 2; display: block; }

.lang-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  min-height: 34px;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.lang-selector:hover { background: rgba(255, 255, 255, 0.06); }
.lang-selector img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
}
.lang-selector .lang {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}
.lang-selector svg {
  width: 10px;
  height: 10px;
  color: #fff;
  flex-shrink: 0;
}

.lang-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--dropdown-bg);
  border-radius: 16px;
  min-width: 150px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 2100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  overflow: hidden;
  padding: 6px;
}
.lang-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-option {
  padding: 10px 14px;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
}
.lang-option:hover { background: rgba(255, 255, 255, 0.1); }
.lang-option img { width: 20px; height: 20px; border-radius: 50%; }

/* ============================================================================
   BOTTOM NAV
   ============================================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 20px;
  z-index: 999;
  min-height: 60px;
  height: auto;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #888;
  font-size: 10px;
  gap: 2px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
  flex: 1;
  max-width: 80px;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg { width: 24px; height: 24px; stroke: #888; transition: stroke 0.2s; }
.bottom-nav-item span { font-size: 9px; font-weight: 500; color: #888; transition: color 0.2s; }
.bottom-nav-item:hover,
.bottom-nav-item.active { color: var(--red); }
.bottom-nav-item:hover svg,
.bottom-nav-item.active svg { stroke: var(--red); }
.bottom-nav-item:hover span,
.bottom-nav-item.active span { color: var(--red); }
.bottom-nav-item .favorites-badge {
  position: absolute;
  top: -2px;
  right: 4px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ============================================================================
   SIDEBAR
   ============================================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  z-index: 2000;
}
.menu-overlay.active { opacity: 1; visibility: visible; }

.menu-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  max-width: 85%;
  height: 100vh;
  height: 100dvh;
  background: #121212;
  color: #ffffff;
  z-index: 2001;
  transition: left .3s ease;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}
.menu-sidebar.active { left: 0; }

.menu-sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px 16px 10px;
  gap: 16px;
}
.menu-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: opacity 0.2s;
  padding: 0 6px;
}
.menu-close:hover { opacity: 0.8; }

.menu-header-logo {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.4px;
  pointer-events: none;
  line-height: 1;
}
.menu-header-logo span { color: var(--red); }

.menu-nav {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 4px 10px 10px;
  gap: 2px;
}

.menu-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px;
  border-bottom: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
}
.menu-item-row:hover:not(.no-hover) { background: rgba(255, 255, 255, 0.06); }

.menu-item-left { display: flex; align-items: center; gap: 14px; }
.menu-icon { width: 20px; height: 20px; color: #ffffff; stroke-width: 1.8; }
.menu-item-arrow {
  font-size: 20px;
  color: #8e8e93;
  line-height: 1;
  transition: transform 0.2s, color 0.2s;
}
.tg-logo { width: 25px; height: 25px; }

.lang-current {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lang-current img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-sizing: border-box;
  flex-shrink: 0;
}
.lang-current .lang {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}

.submenu {
  display: none;
  position: relative;
  background: transparent;
  margin-top: 2px;
}
.menu-dropdown.open > .submenu { display: block; }

.submenu-line {
  position: absolute;
  left: 25px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #2c2c2e;
  z-index: 1;
}
.submenu-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.submenu-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 40px;
  border-bottom: none;
  border-radius: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}
.submenu-item:hover { background: rgba(255, 255, 255, 0.06); }

.red-dot {
  position: absolute;
  left: 22px;
  width: 7px;
  height: 7px;
  background-color: var(--red);
  border-radius: 50%;
  z-index: 2;
}
.nested-toggle {
  padding-left: 40px !important;
  border-bottom: none !important;
}
.nested-submenu { background: transparent !important; }
.nested-line { left: 45px !important; }
.nested-submenu .submenu-item { padding-left: 60px !important; }
.nested-submenu .red-dot { left: 42px !important; }
.toggle-arrow.open { transform: rotate(90deg); color: var(--red); }

.theme-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.theme-switch input { opacity: 0; width: 0; height: 0; }
.theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #3a3a3c;
  transition: .3s;
  border-radius: 24px;
}
.theme-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
.theme-switch input:checked + .theme-slider { background-color: #30d158; }
.theme-switch input:checked + .theme-slider:before { transform: translateX(20px); }

.menu-footer {
  padding: 24px 16px;
  font-size: 12px;
  color: #8e8e93;
  text-align: left;
  border-top: 1px solid #1c1c1e;
  margin-top: auto;
}

/* ============================================================================
   CONTACT FLOAT MODAL
   ============================================================================ */
.contact-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
}
.contact-modal-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.contact-card {
  position: absolute;
  top: 72px;
  left: 12px;
  background: var(--dropdown-bg);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  padding: 10px;
  width: 235px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.contact-row:hover { background: rgba(255, 255, 255, 0.1); }
.cm-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cm-icon img { width: 34px; height: 34px; }
.cm-text b { display: block; font-size: 16px; }
.cm-text small { display: block; color: #bdbdbd; font-size: 12px; }

/* ============================================================================
   LOGIN MODAL
   ============================================================================ */
.login-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2300;
  align-items: center;
  justify-content: center;
}
.login-modal-overlay.active { display: flex; }
.login-modal {
  background: var(--modal-bg);
  border-radius: 20px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  position: relative;
}
.login-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
}
.login-close:hover { color: var(--text); }
.login-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.login-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
}
.login-tab.active { color: var(--text); border-bottom: 2px solid var(--red); }
.login-form input,
.register-form input {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}
.login-form input:focus,
.register-form input:focus { outline: none; border-color: var(--red); }
.login-form input::placeholder,
.register-form input::placeholder { color: var(--muted); }
.login-form button,
.register-form button {
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.login-form button:hover,
.register-form button:hover { opacity: 0.8; }

/* ============================================================================
   ОСНОВНОЙ КОНТЕНТ (О СЕРВИСЕ)
   ============================================================================ */
.about-wrapper {
  max-width: 820px;
  margin: 20px auto 40px;
  padding: 0 14px;
}
.about-intro { text-align: center; padding: 10px 0 20px; }
.about-intro h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}
.section-card {
  background: var(--card);
  border-radius: 28px;
  padding: 28px 30px;
  margin-bottom: 28px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
  transition: background 0.3s, box-shadow 0.3s;
}
.dark-theme .section-card { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.section-card h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.3px;
  color: var(--text);
}
.section-card p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 14px;
}
.section-card p:last-child { margin-bottom: 0; }

.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px 20px;
  margin-top: 4px;
}
.who-item h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.who-item p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0;
}
.offer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
}
.offer-list li {
  font-size: 16px;
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}
.offer-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--red);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.offer-list li:last-child { border-bottom: none; }

/* ============================================================================
   FOOTER
   ============================================================================ */
.site-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 14px 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.site-footer-first {
  max-width: 980px;
  margin: 12px auto 0;
  padding: 14px 14px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-content-first {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.footer-text-first {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}
.dot { margin: 0 8px; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.2px;
}
.footer-logo .footer-brand span { color: var(--red); }
.footer-copy { font-size: 12px; color: var(--muted); }
.footer-year { font-size: 12px; font-weight: 700; color: var(--muted); }
.footer-brand { font-size: 16px; font-weight: 900; color: var(--text); }
.footer-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 400px;
  margin: 0 auto;
}

/* ============================================================================
   VERIFICATION MODAL
   ============================================================================ */
.verification-modal-overlay {
  display: flex !important;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}
.verification-modal {
  background: var(--modal-bg);
  border-radius: 20px;
  padding: 32px 28px;
  width: 90%;
  max-width: 440px;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.verification-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
}
.verification-close:hover { color: var(--red); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================================
   АДАПТИВ
   ============================================================================ */
@media (max-width: 768px) {
  .header-inner { height: 52px; padding: 0 10px; }
  .header-logo { font-size: 22px; }
  .header-right { gap: 6px; }

  .h-icon-btn { width: 32px; height: 32px; }
  .h-icon-btn svg { width: 16px; height: 16px; }

  .lang-selector {
    padding: 2px 6px;
    min-height: 28px;
    gap: 3px;
    border-width: 1px;
  }
  .lang-selector img { width: 16px; height: 16px; }
  .lang-selector .lang { font-size: 12px; }
  .lang-selector svg { width: 9px; height: 9px; }
  .lang-option { font-size: 14px; padding: 8px 12px; }
  .lang-option img { width: 18px; height: 18px; }

  .menu-sidebar { width: 280px; }
  .menu-item-row { font-size: 15px; padding: 12px 12px; }
  .submenu-item { font-size: 14px; padding: 10px 10px 10px 36px; }

  .about-intro h1 { font-size: 30px; }
  .section-card { padding: 22px 18px; border-radius: 20px; }
  .section-card h2 { font-size: 22px; }
  .section-card p { font-size: 15px; }

  .who-grid { grid-template-columns: 1fr; gap: 18px; }
  .who-item h3 { font-size: 17px; }
  .who-item p { font-size: 15px; }

  .offer-list { grid-template-columns: 1fr; gap: 0; }
  .offer-list li { font-size: 15px; padding: 8px 0 8px 26px; }
  .offer-list li::before { font-size: 20px; }

  .contact-card { top: 60px; left: 12px; width: 220px; }

  .footer-logo { font-size: 13px; }
  .footer-brand { font-size: 13px; }
  .footer-copy, .footer-year { font-size: 10px; }
  .footer-text { font-size: 8px; max-width: 300px; }

  .dot { margin: 0 6px; }

  .bottom-nav {
    min-height: 56px;
    height: auto;
    padding-bottom: 20px;
  }

  /* Отступ под фиксированную нижнюю навигацию — только у последнего футера.
     У .site-footer-first отступа нет, чтобы расстояние между текстом
     и следующей полоской было симметричным (14px / 14px). */
  .site-footer { margin-bottom: 80px; }
}

@media (max-width: 480px) {
  .header-inner { height: 50px; padding: 0 8px; }
  .header-logo { font-size: 20px; }
  .header-right { gap: 4px; }

  .h-icon-btn { width: 30px; height: 30px; }
  .h-icon-btn svg { width: 15px; height: 15px; }

  .lang-selector {
    padding: 2px 6px;
    min-height: 26px;
    gap: 3px;
  }
  .lang-selector img { width: 14px; height: 14px; }
  .lang-selector .lang { font-size: 11px; }
  .lang-selector svg { width: 8px; height: 8px; }

  .about-wrapper { padding: 0 10px; }
  .about-intro h1 { font-size: 26px; }
  .section-card { padding: 18px 14px; }
  .section-card h2 { font-size: 20px; margin-bottom: 12px; }

  .footer-text-first { font-size: 11px; max-width: 380px; }
}