/* БАЗОВЫЕ НАСТРОЙКИ */
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    /* Центрирует всё содержимое по горизонтали */
    min-height: 100vh;
    /* Растягивает тело сайта на всю высоту экрана */
    background-color: #ffffff;
    transition: background-color 0.5s ease;
    /* Плавная смена темы день/ночь */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Системные шрифты */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* ЗАЩИТА ОТ ГОРИЗОНТАЛЬНОГО СКРОЛЛА */
    overflow-x: hidden;
    width: 100%;
    position: relative;

}

/* Принудительно задаем шрифт для всех текстовых элементов в SVG */
svg text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}




/* ШИРОКАЯ ЗОНА (ДЛЯ КАРТЫ И ГЛАВНОЙ) */
.wide-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* КОНТЕЙНЕРЫ (СЕТКА ПРОЕКТА) */
.content-section {
    max-width: 825px;
    width: 90%;
    margin: 0px auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 100px 35px 30px 35px;
    box-sizing: border-box;
}

/* Текст «всплывает» и проявляется. */
@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ТИПОГРАФИКА (ОФОРМЛЕНИЕ ТЕКСТА) */
h1 {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: #EB7B08;
}

h2 {
    font-size: 20px;
    font-weight: 400;
    color: #5d5d5d;
    line-height: 1.3;
    margin-top: 10px;
}

p {
    font-size: 17px;
    line-height: 1.3;
    color: #5d5d5d;
    margin: 4px 0;
}

/* раздвигает телефоны в контактах */
.phone-link {
    margin: 1px 0;
}

/* БАЗОВАЯ АНИМАЦИЯ (Для всех страниц, КРОМЕ главной) */
body:not(.home-page) .content-section>* {
    opacity: 0;
    animation: contentFadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: 0.3s;
    /* Базовая задержка для самого первого элемента */
}

body:not(.home-page) .content-section>*:nth-child(2) {
    animation-delay: 0.5s;
}

body:not(.home-page) .content-section>*:nth-child(3) {
    animation-delay: 0.7s;
}

body:not(.home-page) .content-section>*:nth-child(4) {
    animation-delay: 0.9s;
}

body:not(.home-page) .content-section>*:nth-child(5) {
    animation-delay: 1.1s;
}

body:not(.home-page) .content-section>*:nth-child(6) {
    animation-delay: 1.3s;
}

body:not(.home-page) .content-section>*:nth-child(7) {
    animation-delay: 1.5s;
}

body:not(.home-page) .content-section>*:nth-child(8) {
    animation-delay: 1.7s;
}

body:not(.home-page) .content-section>*:nth-child(9) {
    animation-delay: 1.9s;
}

body:not(.home-page) .content-section>*:nth-child(10) {
    animation-delay: 2.1s;
}

body:not(.home-page) .content-section>*:nth-child(11) {
    animation-delay: 2.3s;
}

body:not(.home-page) .content-section>*:nth-child(12) {
    animation-delay: 2.5s;
}

body:not(.home-page) .content-section>*:nth-child(13) {
    animation-delay: 2.7s;
}

body:not(.home-page) .content-section>*:nth-child(14) {
    animation-delay: 2.9s;
}

body:not(.home-page) .content-section>*:nth-child(15) {
    animation-delay: 3.1s;
}

body:not(.home-page) .content-section>*:nth-child(16) {
    animation-delay: 3.3s;
}

body:not(.home-page) .content-section>*:nth-child(17) {
    animation-delay: 3.5s;
}

body:not(.home-page) .content-section>*:nth-child(18) {
    animation-delay: 3.7s;
}

body:not(.home-page) .content-section>*:nth-child(19) {
    animation-delay: 3.9s;
}

body:not(.home-page) .content-section>*:nth-child(20) {
    animation-delay: 4.1s;
}

body:not(.home-page) .content-section>*:nth-child(21) {
    animation-delay: 4.3s;
}

body:not(.home-page) .content-section>*:nth-child(22) {
    animation-delay: 4.5s;
}

/* Элемент ждет появления в поле зрения */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 1s ease;
}

/* Элемент появляется */
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}














/* --- ГЛАВНАЯ СТРАНИЦА: ПОЛНОЭКРАННАЯ КАРТА И КОНТЕНТ --- */
.zoom-container {
    position: relative;
    width: 100%;
    height: 5000px;
}

/* ЛИФТ КАРТЫ: зафиксирован на весь экран */
.zoom-sticky-wrapper {
    position: sticky; 
    top: 0;
    left: 0;
	/* Используем vw/vh для строгого соответствия окну */
    width: 100vw;
    height: 100vh;
    z-index: 50;
	/* Обрезает карту при увеличении */
    overflow: hidden;
}

/* ОКНО КАРТЫ: растянуто внутри лифта */
.map-underlay {
    position: absolute;
    inset: 0; 
    width: 100%;
    height: 100%;
    opacity: 0;
}

.map-layer {
    position: absolute;
    width: 3000px;
    height: 3000px;
    top: 0;
    left: 0;
    will-change: transform, opacity;
}

.map-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
	/* Чтобы SVG не искажался */
    object-fit: contain;
}

#l, #l1, #l2, #l3, #l4, #l5, #l6, #L0, #L1, #L2, #L3, #L4, #L5, #L6, #L7, #L8, #c1, #c2, #c3, #c4, #c5, #c6, #p1, #p2, #p3, #p4, #p5, #p6, #mapLetters path, #mapLetters polygon {
/*    fill-opacity: 0;*/
    stroke-opacity: 1;
    /* Заставляет браузер отрисовывать вектор максимально точно */
    shape-rendering: geometricPrecision;
	will-change: transform, opacity;
}

/* Контейнер для SVG районов */
.districts-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	/* Сам SVG "прозрачен" для кликов... */
    pointer-events: none;
}

/* А сами пути (районы) внутри него — активны */
.district-path {
	/* ...но районы ловят мышку */
    pointer-events: all;
    fill: #eb7b08;
    fill-opacity: 0;
    stroke-opacity: 0;
    stroke-width: 7; 
    cursor: default;
	will-change: transform, opacity;
}

.district-label {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 40px;
    font-weight: 700;
    fill: #5d5d5d;
    opacity: 0;
    pointer-events: none;
/*	transition: opacity 0.4s ease;*/
	will-change: transform;
}

/* Контейнер для SVG районов */
.rooms-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	/* Сам SVG "прозрачен" для кликов... */
    pointer-events: none;
}

/* А вот сами пути (макеты) внутри него — активны */
.room-path {
    stroke: #eb7b08;
	/* ...но макеты ловят мышку */
    pointer-events: all;
	fill: transparent;
	opacity: 0;
    fill-opacity: 0;
    stroke-opacity: 0;
    stroke-width: 9; 
    cursor: default;
	will-change: transform, opacity;
}

.size-label {
    font-weight: 800;
    fill: #ffffff;
    opacity: 0;
    pointer-events: none;
    /* Добавляем эти свойства для четкости */
    shape-rendering: geometricPrecision;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
	will-change: transform;
	
}

.house-img {
    width: 3000px;
    height: 3000px;
    top: 0;
    left: 0;
    object-fit: cover;
	/* Накладываем кадры друг на друга */
    position: absolute;

}

#frame1, #frame2, #frame3, #frame4 {
/* Для четкости */
  image-rendering: -webkit-optimize-contrast;
  /* Принудительный GPU слой */
  transform: translateZ(0);
  backface-visibility: hidden;
  pointer-events: none;
}

.info-window-glass {
    min-height: 230px;
    position: fixed;
    top: 100px;
    /* Зеркальная формула для левого края хедера: */
    left: max(5%, calc(50% - 500px));
    width: 205px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 20px;
    z-index: 9997;
    opacity: 0;
    pointer-events: none; 
    transform: translateY(-15px);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	/* Чтобы текст не вылезал за границы во время анимации */
     overflow: hidden;
}

/* Эффект стеклянной грани для окна подсказок */
.info-window-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    /* градиент: от блика сверху к тени снизу */
    background: linear-gradient(
        to bottom, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(0, 0, 0, 0.1) 100%
    );
    /* оставляем только 1px по краю */
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
	/* Рамка не мешает нажимать на кнопки */
    pointer-events: none;
}

/* Стили заголовков внутри "стекла" */
.info-label {
	font-size: 13px;
	color: #EB7B08;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.info-title {
	font-size: 21px;
	color: #EB7B08;
	font-weight: bold;
	margin-bottom: 8px;
	line-height: 1.2;
	opacity: 1;
	transition: opacity 0.2s ease-in-out;
	will-change: opacity;
}

.info-text  {
	font-size: 15px;
	color: #5d5d5d;
	line-height: 1.4;
	opacity: 1;
	transition: opacity 0.2s ease-in-out;
	will-change: opacity;
	/* Заставляет браузер учитывать переносы \n */
	white-space: pre-line;
}

.info-window-glass.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* плавная смена информации в окне */
.fade-out {
	opacity: 0 !important;
}

/* ФУТЕР */
footer {
    width: 100%;
    margin-top: auto;
    padding: 10px 0;
    border-top: 1px solid rgba(151, 151, 151, 0.15);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
}

.footer-content a.active {
	color: #EB7B08;
	pointer-events: none;
}

.copyright {
    font-size: 13px;
    color: #5d5d5d;
}

.trademark-footer {
    font-size: 11px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    color: #5d5d5d;
}

/* --- ЭТАП 1: 900px - 681px (Тают соцсети) --- */
@media (max-width: 900px) {
    .header-socials {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.5s ease, visibility 0.5s ease;
    }
}

/* --- ЭТАП 2: 680px (Тает десктопная навигация) --- */
@media (max-width: 681px) {
    .nav-desktop {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.5s ease, visibility 0.5s ease;
    }
}

/* --- ЭТАП 3: 670px - ФИНАЛЬНАЯ ТРАНСФОРМАЦИЯ (Mobile Mode) --- */
@media (max-width: 670px) {

    /* Полностью освобождаем место в DOM */
    .nav-desktop,
    .header-socials {
        display: none !important;
    }

    /* ПРИЗРАЧНАЯ КНОПКА (GHOST MODE) */
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 70%;
        right: 20px;
        transform: translateY(-50%);
        width: 50px;
        height: 32px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 3100;
        animation: fadeInSequence 0.7s forwards;
    }

    @keyframes fadeInSequence {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* ЛИНИИ КНОПКИ */
    .menu-toggle .line {
        position: absolute;
        width: 20px;
        height: 2px;
        background: #5d5d5d;
        border-radius: 2px;
        transition: all 0.35s cubic-bezier(0.2, 0, 0.2, 1);
    }

    .menu-toggle .line:nth-child(1) {
        transform: translateY(-3px);
    }

    .menu-toggle .line:nth-child(2) {
        transform: translateY(3px);
    }

    /* Интерактив линий */
    .menu-toggle:hover .line:nth-child(1) {
        background: #EB7B08;
        transform: translateY(0) rotate(-45deg);
    }

    .menu-toggle:hover .line:nth-child(2) {
        background: #EB7B08;
        transform: translateY(0) rotate(45deg);
    }

    .menu-toggle.active .line {
        background: #EB7B08;
    }
}

/* --- МОБИЛЬНАЯ ШТОРКА --- */
.nav-mobile {
    color: #5d5d5d;
    display: none;
    position: fixed;
    top: 100px;
    right: max(5%, calc(50% - 500px));
    width: 205px;
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 20px;
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
    z-index: 9998;
    opacity: 0;
    transform: translateY(-15px);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

/* Эффект стекла для шторки */
.nav-mobile::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.nav-mobile.is-open {
    opacity: 1;
    transform: translateY(0);
}

/* Ссылки внутри шторки */
.nav-mobile a {
    display: flex;
    height: 54px;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    font-size: 17px;
}

.nav-mobile a:hover {
    background: rgba(235, 123, 8, 0.25);
}

.nav-mobile a.active {
    color: #EB7B08;
    background: rgba(235, 123, 8, 0.1);
}

.dynamic-header {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    margin: 0 auto;
    opacity: 0;
    width: 90%;
    max-width: 1000px;
    height: 66px;
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    backdrop-filter: blur(10px) saturate(180%);
    border-radius: 24px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-sizing: border-box;
    will-change: top, opacity;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ОКАНТОВКА */
.dynamic-header::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(0, 0, 0, 0.15) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* 2. ЛЕВАЯ ЗОНА (КОНТЕЙНЕР ЛОГОТИПА) */
.logo-link {
    margin-right: 28px;
}

.logo-svg {
    width: 200px;
    height: 30px;
    pointer-events: none;
/*    fill: none;*/
}

/* ЦЕНТРАЛЬНАЯ ЗОНА */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 25px;
    white-space: nowrap;
    height: 100%;
    flex: 1;
    color: #5d5d5d;
}

.nav-desktop a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-desktop a.active {
    color: #EB7B08;
    pointer-events: none;
}

/* ПРАВЫЙ БЛОК */
.header-socials {
    display: flex;
    gap: 4px;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.social-icon-link svg {
    width: 20px;
    height: 20px;
    fill: #787878;
	display: block;
}

.social-icon-link:hover {
	will-change: transform;
	transform: scale(1.2);
}

.social-icon-link:hover svg {
    fill: #EB7B08;
}

/*  точка в правом крае хедера   */
.menu-toggle {
    opacity: 0;
}

/* --- ЛОГИКА ИНВЕРСИИ (ТЕЛЕПОРТ) --- */
/* По умолчанию мобильная версия ВСЕГДА скрыта */
.show-on-mobile {
    display: none;
}

/* Соц сети в контактах когда экран меньше 860px */
@media (max-width: 900px) {
    .show-on-mobile {
        display: flex;
        gap: 25px;
    }

    .show-on-mobile .social-icon-link svg {
        width: 25px;
        height: 25px;
    }
}

/* ---  КАРТА САЙТА (SITEMAP) --- */
/*.sitemap-item p {*/
/*    margin-top: -15px;*/
/*}*/

/* --- ГЛОБАЛЬНЫЙ СТАНДАРТ ССЫЛОК --- */
a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: color 0.4s ease,
    transform 0.4s ease;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}

a:hover {
will-change: transform;
    color: #EB7B08;
    transform: scale(1.05);
}

@media (prefers-color-scheme: dark) {
.copyright,
.trademark-footer,
.info-text,
h2,
p,
.footer-links,
.district-label,
.nav-desktop,
.nav-mobile {
        color: #b0b0b0;
    }

.social-icon-link svg,
.district-label {
        fill: #d0d0d0;
    }

 body {
        background-color: #1A1A1A;
    }

.menu-toggle .line {
        background: #d0d0d0; 
    }

/* Меняем заливку всех областей (l1, l2 и т.д.) */
    #l1, #l2, #l3, #l4, #l5, #l6 {
        fill: #2a2a2a !important; /* Тёмно-серый или любой другой для тёмной темы */
    }

.nav-mobile, .info-window-glass {
    background: rgba(15, 15, 15, 0.45); 
    }
}
