
:root {
  --ultramarine: #120a8f;
  --ultramarine-dark: #08044f;
  --ultramarine-soft: #eef2ff;
  --white: #ffffff;
  --text: #17172f;
  --muted: #5d6383;
  --line: #dce2ff;
  --shadow: 0 18px 50px rgba(18, 10, 143, 0.14);
  --radius: 24px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--white);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.55;
}
body, button, input, textarea, select { font-family: Georgia, "Times New Roman", Times, serif; }
h1, h2, h3, .brand-title, .section-kicker, .button, .site-nav a, .footer-brand span {
  font-family: "Cyrillic Old", "Old Standard TT", Georgia, "Times New Roman", serif;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}
h2 {
  margin-bottom: 20px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
  color: var(--ultramarine-dark);
}
h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.18;
  color: var(--ultramarine-dark);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; }
.container { width: min(100% - 32px, var(--container)); margin: 0 auto; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--ultramarine);
  color: var(--white);
  border-radius: 12px;
}
.skip-link:focus { left: 12px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.header-inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 300px;
}
.brand-logo, .footer-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--ultramarine-dark);
}
.brand-copy { display: block; line-height: 1.1; }
.brand-title {
  display: block;
  color: var(--ultramarine-dark);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.brand-subtitle {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  max-width: 260px;
}
.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex: 1 1 auto;
}
.site-nav a {
  color: var(--ultramarine-dark);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus { border-color: currentColor; }
.header-side { display: flex; align-items: center; gap: 16px; }
.socials { display: flex; align-items: center; gap: 8px; }
.socials a {
  width: 31px; height: 31px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--ultramarine);
  font-size: 11px;
  font-weight: 700;
}
.phone-link { color: var(--ultramarine-dark); font-weight: 700; white-space: nowrap; }
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
.nav-toggle span:not(.visually-hidden) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ultramarine-dark);
  border-radius: 2px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--ultramarine-dark);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 20%;
  background: linear-gradient(90deg, var(--ultramarine-dark), rgba(8, 4, 79, 0));
  pointer-events: none;
}
.hero::after {
  inset: 0 0 0 auto;
  background: linear-gradient(270deg, var(--ultramarine-dark), rgba(8, 4, 79, 0));
}
.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0;
}
.hero-text { max-width: 620px; }
.hero .section-kicker { color: rgba(255,255,255,0.88); }
.hero-lead {
  max-width: 620px;
  margin-bottom: 34px;
  font-size: 24px;
  line-height: 1.45;
  color: rgba(255,255,255,0.92);
}
.hero-media {
  justify-self: center;
  width: 100%;
  max-width: 690px;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.28);
  background: var(--ultramarine-dark);
}
.hero-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.button-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 28px;
  border: 2px solid var(--ultramarine);
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.button:hover, .button:focus { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--ultramarine); }
.button-primary:hover, .button-primary:focus { background: var(--ultramarine-dark); border-color: var(--ultramarine-dark); }
.button-secondary { color: var(--ultramarine-dark); background: var(--white); border-color: var(--white); }
.button-outline { color: var(--ultramarine); background: transparent; }
.button-outline:hover, .button-outline:focus { color: var(--white); background: var(--ultramarine); }

.section { padding: 86px 0; }
.two-columns { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.text-panel {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.text-panel p:last-of-type { margin-bottom: 26px; }
.about-photo {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--ultramarine-soft);
}
.about-photo img { width: 100%; height: auto; }
.stats-section, .help-section, .map-section, .news-section, .reports-section, .material-form-section {
  background: var(--ultramarine-soft);
}
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stat-card {
  min-height: 190px;
  padding: 28px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--ultramarine);
  box-shadow: var(--shadow);
}
.stat-card strong { display: block; margin-bottom: 14px; font-size: 42px; line-height: 1; }
.stat-card span { display: block; color: rgba(255,255,255,0.86); }
.centered { text-align: center; }
.section-head { max-width: 860px; margin: 0 auto 38px; }
.section-kicker, .news-date {
  margin-bottom: 12px;
  color: var(--ultramarine);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
}
.muted { color: var(--muted); }
.cards-grid, .partner-grid, .contacts-grid { display: grid; gap: 20px; }
.collections-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.info-card, .person-card, .partner-card, .news-card, .contact-card, .map-card, .donate-card, .quote-card, .help-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
.info-card, .person-card { padding: 24px; }
.info-card img, .person-card img, .news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 20px;
}
.text-link { color: var(--ultramarine); font-weight: 700; border-bottom: 1px solid currentColor; }
.centered-buttons { justify-content: center; margin-top: 30px; }
.quote-card {
  padding: 44px;
  color: var(--white);
  background: var(--ultramarine);
}
.quote-card p { margin: 0; font-size: 28px; line-height: 1.45; }

.map-card { padding: 18px; }
.map-canvas {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
}
.map-image {
  width: 100%;
  height: auto;
  min-height: 330px;
  object-fit: contain;
}
.map-pin {
  position: absolute;
  left: 20.5%;
  top: 43.5%;
  width: 46px;
  height: 62px;
  transform: translate(-50%, -100%);
  z-index: 2;
}
.pin-flag {
  position: absolute;
  left: 20px;
  top: 2px;
  width: 28px;
  height: 21px;
  background: var(--ultramarine);
  border: 3px solid var(--white);
  border-radius: 4px 6px 6px 4px;
  box-shadow: 0 8px 18px rgba(8, 4, 79, 0.28);
}
.pin-flag::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 1px;
  width: 4px;
  height: 45px;
  background: var(--ultramarine-dark);
  border-radius: 2px;
}
.pin-dot {
  position: absolute;
  left: 9px;
  bottom: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ultramarine);
  border: 4px solid var(--white);
  box-shadow: 0 0 0 6px rgba(18, 10, 143, 0.14);
}
.pin-tooltip {
  position: absolute;
  left: 52px;
  top: -8px;
  width: 210px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  font-size: 15px;
  line-height: 1.35;
}
.map-pin:hover .pin-tooltip, .map-pin:focus .pin-tooltip, .map-pin:focus-visible .pin-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.form-layout { align-items: stretch; }
.help-form { padding: 34px; }
.form-row { margin-bottom: 16px; }
.form-row label, .checkbox-row { display: block; margin-bottom: 7px; color: var(--ultramarine-dark); font-weight: 700; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #bfc8ff;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-row textarea { resize: vertical; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  border-color: var(--ultramarine);
  box-shadow: 0 0 0 4px rgba(18, 10, 143, 0.12);
}
.two-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 18px; color: var(--text); font-weight: 400; }
.checkbox-row input { margin-top: 6px; -webkit-appearance: auto; appearance: auto; }
.form-message { margin: 14px 0 0; color: var(--ultramarine); font-weight: 700; }

.partner-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.partner-card {
  min-height: 210px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  color: var(--ultramarine-dark);
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease;
}
.partner-card:hover, .partner-card:focus { transform: translateY(-3px); box-shadow: 0 22px 58px rgba(18, 10, 143, 0.18); }
.partner-card img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 14px;
  background: var(--white);
}
.donate-card {
  padding: 42px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 34px;
  align-items: center;
}
.qr-box {
  justify-self: end;
  width: 280px;
  padding: 18px;
  border-radius: 22px;
  border: 1px dashed var(--ultramarine);
  text-align: center;
  color: var(--muted);
  background: var(--white);
}
.qr-box img { width: 100%; height: auto; border-radius: 14px; margin-bottom: 12px; }
.news-card {
  max-width: 850px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 26px;
  align-items: center;
}
.news-card:target, .news-card.is-highlighted { outline: 4px solid rgba(18, 10, 143, 0.22); }
.news-card img { height: 210px; margin: 0; }
.team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.placeholder-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 180px;
  border-radius: 18px;
  margin-bottom: 20px;
  background: #000;
  color: #fff;
  font-size: 13px;
}
.contacts-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.contact-card { padding: 30px; font-style: normal; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card a { color: var(--ultramarine); border-bottom: 1px solid transparent; }
.contact-card a:hover, .contact-card a:focus { border-color: currentColor; }
.site-footer { padding: 42px 0; color: var(--white); background: var(--ultramarine-dark); }
.footer-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: 0.08em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: flex-end; }
.footer-links a { color: rgba(255,255,255,0.88); border-bottom: 1px solid transparent; }
.footer-links a:hover, .footer-links a:focus { border-color: currentColor; }
.copyright { grid-column: 1 / -1; margin: 0; color: rgba(255,255,255,0.72); font-size: 14px; }

@media (max-width: 1080px) {
  .header-inner { gap: 16px; }
  .brand { min-width: 250px; }
  .brand-subtitle { max-width: 210px; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 12px; }
  .header-side { display: none; }
  .collections-grid, .partner-grid, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr; min-height: auto; }
  .hero-text { max-width: 760px; }
  .hero-media { max-width: 760px; justify-self: start; }
}
@media (max-width: 820px) {
  body { font-size: 16px; }
  .header-inner { min-height: 78px; justify-content: space-between; }
  .brand { min-width: 0; }
  .brand-logo { width: 52px; height: 52px; }
  .brand-title { font-size: 17px; }
  .brand-subtitle { display: none; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    left: 16px; right: 16px; top: calc(100% + 10px);
    display: none;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .site-nav a { padding: 12px; border-radius: 12px; border-bottom: 0; }
  .site-nav a:hover, .site-nav a:focus { background: var(--ultramarine-soft); }
  .hero-inner { padding: 52px 0; }
  .hero-lead { font-size: 20px; }
  .section { padding: 62px 0; }
  .two-columns, .contacts-grid, .donate-card, .news-card { grid-template-columns: 1fr; }
  .qr-box { justify-self: start; width: 240px; }
  .team-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 22px, var(--container)); }
  .button { width: 100%; min-height: 52px; padding-left: 18px; padding-right: 18px; }
  .text-panel, .help-form, .donate-card, .quote-card, .contact-card, .news-card { padding: 22px; }
  .collections-grid, .partner-grid, .stats-grid, .two-inputs { grid-template-columns: 1fr; }
  .stat-card { min-height: 150px; }
  .info-card img, .person-card img, .news-card img, .placeholder-image { height: 160px; }
  .map-image { min-height: 260px; }
  .map-pin { left: 20.5%; top: 44%; transform: translate(-50%, -90%) scale(.82); }
  .pin-tooltip { left: auto; right: -18px; top: 56px; width: 190px; }
  .quote-card p { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* === Правки структуры лендинга: навигация, карта, новости, формы === */
.brand { min-width: 220px; }
.brand-copy { max-width: none; }
.hero-kicker span { display: block; }
.quote-card p { text-align: justify; text-align-last: left; }
.checkbox-row a { color: var(--ultramarine); border-bottom: 1px solid currentColor; }

.map-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 18px;
  align-items: stretch;
}
.map-viewport {
  grid-column: 1;
  grid-row: 1;
  overflow: auto;
  border-radius: 18px;
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}
.map-tools {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: var(--ultramarine-soft);
  color: var(--ultramarine-dark);
  font-weight: 700;
}
.map-tools input[type="range"] {
  width: 100%;
  accent-color: var(--ultramarine);
}
.map-tools output {
  color: var(--ultramarine);
  font-weight: 700;
}
.map-canvas {
  width: 100%;
  min-width: 680px;
  transition: width 0.2s ease;
}
.map-image { display: block; width: 100%; min-height: 0; }

.news-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
}
.news-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 10px 4px 24px;
  -webkit-overflow-scrolling: touch;
}
.news-track::-webkit-scrollbar { height: 10px; }
.news-track::-webkit-scrollbar-track { background: rgba(18, 10, 143, 0.08); border-radius: 999px; }
.news-track::-webkit-scrollbar-thumb { background: rgba(18, 10, 143, 0.35); border-radius: 999px; }
.news-carousel .news-card {
  flex: 0 0 min(390px, 84vw);
  max-width: none;
  min-height: 360px;
  margin: 0;
  grid-template-columns: 1fr;
  align-items: start;
  scroll-snap-align: start;
}
.news-carousel .placeholder-image {
  height: 170px;
  margin-bottom: 0;
}
.details-link { display: inline-flex; margin-top: 8px; }
.carousel-button {
  width: 54px;
  height: 54px;
  border: 2px solid var(--ultramarine);
  border-radius: 50%;
  background: var(--white);
  color: var(--ultramarine);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.carousel-button:hover,
.carousel-button:focus {
  background: var(--ultramarine);
  color: var(--white);
  transform: translateY(-2px);
}

.back-to-top {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 120;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--ultramarine);
  box-shadow: 0 14px 34px rgba(8, 4, 79, 0.28);
  font-size: 28px;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.back-to-top:hover,
.back-to-top:focus { background: var(--ultramarine-dark); }

@media (max-width: 1080px) {
  .brand { min-width: 190px; }
}
@media (max-width: 820px) {
  .map-card { grid-template-columns: 1fr; }
  .map-viewport, .map-tools { grid-column: 1; grid-row: auto; }
  .map-tools { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .map-tools label { flex: 1 1 100%; }
  .map-tools input[type="range"] { flex: 1 1 180px; }
  .news-carousel { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
  .carousel-button { width: 44px; height: 44px; font-size: 22px; }
}
@media (max-width: 560px) {
  .brand { min-width: 0; }
  .brand-title { font-size: 15px; }
  .hero-kicker { letter-spacing: 0.1em; }
  .map-canvas { min-width: 520px; }
  .news-carousel { grid-template-columns: 1fr; }
  .carousel-button { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
  .carousel-button:hover, .carousel-button:focus { transform: translateY(-52%); }
  .carousel-button-prev { left: -4px; }
  .carousel-button-next { right: -4px; }
  .news-track { padding-left: 52px; padding-right: 52px; }
  .news-carousel .news-card { flex-basis: min(300px, 76vw); }
  .back-to-top { width: 46px; height: 46px; font-size: 24px; }
}


/* === Структура v3: реальные новости, команда, флажки и мобильная устойчивость === */
.hero { scroll-margin-top: 96px; }
.quote-card p { text-align: justify; text-align-last: left; }
.map-card { overflow: hidden; }
.map-viewport { overscroll-behavior: contain; }
.map-canvas { position: relative; transform-origin: left top; }
.map-pin {
  left: var(--pin-left, 20.5%);
  top: var(--pin-top, 43.5%);
  width: 54px;
  height: 54px;
  transform: translate(-50%, -96%);
  display: block;
  outline-offset: 5px;
}
.map-pin .pin-image {
  width: 54px;
  height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(8, 4, 79, 0.28));
}
.pin-flag, .pin-dot { display: none !important; }
.map-pin .pin-tooltip {
  left: 44px;
  top: -16px;
  min-width: 230px;
  max-width: 260px;
  width: max-content;
}
.content-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  gap: 14px;
  align-items: center;
}
.carousel-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 10px 4px 24px;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { height: 10px; }
.carousel-track::-webkit-scrollbar-track { background: rgba(18, 10, 143, 0.08); border-radius: 999px; }
.carousel-track::-webkit-scrollbar-thumb { background: rgba(18, 10, 143, 0.35); border-radius: 999px; }
.news-carousel .news-card,
.team-carousel .person-card {
  flex: 0 0 min(390px, 84vw);
  max-width: none;
  min-height: 420px;
  margin: 0;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}
.news-carousel .news-card { align-items: stretch; }
.news-carousel .news-card img,
.team-carousel .person-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 18px;
  margin: 0 0 18px;
}
.news-carousel .news-card p,
.team-carousel .person-card p { margin-bottom: 12px; }
.details-link { margin-top: auto; align-self: flex-start; }
.team-section { background: var(--white); }
.team-carousel .person-card { min-height: 390px; }
.team-carousel .person-card img { height: 250px; object-position: center top; }
.team-carousel .person-card h3 { margin-bottom: 8px; }
.footer-links a[target="_blank"]::after,
.text-panel a[target="_blank"]::after,
.donate-card a[target="_blank"]::after { content: none; }
@supports not (scroll-behavior: smooth) {
  html, .carousel-track { scroll-behavior: auto; }
}
@media (max-width: 820px) {
  .content-carousel { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
  .map-pin { transform: translate(-50%, -96%) scale(.9); }
  .map-pin .pin-tooltip { left: auto; right: -10px; top: 50px; width: 220px; min-width: 0; }
}
@media (max-width: 560px) {
  .content-carousel { grid-template-columns: 1fr; }
  .carousel-button { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; }
  .carousel-button:hover, .carousel-button:focus { transform: translateY(-52%); }
  .carousel-button-prev { left: -4px; }
  .carousel-button-next { right: -4px; }
  .carousel-track { padding-left: 52px; padding-right: 52px; }
  .news-carousel .news-card,
  .team-carousel .person-card { flex-basis: min(310px, 78vw); min-height: 0; }
  .news-carousel .news-card img,
  .team-carousel .person-card img { height: 190px; }
  .map-pin { transform: translate(-50%, -96%) scale(.78); }
}

/* === Map coordinate fix 2026-06-30 ===
   Флажки в админке и на публичной карте теперь считаются от фактического
   прямоугольника изображения карты, поэтому проценты flag_x/flag_y совпадают. */
.map-canvas,
.map-picker {
  position: relative;
  line-height: 0;
}
.map-canvas {
  overflow: visible;
}
.map-image,
.map-picker img.map-base {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}
.map-pin,
.map-flag {
  position: absolute;
  transform-origin: 50% 100%;
}
.map-pin {
  left: var(--pin-left, 20.5%);
  top: var(--pin-top, 43.5%);
}
.map-pin .pin-tooltip {
  line-height: 1.35;
}
.map-picker {
  cursor: crosshair;
}
.map-flag {
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
}

/* === Map coordinate precision fix 2026-06-30-mm ===
   Одна система координат для админки и сайта: left/top указывают на
   видимый кончик древка флажка. Флажок уменьшен с 54px до 38px (~-30%). */
:root{--map-flag-size:38px;--map-flag-anchor-x:1%;--map-flag-anchor-y:98.7%;--map-flag-anchor-x-neg:-1%;--map-flag-anchor-y-neg:-98.7%}
.map-canvas,.map-picker{position:relative;line-height:0}
.map-canvas{overflow:visible}
.map-image,.map-picker img.map-base{display:block;width:100%;height:auto;min-height:0;object-fit:contain}
.map-pin{position:absolute;left:var(--pin-left,20.5%);top:var(--pin-top,43.5%);width:var(--map-flag-size)!important;height:var(--map-flag-size)!important;display:block;z-index:2;outline-offset:3px;transform:translate(var(--map-flag-anchor-x-neg),var(--map-flag-anchor-y-neg))!important;transform-origin:var(--map-flag-anchor-x) var(--map-flag-anchor-y)!important}
.map-pin .pin-image{display:block;width:var(--map-flag-size)!important;height:var(--map-flag-size)!important;max-width:none;max-height:none;object-fit:contain;filter:drop-shadow(0 6px 9px rgba(8,4,79,.24))}
.pin-flag,.pin-dot{display:none!important}
.map-pin .pin-tooltip{line-height:1.35;left:34px;top:-12px;min-width:220px;max-width:260px;width:max-content}
@media(max-width:820px){.map-pin{transform:translate(var(--map-flag-anchor-x-neg),var(--map-flag-anchor-y-neg))!important}.map-pin .pin-tooltip{left:30px;right:auto;top:32px;width:210px;min-width:0}}
@media(max-width:560px){.map-pin{transform:translate(var(--map-flag-anchor-x-neg),var(--map-flag-anchor-y-neg))!important}.map-pin .pin-tooltip{left:28px;right:auto;top:30px;width:190px;min-width:0}}
