:root {
  --color-bg: #f5f5f5;
  --color-white: #ffffff;
  --color-text: #111111;
  --color-muted: #6e6e6e;
  --color-border: #cfcfcf;
  --color-green: #187229;
  --color-green-dark: #125c20;
  --container-width: 1480px;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--color-text);
  line-height: 1.5;
  position: relative;
  background: transparent;
  zoom: 0.9;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("bgg1.png") center top / cover no-repeat;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(245, 245, 245, 0.88);
  z-index: -1;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
select,
input {
  font: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
#section-header {
  background: var(--color-white);
  border-bottom: 1px solid #ececec;
  position: relative;
  z-index: 300;
}

.site-header {
  padding: 22px 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.brand-logo img {
  width: 260px;
  height: auto;
  object-fit: contain;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.05;
  color: #111;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 54px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 18px;
  font-weight: 600;
  color: #111;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.65;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.lang-switch {
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.header-search-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #111;
  transition: background 0.2s ease;
}

.header-search-btn:hover {
  background: #f1f1f1;
}

/* LANG DROPDOWN */
.lang-switch {
  position: relative;
}

.lang-current {
  user-select: none;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 8px 0;
  display: none;
  z-index: 100;
  min-width: 80px;
}

.lang-switch.open .lang-dropdown {
  display: block;
}

.lang-option {
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 15px;
}

.lang-option:hover {
  background: #f0f0f0;
}

/* SEARCH SUGGESTIONS */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  margin-top: -10px;
  padding: 10px 0;
  display: none;
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}

.suggest-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.2s;
  color: #333;
}

.suggest-item:hover {
  background: #f5f5f5;
}

.suggest-title {
  font-weight: 500;
  font-size: 15px;
}

.suggest-title mark {
  background: rgba(24, 114, 41, 0.15);
  color: #187229;
  font-weight: 700;
}

.suggest-cat {
  font-size: 12px;
  color: #888;
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 12px;
}

.suggest-empty {
  padding: 12px 18px;
  color: #888;
  text-align: center;
  font-size: 15px;
}




/* MAIN */
#section-main {
  padding: 28px 0 70px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 16px;
  margin-bottom: 18px;
  color: #1d1d1d;
}

.breadcrumbs a {
  color: #4d76a8;
  font-weight: 600;
}

.map-hero-head {
  margin-bottom: 24px;
}

#section-header {
  background: var(--color-white);
  border-bottom: 1px solid #ececec;
  position: relative;
  z-index: 300;
}

.search-dropdown-floating {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-18px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.search-dropdown-floating.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.search-floating-container {
  display: flex;
  justify-content: flex-end;
}

.search-panel {
  width: 100%;
  max-width: 520px;
  min-height: 64px;
  background: #f8f8f8;
  border: 1px solid #bdbdbd;
  border-top: none;
  border-radius: 0 0 34px 34px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.search-panel-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #111;
  font-family: inherit;
}

.search-panel-input::placeholder {
  color: #ababab;
}

.search-panel-icon,
.search-panel-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #111;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.search-panel-icon:hover,
.search-panel-close:hover {
  background: #ececec;
}

.page-title {
  font-size: 30px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
  margin-bottom: 10px;
}

.map-subtitle {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  font-size: 17px;
  line-height: 1.65;
  color: #666;
}

/* MAP SHELL */
.map-shell {
  position: relative;
  border-radius: 34px;
  border: 1px solid #dddddd;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
}

.map-frame-wrap {
  overflow: hidden;
  border-radius: 24px;
}

.main-map-frame {
  width: 100%;
  height: 720px;
  border: 0;
  display: block;
  background: #ddd;
  z-index: 1;
}

#modal {
  z-index: 999999;
}

.map-top-actions {
  position: absolute;
  top: 30px;
  right: 30px;
  z-index: 20;
}

.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  background: var(--color-green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}

.filter-toggle-btn:hover {
  background: var(--color-green-dark);
  transform: translateY(-1px);
}

.map-filter-panel {
  position: absolute;
  top: 86px;
  right: 30px;
  width: 320px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dddddd;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
  z-index: 19;
}

.map-filter-panel.hidden {
  display: none;
}

.filter-group {
  margin-bottom: 14px;
}

.filter-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
}

.filter-group select,
.filter-group input {
  width: 100%;
  height: 46px;
  border: 1px solid #cccccc;
  background: #f8f8f8;
  border-radius: 16px;
  padding: 0 14px;
  color: #222;
  outline: none;
}

.period-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.filter-footer {
  padding-top: 10px;
  border-top: 1px solid #ebebeb;
}

.found-count {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

.filter-btn {
  flex: 1;
  height: 44px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.filter-btn.primary {
  background: var(--color-green);
  color: #fff;
}

.filter-btn.primary:hover {
  background: var(--color-green-dark);
}

.filter-btn.secondary {
  background: #f1f1f1;
  color: #222;
  border: 1px solid #d8d8d8;
}

.filter-btn.secondary:hover {
  background: #e7e7e7;
}

.map-stats-overlay {
  position: absolute;
  left: 30px;
  bottom: 30px;
  display: flex;
  gap: 14px;
  z-index: 5;

  pointer-events: none;
  /* ВАЖНО */
}

.map-stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-marker {
  width: 16px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.map-stat-pill {
  min-width: 190px;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dbdbdb;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.map-stat-pill strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}

.map-stat-pill span {
  font-size: 14px;
  color: #505050;
}

/* ACCORDIONS */
.object-lists-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.object-accordion {
  border-radius: 28px;
  border: 1px solid #d9d9d9;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.object-accordion-header {
  width: 100%;
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  color: #111;
}

.object-accordion-header span:first-child {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.accordion-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.object-count {
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.accordion-arrow {
  font-size: 22px;
  line-height: 1;
  color: #555;
  transition: transform 0.25s ease;
}

.object-accordion.open .accordion-arrow {
  transform: rotate(180deg);
}

.object-accordion-body {
  display: none;
  max-height: 460px;
  overflow-y: auto;
  padding: 0 22px 22px;
  flex-direction: column;
  gap: 10px;
}

.object-accordion.open .object-accordion-body {
  display: flex;
}

.object-accordion-body a {
  color: #3e4e70;
  font-size: 15px;
  line-height: 1.45;
  transition: color 0.2s ease, transform 0.2s ease;
}

.object-accordion-body a:hover {
  color: var(--color-green);
  transform: translateX(2px);
}

.object-accordion-body::-webkit-scrollbar {
  width: 8px;
}

.object-accordion-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 20px;
}

.object-accordion-body::-webkit-scrollbar-thumb {
  background: #b8b8b8;
  border-radius: 20px;
}

.object-accordion-body::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

.object-accordion-header span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accordion-icon {
  width: 16px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

/* FOOTER */
#section-footer {
  background: #1b4f25;
  color: #fff;
  padding: 56px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-logo .logo-text {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.footer-links {
  display: flex;
  gap: 70px;
}

.link-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-col a {
  color: #fff;
  font-size: 16px;
  transition: opacity 0.2s ease;
}

.link-col a:hover {
  opacity: 0.7;
}

/* ADAPTIVE */
@media (max-width: 1280px) {
  .main-nav {
    gap: 28px;
  }

  .object-lists-grid {
    grid-template-columns: 1fr;
  }

  .main-map-frame {
    height: 640px;
  }
}

@media (max-width: 1024px) {
  .header-container {
    flex-wrap: wrap;
    justify-content: center;
  }

  .brand-block {
    width: 100%;
    justify-content: center;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .page-title {
    font-size: 26px;
  }

  .map-filter-panel {
    width: calc(100% - 36px);
    right: 18px;
    top: 78px;
  }

  .map-stats-overlay {
    left: 18px;
    right: 18px;
    bottom: 18px;
    flex-wrap: wrap;



  }

  .map-stat-pill {
    min-width: 160px;
  }
}

@media (max-width: 768px) {
  .brand-block {
    flex-direction: column;
    text-align: center;
  }

  .brand-logo img {
    width: 220px;
  }

  .brand-title {
    font-size: 20px;
  }

  .main-nav {
    gap: 16px 24px;
  }

  .nav-link {
    font-size: 16px;
  }

  .breadcrumbs {
    font-size: 14px;
  }

  .page-title {
    font-size: 23px;
  }

  .map-subtitle {
    font-size: 15px;
  }

  .map-shell {
    padding: 12px;
    border-radius: 24px;
  }

  .main-map-frame {
    height: 520px;
  }

  .map-top-actions {
    top: 20px;
    right: 20px;
  }

  .filter-toggle-btn {
    padding: 12px 18px;
    font-size: 14px;
  }

  .map-stats-overlay {
    position: static;
    margin-top: 14px;
    gap: 10px;
  }

  .map-stat-pill {
    flex: 1;
    min-width: 0;
  }

  .object-accordion-header {
    padding: 18px;
  }

  .object-accordion-header span:first-child {
    font-size: 17px;
  }

  .object-accordion-body {
    padding: 0 18px 18px;
  }

  .footer-links {
    flex-direction: column;
    gap: 24px;
  }
}