/* Mobile corrections for the existing PRIME PARK homepage. */
.fnsh__finishing--container:has(> .fnsh__finishing--pagination) .swiper-slide img {
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .fnsh__finishing--container:has(> .fnsh__finishing--pagination) .swiper-slide {
    transition-duration: 0s !important;
  }
}

@media (max-width: 768px) {
  /* A single 16:9 film occupies its own frame, not the entire viewport. */
  .fnsh__finishing:has(> .fnsh__finishing--container.--video) {
    height: auto;
  }

  .fnsh__finishing:has(> .fnsh__finishing--container.--video) > .fnsh__finishing--header,
  .fnsh__finishing:has(> .fnsh__finishing--container.--video) > .fnsh__finishing--header.fixed {
    position: relative;
    top: auto;
  }

  .fnsh__finishing > .fnsh__finishing--container.--video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    padding: 0;
  }

  .fnsh__finishing > .fnsh__finishing--container.--video > .fnsh__finishing--video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .fnsh__finishing > .fnsh__finishing--container.--video > .fnsh__finishing--sound {
    top: 12px;
  }

  /* White Box uses square mobile photographs. Let the photo set the height. */
  .fnsh__finishing:has(.fnsh__finishing--pagination) { height: auto; }
  .fnsh__finishing:has(.fnsh__finishing--pagination) > .fnsh__finishing--header {
    position: relative;
    top: auto;
  }
  .fnsh__finishing > .fnsh__finishing--container:has(> .fnsh__finishing--pagination) {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    padding: 0;
  }
  .fnsh__finishing--container:has(> .fnsh__finishing--pagination) > .swiper-wrapper {
    position: absolute;
    inset: 0;
    height: 100%;
  }
  .fnsh__finishing--container:has(> .fnsh__finishing--pagination) picture,
  .fnsh__finishing--container:has(> .fnsh__finishing--pagination) img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #section-2, #section-13, #section-9, #lift-hall, #section-10, #section-17, #living {
    scroll-margin-top: 72px;
  }
}

/* The pauses at a section boundary and between a heading and its copy serve different purposes. */
main {
  --prime-section-space: clamp(48px, 5vw, 72px);
  --prime-heading-gap: 24px;
}
@media (max-width: 1023px) {
  main { --prime-heading-gap: 20px; }
}
@media (max-width: 767px) {
  main { --prime-section-space: 32px; --prime-heading-gap: 12px; }
}

#section-2, #section-13, #section-10, #lift-hall, #section-17, #living, #parking.screen-parking {
  padding-block: var(--prime-section-space);
}

#section-2 h1, #section-13 h2, #section-17 h2, #living .title, #parking.screen-parking .title {
  margin-block-end: var(--prime-heading-gap);
}

#section-9 { padding-block: var(--prime-section-space) 0; }
#section-15 { padding-block: var(--prime-section-space); }
#section-15 .section-15__title {
  margin: 0;
  line-height: 1.4;
  text-wrap: balance;
}
@media (max-width: 767px) {
  .fnsh_section-16 .plan-choices > summary.plan-drop__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    /* Keep the label and arrow together, clear of the floating call button. */
    padding-inline: clamp(12px, calc(100% - 328px), 80px) 80px;
  }
  .fnsh_section-16 .plan-choices > summary.plan-drop__label::before {
    position: static;
    order: 1;
    flex: 0 0 16px;
    height: 10px;
    margin: 0;
  }
}
#section-9 + .fnsh__finishing--title__container .section-13__title {
  margin-block: 0;
  padding-block: 0;
}
#section-9 + .fnsh__finishing--title__container .service_title-list {
  padding-block: var(--prime-heading-gap) var(--prime-section-space);
}

@media (min-width: 768px) {
  #section-13 .section-13__items.--grid {
    display: grid;
    row-gap: 16px;
  }
  #section-13 .section-13__items.--grid .section-13__item { margin-block: 0; }
}

@media (max-width: 767px) {
  #section-4, .screen-park-description { padding-block: var(--prime-section-space); }
  #section-13 .section-13__title { line-height: 1.25; }
  #section-13 .slider-2 { padding-bottom: 0; }
  #section-13 .slider-2__item .section-13__item { margin-block: 0; }
  #section-13 .slider-2__item .section-13__item + .section-13__item { margin-top: 16px; }
  #section-13 .slider-2 > .slider-2__pagin {
    position: static;
    margin: 16px 0 0;
    min-height: 12px;
    line-height: 12px;
  }
}

/* Replace the grey strip in each gallery which previously rendered it. */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .fnsh__finishing .fnsh__finishing--container > .fnsh__finishing--pagination,
  .swiper-fitness__wrap .swiper-fitness > .swiper-pagination,
  :is(#lobby, #lift-hall-gallery) .swiper-lobby > .swiper-pagination {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    transform: none;
    width: 100%;
    padding: 14px 0 6px;
    background: linear-gradient(transparent, rgb(0 0 0 / 48%));
    gap: 0;
    pointer-events: none;
    z-index: 2;
  }
  .fnsh__finishing .fnsh__finishing--pagination .swiper-pagination-bullet,
  .swiper-fitness__wrap .swiper-pagination .swiper-pagination-bullet,
  :is(#lobby, #lift-hall-gallery) .swiper-pagination .swiper-pagination-bullet {
    pointer-events: auto;
    opacity: 1;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    display: inline-grid;
    place-items: center;
  }
  .fnsh__finishing .fnsh__finishing--pagination .swiper-pagination-bullet::before,
  .swiper-fitness__wrap .swiper-pagination-bullet::before,
  :is(#lobby, #lift-hall-gallery) .swiper-pagination-bullet::before {
    content: "";
    width: 6px;
    height: 6px;
    border: 1px solid #fff;
    border-radius: 50%;
    background: rgb(0 0 0 / 32%);
    box-shadow: 0 0 2px rgb(0 0 0 / 80%);
  }
  .fnsh__finishing .fnsh__finishing--pagination .swiper-pagination-bullet-active::before,
  .swiper-fitness__wrap .swiper-pagination-bullet-active::before,
  :is(#lobby, #lift-hall-gallery) .swiper-pagination-bullet-active::before {
    background: white;
  }
}

/* At 768px the site's script already uses the tablet tab bar. */
@media (width: 768px) {
  /* The legacy grid and slider both hide on this boundary. */
  #section-13 .section-13__items.--grid { display: grid !important; }

  .fnsh__finishing .fnsh__finishing--mobile__title--action { display: none; }
  .fnsh__finishing .fnsh__finishing--title__container.triple {
    grid-auto-flow: column;
    grid-template-columns: repeat(3, 1fr);
    justify-content: stretch;
  }
  .fnsh__finishing .fnsh__finishing--title {
    width: auto;
    order: 0 !important;
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 359px) {
  /* Off-screen panels must not increase the width of the layout viewport. */
  .main-wrap { overflow-x: clip; }
  .header-line, .screen-awards, .popup-map, .module-route-v2 {
    max-width: 100vw;
    box-sizing: border-box;
  }
}

#contacts.contacts { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
#contacts .contacts-text { padding-top: 28px; }
@media (max-width: 767px) {
  #contacts .contacts-text {
    padding-top: 20px;
    /* The floating phone occupies the lower right corner. */
    padding-inline: 52px;
  }
}

/* The presentation is one PDF link between the parking film and the news. */
#presentation.module-presentation { height: auto; }
#presentation .block_wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  height: auto;
  padding: var(--prime-section-space) clamp(24px, 8vw, 160px);
  /* The original tablet and phone rules set this property with !important. */
  padding-bottom: var(--prime-section-space) !important;
}
#presentation .text_block { width: auto; }
#presentation .text_block_text { line-height: 1.16; }
#presentation .logo_block img { display: block; }
#presentation, #presentation .block_wrap, #presentation .text_block,
#presentation .text_block_text, #presentation .logo_block img { transition: none; }

@media (max-width: 767px) {
  #presentation .block_wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--prime-heading-gap);
    justify-items: start;
  }
  #presentation .logo_block { order: -1; }
  #presentation .logo_block img {
    width: 64px !important;
    height: auto !important;
    aspect-ratio: 291 / 323;
  }
}

/* Keep both four-fact groups in the original rail. Sticky stays inside the facade. */
@media (min-width: 768px) {
  main > .section-5 { display: flex; flex-direction: row; align-items: flex-start; }
  .section-5 > .section-5__left,
  .section-5 > .section-5__left.fixed,
  .section-5 > .section-5__left.bottom {
    order: -1; position: sticky; top: 0; bottom: auto;
    flex-shrink: 0;
    height: 100vh !important; height: 100svh !important;
    box-sizing: border-box;
    justify-content: space-evenly;
  }
  .section-5 > .section-5__right { flex: 1 1 0; min-width: 0; margin-left: 0; }
  .section-5__right picture, .section-5__right img { display: block; width: 100%; }
  .section-5__left .section-5__block-item { margin-block: 0; }
}
@media (min-width: 768px) and (max-height: 780px) {
  .section-5 .section-5__block-num { font-size: clamp(32px, 8vh, 76px); line-height: 1.05; }
  .section-5 .section-5__block-text { font-size: clamp(13px, 2.2vh, 18px); line-height: 1.25; }
}
/* In a very short window visitors can scroll the entire original list. */
@media (min-width: 768px) and (max-height: 480px) {
  .section-5 > .section-5__left,
  .section-5 > .section-5__left.fixed,
  .section-5 > .section-5__left.bottom {
    position: static; height: auto !important; align-self: stretch;
    justify-content: space-evenly; gap: 16px; padding-block: 20px;
  }
  .section-5 .section-5__block-item { display: block !important; opacity: 1 !important; }
  .section-5 > .section-5__right { position: relative; align-self: stretch; }
  .section-5__right picture, .section-5__right img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
}
@media (orientation: landscape) and (max-height: 540px) {
  html, body { background-color: #000; }
  .header .header-line { height: 52px; }
  .header .burger { top: 16px; left: max(16px, env(safe-area-inset-left)); }
  .header .main_logo { top: 12px; left: calc(max(16px, env(safe-area-inset-left)) + 48px); width: 104px; }
  .header .main_logo img { width: 100%; }
  .header .phone.desktop { top: 7px; right: max(14px, env(safe-area-inset-right)); width: auto; height: 38px; }
  .header .phone .phone-links { height: 38px; white-space: nowrap; }
  .header .phone-links__item { margin-right: 12px; vertical-align: middle; }
  .header .phone-links__item-num { font-size: 19px; line-height: 22px; }
  .header .phone-links__item-text { margin-top: 2px; font-size: 9px; line-height: 11px; }
  .header .svg_header-tg, .header .svg_header-tg svg { width: 34px; height: 34px; vertical-align: middle; }
  .header .phone.desktop .phone-links > .btn.phone-links__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 108px; width: auto; height: 36px; padding: 0 12px; font-size: 11px; line-height: 1.15; vertical-align: middle; }
  .main-wrap .phone-call { right: max(16px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); }
  main > #section-9 { padding-block: clamp(12px, 4vh, 22px) 0; }
  #section-9 .section-13__title { font-size: clamp(20px, 3.2vw, 28px); line-height: 1.2; }
  main > #section-9 + .fnsh__finishing--title__container .service_title-list {
    padding-block: 4px 8px;
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }
  #section-9 + .fnsh__finishing--title__container .fitness-title { line-height: 36px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .fitness-tabs-swiper .swiper-wrapper { justify-content: safe center; }
  .fitness-tabs-swiper .swiper-slide { font-size: max(12px, 1.083vw); }
}
/* Reserve the gallery geometry before Swiper initializes or decodes its first image. */
#slider .swiper-fitness__wrap, #lobby .swiper-lobby, #lift-hall-gallery .swiper-lobby {
  aspect-ratio: 16 / 9;
}
#slider .swiper-fitness__wrap { background: center / cover no-repeat url('/include/NEW2/fitness-awards-20261203/01-01.webp'); }
#slider .swiper-fitness, #lobby .swiper-slide img, #lift-hall-gallery .swiper-slide img {
  width: 100%; height: 100%; object-fit: cover;
}
#section-14-new { position: relative; }
.prime-frame-cover {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 1; transition: opacity 120ms linear;
}
.prime-frame-cover.is-playing { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .prime-frame-cover {transition: none;} }
@media (min-width: 768px) {
  .fnsh__finishing .fnsh__finishing--header .fnsh__finishing--title__container.triple {
    display: grid; width: 100%; max-width: none; margin-inline: 0;
    padding-inline: 0; grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch; gap: 0;
  }
  .fnsh__finishing .fnsh__finishing--header .fnsh__finishing--title__container.triple > .fnsh__finishing--title {
    width: 100%; min-width: 0; max-width: none; box-sizing: border-box;
    justify-self: stretch; text-align: center;
  }
}

/* The gallery header sits in normal flow. Scrolling up must not translate it over the film. */
.fnsh__finishing:has(> .fnsh__finishing--container.--video) > .fnsh__finishing--header {
  transform: none !important;
}

/* Inline showroom films retain the full frame in both orientations. */
  /* A single 16:9 film occupies its own frame, not the entire viewport. */
  .fnsh__finishing:has(> .fnsh__finishing--container.--video) {
    height: auto;
  }

  .fnsh__finishing:has(> .fnsh__finishing--container.--video) > .fnsh__finishing--header,
  .fnsh__finishing:has(> .fnsh__finishing--container.--video) > .fnsh__finishing--header.fixed {
    position: relative;
    top: auto;
  }

  .fnsh__finishing > .fnsh__finishing--container.--video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    padding: 0;
  }

  .fnsh__finishing > .fnsh__finishing--container.--video > .fnsh__finishing--video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .fnsh__finishing > .fnsh__finishing--container.--video > .fnsh__finishing--sound {
    top: 12px;
  }

