@media screen and (max-width: 596px) {
    .no-phone {
        display:none !important;
    }
}

@media screen and (min-width: 596px) {
    .only-phone {
        display:none !important;
    }
}


.apartment-layouts__image_small .box {
    width: 29.06rem;
    height: 20rem;
}
@media screen and (max-width: 992px) {
    .apartment-layouts__image_small .box {
        width: 12.38rem;
        height: 8.38rem;
    }
}

#preloader {
    position: fixed; /* Фиксированное положение, чтобы перекрыть весь экран */
    top: 0;
    left: 0;
    width: 100vw; /* Полная ширина экрана */
    height: 100vh; /* Полная высота экрана */
    background-color: rgba(51, 52, 57, 1); /* Темный фон */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Высокий слой, чтобы быть поверх контента */
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none; /* Избегает взаимодействий во время исчезновения */
}

.logo-preloader img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    z-index: 10;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    transform: translate(-50%, -50%);
    border: 3px solid transparent;
    border-top: 3px solid #ead587;
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

#site-content.hidden {
    display: none;
}

@media screen and (max-width: 992px) {
    .footer__socials p {padding-left: 15px;}
}


.main-screen__video::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: -webkit-gradient(
      linear,
      left bottom,
      left top,
      from(rgba(20, 21, 24, 0.35)),
      color-stop(33.17%, rgba(20, 21, 24, 0.42)),
      color-stop(70%, rgba(20, 21, 24, 0.14)),
      color-stop(95%, rgba(20, 21, 24, 0.49))
    );
    background: -webkit-linear-gradient(
      bottom,
      rgba(20, 21, 24, 0.35) 0%,
      rgba(20, 21, 24, 0.42) 33.17%,
      rgba(20, 21, 24, 0.14) 70%,
      rgba(20, 21, 24, 0.49) 95%
    );
    background: -o-linear-gradient(
      bottom,
      rgba(20, 21, 24, 0.35) 0%,
      rgba(20, 21, 24, 0.42) 33.17%,
      rgba(20, 21, 24, 0.14) 70%,
      rgba(20, 21, 24, 0.49) 95%
    );
    background: linear-gradient(
      0deg,
      rgba(20, 21, 24, 0.35) 0%,
      rgba(20, 21, 24, 0.42) 33.17%,
      rgba(20, 21, 24, 0.14) 70%,
      rgba(20, 21, 24, 0.49) 95%
    );
    mix-blend-mode: multiply;
  }
  .main-screen__video::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 34.375rem;
    bottom: 0;
    left: 0;
    background: -webkit-gradient(linear, left bottom, left top, from(rgba(20, 21, 24, 0.5)), to(rgba(20, 21, 24, 0)));
    background: -webkit-linear-gradient(bottom, rgba(20, 21, 24, 0.5) 0%, rgba(20, 21, 24, 0) 100%);
    background: -o-linear-gradient(bottom, rgba(20, 21, 24, 0.5) 0%, rgba(20, 21, 24, 0) 100%);
    background: linear-gradient(0deg, rgba(20, 21, 24, 0.5) 0%, rgba(20, 21, 24, 0) 100%);
    opacity: 0.7;
    mix-blend-mode: overlay;
  }

@media screen and (max-width: 576px) {
    .main-screen {background-image: url(../img/main-screen/bg-image2.jpg);}
    .main-screen__video {
        display: none;
    }
}

@media screen and (max-width: 576px) {
    .infrastructure {
        padding-bottom: 10rem;
    }
    .infrastructure__wrapper {
        padding-bottom: 0;
    }
    .infrastructure-item__box_1 {
        width: 10.13rem;
        height: 9.13rem;
    }
    .infrastructure-item__box_2 {
        width: 11.94rem;
        height: 9.9375rem;
    }
    .infrastructure-item__box_3 {
        width: 9.13rem;
        height: 11.75rem;
    }
}

.residents__items_img {
    height: 18.75rem;
    position: relative;
    margin-top: 14px;
    margin-bottom: 6px;
}
.residents__items_img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

.navbar-toggler-menu {
    width: 113px !important;
    padding: 0 14px !important;
}
.navbar-toggler-menu_text {
    font-size: 14px !important;
    font-weight: 300;
    color: #fff !important;
}
@media screen and (max-width: 576px) {
    .navbar-toggler-menu {
        width: 82px !important;
        padding: 0 10px !important;
    }
    .navbar-toggler-menu_text {
        font-size: 10px !important;
    }
}

@media (max-width: 576px) {
    .parking__top {position: relative;}
    .tab-pane_parking {
        display: block !important; /* Показываем все вкладки */
        margin-bottom: 40px !important;
        opacity: 1 !important;    /* Снимаем затемнение (fade) */
        visibility: visible !important;
    }
}

.custom-scroll {
    max-height: 100vh; /* Ограничение высоты панели до высоты экрана */
    overflow-y: auto;  /* Добавление вертикального скролла */
}

.navbar .offcanvas-body .navbar-nav li {
    padding: 1.2rem 0;
}

.navbar .offcanvas-body .navbar-nav li a {
    font-size: 1.25rem;
}

.has-scroll-smooth body {
    /*overflow: visible !important;*/
}

/* ==========================================================================
   Мобильная фиксированная кнопка «выбор квартиры»
   Аналог десктопной вертикальной кнопки .main-screen__apart, но горизонтальная,
   закреплена снизу экрана и так же меняет цвет при скролле.
   ========================================================================== */
.apart-fixed-mob {
    display: none;
}

@media screen and (max-width: 992px) {
    .apart-fixed-mob {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -webkit-align-items: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        -ms-flex-pack: center;
        justify-content: center;
        gap: 0.9rem;
        width: 100%;
        padding: 0.85rem 1.5rem;
        border: none;
        border-top: 0.0625rem solid rgba(255, 255, 255, 0.5);
        background: rgba(255, 255, 255, 0.15);
        -webkit-backdrop-filter: blur(0.4375rem);
        backdrop-filter: blur(0.4375rem);
        -webkit-transition: 0.3s ease;
        -o-transition: 0.3s ease;
        transition: 0.3s ease;
        cursor: pointer;
    }

    .apart-fixed-mob .main-screen__icon {
        width: 2.75rem;
        height: 2.75rem;
        -webkit-box-flex: 0;
        -webkit-flex: 0 0 auto;
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
    }

    .apart-fixed-mob .main-screen__apart_text {
        -webkit-writing-mode: horizontal-tb;
        -ms-writing-mode: lr-tb;
        writing-mode: horizontal-tb;
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
        margin: 0;
        color: #FAFAFA;
        text-transform: uppercase;
        font-size: 1.25rem;
        letter-spacing: 0.02em;
        font-family: Geologica;
        font-weight: 300;
        -webkit-transition: 0.3s ease;
        -o-transition: 0.3s ease;
        transition: 0.3s ease;
    }

    /* Смена цвета при скролле — как у десктопной кнопки */
    .apart-fixed-mob.scroll {
        background-color: var(--accent);
        border-color: var(--accent);
    }
    .apart-fixed-mob.scroll .main-screen__apart_text {
        color: var(--text);
    }
    .apart-fixed-mob.scroll .main-screen__icon {
        border-color: var(--text);
    }
    .apart-fixed-mob.scroll .main-screen__icon svg path,
    .apart-fixed-mob.scroll .main-screen__icon svg rect {
        fill: var(--text);
    }

    /* Чтобы фиксированная панель не перекрывала футер */
    .footer.section {
        padding-bottom: 6rem;
    }

    /* Приподнимаем кнопку «наверх» над панелью */
    .scroll-up-icon {
        bottom: 5.5rem;
    }
}
