* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #2e2f42;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1128px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.gallery-item {
  width: 360px;
  height: 200px;
  overflow: hidden;
}

.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
}

.gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 250ms ease;
}

.gallery-image:hover {
  transform: scale(1.04);
}

.basicLightbox {
  background: rgba(46, 47, 66, 0.8);
}

.modal {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: transparent;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1112px;
  height: 640px;
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 56px);
  transform: translate(-50%, -50%);
}

.modal-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 250ms ease-in-out;
}

.modal-image.is-changing {
  opacity: 0.35;
}

.modal-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  margin: 0;
  padding: 4px 8px;
  width: 100%;
  font-size: 12px;
  color: #ffffff;
  background-color: rgba(46, 47, 66, 0.8);
}

.modal-counter {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  margin: 0;
  font-size: 12px;
  color: #ffffff;
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  border: none;
  background-color: transparent;
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.modal-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  border: none;
  background-color: transparent;
  color: #ffffff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.modal-arrow-left {
  left: 24px;
}

.modal-arrow-right {
  right: 24px;
}

.modal-arrow:hover,
.modal-arrow:focus,
.modal-close:hover,
.modal-close:focus {
  color: #dcdcdc;
}