/* Гармония Алтая — редизайн: тёплый беж + зелень, фото без обрезки */

:root {
  --beige: #f7f3eb;
  --beige-dark: #ebe4d6;
  --sand: #faf8f4;
  --white: #ffffff;
  --green: #4a6b58;
  --green-dark: #3a5546;
  --green-deep: #2d4438;
  --green-light: #6d8f7a;
  --green-pale: #e8efe9;
  --accent: #a68b5c;
  --accent-light: #c4a97a;
  --text: #3d3a36;
  --text-muted: #6b6560;
  --shadow: 0 8px 32px rgba(45, 68, 56, 0.08);
  --shadow-sm: 0 2px 12px rgba(45, 68, 56, 0.06);
  --radius: 8px;
  --radius-lg: 16px;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --header-h: 112px;
  --transition: 0.3s ease;
  --photo-bg: var(--beige-dark);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--beige);
  -webkit-font-smoothing: antialiased;
}

/* Фото: полное изображение, без crop */
img { max-width: 100%; height: auto; display: block; }

.photo-frame {
  background: var(--photo-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  line-height: 0;
}

.photo-frame img,
.house-card-image img,
.split-image img,
.quiet-banner-image img,
.region-card-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--green-deep);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.35rem); margin: 0 0 1rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1rem; }
.lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 40rem;
  line-height: 1.75;
}

.container {
  width: min(1140px, 94vw);
  margin: 0 auto;
}

/* ——— Header (как medunitsa: светлая полоса) ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  min-height: var(--header-h);
  height: auto;
  padding: 1rem 0 0.75rem;
  display: flex;
  align-items: center;
  background: rgba(247, 243, 235, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(58, 85, 70, 0.08);
  transition: box-shadow var(--transition);
}

.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.site-header.is-over-hero {
  background: transparent;
  border-bottom-color: transparent;
}

.site-header.is-over-hero .nav-link { color: var(--white); }

.site-header.is-over-hero.is-scrolled,
.site-header:not(.is-over-hero) {
  background: rgba(247, 243, 235, 0.96);
}

.site-header.is-over-hero.is-scrolled .nav-link,
.site-header .nav-link {
  color: var(--green-deep);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
  background: var(--beige);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(58, 85, 70, 0.08);
}

.logo img {
  display: block;
  height: 52px;
  width: auto;
  max-width: min(220px, 42vw);
  object-fit: contain;
}

.site-header.is-over-hero:not(.is-scrolled) .logo {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.1rem;
}

.nav-link {
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--green);
  background: var(--green-pale);
}

.site-header.is-over-hero:not(.is-scrolled) .nav-link:hover,
.site-header.is-over-hero:not(.is-scrolled) .nav-link.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
}

.nav-dropdown { position: relative; }
.nav-dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin-left: 0.3em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  vertical-align: middle;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  padding: 0.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: var(--transition);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(2px);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
}

.nav-dropdown-menu a:hover { background: var(--green-pale); }

.nav-phone {
  font-weight: 600;
  white-space: nowrap;
  font-size: 1rem;
}

.header-phone-mobile {
  display: none;
}

.site-header.is-over-hero:not(.is-scrolled) .header-phone-mobile {
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* Messengers */
.messengers { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.messenger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
}
.messenger-btn__icon { width: 1.15rem; height: 1.15rem; }
.messenger-btn--nav .messenger-btn__text { display: none; }
@media (min-width: 1100px) {
  .messenger-btn--nav .messenger-btn__text { display: inline; }
}
.messenger-btn--telegram { background: #229ed9; }
.messenger-btn--max { background: #5b4fd6; }
.messenger-btn.is-pending { opacity: 0.5; cursor: default; }
.messengers--card { margin-top: 0.75rem; gap: 0.65rem; }
.messenger-btn--card {
  flex: 1 1 140px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}
.messenger-btn--card .messenger-btn__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
}
.messenger-link { text-decoration: none; }
.messenger-link.is-pending { opacity: 0.6; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  width: 24px;
  height: 2px;
  background: var(--green-deep);
  transition: var(--transition);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  text-align: center;
  padding: calc(var(--header-h) + 2rem) 0 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--green-pale);
}

.hero-bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  z-index: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg__video {
    display: none;
  }

  .hero-bg {
    background: var(--green-deep) url("../images/usadba/video-poster.jpg") center / cover no-repeat;
  }
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(45, 68, 56, 0.35) 0%,
    rgba(45, 68, 56, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: clamp(1.25rem, 3.5vh, 2.25rem) 0 0;
}

.hero-content [data-roomslot-account-id] {
  width: 100vw;
  max-width: 100vw;
  align-self: center;
  margin-top: auto;
  margin-bottom: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.hero-content [data-roomslot-account-id] > div,
.hero-content [data-roomslot-account-id] iframe {
  width: 100% !important;
  max-width: 100%;
}

.hero-logo {
  width: min(240px, 46vw);
  height: auto;
  margin: 0 auto 1rem;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.35));
}

.hero-slogan {
  display: block;
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.hero h1,
.hero-title {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.2);
}

.hero .lead {
  color: rgba(255, 255, 255, 0.95);
  margin: 0 auto 1.25rem;
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform 0.2s, color var(--transition);
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(74, 107, 88, 0.35);
}

.btn-primary:hover {
  background: var(--green-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.75);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--green-deep);
  border-color: var(--white);
}

.section-green .btn-outline,
.section-alt .btn-outline {
  color: var(--green-deep);
  border-color: var(--green);
}

.section-green .btn-outline:hover,
.section-alt .btn-outline:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-forest {
  background: var(--green);
  color: var(--white);
}

.btn-forest:hover {
  background: var(--green-dark);
  color: var(--white);
}

/* ——— Sections ——— */
.section { padding: 4.5rem 0; }

.section-alt {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--sand);
}

.section-alt > .container {
  position: relative;
  z-index: 1;
}

.section-alt:has(+ .section-green) {
  padding-bottom: 5.5rem;
}

.section-alt:has(+ .section-green)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 52%,
    rgba(232, 239, 233, 0.45) 78%,
    var(--green-pale) 100%
  );
}

/* Светлый орнаментальный фон (главная, шапки страниц) */
.section-green,
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(165deg, #f0f5f1 0%, var(--green-pale) 48%, #dde8df 100%);
}

.section-green::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../images/decor/harmony-pattern-light.svg");
  background-size: 72px 72px;
  opacity: 0.7;
}

.section-green::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 255, 255, 0.65), transparent 58%),
    radial-gradient(ellipse 50% 45% at 0% 100%, rgba(74, 107, 88, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 45% at 100% 100%, rgba(74, 107, 88, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(166, 139, 92, 0.08), transparent 55%);
}

.section-green {
  padding-bottom: 5.5rem;
}

.section-green::after {
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 255, 255, 0.65), transparent 58%),
    radial-gradient(ellipse 50% 45% at 0% 100%, rgba(74, 107, 88, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 45% at 100% 100%, rgba(74, 107, 88, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(166, 139, 92, 0.08), transparent 55%),
    linear-gradient(180deg, transparent 0%, transparent 48%, rgba(250, 248, 244, 0.55) 76%, var(--sand) 100%);
}

.page-hero::after {
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(255, 255, 255, 0.65), transparent 58%),
    radial-gradient(ellipse 50% 45% at 0% 100%, rgba(74, 107, 88, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 45% at 100% 100%, rgba(74, 107, 88, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(166, 139, 92, 0.08), transparent 55%),
    linear-gradient(180deg, transparent 0%, transparent 52%, rgba(247, 243, 235, 0.7) 84%, var(--beige) 100%);
}

.section-green + .section-alt,
.section-alt + .section-green {
  margin-top: -3.5rem;
  padding-top: calc(4.5rem + 2.5rem);
}

.section-alt + .section-green {
  background: linear-gradient(
    180deg,
    var(--sand) 0%,
    #eef4ef 10%,
    #f0f5f1 18%,
    var(--green-pale) 46%,
    #dde8df 100%
  );
}

.section-green > .container,
.page-hero > .container {
  position: relative;
  z-index: 1;
}

.page-hero + .section,
.page-hero + .section-alt {
  margin-top: -2.5rem;
  padding-top: calc(4.5rem + 2rem);
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .section-green::before,
  .page-hero::before {
    background-size: 80px 80px;
  }

  .section-green > .container {
    position: relative;
  }

  .section-green > .container::before,
  .section-green > .container::after {
    content: "";
    position: absolute;
    top: 50%;
    width: min(140px, 12vw);
    height: clamp(40px, 6vw, 64px);
    background: url("../111.png") center / contain no-repeat;
    opacity: 0.14;
    pointer-events: none;
    transform: translateY(-50%);
    filter: brightness(0.85) saturate(0.9);
  }

  .section-green > .container::before {
    left: max(-0.25rem, -1.5vw);
  }

  .section-green > .container::after {
    right: max(-0.25rem, -1.5vw);
    transform: translateY(-50%) scaleX(-1);
    filter: brightness(0.85) saturate(0.9);
  }
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.section-header .lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header:has(.section-ornaments) {
  max-width: min(1100px, 96vw);
}

.section-header:has(.section-ornaments) h2 {
  margin: 0 0 1rem;
}

.section-ornaments {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem);
  margin-bottom: 1rem;
}

.section-ornament {
  width: auto;
  height: clamp(48px, 14vw, 80px);
  max-width: min(300px, 88vw);
  object-fit: contain;
  pointer-events: none;
}

.section-ornament--mirror {
  display: none;
}

@media (min-width: 900px) {
  .section-ornaments {
    gap: clamp(1rem, 4vw, 3rem);
    margin-bottom: 1.25rem;
  }

  .section-ornament {
    height: clamp(120px, 14vw, 200px);
    max-width: min(320px, 40vw);
  }

  .section-ornament--mirror {
    display: block;
    transform: scaleX(-1);
  }
}

.section-header .eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.section-green .section-header h2 { color: var(--green-deep); }
.section-green .lead { color: var(--text-muted); }

/* legacy alias */
.section-forest {
  background: var(--green-pale);
  color: var(--text);
}
.section-forest .section-header h2 { color: var(--green-deep); }
.section-forest .section-header .eyebrow { color: var(--green); }
.section-forest .lead { color: var(--text-muted); }

/* ——— House cards ——— */
.houses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: start;
}

.house-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(58, 85, 70, 0.06);
}

.house-card-image {
  display: block;
  position: relative;
  background: var(--photo-bg);
  text-decoration: none;
}

.house-card-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.house-card-image .tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  background: var(--green);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
}

.house-card-body { padding: 1.5rem 1.75rem 1.75rem; }
.house-card h3 { margin-bottom: 0.35rem; }
.house-card-address {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.house-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.house-price {
  font-family: var(--font-display);
  font-size: 1.65rem;
  color: var(--green-dark);
  margin-bottom: 1.25rem;
}
.house-price small {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ——— Features ——— */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--beige-dark);
}

.feature-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 0.65rem;
  color: var(--green);
}

.feature-carousel {
  position: relative;
  margin-bottom: 0.85rem;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: var(--photo-bg);
  border: 1px solid var(--beige-dark);
}

.feature-carousel__viewport {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 140px;
}

.feature-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
}

.feature-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.feature-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: static;
  min-height: 0;
}

.feature-carousel__btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--green-deep);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: background 0.2s, color 0.2s;
}

.feature-carousel__btn:hover {
  background: var(--white);
  color: var(--green);
}

.feature-carousel__btn--prev { left: 0.35rem; }
.feature-carousel__btn--next { right: 0.35rem; }

.feature-carousel__dots {
  position: absolute;
  bottom: 0.4rem;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.feature-carousel__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.feature-carousel__dot.is-active {
  background: var(--white);
  transform: scale(1.15);
}

.feature-card h3 { margin-bottom: 0.4rem; font-size: 1.15rem; }
.feature-card p { margin: 0; font-size: 0.95rem; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  .feature-carousel__slide {
    transition: none;
  }
}

/* ——— Page hero ——— */
.page-hero {
  padding: calc(var(--header-h) + 3rem) 0 3.25rem;
  text-align: center;
  border-bottom: none;
}

.page-hero h1 {
  margin-bottom: 0.75rem;
  color: var(--green-deep);
}

.page-hero .lead {
  margin: 0 auto;
  color: var(--text-muted);
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--green); text-decoration: none; }

/* ——— Split (фото + текст) ——— */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.split-reverse .split-image { order: 2; }

.split-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--photo-bg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--beige-dark);
}

.split-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ——— Gallery: без квадратной обрезки ——— */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  align-items: start;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--photo-bg);
  border: 1px solid var(--beige-dark);
  padding: 0;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity 0.3s;
}

.gallery-item:hover img { opacity: 0.92; }

.gallery-item.featured {
  grid-column: span 1;
  grid-row: span 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(45, 68, 56, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox img {
  max-height: 92vh;
  max-width: 96vw;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* ——— Specs, rules ——— */
.specs-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.specs-list li {
  display: flex;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--beige-dark);
  font-size: 0.95rem;
}

.specs-list li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}

.rule-item {
  background: var(--sand);
  padding: 1.15rem;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--beige-dark);
}

.rule-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--green-dark);
}

.routes-layout {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
}

.routes-block h3 {
  color: var(--green-deep);
  margin-bottom: 0.85rem;
}

.routes-block > p {
  max-width: 46rem;
  margin-bottom: 1rem;
}

.route-steps {
  margin: 0 0 1.25rem;
  padding-left: 1.35rem;
  max-width: 46rem;
}

.route-steps li {
  margin-bottom: 0.65rem;
  padding-left: 0.35rem;
}

.route-steps li::marker {
  color: var(--green);
  font-weight: 700;
}

.routes-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 46rem;
  margin-bottom: 0.75rem;
}

.routes-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1rem;
}

.route-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(74, 107, 88, 0.14);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.route-card h4 {
  font-size: 1.05rem;
  color: var(--green-deep);
  margin-bottom: 0.35rem;
  line-height: 1.35;
}

.route-distance {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 0.45rem;
}

.route-card p:last-child {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.booking-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--beige-dark);
}

.video-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--photo-bg);
  box-shadow: var(--shadow-sm);
  line-height: 0;
}

.video-wrap video {
  width: 100%;
  height: auto;
  display: block;
}

.video-placeholder {
  padding: 3rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--green-pale);
}

/* ——— Region cards ——— */
.region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.region-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(58, 85, 70, 0.06);
}

.region-card-image {
  background: var(--photo-bg);
  line-height: 0;
}

.region-card-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.region-card-image .feature-carousel {
  margin: 0;
  border: none;
  border-radius: 0;
}

.region-card-body { padding: 1.35rem; }
.region-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.2rem;
  color: var(--green-deep);
}
.region-card p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

/* ——— Reviews ——— */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.review-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
  box-shadow: var(--shadow-sm);
}

.review-stars { color: var(--accent); margin-bottom: 0.65rem; }
.review-author { font-weight: 600; font-size: 0.88rem; margin-top: 0.85rem; color: var(--text-muted); }

/* ——— Contact ——— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--beige-dark);
}

.contact-phone {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--green-dark);
  text-decoration: none;
}

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--beige-dark);
}

.map-wrap iframe { width: 100%; height: 360px; border: 0; }

/* ——— CTA & footer: орнаментальная сетка ——— */
.cta-strip,
.site-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.cta-strip::before,
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("../images/decor/harmony-pattern.svg");
  background-size: 72px 72px;
  opacity: 0.5;
}

.cta-strip::after,
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(196, 169, 122, 0.28), transparent 58%),
    radial-gradient(ellipse 45% 55% at 0% 100%, rgba(255, 255, 255, 0.07), transparent 50%),
    radial-gradient(ellipse 45% 55% at 100% 100%, rgba(255, 255, 255, 0.07), transparent 50%);
}

.cta-strip > .container,
.site-footer > .container {
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .cta-strip::before,
  .site-footer::before {
    background-size: 80px 80px;
  }

  .cta-strip .container,
  .site-footer .container {
    position: relative;
  }

  .cta-strip .container::before,
  .cta-strip .container::after {
    content: "";
    position: absolute;
    top: 50%;
    width: min(160px, 14vw);
    height: clamp(48px, 8vw, 72px);
    background: url("../111.png") center / contain no-repeat;
    opacity: 0.2;
    pointer-events: none;
    transform: translateY(-50%);
  }

  .cta-strip .container::before {
    left: max(-0.5rem, -2vw);
  }

  .cta-strip .container::after {
    right: max(-0.5rem, -2vw);
    transform: translateY(-50%) scaleX(-1);
  }
}

@media (min-width: 1100px) {
  .site-footer .container::before,
  .site-footer .container::after {
    content: "";
    position: absolute;
    top: 2.5rem;
    width: min(140px, 12vw);
    height: 56px;
    background: url("../111.png") center / contain no-repeat;
    opacity: 0.16;
    pointer-events: none;
  }

  .site-footer .container::before {
    left: -0.25rem;
  }

  .site-footer .container::after {
    right: -0.25rem;
    transform: scaleX(-1);
  }
}

/* ——— CTA ——— */
.cta-strip {
  padding: 3.5rem 0;
  text-align: center;
  background: linear-gradient(165deg, #527a66 0%, var(--green) 45%, #3a5546 100%);
  color: var(--white);
}

.cta-strip h2 { color: var(--white); }
.cta-strip p { color: rgba(255, 255, 255, 0.92); max-width: 520px; margin: 0 auto 1.5rem; }

.cta-strip .btn-primary {
  background: var(--white);
  color: var(--green-deep);
}

.cta-strip .btn-primary:hover {
  background: var(--beige);
  color: var(--green-deep);
}

/* ——— Quiet banner ——— */
.quiet-banner-ornament {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto 1.25rem;
  line-height: 0;
}

.quiet-banner-ornament img {
  display: block;
  width: auto;
  height: clamp(56px, 12vw, 120px);
  max-width: min(420px, 92vw);
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 900px) {
  .quiet-banner-ornament {
    margin-bottom: 1.5rem;
  }

  .quiet-banner-ornament img {
    height: clamp(80px, 10vw, 140px);
    max-width: min(520px, 70vw);
  }
}

.quiet-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--beige-dark);
  background: var(--white);
}

.quiet-banner-image {
  background: var(--photo-bg);
  line-height: 0;
}

.quiet-banner-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  position: static;
  min-height: 0;
}

.quiet-banner-text {
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ——— Footer ——— */
.site-footer {
  background: linear-gradient(180deg, #2a4236 0%, var(--green-deep) 40%, #1e3028 100%);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}

.site-footer::before {
  opacity: 0.38;
}

.site-footer::after {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(196, 169, 122, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 35% at 15% 85%, rgba(255, 255, 255, 0.04), transparent),
    radial-gradient(ellipse 40% 35% at 85% 85%, rgba(255, 255, 255, 0.04), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--white);
  margin-bottom: 0.65rem;
}

.site-footer a { color: var(--accent-light); text-decoration: none; }
.site-footer a:hover { color: var(--white); }

.footer-title {
  color: var(--white);
  font-weight: 600;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.45rem; }

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— Responsive ——— */
@media (max-width: 1024px) {
  .houses-grid,
  .split,
  .region-grid,
  .footer-grid,
  .quiet-banner,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .split-reverse .split-image { order: 0; }
  .region-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    min-height: var(--header-h);
    padding: 0.4rem 0;
    background: rgba(250, 248, 244, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(58, 85, 70, 0.06);
  }

  .site-header .container {
    gap: 0.4rem;
  }

  .burger {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    gap: 4px;
    border: 1px solid rgba(58, 85, 70, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background var(--transition), border-color var(--transition);
  }

  .burger:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(58, 85, 70, 0.16);
  }

  .burger span {
    width: 16px;
    height: 1.5px;
    border-radius: 1px;
    background: var(--green);
  }

  .header-phone-mobile {
    display: block;
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0 0.2rem;
    font-size: clamp(0.95rem, 4.5vw, 1.12rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--green-deep);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.2;
    opacity: 1;
    transition: color var(--transition);
  }

  .header-phone-mobile:hover {
    color: var(--green);
  }

  .site-header.is-over-hero:not(.is-scrolled) .header-phone-mobile:hover {
    color: var(--green-deep);
    opacity: 1;
  }

  .nav .nav-phone {
    display: none;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(250, 248, 244, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 0.65rem 0.85rem 1rem;
    gap: 0.1rem;
    border-bottom: 1px solid rgba(58, 85, 70, 0.08);
    box-shadow: 0 12px 28px rgba(45, 68, 56, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
  }

  .nav-phone { font-size: 1rem; }
  .messenger-btn--nav {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
  }

  .messengers--nav {
    gap: 0.5rem;
    padding: 0.35rem 0 0;
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 0.5rem;
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown-menu { display: block; }

  .region-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero {
    min-height: min(100svh, 900px);
    padding-bottom: 0;
  }
  .section { padding: 3rem 0; }

  .section-green {
    padding-bottom: 4rem;
  }

  .section-alt:has(+ .section-green) {
    padding-bottom: 4rem;
  }

  .section-green + .section-alt,
  .section-alt + .section-green {
    margin-top: -2.5rem;
    padding-top: calc(3rem + 1.75rem);
  }

  .page-hero {
    padding-bottom: 2.75rem;
  }

  .page-hero + .section,
  .page-hero + .section-alt {
    margin-top: -2rem;
    padding-top: calc(3rem + 1.5rem);
  }
  .gallery-grid { grid-template-columns: 1fr; }
  .houses-grid { gap: 1.5rem; }

  .site-header.is-over-hero,
  .site-header.is-over-hero.is-scrolled {
    background: rgba(250, 248, 244, 0.9);
    border-bottom-color: rgba(58, 85, 70, 0.06);
  }

  .site-header.is-over-hero .nav-link {
    color: var(--green-deep);
  }

  .site-header.is-over-hero .header-phone-mobile,
  .site-header.is-over-hero:not(.is-scrolled) .header-phone-mobile {
    color: var(--green-deep);
    text-shadow: none;
  }

  .site-header.is-over-hero .logo,
  .site-header.is-over-hero.is-scrolled .logo {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
  }

  .logo img {
    height: 34px;
    max-width: 118px;
  }

  .hero-content {
    padding-top: 1.5rem;
  }

  .hero-logo {
    width: min(180px, 48vw);
    margin-bottom: 0.85rem;
  }

}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }

  .logo img {
    height: 30px;
    max-width: 100px;
  }

  .header-phone-mobile {
    font-size: clamp(0.88rem, 4.2vw, 1.02rem);
    font-weight: 700;
  }

  .burger {
    width: 36px;
    height: 36px;
  }

  .burger span {
    width: 15px;
  }
}
