body {
  margin: 0;
  padding: 0;
}

@keyframes blinking-project {
  0% {
    fill: rgba(242, 42, 42, 1);
  }
  50% {
    fill: rgba(242, 42, 42, 0);
  }
  100% {
    fill: rgba(242, 42, 42, 1);
  }
}

@keyframes blinking-region {
  0% {
    transform: translate(0, 0);
    filter: url(#filter-shadow-1);
  }
  100% {
    fill: rgb(230, 97, 97);
    transform: translate(0px, -5px);
    filter: url(#filter-shadow-2);
  }
}
@keyframes active-text-doth {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(0px, -5px);
  }
}

.map-kaz {
  position: relative;
  width: 100%;
}

.map-kaz a {
  outline: 0;
}

.map-kaz svg {
  top: 0;
  margin-left: 0;
  height: 100%;
  width: 100%;
  transition: 0.5s ease;

  filter: url(#filter-shadow-svg);
}

.map-kaz .region {
  opacity: 1;
  fill: #dee6f4;
  stroke: #a5a5a5;
  stroke-width: 1;
  stroke-linejoin: round;
  transition: 0.3s ease;
}
.map-kaz .region.akmol,
.map-kaz .region.kost,
.map-kaz .region.actobe,
.map-kaz .region.pavlodar {
  opacity: 1;
  fill: #dee6f4;
  stroke: #8a0101;
}
.map-kaz .region.akmol:hover,
.map-kaz .region.kost:hover,
.map-kaz .region.actobe:hover,
.map-kaz .region.pavlodar:hover {
  transition: opacity 0.2s ease;
  opacity: 1;
  cursor: pointer;
  fill: rgb(230, 97, 97);
  stroke: #812f2f;
  transition: 0.5s ease;
}
.map-kaz .region.active {
  animation: blinking-region 1s alternate;
  transform: translate(0px, -5px);
  stroke: #812f2f;
  filter: url(#filter-shadow-2);
  fill: rgb(230, 97, 97);
}

.map-kaz .project.promising {
  fill: #7a5b03;
  transition: 0.5s ease;
}
.map-kaz .project.fez {
  fill: #7b7d7a;
  transition: 0.5s ease;
}
.map-kaz .project.implemented {
  fill: #2e95ab;
  transition: 0.5s ease;
}
.map-kaz .project.acting {
  fill: #508331;
  transition: 0.5s ease;
}

.map-kaz .project:hover {
  fill: #f22a2a;
}
.map-kaz .project.active {
  animation: blinking-project 1s infinite;
}

.map-kaz .description {
  display: none;
  position: absolute;
  background: #fff;
  padding: 10px;
  box-sizing: border-box;
  width: 28%;
  min-width: 200px;
  height: auto;
  max-height: 400px;
  box-shadow: 0 0 20px 10px #ccc;
  left: 30px;
  top: 30px;
  font-family: sans-serif;
  text-align: left;
  overflow: auto;
}

.map-kaz svg.open,
.map-kaz .legend.open {
  width: 70%;
  margin-left: 30%;
}

.map_region-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: #424242;
}

.map_descr {
  border: 1px solid #ccc;
  padding: 5px;
  margin: 5px 0;
  font-size: 1rem;
}
.map_descr.fez {
  border-color: #7b7d7a;
  background: #e6e6e6;
}
.map_descr.implemented {
  border-color: #2e95ab;
  background: #d4f7ff;
}
.map_descr.acting {
  border-color: #ddd;
  background: #f4f3f4;
}
.map_descr.promising {
  border-color: #7a5b03;
  background: #fff2ce;
}
.map_project-title,
.map_project-title a {
  color: #5e5e5e;
  font-size: 1rem;
  text-decoration: none;
}
.map_project-title a:hover {
  text-decoration: none;
  color: #373737;
}
.map_projectType-title {
  font-weight: 500;
  color: #777;
  font-size: 1rem;
  font-style: italic;
}

.legend .icon {
  background: #7e7e7e;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
}
.legend {
  text-align: center;
}
.legend__block {
  display: inline-block;
  margin: 10px;
  color: #555;
  font-size: 1.2rem;
}
.legend .icon.fez {
  background: #7e7e7e;
}
.legend .icon.acting {
  background: #538335;
}
.legend .icon.implemented {
  background: #149dbb;
}
.legend .icon.promising {
  background: #7c6100;
}
.svg-text {
  font-size: 18px;
  text-align: end;
  text-anchor: end;
  fill: #000;
  -inkscape-font-specification: "sans-serif Bold";
  font-family: sans-serif;
  font-weight: bold;
  font-style: normal;
  font-stretch: normal;
  font-variant: normal;
  text-transform: uppercase;
  transition: 0.5s ease;
  /*stroke:#57d8ff;*/
  stroke-opacity: 1;
  stroke-width: 1.1;
  stroke-miterlimit: 4;
  stroke-dasharray: none;
}
svg .svg-text.active {
  animation: active-text-doth 1s alternate;
  transform: translate(0px, -20px);
}
svg .project.open-region {
  animation: active-text-doth 1s alternate;
  transform: translate(0px, -20px);
}

@media (max-width: 992px) {
  .map-kaz .description {
    position: relative;
    width: 90%;
    margin: 0 auto;
    box-shadow: 0 0 8px 5px #ccc;
    max-height: 100%;
    left: 0;
  }
  .map-kaz svg.open,
  .map-kaz .legend.open {
    width: 100%;
    margin-left: 0;
  }
  .legend__block {
    font-size: 0.8rem;
  }
}
