.project-detail {
  position: fixed;
  z-index: 12;
  inset: 64px 0 0;
  display: none;
  overflow: hidden;
  background: #fff;
}

.project-detail.open {
  display: block;
}

.detail-back {
  position: absolute;
  z-index: 2;
  top: 40px;
  left: 93px;
  width: 42px;
  height: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.detail-back span {
  position: absolute;
  top: 14px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--red);
}

.detail-back span::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--red);
  content: "";
  transform: rotate(-45deg);
  transform-origin: left center;
}

.detail-scroller {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
}

.detail-scroller::-webkit-scrollbar {
  display: none;
}

.detail-layout {
  display: block;
  width: 100%;
  min-height: 100%;
  padding: clamp(58px, 8.8vh, 95px) 90px clamp(32px, 6.5vh, 70px);
}

.detail-gallery-track {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  width: 100%;
  border: 0;
  outline: none;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}

.detail-gallery-track::-webkit-scrollbar {
  display: none;
}

.detail-gallery-track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.detail-gallery-image {
  flex: 0 0 auto;
  display: block;
  width: auto;
  height: clamp(280px, calc(100vh - 420px), 600px);
  height: clamp(280px, calc(100dvh - 420px), 600px);
  max-width: none;
  -webkit-user-drag: none;
  user-select: none;
}

.detail-info {
  width: max-content;
  margin: clamp(16px, 2.6vh, 28px) 0 0 132px;
  text-align: left;
}

.detail-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  color: #000000;
  font-weight: 600;
}

.detail-location {
  margin: 2px 0 0;
  color: #838383;
  font-size: 14px;
}

.detail-awards {
  min-height: 21px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.detail-awards:empty {
  display: none;
}

.detail-award {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #0b0b0b;
}

.detail-award + .detail-award {
  margin-top: 4px;
}

.detail-facts {
  display: grid;
  grid-template-columns: 190px 130px 180px;
  column-gap: 40px;
  margin-top: 26px;
}

.detail-facts span {
  display: block;
  margin-bottom: 6px;
  color: #838383;
  font-size: 14px;
}

.detail-facts p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
  color: #0b0b0b;
  font-weight: 500;
}

.detail-description {
  flex: 0 0 300px;
  align-self: start;
  width: 300px;
  margin: 0;
  color: #0b0b0b;
  font-size: 14px;
  line-height: 1.45;
  white-space: normal;
}

body.detail-active {
  overflow: hidden;
}

@media (max-width: 1199px) {
  .detail-back {
      left: 60px;
    }

  .detail-layout {
      padding-right: 60px;
      padding-left: 60px;
    }
}

@media (max-width: 767px) {
  .detail-back {
      top: 20px;
      right: 20px;
      left: auto;
      width: 24px;
      height: 24px;
    }

  .detail-back span {
      top: 11px;
      left: 1px;
      width: 22px;
      height: 1.5px;
      transform: rotate(45deg);
    }

  .detail-back span::before {
      width: 22px;
      height: 1.5px;
      transform: rotate(-90deg);
    }

  .detail-scroller {
      overflow-x: hidden;
      overflow-y: auto;
      cursor: auto;
    }

  .detail-layout {
      display: flex;
      flex-direction: column;
      width: auto;
      min-height: 0;
      padding: 76px 20px 60px;
    }

  .detail-gallery-track {
      display: block;
      width: auto;
      overflow: visible;
      cursor: auto;
    }

  .detail-gallery-image {
      width: 100%;
      height: auto;
      max-width: 100%;
      aspect-ratio: auto;
    }

  .detail-description {
      width: auto;
    }

  .detail-info {
      order: -1;
      width: auto;
      margin: 0 0 38px;
    }

  .detail-title {
      font-size: 17px;
    }

  .detail-facts {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 22px 28px;
      margin-top: 24px;
    }

  .detail-description {
      margin-top: 38px;
      font-size: 14px;
      line-height: 1.65;
    }

  .detail-gallery-image {
      margin-top: 30px;
    }
}
