/* ============================================================
   PROJECT PAGE — project.css
   Подключается только на странице проекта
   ============================================================ */

/* ============================================================
   LAZY LOAD — блюр-эффект при загрузке
   ============================================================ */
.ll-img {
  filter: blur(8px);
  transition: filter 0.5s ease;
}
.ll-img.ll-loaded {
  filter: blur(0);
}
.ll-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(12px) brightness(0.7);
  transform: scale(1.04); /* компенсация blur-краёв */
  transition: filter 0.6s ease, transform 0.6s ease;
}
.ll-bg.ll-loaded {
  filter: blur(0) brightness(1);
  transform: scale(1);
}

/* ============================================================
   HERO
   ============================================================ */
.project-hero {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: -150px; /* выезжаем за пределы потока, начинаем выше шапки */
}

.project-hero__bg {
  position: absolute;
  inset: 0;
  background-color: #1a1a1a; /* placeholder до загрузки */
}

.project-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1;
}

.project-hero__content {
  position: relative;
  z-index: 2;
  padding: 0 var(--px);
  padding-top: calc(var(--topbar-h) * 2); /* уходим ниже шапки */
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.5vw, 20px);
  max-width: 900px;
  margin-top: -5vh; /* чуть выше середины */
}

.project-hero__type {
  font-family: var(--font-m);
  font-weight: 500;
  font-size: clamp(11px, 0.8vw, 14px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243,245,245,0.75);
}

.project-hero__title {
  font-family: var(--font-u);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 72px);
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text);
  margin: 0;
}

.project-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-m);
  font-weight: 500;
  font-size: clamp(13px, 0.94vw, 16px);
  color: rgba(243,245,245,0.85);
  transition: color 0.2s;
  text-decoration: none;
}
.project-hero__back:hover {
  color: var(--text);
}
.project-hero__back-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
  transition: transform 0.2s;
}
.project-hero__back:hover .project-hero__back-arrow {
  transform: translateX(-3px);
}

/* ============================================================
   PROJECT INFO — о проекте + характеристики
   ============================================================ */
.project-info {
  padding: clamp(40px, 6vw, 100px) var(--px);
}

.project-info__inner {
  display: grid;
  grid-template-columns: 60% 1fr;
  gap: clamp(32px, 5vw, 80px);
  max-width: 1100px;
  margin: 0 auto;
}

.project-info__heading {
  font-family: var(--font-u);
  font-weight: 700;
  font-size: clamp(20px, 2.08vw, 40px);
  color: var(--text);
  margin-bottom: clamp(16px, 2vw, 28px);
}

.project-info__text {
  font-family: var(--font-m);
  font-weight: 400;
  font-size: clamp(14px, 1vw, 18px);
  line-height: 1.65;
  color: rgba(243,245,245,0.85);
}
.project-info__text p {
  margin-bottom: 1em;
   line-height: 1.8;
}
.project-info__text p:last-child {
  margin-bottom: 0;
}

.project-info__right {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.5vw, 36px);
  padding-top: clamp(4px, 0.5vw, 8px);
}

.project-info__stat-title {
  font-family: var(--font-u);
  font-weight: 600;
  font-size: clamp(11px, 0.83vw, 15px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(243,245,245,0.5);
  margin-bottom: 6px;
}

.project-info__stat-value {
  display: block;
  font-family: var(--font-m);
  font-weight: 500;
  font-size: clamp(15px, 1.15vw, 22px);
  color: var(--text);
  line-height: 1.3;
}

/* ============================================================
   БЫЛО / СТАЛО + 360 — секция
   ============================================================ */
.project-compare-section {
  padding: 0 var(--px) clamp(40px, 6vw, 100px);
}

.project-compare-row {
  max-width: 1100px;
  margin: 0 auto;
}

/* Оба блока присутствуют — рядом */
.project-compare-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

/* Только один блок — на всю ширину */
.project-compare-row--full {
  display: block;
}

/* ============================================================
   БЫЛО / СТАЛО — слайдер-полоска
   ============================================================ */
.project-before-after {
  border-radius: var(--r-card);
  overflow: hidden;
}

.before-after__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  border-radius: var(--r-card);
}

.before-after__before,
.before-after__after {
  position: absolute;
  inset: 0;
}

.before-after__before {
  z-index: 1;
}

.before-after__after {
  z-index: 2;
  clip-path: inset(0 50% 0 0); /* JS будет менять это значение */
}

.before-after__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.before-after__label {
  position: absolute;
  top: 16px;
  font-family: var(--font-u);
  font-weight: 600;
  font-size: clamp(11px, 0.83vw, 14px);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text);
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  padding: 5px 12px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 10;
}
.before-after__label--left  { left: 16px; }
.before-after__label--right { right: 16px; }

.before-after__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%; /* JS будет менять */
  width: 3px;
  background: rgba(255,255,255,0.9);
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
}

.before-after__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  color: #222;
  z-index: 6;
}

/* ============================================================
   360° KUULA
   ============================================================ */
.project-360 {
  border-radius: var(--r-card);
  overflow: hidden;
}

.panorama-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.panorama-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ============================================================
   СЛАЙДЕРЫ КОМНАТ
   ============================================================ */
.project-rooms {
  padding: 0 var(--px) clamp(60px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 6vw, 96px);
}

.room-slider__title {
  font-family: var(--font-u);
  font-weight: 700;
  font-size: clamp(18px, 1.77vw, 34px);
  color: var(--text);
  margin-bottom: clamp(16px, 2vw, 28px);
}

.room-slider__outer {
  overflow: hidden;
  width: 100%;
}

.room-slider__track {
  display: flex;
  gap: clamp(8px, 1vw, 16px);
  will-change: transform;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.room-slide {
  flex-shrink: 0;
  height: 350px;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-dark);
  display: flex; /* ширина = ширине img внутри */
}

.room-slide__img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
}

/* Стрелки — под слайдером справа */
.room-slider__controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: clamp(12px, 1.5vw, 20px);
}

.room-slider__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.room-slider__arrow:hover {
  background: rgba(255,255,255,0.18);
}

/* ============================================================
   LIGHTBOX — полноэкранная галерея
   ============================================================ */
.project-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.project-lightbox.is-open {
  display: flex;
}
.project-lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}
.project-lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
}
.project-lightbox__close:hover {
  background: rgba(255,255,255,0.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .project-info__inner {
    grid-template-columns: 1fr;
    gap: clamp(32px, 4vw, 48px);
  }

  .project-compare-row--split {
    grid-template-columns: 1fr;
  }

  .room-slide {
    height: 260px;
  }
}

@media (max-width: 768px) {
  .project-hero {
    height: 75vh;
    min-height: 380px;
  }

  .project-hero__content {
    padding-top: calc(var(--topbar-h) + 24px);
    margin-top: 0;
    max-width: 100%;
  }

  .project-hero__title {
    font-size: clamp(24px, 8vw, 42px);
  }

  .room-slide {
    height: 220px;
  }

  .room-slider__controls {
    justify-content: center;
  }
}

/* ============================================================
   PROJECT CTA — призыв к расчёту стоимости
   ============================================================ */
.project-cta {
  padding: 0 var(--px) clamp(60px, 8vw, 120px);
}

.project-cta__inner {

  margin: 0 auto;
  background: var(--bg-form);
  border-radius: var(--r-form);
  padding: clamp(40px, 5vw, 80px) clamp(24px, 4vw, 64px);
  text-align: center;
}

.project-cta__title {
  font-family: var(--font-u);
  font-weight: 700;
  font-size: clamp(24px, 2.6vw, 48px);
  line-height: 1.2;
  color: var(--text);
  margin-bottom: clamp(12px, 1.2vw, 20px);
}

.project-cta__subtitle {
  font-family: var(--font-m);
  font-weight: 400;
  font-size: clamp(14px, 1.04vw, 20px);
  line-height: 1.5;
  color: rgba(243,245,245,0.85);
  max-width: 600px;
  margin: 0 auto clamp(24px, 3vw, 40px);
}

.project-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  border-radius: var(--r-input);
  height: clamp(48px, 3vw, 58px);
  padding: 0 clamp(32px, 5vw, 64px);
  font-family: var(--font-u);
  font-weight: 500;
  font-size: clamp(14px, 1vw, 18px);
  color: var(--text);
  transition: background 0.2s;
}
.project-cta__btn:hover {
  background: #2a5db8;
}

@media (max-width: 768px) {
  .project-cta__inner {
    padding: clamp(32px, 6vw, 48px) 20px;
  }
  .project-cta__btn {
    width: 100%;
  }
}