:root {
  --ft-navy: #020a3f;
  --ft-navy-soft: #111b55;
  --ft-slate: #465d7c;
  --ft-slate-light: #d9e0ea;
  --ft-ink: #101729;
  --ft-muted: #5e6b7d;
  --ft-line: #dce2eb;
  --ft-bg: #f5f7fb;
  --ft-white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ft-ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--ft-bg);
}

body.panel-open {
  overflow: hidden;
}

.school-map {
  display: block;
  min-height: 100dvh;
}

.mobile-menu-button {
  position: fixed;
  z-index: 1001;
  top: 14px;
  left: 86px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ft-white);
  font-weight: 700;
  border: 0;
  border-radius: 8px;
  background: var(--ft-navy);
  box-shadow: 0 8px 22px rgba(2, 10, 63, 0.28);
  cursor: pointer;
}

.mobile-menu-button__icon {
  display: grid;
  gap: 4px;
}

.mobile-menu-button__icon span {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.panel-overlay {
  position: fixed;
  z-index: 1002;
  inset: 0;
  display: block;
  background: rgba(4, 10, 32, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.panel-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.school-map__panel {
  position: fixed;
  z-index: 1003;
  top: 0;
  left: 0;
  width: min(88vw, 380px);
  height: 100dvh;
  max-height: none;
  padding: 24px;
  background: var(--ft-white);
  border-right: 1px solid var(--ft-line);
  box-shadow: 16px 0 36px rgba(2, 10, 63, 0.22);
  overflow-y: auto;
  transform: translateX(-105%);
  transition: transform 220ms ease;
}

.school-map__panel.is-open {
  transform: translateX(0);
}

.school-map__panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--ft-muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-close {
  min-height: 36px;
  padding: 0 12px;
  color: var(--ft-navy);
  font-weight: 700;
  border: 1px solid var(--ft-slate-light);
  border-radius: 8px;
  background: #eef2f8;
  cursor: pointer;
}

.school-map__brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.school-map__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  padding: 6px;
  border: 1px solid var(--ft-line);
  border-radius: 8px;
  background: var(--ft-white);
}

.school-map__brand p {
  margin: 0 0 4px;
  color: var(--ft-muted);
  font-size: 13px;
}

.school-map__brand h1 {
  margin: 0;
  color: var(--ft-navy);
  font-size: 24px;
  line-height: 1.1;
}

.school-map__controls {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.school-map__filter {
  display: grid;
  gap: 8px;
  color: var(--ft-muted);
  font-size: 13px;
  font-weight: 700;
}

.school-map__filter select,
.school-map__filter input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ft-ink);
  border: 1px solid var(--ft-line);
  border-radius: 8px;
  background: var(--ft-white);
  font: inherit;
}

.school-map__filter input:focus,
.school-map__filter select:focus {
  outline: 2px solid rgba(70, 93, 124, 0.28);
  border-color: var(--ft-slate);
}

.school-map__reset {
  min-height: 40px;
  color: var(--ft-navy);
  font-weight: 700;
  border: 1px solid var(--ft-slate-light);
  border-radius: 8px;
  background: #eef2f8;
  cursor: pointer;
}

.school-map__reset:hover,
.school-map__reset:focus {
  outline: 2px solid rgba(2, 10, 63, 0.16);
  border-color: var(--ft-slate);
}

.school-map__stats {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 18px;
  padding: 14px;
  background: #eef2f8;
  border-radius: 8px;
}

.school-map__stats strong {
  color: var(--ft-navy);
  font-size: 28px;
}

.school-map__stats span {
  color: var(--ft-muted);
  font-size: 14px;
}

.school-map__list {
  display: grid;
  gap: 10px;
}

.project-card {
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--ft-line);
  border-radius: 8px;
  background: var(--ft-white);
  cursor: pointer;
}

.project-card:hover,
.project-card:focus {
  outline: 2px solid rgba(70, 93, 124, 0.22);
  border-color: var(--ft-slate);
}

.project-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ft-navy);
  font-size: 15px;
}

.project-card span {
  display: block;
  color: var(--ft-muted);
  font-size: 13px;
}

.empty-state {
  margin: 0;
  padding: 14px;
  color: var(--ft-muted);
  border: 1px dashed var(--ft-slate-light);
  border-radius: 8px;
  background: #f8fafc;
}

.school-map__canvas {
  height: 100dvh;
  min-height: 100dvh;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
}

.ft-marker {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  background: var(--ft-white);
  border: 3px solid var(--ft-white);
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
}

.ft-marker img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.ft-marker--rc {
  border-color: var(--ft-navy);
  border-radius: 8px;
}

.ft-marker--fenix {
  padding: 2px;
  border-color: #e35d20;
  background: #fff7f1;
  border-radius: 10px;
}

.ft-marker--fenix img {
  object-fit: contain;
  border-radius: 7px;
}

.ft-popup {
  width: 270px;
}

.ft-popup img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 10px;
  object-fit: cover;
  border-radius: 8px;
}

.ft-popup h2 {
  margin: 0 0 6px;
  color: var(--ft-navy);
  font-size: 17px;
  line-height: 1.2;
}

.ft-popup p {
  margin: 0 0 8px;
  color: var(--ft-muted);
  line-height: 1.4;
}

.ft-popup a {
  display: inline-block;
  color: var(--ft-navy);
  font-weight: 700;
  text-decoration: none;
}

.leaflet-popup-content {
  margin: 12px;
}

@media (max-width: 820px) {
  .mobile-menu-button {
    left: 86px;
  }

  .school-map__panel {
    width: min(88vw, 360px);
    padding: 18px;
  }

  .school-map__brand {
    margin-bottom: 16px;
  }

  .school-map__logo {
    width: 54px;
    height: 54px;
  }

}
