/* =============================================
   VERDE PARK — Сітка, сайдбар, верхнє меню
   ============================================= */

/* ---------- Загальна обгортка ---------- */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* =============================================
   ЛІВИЙ САЙДБАР
   ============================================= */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 50px;
  gap: var(--gap-md);
  z-index: 100;
}

/* --- Лого --- */
.sidebar-logo {
  display: flex;
  align-items: flex-start;
}

.sidebar-logo-img {
  display: block;
}

/* --- Logo subtitle --- */
.logo-subtitle {
  font-family: var(--font-museo);
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* --- Навігація --- */
.sidebar-nav {
  flex: 1;
  margin-top: 100px;
}

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 5px;
  font-family: var(--font-museo);
  font-size: 16px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--text-dark);
  transition: color 0.2s, background 0.2s;
}

.sidebar-nav a:hover {
  color: var(--green);
}

/* Активний пункт — Museo 900 */
.sidebar-nav a.active {
  background: var(--nav-active-bg);
  color: var(--green);
  font-weight: 900;
}

/* --- Телефон --- */
.sidebar-phone {
  font-family: var(--font-museo);
  font-size: 16px;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 0.02em;
}

/* --- Адреса --- */
.sidebar-address {
  font-family: var(--font-museo);
  font-size: 14px;
  font-weight: 100;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Соцмережі --- */
.sidebar-social {
  display: flex;
  justify-content: space-between;
}

.social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.social-icon:hover {
  background: var(--green);
}

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: var(--white);
}

/* =============================================
   КОНТЕНТНА ЗОНА
   ============================================= */
.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, .04) 0px,
      rgba(0, 0, 0, .04) 1px,
      transparent        1px,
      transparent        120px
    )
    var(--content-area-bg);
}

/* =============================================
   ВЕРХНЄ МЕНЮ (топ-бар)
   ============================================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px 50px 0 150px;
}

.topbar-nav {
  background: var(--white);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 0 4px;
  display: flex;
  gap: 4px;
  width: 490px;
  height: 30px;
  align-items: center;
}

.topbar-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0;
  height: 100%;
  border-radius: 2px;
  font-family: var(--font-museo);
  font-size: 16px;
  font-weight: 100;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-dark);
  transition: color 0.2s, background 0.2s;
}

.topbar-nav a:hover {
  color: var(--green);
}

.topbar-nav a.active {
  background: var(--section-bg);
  color: var(--green);
}

/* --- Перемикач мов UA / EU --- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-museo);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.lang-switch button {
  padding: 2px 0;
  color: var(--text-muted);
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
}

.lang-switch button.active {
  color: var(--green);
}

.lang-switch button:hover {
  color: var(--green-dark);
}

.lang-divider {
  color: var(--text-muted);
  font-weight: 300;
}

/* --- Головний контент сторінки --- */
.page-content {
  flex: 1;
  padding: 80px 50px 60px 150px;
}

/* =============================================
   ПРЕМІАЛЬНІ АНІМАЦІЇ — спільні початкові стани
   Transition задається через JS inline при reveal.
   ============================================= */
.ha { opacity: 0; will-change: opacity, transform, filter; }
.ha-up    { transform: translateY(18px); filter: blur(8px); }
.ha-down  { transform: translateY(-12px); filter: blur(8px); }
.ha-left  { transform: translateX(-18px); filter: blur(6px); }
.ha-scale { transform: scale(0.97);       filter: blur(6px); }

.ha.ha-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* =============================================
   СПІЛЬНИЙ ОВЕРЛЕЙ ПАРАЛАКС-БАНЕРА
   Використовується на сторінках: про нас,
   переваги, планування, контакти.
   ============================================= */
.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, .18) 0px,
      rgba(255, 255, 255, .18) 1px,
      transparent              1px,
      transparent              120px
    ),
    linear-gradient(
      to top right,
      rgba(60, 40, 90, .82) 0%,
      rgba(40, 25, 65, .60) 45%,
      rgba(20, 15, 40, .35) 100%
    );
  pointer-events: none;
}

/* =============================================
   ПЛЕЙСХОЛДЕР ФОТО
   ============================================= */
.img-placeholder {
  width: 100%;
  border: 2px dashed var(--text-muted);
  background: var(--section-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-body);
  text-align: center;
  padding: 12px;
}

/* =============================================
   МОБІЛЬНИЙ ХЕДЕР (показується < 768px)
   ============================================= */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
}

.mobile-header-lang {
  margin-left: auto;
  margin-right: 16px;
  font-size: 13px;
}

.mobile-header-lang button {
  color: var(--text-muted);
}

.mobile-header-lang button.active {
  color: var(--green);
}

.mobile-header-lang .lang-divider {
  color: var(--text-muted);
}

.mobile-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

/* Кнопка-гамбургер */
.hamburger {
  width: 36px;
  height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Стан «відкрито» */
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   МОБІЛЬНИЙ ОВЕРЛЕЙ-МЕНЮ
   ============================================= */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--sidebar-bg);
  padding: 90px 32px 40px;
  flex-direction: column;
  gap: var(--gap-md);
  overflow-y: auto;
}

.mobile-overlay.is-open {
  display: flex;
}

.mobile-overlay .sidebar-nav a {
  font-size: 15px;
  padding: 12px 16px;
}

.mobile-overlay .topbar-nav {
  background: var(--section-bg);
  box-shadow: none;
  border-radius: 10px;
  width: 100%;
  height: auto;
  flex-wrap: nowrap;
  padding: 4px;
  gap: 4px;
}

.mobile-overlay .topbar-nav a {
  flex: 1;
  height: 44px;
  font-size: 14px;
  border-radius: 8px;
  padding: 0;
}

.mobile-overlay .lang-switch {
  margin-top: 8px;
}

.mobile-overlay .lang-switch button {
  color: var(--text-muted);
}

.mobile-overlay .lang-switch button.active {
  color: var(--green);
}

.mobile-overlay .lang-divider {
  color: var(--text-muted);
}

.mobile-overlay .sidebar-phone {
  font-size: 17px;
}

.mobile-overlay .sidebar-social {
  flex-wrap: wrap;
}

/* =============================================
   АДАПТИВНІСТЬ
   ============================================= */

/* Планшет: 768–1199px */
@media (max-width: 1199px) {
  .sidebar {
    width: var(--sidebar-w-md);
    padding: 32px 24px;
  }

  .topbar {
    padding: 20px 28px 0 80px;
  }

  .topbar-nav {
    width: auto;
  }

  .page-content {
    padding: 60px 32px 48px 80px;
  }

  .topbar-nav a {
    padding: 0 14px;
  }
}

/* Мобайл: < 768px */
@media (max-width: 767px) {
  .site-wrapper {
    flex-direction: column;
    padding-top: 64px; /* висота mobile-header */
  }

  .sidebar {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  .topbar {
    display: none;
  }

  .page-content {
    padding: 24px 16px 48px;
  }
}


/* =============================================
   АНІМАЦІЯ ПЕРЕХОДУ МІЖ СТОРІНКАМИ
   Темна панель (#0e1a08) з вертикальними рисками
   бренду. Перекриває екран → нова сторінка → відкривається.
   ============================================= */
#pt {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  will-change: transform;

  background: var(--pt-bg);

  /* За замовчуванням — перекриває весь екран;
     JS на DOMContentLoaded одразу додає .pt-reveal */
  transform: scaleX(1);
  transform-origin: right center;
}

/* Зелена крайова смуга (ліво — під час розкриття) */
#pt::after {
  content: '';
  position: absolute;
  inset: 0;
  left: auto;
  width: 4px;
  background: var(--green);
  box-shadow: 0 0 24px rgba(158, 199, 62, .7);
}

/* --- Розкриття нової сторінки (scaleX 1 → 0, origin правий) --- */
#pt.pt-reveal {
  transform-origin: right center;
  animation: ptReveal 560ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* --- Перекриття при виході (scaleX 0 → 1, origin лівий) --- */
#pt.pt-cover {
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: auto;
  animation: ptCover 400ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes ptReveal {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@keyframes ptCover {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}


/* =============================================
   СИСТЕМА МОДАЛЬНИХ ВІКОН
   ============================================= */

/* --- Оверлей-обгортка --- */
.site-modal {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.site-modal[hidden] { display: none; }

.site-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity 200ms ease;
  cursor: pointer;
  pointer-events: all;
}

/* --- Контейнер --- */
.site-modal__container {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: calc(100% - 32px);
  max-width: 880px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: all;
}

/* Анімація появи */
.site-modal.is-open .site-modal__overlay   { opacity: 1; }
.site-modal.is-open .site-modal__container { opacity: 1; transform: translateY(0); }

/* --- Шапка --- */
.site-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 32px 0;
  flex-shrink: 0;
}

.site-modal__title {
  font-family: var(--font-montserrat);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-heading);
  line-height: 1.2;
}

.site-modal__close {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: none;
  border-radius: 5px;
  background: var(--section-bg);
  color: var(--text-dark);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s;
}

.site-modal__close:hover {
  background: var(--green);
  color: var(--white);
}

.site-modal__close span {
  display: block;
  transform: translateY(-3px);
  pointer-events: none;
}

.site-modal__lead {
  padding: 10px 32px 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* --- Тіло (скролиться) --- */
.site-modal__body {
  padding: 22px 32px 32px;
  overflow-y: auto;
  flex: 1;
}

/* =============================================
   ТАЙМЛАЙН «Хід будівництва»
   ============================================= */
.timeline {
  list-style: none;
  position: relative;
  padding-left: 32px;
}

/* Вертикальна лінія */
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--timeline-line);
}

/* Маркер-кружечок */
.timeline__item {
  position: relative;
  padding-bottom: 32px;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--timeline-dot);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--timeline-dot);
}

/* Виконаний етап */
.timeline__item--done::before {
  background: var(--timeline-dot-done);
  box-shadow: 0 0 0 2px var(--timeline-dot-done);
}

/* Поточний етап */
.timeline__item--current::before {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(158, 199, 62, .25);
}

.timeline__date {
  font-family: var(--font-montserrat);
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 5px;
}

.timeline__desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.timeline__photo {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

/* =============================================
   АКОРДЕОН «Тех. характеристики»
   ============================================= */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.accordion__item {
  background: var(--section-bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-montserrat);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: left;
  transition: color 0.18s;
}

.accordion__btn:hover { color: var(--green); }
.accordion__item--open .accordion__btn { color: var(--green); }

/* Іконка +/– */
.accordion__icon {
  flex-shrink: 0;
  position: relative;
  width: 16px;
  height: 16px;
}

.accordion__icon::before,
.accordion__icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.accordion__icon::before {
  width: 12px;
  height: 2px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.accordion__icon::after {
  width: 2px;
  height: 12px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.accordion__item--open .accordion__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 280ms ease;
}

.accordion__panel-inner {
  padding: 4px 18px 16px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.7;
}

.accordion__panel-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.accordion__panel-inner li {
  padding: 2px 0 2px 18px;
  position: relative;
}

.accordion__panel-inner li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 12px;
}

/* Таблиця параметрів */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
  border-radius: var(--radius);
  overflow: hidden;
}

.specs-table th,
.specs-table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }

.specs-table th {
  font-family: var(--font-montserrat);
  font-weight: 600;
  color: var(--text-dark);
  background: var(--section-bg);
  width: 48%;
}

.specs-table td {
  font-weight: 300;
  color: var(--text-muted);
}

/* =============================================
   ГАЛЕРЕЯ
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-thumb {
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  display: block;
}

/* =============================================
   ЛАЙТБОКС
   ============================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox[hidden] { display: none; }

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .90);
  cursor: pointer;
}

.lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 60px 80px;
  pointer-events: none;
}

.lightbox__img-wrap {
  pointer-events: auto;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
}

.lightbox__placeholder {
  width: 70vw;
  max-width: 800px;
  aspect-ratio: 4 / 3;
  border: 2px dashed rgba(255, 255, 255, .25);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, .5);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  z-index: 2;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
  pointer-events: auto;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover { background: var(--green); }

.lightbox__close {
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  font-size: 22px;
}

.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 26px;
}

.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }

/* =============================================
   АДАПТИВ МОДАЛОК
   ============================================= */
@media (min-width: 768px) and (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  /* Модалка знизу екрану */
  .site-modal {
    padding: 0;
    align-items: flex-end;
  }

  .site-modal__container {
    width: 100%;
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
  }

  .site-modal__header {
    padding: 20px 20px 0;
  }

  .site-modal__title { font-size: 16px; }

  .site-modal__lead {
    padding: 8px 20px 0;
  }

  .site-modal__body {
    padding: 16px 20px 24px;
  }

  .gallery-grid { grid-template-columns: 1fr; }

  .lightbox__content {
    padding: 60px 56px;
  }

  .lightbox__prev,
  .lightbox__next {
    width: 44px;
    height: 44px;
  }
}
