@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600;700&family=Press+Start+2P&display=swap');

:root {
  --header-height: 104px;
  --bg-deep: #09130e;
  --bg-panel: #102018;
  --bg-card: #15291f;
  --bg-card-hover: #1b3427;
  --border-pine: #254434;
  --accent-gold: #eab308;
  --accent-gold-hover: #facc15;
  --text-main: #e6efe9;
  --text-muted: #8ca396;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.pixel-font {
  font-family: 'Press Start 2P', monospace;
  line-height: 1.45;
  letter-spacing: 1px;
}

.archive-font {
  font-family: 'Courier Prime', monospace;
}

/* --- ШАПКА САЙТУ --- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

header.scrolled {
  background-color: rgba(9, 19, 14, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-pine);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
  width: 100%;
  max-width: 1320px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
}

.brand-btn img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  image-rendering: pixelated;
}

.brand-btn span {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  line-height: 1.35;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 38px;
}

.nav-item {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  padding: 13px 3px;
  position: relative;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text-main);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background-color: var(--accent-gold);
  border-radius: 2px;
}

/* --- КОНТЕЙНЕР СТОРІНОК --- */
main { flex: 1; }

.page-section {
  display: none;
  animation: fadeIn 0.25s ease;
}

.page-section.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- ГОЛОВНА СТОРІНКА (HERO) --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #060d09;
}

.bg-collage-wrapper {
  position: absolute;
  inset: -10%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  transform: rotate(-4deg);
  opacity: 0.35;
  animation: slowPan 45s linear infinite alternate;
  pointer-events: none;
}

.bg-collage-wrapper img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-pine);
}

@keyframes slowPan {
  0% { transform: rotate(-4deg) translate(0, 0) scale(1.05); }
  100% { transform: rotate(-4deg) translate(-4%, -5%) scale(1.08); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 45%, rgba(16, 32, 24, 0.35) 0%, rgba(9, 19, 14, 0.92) 75%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-left { max-width: 620px; }

.hero-title {
  font-size: clamp(26px, 4vw, 44px);
  color: var(--accent-gold);
  margin-bottom: 18px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
  font-size: 16px;
  color: #b7c9be;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-gold {
  background-color: var(--accent-gold);
  color: #0b140f;
}

.btn-gold:hover {
  background-color: var(--accent-gold-hover);
  transform: translateY(-2px);
}

.btn-pine {
  background-color: rgba(21, 41, 31, 0.85);
  color: var(--text-main);
  border-color: var(--border-pine);
}

.btn-pine:hover {
  background-color: var(--bg-card-hover);
  border-color: #3c6b53;
  transform: translateY(-2px);
}

.hero-right img {
  width: clamp(210px, 24vw, 310px);
  height: auto;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.85));
  image-rendering: pixelated;
}

/* --- ПАРАЛАКС ГОРИ ТА ЯЛИНКИ ЗНИЗУ --- */
.forest-horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  z-index: 15;
  pointer-events: none;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  background-position: bottom left;
}

.layer-mountains {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 150' preserveAspectRatio='none'%3E%3Cpath fill='%2313261d' d='M0,150 L0,95 L140,35 L290,105 L460,25 L650,110 L820,40 L990,95 L1120,45 L1200,85 L1200,150 Z'/%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: driftSlow 75s linear infinite;
}

.layer-pines-back {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 150'%3E%3Cg fill='%230d1c15'%3E%3Cpolygon points='40,55 15,120 65,120'/%3E%3Cpolygon points='40,35 20,90 60,90'/%3E%3Cpolygon points='130,65 100,130 160,130'/%3E%3Cpolygon points='130,45 108,100 152,100'/%3E%3Cpolygon points='240,50 210,125 270,125'/%3E%3Cpolygon points='240,30 218,88 262,88'/%3E%3Cpolygon points='360,60 330,130 390,130'/%3E%3Cpolygon points='360,40 338,95 382,95'/%3E%3Cpolygon points='480,52 450,125 510,125'/%3E%3Cpolygon points='480,32 458,90 502,90'/%3E%3Crect x='0' y='115' width='600' height='35'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 25% 100%;
  animation: driftSlow 45s linear infinite;
}

.layer-pines-front {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 150'%3E%3Cg fill='%2309130e'%3E%3Cpolygon points='80,75 45,140 115,140'/%3E%3Cpolygon points='80,52 55,108 105,108'/%3E%3Cpolygon points='195,82 160,142 230,142'/%3E%3Cpolygon points='195,60 170,112 220,112'/%3E%3Cpolygon points='310,70 275,140 345,140'/%3E%3Cpolygon points='310,48 285,105 335,105'/%3E%3Cpolygon points='430,80 395,142 465,142'/%3E%3Cpolygon points='430,58 405,110 455,110'/%3E%3Cpolygon points='545,72 510,140 580,140'/%3E%3Cpolygon points='545,50 520,106 570,106'/%3E%3Crect x='0' y='132' width='600' height='18'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 25% 100%;
  animation: driftSlow 28s linear infinite;
}

@keyframes driftSlow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- РОЗДІЛЮВАЧ МІЖ HERO ТА ІНФОРМАЦІЄЮ --- */
.hero-section-divider {
  position: relative;
  z-index: 20;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 24px;
  border-top: 1px solid #294838;
  border-bottom: 1px solid #1d382a;
  background:
    linear-gradient(90deg, transparent, rgba(37, 68, 52, 0.2) 50%, transparent),
    #07100b;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.38), 0 12px 30px rgba(0, 0, 0, 0.22);
}

.hero-section-divider::before,
.hero-section-divider::after {
  content: "";
  width: min(33vw, 390px);
  height: 1px;
}

.hero-section-divider::before {
  background: linear-gradient(90deg, transparent, rgba(234, 179, 8, 0.75));
}

.hero-section-divider::after {
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.75), transparent);
}

.hero-section-divider span {
  position: relative;
  flex-shrink: 0;
  padding: 9px 17px 8px;
  border: 1px solid rgba(234, 179, 8, 0.48);
  background: #0d1d15;
  color: var(--accent-gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 0 0 5px #07100b;
}

.hero-section-divider span::before,
.hero-section-divider span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--accent-gold);
  transform: translateY(-50%) rotate(45deg);
}

.hero-section-divider span::before { left: -4px; }
.hero-section-divider span::after { right: -4px; }

/* --- ІНФОРМАЦІЙНА ДОШКА МІСТА --- */
.city-info {
  position: relative;
  padding: 96px 24px 104px;
  background:
    radial-gradient(circle at 15% 10%, rgba(37, 68, 52, 0.22), transparent 32%),
    linear-gradient(180deg, #09130e 0%, #0c1912 55%, #09130e 100%);
  overflow: hidden;
}

.city-info::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
}

.city-info-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
}

.city-info-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  color: var(--accent-gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.city-info-kicker::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.55), transparent);
}

.city-info-code {
  order: 3;
  color: var(--text-muted);
  white-space: nowrap;
}

.city-info-board {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 54px;
  padding: 54px;
  border: 1px solid #3b604b;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.025), transparent 40%),
    #102018;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.42),
    inset 0 0 0 5px #0c1912,
    inset 0 0 0 6px rgba(234, 179, 8, 0.16);
}

.board-pin {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #bd8f09;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 1px 4px #000;
}

.board-pin-tl { top: 15px; left: 15px; }
.board-pin-tr { top: 15px; right: 15px; }
.board-pin-bl { bottom: 15px; left: 15px; }
.board-pin-br { right: 15px; bottom: 15px; }

.city-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding-right: 48px;
  border-right: 1px solid var(--border-pine);
  text-align: center;
}

.city-crest-frame {
  width: 220px;
  height: 220px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid #486b58;
  border-radius: 50%;
  background: radial-gradient(circle, #1a3226 0%, #0b1710 70%);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.32), inset 0 0 0 7px #102018;
}

.city-crest-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.55));
}

.city-crest-caption {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.city-motto {
  margin-top: 15px;
  color: #d7e2db;
  font-family: 'Courier Prime', monospace;
  font-size: 15px;
  font-style: italic;
  line-height: 1.45;
}

.city-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border-pine);
}

.city-overline {
  margin-bottom: 9px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.city-profile h2 {
  color: var(--accent-gold);
  font-size: clamp(24px, 3.2vw, 38px);
}

.city-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 8px 11px;
  border: 1px solid #315b43;
  border-radius: 999px;
  color: #a9c9b5;
  background: rgba(9, 19, 14, 0.6);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.city-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 9px rgba(74, 222, 128, 0.7);
}

.city-lead {
  margin: 26px 0 28px;
  color: #bed0c5;
  font-size: 15px;
  line-height: 1.75;
}

.city-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.city-facts div {
  padding: 14px 16px;
  border-left: 2px solid var(--accent-gold);
  background: rgba(9, 19, 14, 0.55);
}

.city-facts dt {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.city-facts dd {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.city-info-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.city-info-card {
  display: flex;
  gap: 16px;
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--border-pine);
  border-radius: 6px;
  background: rgba(16, 32, 24, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.city-info-card:hover {
  transform: translateY(-3px);
  border-color: #3c6b53;
  background: var(--bg-card-hover);
}

.info-card-number {
  color: var(--accent-gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 1.6;
}

.city-info-card h3 {
  margin-bottom: 9px;
  font-size: 15px;
}

.city-info-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.city-info-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.city-text-link {
  margin-left: auto;
  padding: 10px 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.city-text-link:hover { color: var(--accent-gold); }

/* --- ПРОФІЛЬ МЕРА --- */
.mayor-section {
  position: relative;
  padding: 98px 24px 110px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 25%, rgba(43, 83, 62, 0.25), transparent 32%),
    linear-gradient(180deg, #09130e, #0d1b14 48%, #08110c);
  border-top: 1px solid rgba(37, 68, 52, 0.7);
}

.mayor-section::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -130px;
  width: 620px;
  height: 620px;
  border: 1px solid rgba(234, 179, 8, 0.06);
  border-radius: 50%;
  box-shadow: inset 0 0 0 80px rgba(37, 68, 52, 0.025), inset 0 0 0 160px rgba(37, 68, 52, 0.025);
  pointer-events: none;
}

.mayor-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
}

.mayor-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.mayor-kicker {
  display: block;
  margin-bottom: 13px;
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mayor-section-heading h2 {
  font-size: clamp(22px, 3vw, 32px);
}

.mayor-office-mark {
  padding-bottom: 4px;
  color: var(--text-muted);
  font-family: 'Courier Prime', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mayor-profile {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 340px;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid #365844;
  border-radius: 6px;
  background: rgba(16, 32, 24, 0.92);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.42), inset 0 0 0 5px rgba(9, 19, 14, 0.45);
}

.mayor-identity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 46px 24px 30px;
  border-right: 1px solid var(--border-pine);
  background: rgba(9, 19, 14, 0.58);
  text-align: center;
}

.mayor-avatar-frame {
  position: relative;
  width: 146px;
  height: 146px;
  margin-bottom: 23px;
  overflow: hidden;
  border: 2px solid #4c725d;
  border-radius: 50%;
  background: #08110c;
  box-shadow: 0 0 0 7px #12271c, 0 15px 28px rgba(0, 0, 0, 0.4);
}

.mayor-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
}

.mayor-role {
  margin-bottom: 10px;
  color: var(--accent-gold);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.mayor-identity-card > strong {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  line-height: 1.5;
}

.mayor-status {
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 11px;
}

.mayor-seal {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 28px;
  color: #799383;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1px;
  text-align: left;
  text-transform: uppercase;
}

.mayor-seal img {
  width: 37px;
  height: 37px;
  object-fit: contain;
  filter: grayscale(0.35);
  image-rendering: pixelated;
}

.mayor-biography {
  min-width: 0;
  padding: 48px 44px 40px;
}

.mayor-name-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-pine);
}

.mayor-name-line > div > span {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.mayor-name-line h3 {
  color: var(--accent-gold);
  font-size: clamp(18px, 2.3vw, 26px);
}

.mayor-verified {
  flex-shrink: 0;
  padding: 7px 9px;
  border: 1px solid #345a45;
  border-radius: 999px;
  color: #9cc4aa;
  background: rgba(9, 19, 14, 0.65);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.mayor-description {
  margin: 25px 0;
  color: #b9ccbf;
  font-size: 14px;
  line-height: 1.75;
}

.mayor-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mayor-facts div {
  padding: 13px 14px;
  border: 1px solid #254434;
  background: rgba(9, 19, 14, 0.5);
}

.mayor-facts dt {
  margin-bottom: 5px;
  color: #718b7b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mayor-facts dd {
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
}

.mayor-facts dd i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 7px rgba(74, 222, 128, 0.65);
}

.mayor-directions { margin-top: 24px; }

.mayor-directions > span {
  display: block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.mayor-directions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mayor-directions b {
  padding: 6px 9px;
  border: 1px solid #315441;
  border-radius: 4px;
  color: #9bb4a5;
  font-size: 9px;
  font-weight: 600;
}

.mayor-biography blockquote {
  margin-top: 25px;
  padding: 14px 16px;
  border-left: 2px solid var(--accent-gold);
  color: #d2ded6;
  background: rgba(9, 19, 14, 0.36);
  font-family: 'Courier Prime', monospace;
  font-size: 12px;
  font-style: italic;
  line-height: 1.55;
}

.mayor-skin-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--border-pine);
  background:
    radial-gradient(circle at 50% 40%, rgba(50, 89, 67, 0.6), transparent 58%),
    #09130e;
}

.mayor-skin-label {
  position: absolute;
  z-index: 4;
  top: 24px;
  left: 24px;
  color: #789181;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.mayor-skin-grid {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    linear-gradient(rgba(67, 105, 82, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(67, 105, 82, 0.28) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}

.mayor-skin-panel > img {
  position: absolute;
  z-index: 2;
  bottom: -2px;
  left: 50%;
  width: 815px;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 22px rgba(0, 0, 0, 0.65));
}

.mayor-skin-base {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 20px;
  border-top: 1px solid #2c4d3a;
  background: rgba(7, 15, 10, 0.92);
}

.mayor-skin-base span {
  color: var(--accent-gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
}

.mayor-skin-base small {
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
}

/* --- ВНУТРІШНІ СТОРІНКИ --- */
.inner-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 120px 24px 60px;
}

.page-header { margin-bottom: 36px; }
.page-header h1 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 12px; }
.page-header p { color: var(--text-muted); font-size: 15px; }

/* --- ПОДІЇ --- */
.events-stats { display: flex; gap: 14px; margin-bottom: 32px; }

.stat-box {
  background: var(--bg-panel);
  border: 1px solid var(--border-pine);
  border-radius: 10px;
  padding: 16px 22px;
  min-width: 140px;
}

.stat-box .num { font-size: 22px; font-weight: 700; color: var(--accent-gold); }
.stat-box .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.section-label {
  font-size: 16px;
  font-weight: 600;
  margin: 32px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-card { display: flex; gap: 18px; margin-bottom: 20px; }

.event-date-badge {
  background: var(--bg-panel);
  border: 1px solid var(--border-pine);
  border-radius: 10px;
  width: 58px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-date-badge .day { font-size: 18px; font-weight: 700; color: var(--accent-gold); }
.event-date-badge .mon { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }

.event-body {
  background: var(--bg-panel);
  border: 1px solid var(--border-pine);
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
}

.event-body img { width: 100%; height: 210px; object-fit: cover; display: block; }
.event-info { padding: 20px; }
.event-meta { font-size: 12px; color: var(--accent-gold); margin-bottom: 8px; }
.event-info h3 { font-size: 18px; margin-bottom: 8px; }
.event-info p { color: var(--text-muted); font-size: 14px; line-height: 1.5; }

.empty-events {
  background: var(--bg-panel);
  border: 1px solid var(--border-pine);
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
}

.tg-banner {
  margin-top: 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border-pine);
  border-radius: 12px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* --- АРХІВ ДОКУМЕНТІВ --- */
.archive-container { max-width: 1150px; }

.archive-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border-pine);
}

.archive-eyebrow {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.archive-counter {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.archive-counter span {
  color: var(--accent-gold);
  font-family: 'Press Start 2P', monospace;
  font-size: 24px;
}

.archive-counter small {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
  align-items: stretch;
}

.archive-document {
  position: relative;
  min-width: 0;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 24px 20px;
  border: 1px solid #3b5d49;
  border-radius: 3px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.035), transparent 32%),
    repeating-linear-gradient(0deg, transparent 0, transparent 28px, rgba(255, 255, 255, 0.013) 29px),
    #13251c;
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.24), inset 0 0 0 5px rgba(9, 19, 14, 0.42);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.archive-document::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  background: linear-gradient(225deg, #09130e 49%, #365744 50%, #1a3125 53%);
  box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.25);
}

.archive-document::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gold);
  opacity: 0.72;
}

.archive-document:hover {
  z-index: 2;
  transform: translateY(-7px) rotate(-0.35deg);
  border-color: #668a74;
  box-shadow: 0 22px 38px rgba(0, 0, 0, 0.38), inset 0 0 0 5px rgba(9, 19, 14, 0.42);
}

.archive-document:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 4px;
}

.archive-document-watermark {
  position: absolute;
  top: 112px;
  right: -20px;
  width: 175px;
  height: 175px;
  object-fit: contain;
  opacity: 0.035;
  filter: grayscale(1);
  pointer-events: none;
}

.archive-document-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  color: #91aa9b;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.archive-document-head b {
  padding-right: 20px;
  color: var(--accent-gold);
  font-size: 12px;
}

.archive-document-rule {
  width: 100%;
  height: 1px;
  margin: 17px 0 20px;
  background: linear-gradient(90deg, #466654, transparent);
}

.archive-number-label {
  margin-bottom: 5px;
  color: #718b7b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.archive-code {
  position: relative;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
}

.archive-title {
  position: relative;
  margin-top: 18px;
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.archive-document-lines {
  position: relative;
  display: grid;
  gap: 6px;
  margin: 18px 0 20px;
}

.archive-document-lines i {
  display: block;
  width: 100%;
  height: 1px;
  background: #294638;
}

.archive-document-lines i:nth-child(2) { width: 84%; }
.archive-document-lines i:nth-child(3) { width: 62%; }

.archive-document-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: auto;
}

.archive-classification {
  max-width: 100%;
  padding: 6px 8px 5px;
  border: 2px solid currentColor;
  color: #8fb5a0;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.archive-document.is-secret .archive-classification,
.dossier-stamp.is-secret { color: #ef7777; }

.archive-document.is-public .archive-classification,
.dossier-stamp.is-public { color: #73c997; }

.archive-document.is-declassified .archive-classification,
.dossier-stamp.is-declassified { color: #d7ad35; }

.archive-document.is-service .archive-classification,
.dossier-stamp.is-service { color: #8fb5a0; }

.archive-date {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  color: #d2ded6;
  font-size: 12px;
  font-weight: 700;
}

.archive-date span {
  color: #718b7b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.archive-open-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px -24px -20px;
  padding: 13px 24px;
  border-top: 1px solid #294638;
  background: rgba(9, 19, 14, 0.48);
  color: #91aa9b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.archive-open-label b {
  color: var(--accent-gold);
  font-size: 16px;
}

.dossier-view {
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 31px, rgba(38, 58, 46, 0.035) 32px),
    #ded9c4;
  border: 1px solid #b5ad91;
  border-radius: 3px;
  padding: 48px;
  color: #18231c;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  position: relative;
}

.dossier-view::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 52px;
  height: 52px;
  background: linear-gradient(225deg, #09130e 49%, #aaa58f 50%, #c8c2aa 53%);
}

.dossier-official-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #526256;
}

.dossier-official-head img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  image-rendering: pixelated;
}

.dossier-official-head span,
.dossier-official-head strong { display: block; text-transform: uppercase; }
.dossier-official-head span { color: #526256; font-size: 10px; letter-spacing: 1.3px; }
.dossier-official-head strong { margin-top: 4px; color: #18231c; font-size: 16px; letter-spacing: 1px; }

.dossier-stamp {
  display: inline-block;
  border: 2px solid currentColor;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  transform: rotate(-1deg);
}

.dossier-header {
  border-bottom: 1px dashed #78877c;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.dossier-header h2 { color: #18231c; }
.dossier-header > div:last-child { color: #526256 !important; }
.dossier-content { font-size: 16px; line-height: 1.7; color: #26372d; }
.dossier-content p { margin-bottom: 14px; }
.dossier-content ul { margin: 0 0 14px 22px; }
.dossier-content a { color: #55701f; font-weight: 700; }

/* --- ЧОРНИЙ СПИСОК --- */
.cs-list { display: flex; flex-direction: column; gap: 12px; }

.cs-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-pine);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cs-player { display: flex; align-items: center; gap: 16px; }

.cs-player img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  image-rendering: pixelated;
  background: #09130e;
}

.cs-nick { font-weight: 600; font-size: 16px; }
.cs-reason { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.cs-date { font-size: 13px; color: var(--text-muted); }

.cs-empty {
  padding: 48px 24px;
  border: 1px solid var(--border-pine);
  border-radius: 10px;
  background: var(--bg-panel);
  text-align: center;
}

.cs-empty span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border: 1px solid #397151;
  border-radius: 50%;
  color: #4ade80;
  font-size: 20px;
}

.cs-empty strong { display: block; font-size: 16px; }
.cs-empty p { margin-top: 7px; color: var(--text-muted); font-size: 13px; }

/* --- КНОПКА НАЗАД ТА ФУТЕР --- */
.back-home-link {
  display: inline-block;
  margin-top: 32px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
}

.back-home-link:hover { color: var(--accent-gold); }

footer {
  background: #060d09;
  border-top: 1px solid var(--border-pine);
  padding: 60px 32px;
  margin-top: auto;
}

.footer-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 36px;
}

.footer-brand { display: flex; align-items: center; gap: 20px; }

.footer-brand img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
}

.footer-brand > div > div:first-child {
  font-size: 20px !important;
  line-height: 1.4;
}

.footer-brand > div > div:last-child {
  margin-top: 4px;
  font-size: 16px !important;
}

.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }

.footer-links a, .footer-links button {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 0;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.footer-links a:hover, .footer-links button:hover { color: var(--text-main); }

@media (max-width: 1000px) {
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mayor-profile { grid-template-columns: 180px minmax(0, 1fr) 270px; }
  .mayor-identity-card { padding-right: 18px; padding-left: 18px; }
  .mayor-avatar-frame { width: 125px; height: 125px; }
  .mayor-biography { padding: 42px 28px 36px; }
  .mayor-name-line { flex-direction: column; }
}

@media (max-width: 768px) {
  :root { --header-height: 84px; }
  .nav-container { padding: 0 18px; }
  .brand-btn { gap: 10px; }
  .brand-btn img { width: 43px; height: 43px; }
  .brand-btn span { font-size: 13px; }
  .hero-content { flex-direction: column-reverse; text-align: center; padding-top: 90px; }
  .hero-buttons { justify-content: center; }
  .nav-links { gap: 12px; }
  .nav-item { padding: 9px 2px; font-size: 12px; }
  .city-info { padding: 70px 18px 76px; }
  .city-info-board { grid-template-columns: 1fr; gap: 36px; padding: 42px 30px; }
  .city-identity { padding: 0 0 34px; border-right: 0; border-bottom: 1px solid var(--border-pine); }
  .city-crest-frame { width: 185px; height: 185px; }
  .city-title-row { align-items: flex-end; }
  .city-info-cards { grid-template-columns: 1fr; }
  .city-info-card { min-height: 0; }
  .city-info-actions { flex-wrap: wrap; }
  .city-text-link { width: 100%; margin-left: 0; text-align: left; }
  .mayor-section { padding: 72px 18px 78px; }
  .mayor-section-heading { align-items: flex-start; flex-direction: column; }
  .mayor-profile { grid-template-columns: 180px minmax(0, 1fr); }
  .mayor-identity-card { border-bottom: 1px solid var(--border-pine); }
  .mayor-biography { padding: 38px 28px; border-bottom: 1px solid var(--border-pine); }
  .mayor-skin-panel { grid-column: 1 / -1; height: 580px; border-left: 0; }
  .mayor-skin-panel > img { width: 820px; }
  .archive-page-header { align-items: flex-start; }
  .dossier-view { padding: 34px 28px; }
  footer { padding: 46px 22px; }
  .footer-brand { gap: 16px; }
  .footer-brand img { width: 58px; height: 58px; }
  .footer-brand > div > div:first-child { font-size: 17px !important; }
  .footer-brand > div > div:last-child { font-size: 14px !important; }
  .footer-links { gap: 21px; }
  .footer-links a, .footer-links button { font-size: 15px; }
}

@media (max-width: 640px) {
  .archive-page-header { flex-direction: column; gap: 18px; }
  .archive-counter { align-self: flex-start; }
  .archive-grid { grid-template-columns: 1fr; }
  .archive-document { min-height: 360px; }
  .mayor-profile { grid-template-columns: 1fr; }
  .mayor-identity-card { min-height: 390px; border-right: 0; }
  .mayor-biography { padding: 34px 24px; }
  .mayor-facts { grid-template-columns: 1fr; }
  .mayor-skin-panel { grid-column: auto; height: 560px; }
}

@media (max-width: 520px) {
  :root { --header-height: 76px; }
  .nav-container { padding: 0 12px; }
  .brand-btn img { width: 38px; height: 38px; }
  .brand-btn span { display: none; }
  .nav-links { gap: 8px; }
  .nav-item { padding: 8px 1px; font-size: 10px; }
  .hero-section-divider { height: 60px; gap: 10px; padding: 0 14px; }
  .hero-section-divider span { padding-right: 12px; padding-left: 12px; font-size: 7px; }
  .city-info-kicker::after, .city-info-code { display: none; }
  .city-info-board { padding: 38px 22px; }
  .city-title-row { align-items: flex-start; flex-direction: column; }
  .city-profile h2 { font-size: 23px; }
  .city-facts { grid-template-columns: 1fr; }
  .city-info-actions .btn { width: 100%; }
  .mayor-office-mark { display: none; }
  .mayor-verified { white-space: normal; }
  .mayor-skin-panel { height: 510px; }
  .mayor-skin-panel > img { width: 730px; }
  .mayor-skin-base { align-items: flex-start; flex-direction: column; }
  .dossier-view { padding: 28px 20px; }
  .dossier-official-head { align-items: flex-start; padding-right: 30px; }
  .dossier-official-head img { width: 46px; height: 46px; }
  .dossier-official-head strong { font-size: 13px; }
  .dossier-header h2 { font-size: 18px !important; }
  footer { padding: 42px 18px; }
  .footer-container { align-items: flex-start; flex-direction: column; gap: 28px; }
}
