/* mobile <= 960px */

.tool-link span { display: none; }
.tool-sep { display: none; }

.site-nav {
  display: none;
}
body.sitemap-open .site-nav,
body.sitemap-closing .site-nav {
  display: block;
  background: transparent;
  position: relative;
  z-index: 1111;
}
body.sitemap-open .site-nav .nav-row,
body.sitemap-closing .site-nav .nav-row {
  display: none !important;
}

.sitemap-toggle-desktop { display: none !important; }
.sitemap-toggle-mobile {
  display: inline-grid !important;
  margin-left: 0;
  width: 2.5rem;
  height: 2.5rem;
}

.header-top {
  flex-wrap: wrap;
  gap: .85rem;
  justify-content: center;
  align-items: center;
}
.header-tools {
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  gap: .65rem;
}
.brand {
  max-width: 100%;
  flex: 1 1 100%;
  justify-content: center;
}
.brand-mark { width: 4.25rem; height: 4.25rem; }
.brand-logo { width: 4.25rem; height: 4.25rem; }
.brand-title {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  align-items: center;
  text-align: center;
  white-space: normal;
}
.brand-title-main { font-size: calc(1.05rem * var(--a11y-font, 1)); }
.brand-title-sub { font-size: calc(.72rem * var(--a11y-font, 1)); letter-spacing: .04em; }
.article-layout {
  grid-template-columns: 1fr !important;
}
.article-side {
  display: none !important;
}
.news-list-grid {
  grid-template-columns: 1fr !important;
}
.news-filter-field {
  min-width: calc(50% - .35rem);
  flex: 1 1 calc(50% - .35rem);
}
.news-filter-grow {
  min-width: 100%;
  flex: 1 1 100%;
}


.sitemap-panel {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 100% !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: calc(100dvh - var(--header-offset, 4rem)) !important;
  background: var(--primary);
  color: #fff;
  box-shadow: none !important;
  filter: none !important;
  border-radius: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  z-index: 1200 !important;
}
body.sitemap-open .sitemap-toggle-mobile {
  position: static;
  z-index: 1210;
}
.sitemap-backdrop {
  background: transparent !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  box-shadow: none !important;
}
.sitemap-grid {
  grid-template-columns: 1fr;
  gap: 1.1rem;
  justify-content: start;
}
.sitemap-col { max-width: none; }
.sitemap-title { font-size: calc(1.15rem * var(--a11y-font, 1)); margin-bottom: 1rem; }
.sitemap-inner {
  padding: 1.15rem var(--gutter, 1rem) calc(4rem + env(safe-area-inset-bottom, 0px));
}
.sitemap-list a {
  font-size: calc(1.05rem * var(--a11y-font, 1));
  padding: .45rem 0 .55rem;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
}

.chat-widget,
.chat-fab,
.chat-bubble {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.news-bsa,
.news-featured,
.activity-grid,
.tri-grid,
.footer-grid { grid-template-columns: 1fr; }
.partners-grid {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1rem;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 0;
  grid-template-columns: none;
}
.partner-item {
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
}
.tri-grid {
  gap: 1.5rem;
  align-items: start;
}
.tri-col {
  z-index: auto;
}
.poll-box,
.empty-box,
.doc-stack,
.panel-stack {
  position: relative;
  z-index: 1;
  margin: 0;
}
.tri-col .panel-stack,
.tri-col .doc-stack {
  overflow: visible;
  max-height: none;
  height: auto;
  padding-right: 0;
  scrollbar-gutter: auto;
}
.tri-col .empty-box,
.tri-col .poll-box {
  min-height: 0;
  height: auto;
}

.footer-col-center,
.footer-col-right {
  text-align: left;
  justify-content: flex-start;
  align-items: flex-start;
}
.footer-links {
  justify-content: flex-start;
  gap: .65rem .95rem;
  padding-block: 1.1rem 1rem;
  font-size: calc(.78rem * var(--a11y-font, 1));
}
.footer-grid {
  gap: 1.35rem;
  padding-block: 1.5rem 1.35rem;
}
.footer-brand {
  font-size: calc(.95rem * var(--a11y-font, 1));
  margin-bottom: .55rem;
}
.footer-address,
.footer-copy {
  font-size: calc(.88rem * var(--a11y-font, 1));
}
.footer-social {
  justify-content: flex-start;
  gap: .95rem;
}
.footer-stats-row {
  justify-content: flex-start;
  gap: .45rem 1.1rem;
  font-size: calc(.78rem * var(--a11y-font, 1));
}
.footer-note {
  padding: .9rem 0 1.15rem;
  font-size: calc(.74rem * var(--a11y-font, 1));
  text-align: left;
}

/* murojaat / appeal form */
.appeal-card { padding: 1.1rem 1rem 1.2rem; max-width: none; }
.appeal-lead { gap: .8rem; }
.appeal-lead-ico { width: 2.6rem; height: 2.6rem; }
.appeal-form { grid-template-columns: 1fr; gap: .95rem; }
.appeal-field input,
.appeal-field textarea { font-size: calc(1rem * var(--a11y-font, 1)); min-height: 3rem; }
.appeal-foot { flex-direction: column; align-items: stretch; }
.appeal-submit { width: 100%; min-height: 3rem; font-size: calc(1rem * var(--a11y-font, 1)); }
.tri-head { flex-wrap: wrap; }
.panel-card, .panel-row {
  min-height: 4.5rem;
  padding: 1.05rem 1rem 1.05rem 1.45rem;
  gap: .85rem;
}
.panel-card-go {
  width: 1.7rem;
  height: 1.7rem;
}
.panel-card-go::before {
  width: 6px;
  height: 6px;
}
.panel-stack,
.activity-grid {
  gap: 1rem;
}

.news-side {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.news-side-item { gap: 1.25rem; min-height: 4.25rem; }
.news-side-date strong { font-size: calc(1.5rem * var(--a11y-font, 1)); }
.news-side-date span { font-size: calc(.9rem * var(--a11y-font, 1)); }
.news-hero {
  grid-template-rows: 14rem 1fr;
}
.news-hero-media { height: 14rem; max-height: 14rem; }
.news-hero-card {
  width: calc(100% - 2rem);
  margin-top: -2.25rem;
  padding: .85rem 1rem;
}
.news-hero-title { font-size: calc(.95rem * var(--a11y-font, 1)); }
.news-list-media { height: 12.5rem; max-height: 12.5rem; }
.news-list-card { grid-template-rows: 12.5rem auto; }
.news-list-content { width: calc(100% - 1.25rem); margin-top: -2.25rem; padding: .85rem .95rem; }
.news-filter { gap: .55rem; }
.news-filter-field { min-width: calc(50% - .35rem); flex: 1 1 calc(50% - .35rem); }
.news-filter-grow { min-width: 100%; flex: 1 1 100%; }
.news-filter-submit { margin-left: auto; }
.bsa-pager { gap: .35rem; margin-top: 1.35rem; }
.bsa-pager-item { width: 2.25rem; height: 2.25rem; font-size: calc(.88rem * var(--a11y-font, 1)); }
.article-gallery-nav { width: 2.2rem; height: 2.2rem; }
.article-gallery-nav.is-prev { left: .5rem; }
.article-gallery-nav.is-next { right: .5rem; }
.section { padding: 1.35rem 0 1.6rem; }
.section-title { font-size: calc(1.25rem * var(--a11y-font, 1)); }
.social-chip { width: 30px; height: 30px; }
.social-inline { gap: .75rem; }
.header-tools { gap: .45rem; }
.header-top { padding: .85rem 0; }
.tool-btn { width: 2.5rem; height: 2.5rem; }
.tool-btn svg { width: 1.35rem; height: 1.35rem; }
.lang-dd-btn { min-width: 3.1rem; height: 2.5rem; padding: 0 .55rem; font-size: calc(.88rem * var(--a11y-font, 1)); }
.article-layout, .news-list-grid { grid-template-columns: 1fr; }
.article-side {
  display: none !important;
}
.side-nav { display: none !important; }

/* при открытой карте: только ряд кнопок + X, лого не мешает */
body.sitemap-open .brand {
  display: none !important;
}
body.sitemap-open .header-top {
  flex-wrap: nowrap;
  justify-content: flex-end;
  padding: .55rem 0;
  gap: .45rem;
  min-height: 3.25rem;
}
body.sitemap-open .header-tools {
  width: auto;
  margin-left: auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: .4rem;
}
body.sitemap-open .tool-search,
body.sitemap-open .tool-link,
body.sitemap-open .lang-dd,
body.sitemap-open .tool-a11y {
  display: none !important;
}
body.sitemap-open .sitemap-toggle-mobile {
  display: inline-grid !important;
  width: 2.75rem;
  height: 2.75rem;
}
body.sitemap-open .site-header-inner {
  background: #fff;
  box-shadow: none;
}
body.sitemap-open .test-mode-wrap {
  display: none !important;
}

/* поиск на телефоне */
.search-modal {
  z-index: 1400;
  padding: max(4.5rem, env(safe-area-inset-top, 0px) + 3.75rem) .75rem 1.25rem;
  align-content: start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.search-modal-card {
  width: 100%;
  max-width: 100%;
  border: 0;
  box-shadow: 0 12px 36px rgba(6, 40, 79, .22);
}
.search-field {
  padding: .95rem .9rem;
  gap: .5rem;
}
.search-field input {
  font-size: calc(16px * var(--a11y-font, 1)); /* без zoom iOS */
  min-height: 2.5rem;
}
.search-results {
  max-height: min(62vh, 28rem);
}
.search-hit {
  padding: .95rem 1rem;
  font-size: calc(1rem * var(--a11y-font, 1));
  min-height: 2.85rem;
}
.search-modal-close {
  position: absolute;
  top: .55rem;
  right: .55rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: #eef2f7;
  color: var(--primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.search-modal-card {
  position: relative;
  padding-top: 0;
}

.media-grid { grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.media-card-play { width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; }
.contact-map { height: 16rem; }

.photo-collage { --row: 6.25rem; gap: .35rem; }
.photo-lightbox-stage { padding: 3.5rem .5rem 0; }
.photo-lightbox-btn.is-prev, .photo-lightbox-btn.is-next { top: auto; bottom: 3.6rem; margin-top: 0; width: 2.75rem; height: 2.75rem; }
.yt-queue { padding: .75rem; }
.yt-queue-list { grid-template-columns: 1fr; }
.yt-queue-item { grid-template-columns: 8rem 1fr; align-items: center; }
/* Картинки в тексте на телефоне: без обтекания, маленькая - 70%, остальные на всю ширину */
.article-body img, .article-body img[data-size="md"], .article-body img[data-size="lg"] { max-width: 100%; max-height: 75vh; float: none !important; margin: 1rem auto !important; }
.article-body img[data-size="sm"] { max-width: 70%; max-height: 50vh; }
.article-body .rt-video { width: 100%; }
