.map .page {
  max-width: 100%;
}

.map-section .visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.map-section {
  overflow: clip;
}

.map-section .map-container {
  position: relative;
  aspect-ratio: 1920/1080;
  width: 100%;
  height: auto;
}

.map-section .map-container .map-full, .map-horseka {
  position: absolute;
  inset: 0;
  aspect-ratio: 1920/1080;
  height: 100%;
  transition: opacity 0.18s;
}

.map-section .map-container .map-full {
  opacity: 0;
  pointer-events: none;
}

.map-section .map-container .map-horseka {
  pointer-events: auto;
}

.map-section .map-container .map-horseka.is_hidden {
  opacity: 0;
  pointer-events: none;
}

.map-section .map-container .map-background {
  width: 100%;
}

.map-section .map-container .button {
  font-family: 'gilroy';
  font-weight: medium;
  font-size: 16px;
  line-height: 24px;
  padding-inline: 16px;
  padding-block: 8px;
  border-radius: 128px;
  text-decoration: none;
}

.map-section .map-container .pin-horseka {
  --pin-color-main: #194986;
  --pin-color-accent: #0A2342;
  cursor: pointer;
}

.map-section .map-container .pin-horseka:hover {
  --pin-color-main: #FC563B;
  --pin-color-accent: #F63719;
}

.map-section .map-container .pin-resort {
  --pin-color-main: #00575B;
  --pin-color-accent: #053A3E;
  cursor: pointer;
}

.map-section .map-container .pin-resort:hover {
  --pin-color-main: #FFBB19;
  --pin-color-accent: #E5A816;
}

.map-section .map-container .logo-animation-text {
  transform-origin: 506px 398px;
}

.map-section .map-container .logo-animation {
  transform-origin: 506px 406px;
}

.map-section .map-container .logo-full .logo-animation-text, .logo-full .logo-animation {
  transition: scale 0.5s ease-in-out;
}

.map-section .map-container .logo-full {
  cursor: pointer;
}

.map-section .map-container .logo-horseka {
  transform: translate(-20px, 80px);
}

.map-section .map-container .logo-ivanovskoye {
  transform: translate(1200px, 300px);
}

.map-section .map-container .logo-full:hover .logo-animation-text {
  scale: 1.06;
}

.map-section .map-container .logo-full:hover .logo-animation {
  scale: 1.03;
}

.map-section .map-container .button-close {
  position: relative;
  left: 50px;
  inline-size: 36px;
  block-size: 36px;
  background-color: #7B7B7B;
  backdrop-filter: blur(24px);
  border-radius: 100%;
  align-self: flex-end;
  border: none;
  outline: none;
  cursor: pointer;
}

.map-section .map-container .button-back {
  position: fixed;
  inset-inline-start: 24px;
  inset-block-start: 24px;
}

.map-section .map-container .button-container {
  display: flex;
  flex-direction: row;
  gap: 4px;
  padding-block-start: 16px;
  padding-block-end: 20px;
}

.map-section .map-container .button-primary {
  background-color: #005E62;
  color: #fff;
  outline: 1px solid #fff;
  transition: background-color 0.3s, color 0.3s, outline-color 0.3s;
}

.map-section .map-container .button-primary:hover {
  background-color: inherit;
  color: #005E62;
  outline-color:#005E62;
}

.map-section .map-container .button-secondary {
  background-color: #EEEEEE;
  color: #000;
  transition: background-color 0.3s, color 0.3s;
}

.map-section .map-container .button-secondary:hover {
  background-color: #005E62;
  color: #fff;
}

.map-section .map-container .popup-container {
  position: fixed;
  background: rgba(0, 0, 0, 0.6);
  overflow: auto;
  display: grid;
  place-items: center;
  padding: clamp(10px, calc(12px + (20 - 12) * ((100vw - 1024px) / (1920 - 1024))), 20px);
  opacity: 0;
}

body:has(.popup[open]) .map-section .map-container .popup-container{
  inset: 0;
  z-index: 54;
  opacity: 1;
}

.map-section .map-container .popup {
  position: absolute;
  inset: 0;
  flex-direction: column;
  max-inline-size: 520px;
  padding: 0;
  border: none;
  border-radius: 24px;
  z-index: 55;
  min-height: min-content;
  margin: auto;
  height: fit-content;
  justify-content: flex-start;
}

.map-section .map-container .popup[open] {
  display: flex;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.map-section .swiper-wrapper {
  align-items: flex-start;
}
.map-section .map-container .popup--content-container {
  padding-inline: 24px;
  padding-block-end: 12px;
  opacity: 0.99;
  z-index: 55;
}

.map-section .map-container .popup .popup-title {
  padding-block-start: 1.3em;
  font-size: 18px;
  line-height: clamp(1.625rem, 1.375rem + 0.52vw, 2rem);
  font-family: 'gilroy';
  font-weight: bold;
}

.map-section .map-container .popup .popup-text {
  font-size: 16px;
  padding-block-start: 0.8em;
  line-height: 1.3em;
  word-spacing: 12px;
  font-family: 'gilroy';
  font-weight: medium;
}

.map-section .map-container .tooltip-container{
  position: fixed;
  pointer-events: none;
  padding: 5px;
}

.map-section .map-container .tooltip {
  font-family: 'gilroy';
  font-weight: bold;
  padding-inline: 15px;
  padding-block: 11.5px;
  border-radius: 9px;
  background-color: #fff;
  font-size: 16px;
  line-height: 1.3em;
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
  width: max-content;
  max-width: 300px;
  transform: translateX(0);
  position: absolute;
}

.map-section .map-container .from_right {
  transform: translateX(30px);
  right: 100%;
}

.map-section .map-container .from_left {
  transform: translateX(-30px);
  left: 100%;
}

.map-section .map-container .from_bottom {
  transform: translate(-50%, 30px);
  bottom: 100%;
}

.map-section .map-container .pin_is_active {
  opacity: 1;
  transform: translateX(0);
}

.map-section .map-container .from_bottom.pin_is_active {
  transform: translate(-50%, 0);
}

.map-section .map-container .swiper {
  inline-size: 100%;
  margin-block-start: -36px;

}

.map-section .map-container .gallery--item {
  object-fit: cover;
  border-radius: 24px;
  aspect-ratio: 16/9;
  height: auto;
}

.map-section .map-container .swiper-pagination {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
  padding-block-end: clamp(1rem, 0.818rem + 0.91vw, 1.5rem);
}

.map-section .map-container .swiper-pagination-bullet-active {
  background: #ffffff;
}

.map-section .map-container .swiper-button-prev svg,
.map-section .map-container .swiper-button-next svg {
  color: #fff;
  width: clamp(3.2em, 0.818em + 0.91vw, 4.8em);
  height: clamp(3.2em, 0.818em + 0.91vw, 4.8em);
}

.map-section .map-container .swiper-button-prev:after,
.map-section .map-container .swiper-button-next:after {
  display: none !important;
}

.map-section .map-container .swiper-button-prev svg {
  transform: rotate(180deg) !important;
}

.map-section .map-container .map-full.is_show {
  opacity: 1;
  pointer-events: auto;
}

.map-section .map-container .logo-tooltip-animation {
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
}

.map-section .map-container .logo-full:hover .logo-tooltip-animation {
  opacity: 1;
  transform: translateY(50px);
}

.map-section .map-container .attraction-bg {
  transition: fill 0.3s;
}

.map-section .map-container .attraction-full:hover .attraction-bg {
  fill: #F63719;
}

.map-section .map-container .attraction-tooltip--text {
  font-family: 'gilroy';
  font-weight: bold;
  font-size: 16px;
}

.map-section .map-container .map-navigation {
  display: none;
  position: fixed;
  left: 24px;
  bottom: 60px;
  max-width: max-content;
  gap: 8px;
  flex-wrap: wrap;
}

.map-section .map-container .button-thirdly {
  background-color: #005E6299;
  color: #fff;
  border: 1px solid #005E62;
  transition: background-color 0.3s, color 0.3s;
}

.map-section .map-container .is-active {
  background-color: #EEEEEEcc;
  color: #000;
  transition: background-color 0.3s, color 0.3s;
}

.map-section .map-container .icon-container {
  display: none;
}

@media(max-width: 1000px) and (orientation: landscape) {
  .map-section .map-container .popup {
    margin-top: 1px;
  }
}

@media(max-width: 768px) {

  .map-section .map-container {
    overflow-x: auto;
    height: 100vh;
    max-height: 100vh;
  }

  .map-section .map-container .map-full, .map-horseka {
    height: 100vh;
    width: auto;
    overflow: auto;
  }

  .map-section .map-container .button-close {
    position: absolute;
    left: auto;
    z-index: 56;
  }

  .map-section .map-container .swiper {
    margin-block-start: 0;
  }

  .map-section .map-container .popup {
    max-inline-size: 96vw;
  }

  .map-section.map-container .popup .popup-text {
    line-height: clamp(1.125rem, 0.767rem + 1.53vw, 1.5rem);
  }

  .map-section .map-container .tooltip {
    opacity: 0;
  }

  .map-section .map-container .logo-horseka, .logo-full {
    display: none;
  }

  .map-section .map-container .button {
    font-size: 13px;
  }

  .map-section .map-container .map-navigation {
    display: flex;
  }

  .map-section .map-container .icon-container {
    display: block;
    position: fixed;
    top: 24px;
    right: 24px;
    width: calc(24px + 16px);
    height: calc(24px + 16px);
    background-color: #ffffffcc;
    border-radius: 50%;
    padding: 8px;
  }

  .map-section .map-container .icon {
    width: 100%;
    height: 100%;
  }

  .map-section .map-container .popup-container {
    place-items: start center;
    height: 100vh;
  }
}

