/* Вертикальная страница коллекции */

html.project-page {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: clip;
  overflow-y: visible;
  width: 100%;
}

html.project-page body.project-page {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  background-color: #ebebeb;
}

.project-page {
  --project-header-h: 52px;
}

@media (max-width: 1023.98px) {
  .project-page {
    --project-header-h: 48px;
  }
}

/* Десктоп: чёрная полоса меню */
.project-page .menucustom {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
}

.project-page .project-mobile-bar,
.project-page .project-mobile-nav {
  display: none;
}

@media (max-width: 1023.98px) {
  .project-page .menucustom {
    display: none !important;
  }

  /* Мобилка: компактный хедер + бургер */
  .project-page .project-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    height: var(--project-header-h);
    padding: 0 12px 0 16px;
    box-sizing: border-box;
    background-color: #050504;
  }

  .project-page .project-mobile-bar__home {
    font-family: "Akony", "ModernGothic-Regular", sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase;
    color: #ffffff !important;
    text-decoration: none;
  }

  .project-page .project-burger {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }

  .project-page .project-burger__line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .project-page .project-burger.is-open .project-burger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .project-page .project-burger.is-open .project-burger__line:nth-child(2) {
    opacity: 0;
  }

  .project-page .project-burger.is-open .project-burger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .project-page .project-mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 290;
    box-sizing: border-box;
    padding: calc(var(--project-header-h) + 20px) 20px 32px;
    background-color: #050504;
    overflow-y: auto;
  }

  .project-page .project-mobile-nav.is-open {
    display: block;
  }

  .project-page .project-mobile-nav__close {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 32px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
  }

  .project-page .project-mobile-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .project-page .project-mobile-nav li {
    margin: 0 0 20px;
  }

  .project-page .project-mobile-nav li:last-child {
    margin-bottom: 0;
  }

  .project-page .project-mobile-nav a {
    display: inline-block;
    font-family: "Akony", "ModernGothic-Regular", sans-serif !important;
    font-size: 26px !important;
    font-weight: 400 !important;
    line-height: 1.1 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase;
    color: #ffffff !important;
    text-decoration: none;
  }

  html.project-page body.project-nav-open {
    overflow: hidden !important;
  }
}

@media (min-width: 1024px) {
  .project-page .project-mobile-bar,
  .project-page .project-mobile-nav {
    display: none !important;
  }
}

.project-page .progetto.internal {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: calc(var(--project-header-h) + 8px) 0 48px;
  overflow: visible;
}

/* —— Шапка коллекции —— */
.project-page .progetto-introduzione {
  box-sizing: border-box;
  width: 100%;
  padding: 16px 16px 20px;
}

.project-page .progetto-introduzione .positioning {
  position: relative;
  padding-top: 4px;
  padding-right: 52px;
}

.project-page .project-meta {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  font-family: "Space Mono", monospace !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
  color: #050504 !important;
  white-space: nowrap;
}

.project-page .project-title,
.project-page .progetto-introduzione h1.project-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.12em 0.2em;
  margin: 0;
  padding: 0;
  font-family: "Akony", "ModernGothic-Regular", sans-serif !important;
  font-size: clamp(42px, 12vw, 140px) !important;
  font-weight: 400 !important;
  line-height: 0.9 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
  color: #050504 !important;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.project-page .project-title__word {
  display: inline-block;
  white-space: nowrap;
  flex: 0 0 auto;
}

.project-page .progetto-introduzione .back-link {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  color: #050504;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.project-page .progetto-introduzione .back-link:hover {
  opacity: 0.45;
}

.project-page .progetto-introduzione .back-link svg {
  width: 36px;
  height: 36px;
}

/* —— Раскладка —— */
.project-page .project-layout {
  box-sizing: border-box;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 0 16px;
}

.project-page .project-main {
  min-width: 0;
  width: 100%;
}

.project-page .project-gallery {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.project-page .project-shot {
  margin: 0;
  width: 100%;
  line-height: 0;
}

.project-page .project-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: top;
}

/* —— Сайдбар —— */
.project-page .project-aside {
  min-width: 0;
}

.project-page .project-aside-sticky {
  width: 100%;
}

/* Перебиваем .progetto .attributi { position: sticky } из styles.css */
.project-page .progetto .attributi,
.project-page .project-aside .attributi {
  position: static !important;
  top: auto !important;
  padding-left: 0 !important;
  margin: 0;
}

.project-page .project-aside .attributi .contenuto {
  border-top: 1px solid #050504;
  padding: 20px 0 24px;
}

.project-page .project-aside .attributi .contenuto h3 {
  margin: 0 0 8px;
  padding: 0;
  font-family: "Space Mono", monospace !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
  color: #050504 !important;
}

.project-page .project-aside .attributi .contenuto p {
  margin: 0;
  padding: 0;
  font-family: "ModernGothic-Regular", sans-serif !important;
  font-size: clamp(18px, 2.2vw, 28px) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  color: #050504 !important;
}

.project-page .project-aside .returnbutton {
  position: static;
  margin: 0;
  padding: 12px 0 0;
  text-align: right;
}

.project-page .project-aside .returnbutton a {
  position: static !important;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  font-size: inherit !important;
  line-height: 1 !important;
  color: #050504;
  text-decoration: none;
}

.project-page .project-aside .returnbutton a:hover {
  opacity: 0.45;
}

.project-page .project-aside .returnbutton svg {
  width: 36px;
  height: 36px;
}

/* —— Десктоп: flex + JS-pin (project-page.js) —— */
@media (min-width: 1024px) {
  .project-page .project-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 48px;
    padding: 0 24px;
  }

  .project-page .project-main {
    flex: 0 0 auto;
    width: min(580px, 52vw);
    max-width: 580px;
  }

  .project-page .project-gallery {
    max-width: 100%;
  }

  .project-page .project-aside {
    flex: 1 1 380px;
    min-width: min(380px, 38vw);
    max-width: 520px;
    position: relative;
    align-self: stretch;
  }

  .project-page .project-aside-sticky {
    position: relative;
    z-index: 5;
    padding-right: 4px;
  }

  .project-page .project-aside-sticky.is-pinned {
    position: fixed;
    z-index: 50;
  }

  .project-page .project-aside-sticky.is-at-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    bottom: 0;
    top: auto;
  }

  .project-page .project-aside .attributi .contenuto {
    padding: 28px 0 32px;
  }

  .project-page .project-aside .attributi .contenuto h3 {
    font-size: 17px !important;
    margin-bottom: 12px;
  }

  .project-page .project-aside .attributi .contenuto p {
    font-size: clamp(32px, 2.8vw, 48px) !important;
    line-height: 1.12 !important;
  }

  .project-page .project-aside .returnbutton svg {
    width: 44px;
    height: 44px;
  }

  .project-page .project-meta {
    font-size: clamp(14px, 1vw, 18px) !important;
  }

  .project-page .project-title,
  .project-page .progetto-introduzione h1.project-title {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.12em 0.2em;
  }

  .project-page .project-title__word {
    display: inline-block;
  }
}

@media (min-width: 1441px) {
  .project-page .project-layout {
    gap: 56px 64px;
    max-width: 1800px;
  }

  .project-page .project-main {
    width: min(640px, 48vw);
    max-width: 640px;
  }

  .project-page .project-aside {
    max-width: 560px;
  }

  .project-page .project-aside .attributi .contenuto p {
    font-size: clamp(36px, 2.5vw, 52px) !important;
  }
}

/* —— Планшет / мобилка —— */
@media (max-width: 1023.98px) {
  .project-page .progetto.internal {
    padding-top: calc(var(--project-header-h) + 4px);
  }

  .project-page .progetto-introduzione {
    padding: 12px 16px 16px;
  }

  .project-page .progetto-introduzione .positioning {
    padding-right: 48px;
  }

  .project-page .project-meta {
    font-size: 13px !important;
    white-space: normal;
  }

  .project-page .project-title,
  .project-page .progetto-introduzione h1.project-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    font-size: clamp(34px, 10vw, 56px) !important;
    line-height: 0.92 !important;
  }

  .project-page .project-title__word {
    display: block;
  }

  .project-page .project-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 16px 24px;
  }

  .project-page .project-main {
    order: 1;
    width: 100%;
    max-width: none;
  }

  .project-page .project-gallery {
    max-width: none;
  }

  .project-page .project-aside {
    order: 2;
    width: 100%;
    margin-top: 32px;
  }

  .project-page .project-aside-sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .project-page .project-aside .attributi .contenuto p {
    font-size: 22px !important;
  }
}

@media (max-width: 480px) {
  .project-page .project-meta {
    font-size: 12px !important;
  }

  .project-page .project-title,
  .project-page .progetto-introduzione h1.project-title {
    font-size: clamp(30px, 9.2vw, 44px) !important;
  }

  .project-page .project-aside .attributi .contenuto p {
    font-size: 20px !important;
  }
}
