.gallery {
  padding: var(--sp-half) 0;
}

.gallery__container {
  display: flex;
  flex-flow: column;
  gap: 120px;
}

.gallery__row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.gallery__row:nth-child(even) {
  flex-direction: row-reverse;
}

.gallery__row:nth-child(even) .gallery__image-link--large {
  transform: translateX(20%);
}

.gallery__image {
  width: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  height: 100%;
}

.gallery__image-link {
  width: 100%;
  display: block;
  position: relative;
}

.gallery__image-link--video:after {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='98' height='113' viewBox='0 0 98 113' fill='none'%3E%3Cpath d='M97.5 56.2916L-5.30183e-06 112.583L-3.80654e-07 -3.09647e-05L97.5 56.2916Z' fill='white'/%3E%3C/svg%3E") 50%/contain no-repeat;
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 13rem;
  aspect-ratio: 1/1;
  z-index: 3;
}

.gallery__image-link--small {
  width: 200%;
  z-index: 2;
  aspect-ratio: 1/1;
}

.gallery__image-link--large {
  aspect-ratio: 460/650;
  z-index: 1;
  width: 300%;
  transform: translateX(-20%);
}

.gallery__image-link--medium {
  width: 300%;
  aspect-ratio: 460/320;
  margin-top: auto;
  z-index: 2;
}

@media (max-width: 1260px) {
  .gallery__container {
    gap: 60px;
  }

  .gallery__row {
    gap: 20px;
  }
}

@media (max-width: 760px) {
  .gallery__row {
    gap: 0;
    flex-direction: column;
    align-items: center;
  }

  .gallery__row:nth-child(even) {
    flex-direction: column;
  }

  .gallery__row:nth-child(even) .gallery__image-link--large {
    transform: none;
  }

  .gallery__row:nth-child(even) .gallery__image-link--small {
    margin-left: auto;
    margin-right: 0;
  }

  .gallery__row:nth-child(even) .gallery__image-link--medium {
    margin-right: auto;
    margin-left: 0;
  }

  .gallery__image-link {
    width: 75%;
  }

  .gallery__image-link--small {
    width: 25%;
    margin-right: auto;
  }

  .gallery__image-link--large {
    transform: none;
    margin: -20px 0;
  }

  .gallery__image-link--medium {
    margin-left: auto;
  }
}