/*
Theme Name: Nova Space Home
Theme URI: https://novaspacehome.com
Author: Nova Space Home
Description: Custom modular homes theme with Apple Glassmorphism, EN/ES auto-translator, unlimited house models, and Customizer controls.
Version: 2.0.0
Text Domain: novaspacehome
*/

:root {
  --bg-color: #f5f2ed;
  --accent-color: #8d432b;
  --accent-hover: #723420;
  --text-main: #1f1d1a;
  --text-muted: #5c5750;
  --border-color: rgba(141, 67, 43, 0.2);
  --body-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --heading-font: 'Uni Sans', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --promo-font: 'Uni Sans', 'Montserrat', sans-serif;
  --header-height: 76px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; width: 100%; overflow: hidden;
  font-family: var(--body-font);
  background-color: var(--bg-color);
  color: var(--text-main);
  top: 0 !important;
}

.heading-font { font-family: var(--heading-font); font-weight: 900; letter-spacing: 0.01em; }
.goog-te-banner-frame.skiptranslate, .goog-te-gadget-icon, #goog-gt-tt, body > .skiptranslate { display: none !important; }

.glass-panel {
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 36px rgba(31, 29, 26, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.fixed-site-background {
  position: fixed; inset: 0;
  background-color: var(--bg-color);
  background-size: cover; background-position: center; z-index: 0; pointer-events: none;
}

.site-header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-height); z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; padding: 0 36px;
  border-top: none; border-left: none; border-right: none; border-radius: 0;
}

.header-logo { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text-main); flex-shrink: 0; }
.header-logo img { max-height: 44px; width: auto; display: block; }
.logo-mark {
  width: 34px; height: 34px; background: var(--accent-color); color: #fff;
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--heading-font); font-size: 16px; font-weight: 900;
}

.header-center { display: flex; align-items: center; gap: 16px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text-main); text-decoration: none; white-space: nowrap; }
.header-phone:hover { color: var(--accent-color); }
.header-phone svg, .footer-address svg { width: 17px; height: 17px; fill: var(--accent-color); flex-shrink: 0; }
.header-divider { color: var(--border-color); font-size: 20px; font-weight: 300; user-select: none; }
.mobile-social-wrap { display: none; position: relative; }

.social-links { display: flex; align-items: center; gap: 9px; }
.social-link {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.55);
  display: inline-flex; align-items: center; justify-content: center; color: var(--accent-color); transition: 0.25s;
}
.social-link:hover { background: var(--accent-color); color: #fff; transform: translateY(-2px); }
.social-link svg { width: 15px; height: 15px; fill: currentColor; }
/* БЛИК ДЛЯ КНОПОК И ПЛАШЕК */
@keyframes nshBtnShine {
  0% { left: -120%; }
  45% { left: 140%; }
  100% { left: 140%; }
}
.btn-shine { position: relative; overflow: hidden; }
.btn-shine::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 65%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.68) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-24deg);
  animation: nshBtnShine 3.2s infinite ease-in-out;
  pointer-events: none;
}

.header-right { display: flex; align-items: center; gap: 14px; position: relative; flex-shrink: 0; }
.lang-switcher { display: flex; border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; background: rgba(255, 255, 255, 0.55); }
.lang-btn { border: none; background: transparent; padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--text-main); }
.lang-btn.active { background: var(--accent-color); color: #fff; }

.menu-square-btn {
  width: 42px; height: 42px; background: var(--accent-color); border: none; border-radius: 8px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-square-btn span { display: block; width: 18px; height: 2px; background: #fff; transition: 0.3s; }
.menu-square-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-square-btn.open span:nth-child(2) { opacity: 0; }
.menu-square-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.models-dropdown {
  position: absolute; top: 54px; right: 0; width: 225px; border-radius: 14px;
  padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: 0.25s; z-index: 1100;
  max-height: 75vh; overflow-y: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(141, 67, 43, 0.18);
  box-shadow: 0 18px 44px rgba(31, 29, 26, 0.16);
}
.models-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.models-dropdown button {
  width: 100%; text-align: left; background: transparent; border: none; padding: 10px 14px;
  font-size: 14px; font-weight: 600; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; color: var(--text-main);
}
.models-dropdown button:hover { background: var(--accent-color); color: #fff; }

.story-dots-nav {
  position: fixed; right: 20px; top: 50%; transform: translateY(-50%); z-index: 950;
  display: flex; flex-direction: column; gap: 8px; padding: 11px 6px; border-radius: 22px;
}
.story-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(141, 67, 43, 0.3);
  border: none; cursor: pointer; transition: 0.35s;
}
.story-dot.active { background: var(--accent-color); height: 22px; border-radius: 6px; }

.snap-container {
  position: relative; z-index: 1; height: 100vh; width: 100%;
  overflow-y: scroll; scroll-behavior: smooth;
  padding-top: var(--header-height);
}

.snap-section {
  width: 100%; padding: 18px 0;
  display: flex; align-items: center; justify-content: center;
  scroll-margin-top: calc(var(--header-height) + 12px);
}

.section-inner {
  width: 100%; max-width: 1200px; padding: 0 60px 0 36px;
  opacity: 0;
  transform: translateY(22px) scale(0.975);
  transition: opacity 0.85s ease, transform 0.85s ease;
  will-change: opacity, transform;
}
.snap-section.is-visible .section-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.42s cubic-bezier(0.16, 1, 0.3, 1), transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ГЛАВНЫЙ БАННЕР */
.hero-section { padding-top: 14px; padding-bottom: 18px; }
.hero-section .section-inner { max-width: 100%; height: calc(100vh - var(--header-height) - 32px); min-height: 480px; padding: 0 54px 0 36px; display: flex; }
.hero-banner-box {
  position: relative; width: 100%; height: 100%; border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: #fff;
  background-color: #24211e; background-size: cover; background-position: center;
}
.hero-banner-box::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(20,18,16,0.38), rgba(20,18,16,0.54)); z-index: 1;
}
.hero-video-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-slides-wrap { position: absolute; inset: 0; z-index: 0; }
.hero-bg-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.03); transition: opacity 0.85s ease, transform 5.5s ease;
}
.hero-bg-slide.active { opacity: 1; transform: scale(1); }
.hero-arrow { z-index: 4; }
.hero-dots { bottom: 18px; z-index: 4; }

.hero-content { position: relative; z-index: 2; max-width: 860px; }
.hero-top-text {
  font-size: clamp(15px, 1.8vw, 20px); letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.92); margin-bottom: 14px; text-transform: uppercase;
}
.hero-title { font-size: clamp(30px, 4.6vw, 62px); margin-bottom: 16px; line-height: 1.1; }
.hero-subtitle { font-size: clamp(15px, 1.8vw, 20px); max-width: 680px; margin: 0 auto 28px; opacity: 0.92; line-height: 1.55; }

.btn-primary {
  background: var(--accent-color); color: #fff; border: none; padding: 14px 30px;
  font-size: 15px; font-weight: 600; border-radius: 12px; cursor: pointer; transition: 0.25s; font-family: var(--body-font);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* КОМПАКТНАЯ БЕЛАЯ СТЕКЛЯННАЯ ПЛАШКА (70%) ПОД КНОПКОЙ EXPLORE ALL */
.hero-actions-col {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px;
}
.hero-financing-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 15px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--accent-color) !important;
  text-decoration: none !important;
  font-family: var(--promo-font);
  font-size: clamp(10.5px, 1.05vw, 12.5px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, box-shadow 0.3s ease;
}
.hero-financing-pill:hover {
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}
/* БЛОК ABOUT US */
.about-card { border-radius: 26px; padding: 44px 48px; max-width: 960px; margin: 0 auto; text-align: center; height: auto; }
.section-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-color); display: block; margin-bottom: 12px; }
.about-body { font-size: 16px; line-height: 1.75; color: var(--text-muted); text-align: left; }
.about-body p { margin-bottom: 14px; }
.about-body p:last-child { margin-bottom: 0; }

/* ШИРОКИЙ ПРОМО-БАННЕР ПОД ABOUT US В СТИЛЕ IPHONE */
.promo-banner-section .section-inner {
  transform: translateY(36px) scale(0.92);
  opacity: 0;
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.promo-banner-section.is-visible .section-inner {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.promo-banner-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  width: 100%; max-width: 960px; min-height: 210px; margin: 0 auto; padding: 38px 32px;
  border-radius: 26px;
  background-color: #4a2215; background-size: cover; background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 20px 48px rgba(141, 67, 43, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-decoration: none !important; color: #ffffff !important; overflow: hidden;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.38s ease;
}
.promo-banner-card:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: 0 26px 58px rgba(141, 67, 43, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.promo-banner-card:active { transform: scale(0.985); }
.promo-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(141, 67, 43, 0.84) 0%, rgba(74, 32, 18, 0.88) 100%);
  z-index: 1;
}
.promo-banner-content { position: relative; z-index: 2; max-width: 760px; }
.promo-banner-title {
  font-family: var(--promo-font);
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff !important;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  margin: 0;
}
.promo-banner-subtitle {
  font-family: var(--body-font);
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92) !important;
  margin-top: 10px;
  margin-bottom: 0;
}

/* КАРТОЧКИ МОДЕЛЕЙ ДОМОВ */
.house-unified-card {
  width: 100%; max-width: 760px; margin: 0 auto; border-radius: 26px;
  overflow: hidden; display: flex; flex-direction: column; height: auto;
}
.carousel-box {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 440px;
  overflow: hidden; background: #e7e1d8;
}
.carousel-track { display: flex; height: 100%; transition: transform 0.5s ease; }
.carousel-slide { min-width: 100%; height: 100%; position: relative; cursor: zoom-in; }
.carousel-slide img, .carousel-slide video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.carousel-slide:hover img { transform: scale(1.02); }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px);
  color: var(--accent-color); border: 1px solid rgba(255,255,255,0.88);
  cursor: pointer; font-size: 20px; font-weight: 700; z-index: 3;
}
.carousel-arrow.prev { left: 14px; } .carousel-arrow.next { right: 14px; }
.carousel-indicators { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.carousel-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.55); border: none; cursor: pointer; }
.carousel-dot.active { background: #fff; width: 18px; border-radius: 4px; }

.house-card-body { padding: 26px 36px 32px; display: flex; flex-direction: column; align-items: center; text-align: center; height: auto; }
.house-header-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.model-circle-badge {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--accent-color); color: #ffffff;
  font-size: 10px; font-weight: 700; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.house-title { font-family: var(--heading-font); font-size: clamp(26px, 3.2vw, 38px); font-weight: 900; color: var(--text-main); line-height: 1.1; }
/* ОПИСАНИЕ МОДЕЛЕЙ ДОМОВ С РАЗДЕЛИТЕЛЯМИ */
.house-desc {
  display: flex; flex-direction: column; align-items: stretch; gap: 0;
  font-family: var(--body-font); font-size: 15px; line-height: 1.5; color: var(--text-muted);
  margin-bottom: 22px; max-width: 640px; height: auto; max-height: none; overflow: visible;
}
.house-desc > p, .house-desc > div, .house-desc > ul, .house-desc > ol {
  margin: 0; padding: 10px 0; line-height: 1.5; height: auto;
  word-wrap: break-word; overflow-wrap: break-word;
}
.house-desc > p:first-child { padding-top: 2px; }
.house-desc > p:last-child { padding-bottom: 4px; }
.house-desc hr, .house-desc .wp-block-separator {
  display: block; width: 100%; max-width: 100%; height: 1px; min-height: 1px;
  border: 0; border-top: 1px solid rgba(0, 0, 0, 0.16); background: transparent;
  margin: 0; padding: 0; flex-shrink: 0; clear: both;
}

/* БЛОК BUILD QUALITY & MATERIALS (КОРИЧНЕВАЯ КНОПКА + БЕЛЫЙ ТЕКСТ) */
.bq-toggle-bar {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 20px; margin-top: 6px; border-radius: 14px;
  background: var(--accent-color);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 26px rgba(141, 67, 43, 0.28);
  color: #ffffff;
  font-family: var(--body-font); font-size: 14px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.bq-toggle-bar:hover {
  background: var(--accent-hover);
  border-color: rgba(255, 255, 255, 0.55);
}
.bq-toggle-bar:active { transform: scale(0.99); }
.bq-toggle-label { color: #ffffff; }
.bq-chevron-icon {
  width: 20px; height: 20px; fill: none; stroke: #ffffff; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: bqArrowHint 2s infinite ease-in-out;
}
.bq-card.is-open .bq-chevron-icon { transform: rotate(180deg); animation: none; }
@keyframes bqArrowHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.bq-collapse-wrap {
  display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0;
  transition: grid-template-rows 0.48s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.38s ease, margin-top 0.38s ease;
}
.bq-card.is-open .bq-collapse-wrap { grid-template-rows: 1fr; opacity: 1; margin-top: 22px; }
.bq-collapse-inner { overflow: hidden; text-align: left; cursor: text; }

.bq-rich-content { font-size: 16px; line-height: 1.75; color: var(--text-muted); padding-top: 16px; border-top: 1px solid var(--border-color); }
.bq-rich-content p { margin-bottom: 14px; }
.bq-rich-content p:last-child { margin-bottom: 0; }
.bq-rich-content strong, .bq-rich-content b { font-weight: 800; color: var(--text-main); }
.bq-rich-content em, .bq-rich-content i { font-style: italic; }
.bq-rich-content u { text-decoration: underline; }
.bq-rich-content ul { list-style-type: disc; margin: 12px 0 16px 24px; padding-left: 8px; }
.bq-rich-content ol { list-style-type: decimal; margin: 12px 0 16px 24px; padding-left: 8px; }
.bq-rich-content li { display: list-item; margin-bottom: 8px; line-height: 1.65; }
.bq-rich-content h1, .bq-rich-content h2, .bq-rich-content h3, .bq-rich-content h4, .bq-rich-content h5, .bq-rich-content h6 {
  font-family: var(--heading-font); color: var(--text-main); margin: 20px 0 10px; line-height: 1.25;
}
.bq-rich-content hr { border: 0; border-top: 1px solid var(--border-color); margin: 18px 0; }

/* ФОРМА ЗАЯВКИ */
.accent-glass-form {
  max-width: 540px; margin: 0 auto;
  background: rgba(141, 67, 43, 0.86);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 24px 54px rgba(141, 67, 43, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #ffffff; border-radius: 26px; padding: 38px 42px;
}
.accent-glass-form .form-group { margin-bottom: 16px; text-align: left; }
.accent-glass-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: rgba(255,255,255,0.92); }
.accent-glass-form .form-control {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255, 255, 255, 0.95); color: var(--text-main); font-size: 15px; font-family: var(--body-font); outline: none;
}
.btn-light {
  background: var(--bg-color); color: var(--accent-color); border: none; padding: 15px 30px;
  font-size: 15px; font-weight: 700; border-radius: 12px; cursor: pointer; transition: 0.25s; font-family: var(--body-font);
  position: relative; overflow: hidden;
}
.btn-light::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 65%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-24deg); animation: nshBtnShine 3s infinite ease-in-out; pointer-events: none;
}
.btn-light:hover { background: #ffffff; transform: translateY(-2px); }
/* ФУТЕР */
.footer-section { padding-top: 18px; padding-bottom: 0; padding-left: 0; padding-right: 0; }
.footer-spacer { display: none; }
.full-width-footer { width: 100%; border-radius: 0; border-left: none; border-right: none; border-bottom: none; padding: 38px 24px 34px; }
.footer-inner-container { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.footer-contacts-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
.footer-address {
  display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--text-main);
  text-decoration: none; padding: 10px 18px; border-radius: 12px; background: rgba(255,255,255,0.6); border: 1px solid var(--border-color);
}
.footer-address:hover { border-color: var(--accent-color); color: var(--accent-color); }
.footer-nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.footer-nav button { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-color); background: rgba(255,255,255,0.6); cursor: pointer; font-weight: 600; color: var(--text-main); }
.footer-nav button:hover { background: var(--accent-color); color: #fff; }
.footer-bottom-line { font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--border-color); padding-top: 14px; width: 100%; }

/* ПОЛНОЭКРАННАЯ ГАЛЕРЕЯ (LIGHTBOX) */
.photo-lightbox {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(15, 14, 12, 0.92); backdrop-filter: blur(14px);
  display: none; align-items: center; justify-content: center;
}
.photo-lightbox.open { display: flex; }
.photo-lightbox, .lb-image-scroll-area, .lb-image-scroll-area img { touch-action: pinch-zoom pan-x pan-y; }
.lb-image-scroll-area {
  width: 100%; height: 100%; overflow: auto;
  display: flex; align-items: center; justify-content: center; padding: 56px 20px;
}
.lb-image-scroll-area img { max-width: 94vw; max-height: 86vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); user-select: none; }
.lb-close {
  position: fixed; top: 18px; right: 20px; z-index: 2600; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.3); font-size: 28px; line-height: 1; cursor: pointer;
}
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2600; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.18); color: #fff; border: 1px solid rgba(255,255,255,0.3); font-size: 26px; cursor: pointer;
}
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-caption {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2600;
  color: rgba(255,255,255,0.88); font-size: 14px; font-weight: 600; background: rgba(0,0,0,0.45); padding: 6px 16px; border-radius: 20px;
}

.mobile-quick-bar { display: none; }

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 768px) {
  .site-header { padding: 0 12px; gap: 8px; }
  .header-logo img { max-height: 36px; }
  .header-center { gap: 8px; }
  .header-center .social-links, .header-divider { display: none; }

  .site-header .header-phone .phone-label-text { display: none; }
  .site-header .header-phone {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--accent-color); color: #ffffff;
    justify-content: center; gap: 0;
    box-shadow: 0 4px 14px rgba(141, 67, 43, 0.35);
    position: relative; overflow: hidden;
  }
  .site-header .header-phone svg { width: 17px; height: 17px; fill: #ffffff; }
  .site-header .header-phone::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 70%; height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-24deg); animation: nshBtnShine 2.8s infinite ease-in-out; pointer-events: none;
  }

  .mobile-social-wrap { display: inline-flex; align-items: center; }
  .mobile-social-btn {
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: var(--accent-color); color: #ffffff;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(141, 67, 43, 0.35);
    position: relative; overflow: hidden; cursor: pointer; padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-social-btn::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 70%; height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.75) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-24deg); animation: nshBtnShine 2.8s infinite ease-in-out; pointer-events: none;
  }
  .ms-rot-icon {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0.75); transition: opacity 0.55s ease, transform 0.55s ease; pointer-events: none;
  }
  .ms-rot-icon.active { opacity: 1; transform: scale(1); }
  .ms-rot-icon svg { width: 17px; height: 17px; fill: #ffffff; }

  .mobile-social-dropdown {
    position: absolute; top: 48px; left: 50%;
    transform: translateX(-50%) translateY(-8px) scale(0.95);
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(24px) saturate(190%);
    -webkit-backdrop-filter: blur(24px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 16px 38px rgba(31, 29, 26, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    opacity: 0; visibility: hidden; transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease; z-index: 1250;
  }
  .mobile-social-dropdown.open { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0) scale(1); }
  .ms-drop-item {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.65); border: 1px solid rgba(141, 67, 43, 0.18);
    color: var(--accent-color); display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  }
  .ms-drop-item:active, .ms-drop-item:hover { background: var(--accent-color); color: #ffffff; transform: scale(1.06); }
  .ms-drop-item svg { width: 16px; height: 16px; fill: currentColor; }

  .header-right { gap: 8px; }
  .lang-btn { padding: 5px 8px; font-size: 11px; }
  .menu-square-btn { width: 38px; height: 38px; }

  .story-dots-nav { right: 5px; padding: 7px 4px; gap: 5px; }
  .story-dot { width: 6px; height: 6px; }

  .snap-section { padding: 12px 0; }
  .section-inner { padding: 0 24px 0 12px; }
  .hero-section { padding-top: 10px; padding-bottom: 12px; }
  .hero-section .section-inner { height: calc(100vh - var(--header-height) - 74px); min-height: 400px; padding: 0 12px; }
  .hero-banner-box { padding: 24px 18px; }
  .hero-actions-col { gap: 9px; }
  .hero-financing-pill { padding: 6px 13px; font-size: 10px; }

  .about-card { padding: 26px 20px; }
  .promo-banner-card { min-height: 175px; padding: 28px 20px; }
  .house-card-body { padding: 20px 18px 24px; }
  .accent-glass-form { padding: 26px 20px; }
  .footer-section { padding-top: 12px; padding-bottom: 0; }
  .full-width-footer { padding: 28px 16px calc(74px + env(safe-area-inset-bottom)); }

  .carousel-arrow, .hero-arrow, .lb-nav, .footer-nav { display: none; }
  .hero-banner-box, .carousel-box { touch-action: pan-y; user-select: none; -webkit-user-select: none; }

  .mobile-quick-bar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1200;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); gap: 10px; border-radius: 0; border-bottom: none; border-left: none; border-right: none;
  }
  .mq-btn {
    flex: 1; height: 42px; border-radius: 10px; border: 1px solid var(--border-color); background: rgba(255,255,255,0.75); color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px; font-weight: 600; letter-spacing: 0;
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  }
  .mq-btn.mq-accent { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
}
/* === ИСПРАВЛЕНИЕ ЦЕНТРОВКИ ПЛАШКИ И ГЛАДКИХ КРАЕВ ПРОМО-БАННЕРА === */
.hero-financing-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
  padding: 9px 18px 7px !important;
}

.promo-banner-card {
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.promo-banner-overlay {
  inset: -1px !important;
  border-radius: inherit;
}

@media (max-width: 768px) {
  .hero-financing-pill {
    padding: 7px 14px 6px !important;
  }
}
/* === ЧИСТЫЕ ГЛАДКИЕ КРАЯ ПРОМО-БАННЕРА НА ПК И МОБИЛЬНЫХ === */
.promo-banner-section .section-inner {
  transform: translateY(24px) !important;
  transition: opacity 0.65s ease, transform 0.65s ease !important;
}

.promo-banner-section.is-visible .section-inner {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.promo-banner-card {
  border: 0 !important;
  outline: none !important;
  border-radius: 24px !important;
  box-shadow: 0 14px 34px rgba(31, 29, 26, 0.14) !important;
  transform: none !important;
  isolation: auto !important;
  -webkit-mask-image: none !important;
}

.promo-banner-card:hover,
.promo-banner-card:active {
  transform: translateY(-2px) !important;
}

.promo-banner-card::before,
.promo-banner-card::after {
  display: none !important;
  content: none !important;
}

.promo-banner-overlay {
  inset: 0 !important;
  border-radius: 24px !important;
  background: linear-gradient(135deg, rgba(141, 67, 43, 0.85) 0%, rgba(74, 32, 18, 0.90) 100%) !important;
}
/* === ВСПЛЫВАЮЩИЙ БАННЕР ПРИ ВХОДЕ НА САЙТ (WELCOME POPUP) === */
.nsh-welcome-popup {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 18, 16, 0.56);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.38s ease;
}

.nsh-welcome-popup.is-open {
  opacity: 1;
}

.nsh-popup-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  transform: translateY(24px) scale(0.95);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.nsh-welcome-popup.is-open .nsh-popup-stack {
  transform: translateY(0) scale(1);
}

.nsh-popup-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-height: calc(92vh - 64px);
  overflow-y: auto;
  padding: 38px 34px;
  border-radius: 24px;
  background-color: #4a2215;
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  text-decoration: none !important;
  color: #ffffff !important;
}

.nsh-popup-overlay {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(141, 67, 43, 0.88) 0%, rgba(62, 26, 14, 0.92) 100%);
  z-index: 1;
}

.nsh-popup-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 580px;
}

.nsh-pop-eyebrow {
  display: block;
  font-family: var(--pop-eyebrow-font);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 10px;
}

.nsh-pop-title {
  font-family: var(--pop-title-font);
  font-size: clamp(26px, 3.8vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff !important;
  margin: 0 0 14px 0;
}

.nsh-pop-disclaimer {
  font-family: var(--pop-disc-font);
  font-size: clamp(11px, 1.2vw, 12.5px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.80) !important;
  margin: 0 auto 18px auto;
  max-width: 520px;
}

.nsh-pop-list {
  font-family: var(--pop-list-font);
  font-size: clamp(13.5px, 1.5vw, 15.5px);
  font-weight: 600;
  line-height: 1.55;
  color: #ffffff !important;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.nsh-popup-close-bottom {
  margin-top: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nsh-popup-close-bottom:hover {
  background: var(--accent-color);
  transform: scale(1.08);
}

@media (max-width: 768px) {
  .nsh-welcome-popup {
    padding: 14px;
  }
  .nsh-popup-card {
    padding: 26px 20px;
  }
  .nsh-pop-eyebrow {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .nsh-pop-title {
    font-size: 24px;
    margin-bottom: 10px;
  }
  .nsh-pop-disclaimer {
    font-size: 11px;
    margin-bottom: 14px;
  }
  .nsh-pop-list {
    font-size: 13px;
    line-height: 1.45;
    padding-top: 12px;
  }
}
