.first-block {
  margin-top: 150px;
  padding: 0 1.2rem;
}

.first-block-link a {
  color: #000;
  text-decoration: none;
  font-size: 2.5rem;
  position: relative;
}
.first-block-link a::after {
  position: absolute;
  bottom: 0;
  left: 0;
  background: #000;
  height: 2px;
  width: 0;
  -webkit-transition: 0.2s linear;
  transition: 0.2s linear;
  content: "";
}
.first-block-link a:hover::after {
  width: 100%;
}

.second-block {
  width: 100%;
  height: 90vh;
  margin-top: 40px;
  background: url("../images/paintings/painting_studioview_w.jpg") no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#white-paintings {
  padding: 0 2rem;
  margin-bottom: 40px;
  margin-top: 50px;
  width: 100%;
}

.section-title h2 {
  font-size: 3rem !important;
}

.pre-title {
  font-size: 1rem;
  margin-left: 6px;
}

.section-description {
  line-height: 1.3rem;
  font-size: 1rem;
  color: #000;
}

.paintings-gallery {
  width: 100%;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr calc(10px + 3.75vw) 1fr calc(10px + 3.75vw) 1fr;
  grid-template-columns: repeat(3, 1fr);
  -ms-grid-rows: 60vh calc(10px + 3.75vw) 60vh calc(10px + 3.75vw) 60vh calc(10px + 3.75vw) 60vh;
  grid-template-rows: repeat(4, 60vh);
  grid-gap: calc(10px + 3.75vw);
  margin-top: 50px;
}

.paintings-gallery > *:nth-child(1) {
  -ms-grid-row: 1;
  -ms-grid-column: 1;
}

.paintings-gallery > *:nth-child(2) {
  -ms-grid-row: 1;
  -ms-grid-column: 3;
}

.paintings-gallery > *:nth-child(3) {
  -ms-grid-row: 1;
  -ms-grid-column: 5;
}

.paintings-gallery > *:nth-child(4) {
  -ms-grid-row: 3;
  -ms-grid-column: 1;
}

.paintings-gallery > *:nth-child(5) {
  -ms-grid-row: 3;
  -ms-grid-column: 3;
}

.paintings-gallery > *:nth-child(6) {
  -ms-grid-row: 3;
  -ms-grid-column: 5;
}

.paintings-gallery > *:nth-child(7) {
  -ms-grid-row: 5;
  -ms-grid-column: 1;
}

.paintings-gallery > *:nth-child(8) {
  -ms-grid-row: 5;
  -ms-grid-column: 3;
}

.paintings-gallery > *:nth-child(9) {
  -ms-grid-row: 5;
  -ms-grid-column: 5;
}

.paintings-gallery > *:nth-child(10) {
  -ms-grid-row: 7;
  -ms-grid-column: 1;
}

.paintings-gallery > *:nth-child(11) {
  -ms-grid-row: 7;
  -ms-grid-column: 3;
}

.paintings-gallery > *:nth-child(12) {
  -ms-grid-row: 7;
  -ms-grid-column: 5;
}

.paintings-gallery-object {
  position: relative;
  width: 100%;
  height: 100%;
}

.paintings-gallery-object:hover .gallery-object-text {
  opacity: 1;
  visibility: visible;
}
.paintings-gallery-object:hover::after {
  opacity: 0.72;
}

.gallery-image {
  -o-object-fit: cover;
     object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

.paintings-gallery-object::after {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: "";
  background: #fff;
  opacity: 0;
  z-index: 1;
  -webkit-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
}

.gallery-object-text {
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 70%;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
  z-index: 3;
  line-height: 1.3rem;
}

#lost-places {
  margin-top: 150px;
  width: 100%;
}
#lost-places .section-title,
#lost-places .section-description {
  padding: 0 2rem;
}

.lost-places-gallery {
  margin-top: 60px;
  width: 100%;
}

.lost-places-object {
  width: 100%;
  height: 100vh;
}
.lost-places-object img {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

#hangar-8,
#magic-square {
  margin-top: 150px;
  width: 100%;
  padding: 0 2rem;
}

.hangar-8-gallery {
  margin-top: 60px;
  display: -ms-grid;
  display: grid;
  width: 100%;
  -ms-grid-columns: 1fr calc(10px + 5vw) 1fr calc(10px + 5vw) 1fr;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(10px + 5vw);
}

.hangar-8-object {
  aspect-ratio: 1/1;
}
.hangar-8-object img {
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
  width: 100%;
  height: 100%;
  -webkit-transition: 0.2s ease-in-out;
  transition: 0.2s ease-in-out;
}

.hangar-8-object:hover img {
  -webkit-transform: scale(1.05);
          transform: scale(1.05);
}

.hangar-8-big-image {
  width: 100%;
  height: 100vh;
  margin-top: 150px;
  background: url("../images/hangar/artbasel_exhibtion_w.jpg") no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.magic-square-gallery {
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr calc(10px + 5vw) 1fr calc(10px + 5vw) 1fr calc(10px + 5vw) 1fr;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(10px + 5vw);
  margin-top: 60px;
}

.magic-square-object {
  aspect-ratio: 1/1;
  width: 100%;
  height: 100%;
}
.magic-square-object img {
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
  width: 100%;
  height: 100%;
}

.magic-square-section {
  width: 100%;
  height: 150vh;
  margin-top: 60px;
}
.magic-square-section img {
  -o-object-fit: fill;
     object-fit: fill;
  display: block;
  width: 100%;
  height: 100%;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
}

.modal__content {
  position: relative;
  height: 100vh;
  padding: 60px;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 360px 80px 1fr;
  grid-template-columns: 360px 1fr;
  gap: 80px;
  z-index: 1;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.modal__text {
  font-size: 16px;
  line-height: 1.4;
}

.modal__title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.modal__meta {
  margin-top: 32px;
}

.modal__meta a {
  text-decoration: underline;
  color: inherit;
}

.modal__image {
  position: relative;
  width: 100%;
  height: 100%;
}

.modal__image img {
  position: absolute;
  left: 30%;
  top: 50%;
  -webkit-transform: translate(-30%, -50%);
          transform: translate(-30%, -50%);
  max-height: 90%;
  max-width: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.modal__close {
  position: absolute;
  top: 32px;
  right: 32px;
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
}

.modal.is-open {
  display: block;
}