/* CASE PAGE */

.case-single-main {
  width: 100%;
  padding: 20px 20px 60px;
}

.case-single-inner {
  width: 100%;
  margin: 0 auto;
}

/* BACK LINK */

.case-back-link-wrap {
  margin-bottom: 40px;
}

.case-back-link,
.case-back-to-top {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

/* HEADER */

.case-single-header {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.case-single-title {
  margin: 80px 0 14px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.case-single-description {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.7;
}

.case-single-city {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.8;
}

/* HERO MEDIA */

.case-single-media {
  width: 100%;
  margin-bottom: 20px;
  overflow: hidden;
}

.case-single-image,
.case-single-video {
  display: block;
  width: 100%;
  height: auto;
}

/* CONTENT */

.case-single-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.case-single-content > * {
  margin: 0;
  width: 100%;
}

/* SINGLE IMAGES */

.case-single-content > .wp-block-image,
.case-single-content > figure.wp-block-image {
  width: 100%;
}

.case-single-content > .wp-block-image img,
.case-single-content > figure.wp-block-image img,
.case-single-content > img {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

/* VIDEO */

.case-single-content .wp-block-video {
  width: 100%;
  overflow: hidden;
  background: none;
}

.case-single-content .wp-block-video video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 0;
}

@media (min-width: 769px) {
  .case-single-content .wp-block-video {
    height: 90vh;
  }

  .case-single-content .wp-block-video video {
    height: 100%;
  }
}

/* WORDPRESS GALLERY */

.case-single-content .wp-block-gallery,
.case-single-content .wp-block-gallery.has-nested-images {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.case-single-content .wp-block-gallery .wp-block-image {
  width: 100% !important;
  margin: 0 !important;
}

.case-single-content .wp-block-gallery .wp-block-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: zoom-in;
}

/* CLASSIC GALLERY FALLBACK */

.case-single-content .gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.case-single-content .gallery-item {
  width: 100%;
  margin: 0;
}

.case-single-content .gallery img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: zoom-in;
}

/* LIGHTBOX */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

/* BACK TO TOP */

.case-back-to-top-wrap {
  margin-top: 40px;
  text-align: center;
}

/* DESKTOP */

@media (min-width: 769px) {
  .case-single-main {
    padding: 20px 24px 20px;
  }

  .case-back-link-wrap {
    margin-bottom: 60px;
  }

  .case-single-header {
    margin-bottom: 56px;
  }

  .case-single-content {
    gap: 28px;
  }

  .case-single-content .wp-block-gallery,
  .case-single-content .gallery {
    gap: 24px;
  }

  .case-back-to-top-wrap {
    margin-top: 56px;
  }
}
