/* Import Google Font Jost */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600&display=swap');

:root {
  --lp-bg-gray: #e5e5e5;
  --lp-bg-dark: #121212;
  --lp-text-main: #1a1a1a;
  --lp-text-gray: #666;
  --lp-circle-gray: #c4c4c4;
  
  /* Typography Variables */
  --font-main: 'Jost', sans-serif;
  --fw-reg: 400;
  --fw-med: 500;
  --fw-semi: 600;
}


.page-node-type-project .main-page {
  margin-top: calc(var(--header-height) + 1rem);
  margin-bottom: 4rem;
}

/* --- Общие сбросы --- */
.project-page-wrapper {
  width: 100%;
  overflow-x: hidden;
  line-height: 1.5;
  color: inherit;
  position: relative;
  font-family: var(--font-main);
}

.project-container {
  width: 100%;
/*  padding-left: 1.25rem;
  padding-right: 1.25rem;*/
  box-sizing: border-box;
}

/*@media (min-width: 75rem) {
  .project-container {
    padding-left: 3.75rem;
    padding-right: 3.75rem;
  }
}*/

/* --- HERO SECTION --- */
.project-hero-split {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-bottom: 1.75rem;
}

.project-hero__image {
  width: 100%;
  overflow: hidden;
}

.project-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-hero__content {
  width: 100%;
  padding: 2.5rem 1.25rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) {
  .project-hero-split {
    flex-direction: row;
    max-height: 67.5rem;/*
    min-height: 37.5rem;*/
    align-items: flex-end;
  }

  .project-hero__image {
    width: 50%;
    height: 100%;
  }

  .project-hero__content {
    width: 50%;
    height: 100%;
    padding: 3.75rem 3rem;
    align-items: flex-start;
  }
}

.project-title {
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 2.5rem 0;
}

@media (min-width: 90rem) {
  .project-title {
    font-size: 3rem;
  }
}

/* Meta Data */
.project-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.meta-item {
  display: flex;
  flex-wrap: wrap;
}
.meta-label {
  display: block;
  min-width: 11.25rem;
  font-weight: 500;
  opacity: 0.7;
}

/* Text */
.project-text-block {
  max-width: 42rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
.project-text-block {
  max-width: 50%;
}

}

/* --- SLIDERS (PHOTOS & PLANS) --- */
.project-photos-section {
  position: relative;
  width: 100%;
}

.header-with-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.875rem;
}

.project-section-title {
  font-size: 2rem;
  margin: 0;
  font-weight: 500;
}

/* Кнопки */
.project-slider-nav {
  display: flex;
  gap: 0.625rem;
}

.slider-btn {
  width: 3rem;
  height: 3rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  z-index: 2;
}

.slider-btn:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

/* Контейнер скролла */
.project-gallery-scroller {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.project-gallery-scroller::-webkit-scrollbar {
  display: none;
}

.project-gallery-scroller .field__items {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 1.25rem;
/*  padding-left: 1.25rem;
  padding-right: 1.25rem;*/
  width: max-content;
}

/*@media (min-width: 75rem) {
  .project-gallery-scroller .field__items {
    padding-left: 3.75rem;
  }
}
*/
.project-gallery-scroller .field__item {
  flex: 0 0 auto;
  display: block;
  width: 80vw;
  scroll-snap-align: start;
}

@media (min-width: 48rem) {
  .project-gallery-scroller .field__item {
    width: 45vw;
  }
}

@media (min-width: 75rem) {
  .project-gallery-scroller .field__item {
    width: 30vw;
    max-width: 37.5rem;
  }
}

.project-gallery-scroller .media,
.project-gallery-scroller article {
  width: 100%;
  height: 100%;
  display: block;
}

/* Изображения в слайдерах */
.project-gallery-scroller img {
  width: 100%;
    height: auto;           /* Высота будет вычисляться автоматически */
  aspect-ratio: 4 / 5;    /* Пропорция портрета: 4 части в ширину, 5 в высоту */
  object-fit: cover; 
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  
  /* Разрешаем клик, но запрещаем тащить как файл */
  -webkit-user-drag: none; 
  user-select: none;
}

.plans-slider img {
  aspect-ratio: 4 / 3; /* Классический альбомный формат для чертежей */
  object-fit: contain;
  background-color: #f9f9f9;
  border: 1px solid #eee;
}

/* --- ИСПРАВЛЕННЫЙ LIGHTBOX --- */
.project-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 99999;
  
  /* Жестко скрываем по умолчанию */
  display: none; 
  align-items: center;
  justify-content: center;
}

/* Класс для включения */
.project-lightbox.is-active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 5px 25px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: #000;
  transform: scale(1.1);
}