/* ===== Публичная часть сайта: шапка, герой, плитки, контент, подвал ===== */

.page {
  max-width: var(--wrap);
  margin: 30px auto;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* --- Шапка --- */

.header {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.header__logo {
  display: block;
  padding: 26px 0 26px 50px;
  flex: 0 0 auto;
}

.logo__mark {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #111;
}

.logo__mark span { color: var(--blue); }

.logo__sub {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--blue);
}

.header__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 18px;
  padding: 20px 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3c3c3c;
}

.nav a:hover { color: var(--blue); }

.nav .is-active { color: var(--blue-light); }

.nav__sep { color: #c3c9cf; }

.nav--main { font-size: 15px; }

.header__lang {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 34px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.06em;
  align-self: flex-start;
  height: 62px;
}

.header__lang a { opacity: 0.75; }
.header__lang a:hover,
.header__lang .is-active { opacity: 1; }

/* --- Выбор языка --- */

/* Блок стоял вплотную к последнему пункту меню — отодвигаем. */
.header__nav { padding-right: 18px; }

.lang { position: relative; padding: 0 22px; }

.lang__btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.lang__caret { font-size: 10px; opacity: 0.8; }

.lang__list {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  padding: 6px 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  z-index: 60;
}

.lang.is-open .lang__list { display: block; }

.lang__opt {
  display: block;
  width: 100%;
  padding: 9px 16px;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.lang__opt:hover { background: #f2f5f8; }
.lang__opt.is-active { color: var(--blue); font-weight: 600; }

/* --- Иврит: разворачиваем то, что жёстко прибито к левому краю --- */

[dir="rtl"] .header__logo { padding: 26px 50px 26px 0; }
[dir="rtl"] .header__nav { align-items: flex-start; padding-right: 0; padding-left: 18px; }
[dir="rtl"] .lang__list { right: auto; left: 0; }
[dir="rtl"] .lang__opt { text-align: right; }
[dir="rtl"] .msg-rail { right: auto; left: 18px; }
[dir="rtl"] .msg-rail__btn { justify-content: flex-start; }
[dir="rtl"] .msg-rail__btn:hover { transform: translateX(2px); }
[dir="rtl"] .hero__body { text-align: right; }
[dir="rtl"] ul { padding-left: 0; padding-right: 20px; }

/* --- Герой --- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 43% 57%;
  min-height: 420px;
  background: var(--navy);
  overflow: hidden;
}

.hero__media {
  position: relative;
  filter: grayscale(1);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(21, 42, 67, 0.1), rgba(21, 42, 67, 0.55));
}

.hero__body {
  padding: 46px 60px 96px 44px;
  color: #fff;
}

.hero__title {
  font-size: 34px;
  letter-spacing: 0.02em;
  color: #eaf1f9;
  margin-bottom: 26px;
}

.hero__tagline {
  color: var(--blue-light);
  font-size: 16px;
  margin-bottom: 18px;
}

.hero__rule {
  width: 34px;
  height: 3px;
  background: #fff;
  margin: 0 0 22px;
  border: 0;
}

.hero__text {
  max-width: 460px;
  color: #cdd8e4;
  font-size: 15px;
}

.hero__cta { margin-top: 26px; }

.hero__cut {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 90px;
  display: block;
}

/* --- Плитки быстрых разделов --- */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 58px 50px 70px;
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  padding: 20px;
  background: var(--navy);
  color: #fff;
  text-align: center;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
}

.tile:hover {
  background: var(--blue);
  transform: translateY(-2px);
}

/* --- Закреплённые кнопки мессенджеров справа --- */

.msg-rail {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-rail__btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 52px;
  height: 52px;
  padding: 0 14px;
  border-radius: 26px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.msg-rail__btn:hover,
.msg-rail__btn:focus-visible {
  width: auto;
  max-width: 280px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translateX(-2px);
}

.msg-rail__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.msg-rail__btn svg {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Подпись появляется при наведении, порядок в разметке — подпись перед значком. */
.msg-rail__label {
  order: -1;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.msg-rail__btn:hover .msg-rail__label,
.msg-rail__btn:focus-visible .msg-rail__label { opacity: 1; }

.msg-rail__btn--tg { background: #229ed9; }
.msg-rail__btn--tg:hover { background: #1b8ec3; }

.msg-rail__btn--wa { background: #25d366; }
.msg-rail__btn--wa:hover { background: #1ebe5a; }

@media (max-width: 720px) {
  .msg-rail { right: 12px; bottom: 14px; top: auto; transform: none; gap: 10px; }
  .msg-rail__btn { width: 46px; height: 46px; padding: 0 11px; }
  .msg-rail__btn:hover, .msg-rail__btn:focus-visible { width: 46px; transform: none; }
  .msg-rail__label { display: none; }
}

/* Если в системе отключены анимации — не дёргаем кнопки. */
@media (prefers-reduced-motion: reduce) {
  .msg-rail__btn, .msg-rail__label { transition: none; }
}

/* --- Кнопки мессенджеров в тексте --- */

.messengers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0 8px;
}

.btn--msg {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.btn--msg svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}

.btn--tg { background: #229ed9; }
.btn--tg:hover { background: #1b87ba; }

.btn--wa { background: #25d366; }
.btn--wa:hover { background: #1da851; }

.messengers__num {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.messengers__num a:hover { color: var(--blue); }

.hero .messengers__num { color: #cdd8e4; }
.hero .messengers__num a:hover { color: #fff; }

/* --- Текстовые страницы --- */

.content {
  padding: 50px;
  max-width: 860px;
}

.content h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.content h2 {
  font-size: 21px;
  margin: 34px 0 12px;
  color: var(--navy);
}

.content__lead {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 28px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 24px 0 8px;
}

.card {
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue);
  background: #fbfcfd;
}

.card h3 {
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.dl {
  margin: 0;
  border-top: 1px solid var(--line);
}

.dl > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.dl dt {
  font-weight: 600;
  color: var(--navy);
}

.dl dd { margin: 0; color: var(--muted); }

/* --- Подвал --- */

.footer {
  background: var(--navy-dark);
  color: #b9c6d4;
  padding: 34px 50px;
  font-size: 13px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: #dfe7ef;
}

.footer__nav a:hover { color: #fff; }

.footer__note { color: #8496a8; margin: 0; }

.footer__disclaimer {
  margin: 14px 0 0;
  font-size: 12px;
  color: #6f8299;
  max-width: 720px;
}

/* --- Адаптив --- */

@media (max-width: 900px) {
  .page { margin: 0; }

  .header {
    flex-wrap: wrap;
    padding-bottom: 12px;
  }

  .header__logo { padding: 20px 0 14px 20px; }
  .logo__mark { font-size: 36px; }

  .header__nav {
    order: 3;
    width: 100%;
    align-items: flex-start;
    padding: 0 20px 8px;
    gap: 10px;
  }

  .header__lang {
    margin-left: auto;
    height: 46px;
    padding: 0 20px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero__media { min-height: 200px; }
  .hero__body { padding: 32px 20px 80px; }
  .hero__title { font-size: 26px; }

  .tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 30px 20px 40px;
  }

  .content { padding: 30px 20px; }
  .footer { padding: 26px 20px; }

  .dl > div { grid-template-columns: 1fr; gap: 4px; }
}
