.filter-item {
  color: var(--grey);
}

.filter-item.active {
  color: var(--blue);
}

.fixed-bottom-bar {
  display: flex !important;
}

a.next,
a.prev {
  color: var(--grey);
  transition: color 0.3s ease;
}

a.next:hover,
a.prev:hover {
  color: var(--dark-grey);
}

.go-back-mobile {
  display: none;
}

.go-back-desktop {
  display: block;
}

.prev-next-mobile {
  display: none;
}

.go-back-desktop {
  position: absolute;
  top: var(--grid-gutter);
  right: var(--grid-margin);
}

.go-back-mobile a {
  color: var(--grey);
  transition: color 0.3s ease;
}

.go-back-mobile a:hover {
  color: var(--dark-grey);
}

.go-back-desktop a {
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.go-back-desktop a svg {
  width: 24px;
  height: 24px;
}

.go-back-desktop a svg path {
  stroke: var(--blue);
  transition: stroke 0.3s ease;
}

.go-back-desktop a:hover svg path {
  stroke: var(--dark-grey);
}

.single-project-container {
  display: grid;
  grid-template-rows: min-content 1fr;
  position: relative;
  z-index: 2;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

.single-project-info,
.single-project-title-location-description {
  position: relative;
  z-index: 3;
  background-color: var(--white);
}

.single-project-info {
  grid-column: 1 / 11;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-column-gap: var(--grid-gutter);
  padding: 16px var(--grid-margin) calc(var(--grid-gutter) + 16px);
}

.single-project-info-title {
  grid-column: 3 / 4;
}

.single-project-info-text {
  grid-column: 4 / 11;
}

.single-project-title-location-description-visuals {
  grid-column: 1 / 11;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  height: 100%;
  max-height: 100%;
  padding-left: var(--grid-margin);
  padding-bottom: 32px;
  overflow: hidden;
  box-sizing: border-box;
}

.single-project-title-location-description {
  flex: 0 0
    calc(
      (100dvw - var(--grid-margin) * 2 - var(--grid-gutter) * 9) / 10 * 3 +
        var(--grid-gutter) * 3
    );
  max-width: calc(
    (100dvw - var(--grid-margin) * 2 - var(--grid-gutter) * 9) / 10 * 3 +
      var(--grid-gutter) * 3
  );
  max-height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: max-content max-content;
  grid-column-gap: var(--grid-gutter);
  align-items: end;
  padding-right: var(--grid-gutter);
  background-color: var(--white);
  position: sticky;
  left: 0;
  align-self: flex-end;
  z-index: 2;
}

.single-project-title-location {
  grid-column: 1 / 3;
}

.single-project-description {
  grid-column: 1 / 3;
}

.single-project-title-location span {
  color: var(--grey);
}

.single-project-description p {
  margin-top: var(--lh-m);
  color: var(--grey);
}

.single-project-visuals {
  flex: 1;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.single-project-visuals::-webkit-scrollbar {
  display: none;
}

.single-project-visuals img,
.single-project-visuals video {
  flex-shrink: 0;
  width: auto;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.single-project-visuals img:not(:last-child),
.single-project-visuals video:not(:last-child) {
  margin-right: var(--grid-gutter);
}

.single-project-visuals-content {
  display: flex;
  flex-direction: row;
  height: 100%;
  align-items: flex-end;
  width: max-content;
  min-width: 100%;
  flex-wrap: nowrap;
}

.single-project-visuals-content img,
.single-project-visuals-content video {
  flex-shrink: 0;
  width: auto;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin-right: var(--grid-gutter);
  background-color: var(--light-blue);
}

.single-project-visuals-content img:last-child,
.single-project-visuals-content video:last-child {
  margin-right: var(--grid-margin);
}

body:has(.single-project-container) main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - var(--fixed-bottom-bar-height));
  max-height: calc(
    100vh - var(--header-height) - var(--fixed-bottom-bar-height)
  );
  overflow: hidden;
}

.single-project-gallery-overlay {
  position: fixed;
  top: var(--header-height);
  right: 0;
  height: calc(100dvh - var(--header-height) - var(--fixed-bottom-bar-height));
  width: 100px;
  background: linear-gradient(to left, var(--white), transparent);
}

/* -------------------- LIGHTBOX -------------------- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.lightbox-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.lightbox-content img,
.lightbox-content video {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  cursor: pointer;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background-color: var(--blue);
  transition: background-color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: var(--dark-grey);
}

.lightbox-close {
  top: var(--grid-margin);
  right: var(--grid-margin);
}

.lightbox-prev {
  left: var(--grid-margin);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: var(--grid-margin);
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  position: absolute;
  bottom: var(--grid-margin);
  left: var(--grid-margin);
  color: var(--white);
  z-index: 10000;
}

.visual-item {
  height: 100%;
  cursor: pointer;
}

/* -------------------- SMALL DESKTOP -------------------- */
/* @media screen and (max-width: 1535px) {
  .single-project-title-location {
    grid-column: 1 / 4;
  }

  .single-project-description {
    grid-column: 1 / 4;
  }
} */

/* -------------------- TABLET / MOBILE -------------------- */
@media screen and (max-width: 1023px) {
  .single-project-info {
    grid-template-columns: 33.33% 66.66%;
    order: 2;
  }

  .single-project-info-title {
    grid-column: span 1;
  }

  .single-project-info-text {
    grid-column: span 1;
  }

  .single-project-title-location-description-visuals {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0px var(--grid-margin)
      calc(var(--fixed-bottom-bar-height) + var(--grid-margin));
    min-height: 0;
    display: contents;
  }

  .single-project-title-location-description {
    flex: none;
    max-width: none;
    position: relative;
    left: auto;
    padding: 40px var(--grid-margin) 8px;
    width: 100%;
    order: 1;
  }

  .single-project-title-location {
    grid-column: 1 / 4;
  }

  .single-project-visuals {
    flex: none;
    width: 100%;
    height: auto;
    overflow: visible;
    min-height: 0;
    padding: 0 var(--grid-margin);
    padding-bottom: var(--grid-gutter);
    order: 3;
  }

  .single-project-visuals-content {
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .single-project-visuals img,
  .single-project-visuals video,
  .single-project-visuals-content img,
  .single-project-visuals-content video {
    width: 100%;
    height: auto;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 0;
    display: block;
  }

  .visual-item {
    height: auto;
    width: 100%;
    margin-bottom: var(--grid-gutter);
  }

  .visual-item:last-child {
    margin-bottom: 0;
  }

  .single-project-gallery-overlay {
    display: none;
  }

  .single-project-container {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: 0;
  }

  body:has(.single-project-container) main {
    height: auto;
    max-height: none;
    overflow: visible;
    min-height: 0;
  }

  .fixed-bottom-bar {
    align-items: flex-start;
  }

  .fixed-bottom-bar.no-description {
    justify-content: center;
  }

  .go-back-desktop {
    display: none;
  }

  .go-back-mobile {
    display: block;
    flex: 0 0 50%;
    text-align: center;
  }

  .go-back-mobile.no-description {
    flex: none;
  }

  .fixed-bottom-bar.panel-open .go-back-mobile {
    display: none;
  }

  .single-project-info-button.no-description {
    display: none;
  }

  .go-back-mobile a {
    display: block;
  }

  .single-project-info-button {
    flex: 0 0 50%;
    text-align: center;
  }

  .single-project-info-button .project-info-toggle {
    text-align: center;
    width: 100%;
  }

  .prev-next-desktop {
    display: none;
  }

  .prev-next-mobile {
    display: flex;
    padding: var(--grid-margin);
    padding-top: calc(var(--grid-margin) * 2);
    padding-bottom: calc(var(--fixed-bottom-bar-height) + var(--grid-margin)*2);
    order: 4;
    width: 100%;
    box-sizing: border-box;
  }

  .prev-next-mobile a {
    color: var(--blue);
    width: 100%;
    text-align: center;
  }
}
