h1,
h2,
h3,
h4,
span,
p {
  line-height: 140%;
}

/* .project {
  border: 60px solid #5271ff;
} */
.pr_galery {
  padding-top: 14rem;
  padding-bottom: 8rem;
}

.header_project {
  position: static;
  margin-bottom: 40px;
}

.galery_content {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  flex-wrap: wrap;
}

.gelery_img a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox--open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 4.4rem;
  height: 4.4rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 2.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}

.gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4.8rem;
  height: 4.8rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 2.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1;
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox__nav--prev {
  left: 2rem;
}

.gallery-lightbox__nav--next {
  right: 2rem;
}

.gallery-lightbox__counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 400;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.6rem 1.6rem;
  border-radius: 2rem;
  z-index: 1;
}

.galery_items {
  display: flex;
  gap: 2rem;
}

.gelery_img {
  flex: 1 1 0;
  overflow: hidden;
}

.gelery_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.pr_galery h3 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 4rem;
  color: #020202;
  text-align: center;
}

.w1 {
  max-width: 264px;
}

.w2 {
  max-width: 376px;
}

.galery_itext_top {
  display: flex;
  flex-direction: column;
  gap: 13px;
  justify-content: center;
  flex-wrap: wrap;
  flex: 0 0 auto;
  max-width: 264px;
  width: 100%;
}

.galery_itext_top h4 {
  font-size: 32px;
  font-weight: 500;
}

.galery_itext_top span {
  font-size: 16px;
  font-weight: 400;
}

.fl_end {
  justify-content: flex-end;
}

.galery_itext_bot {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
  flex: 0 0 auto;
  max-width: 376px;
  width: 100%;
}

.bot_t {
  width: 72%;
  font-size: 20px;
  font-weight: 400;
  color: #020202;
  line-height: 140%;
}

.pr-780 {
  display: none;
}

.project-empty {
  text-align: center;
  padding: 8rem 0;
}

.project-empty h3 {
  font-size: 2.4rem;
  color: var(--grey);
  margin-bottom: 1.6rem;
}

.project-empty p {
  font-size: 1.6rem;
  color: var(--transp-black);
}

/* .prn780 {
  display: none;
}
.gal_cont780 {
  display: grid;
  grid-template-columns: auto auto;
  /* grid-template-columns: repeat(3, 1fr); */
/* }
.gelery_img {
  flex: 0 0 50%; /* ширина 50%, не растягивается */
/* box-sizing: border-box; */
/* } */

@media (max-width: 1180px) {
  .header-head {
    display: flex;
  }

  .prn780 {
    display: none;
  }

  .pr-780 {
    display: block;
  }

  .container {
    max-width: 660px;
    padding-right: 1.6rem !important;
    padding-left: 1.6rem !important;
  }

  .pr_galery {
    padding-top: 12rem;
    padding-bottom: 4rem;
  }

  .pr_galery h3 {
    font-size: 32px;
    margin-bottom: 2rem;
  }

  .galery_content {
    padding-top: 40px;
    gap: 24px;
  }

  .bot_t {
    width: 100%;
    text-align: end;
  }
}

@media (max-width: 660px) {
  .container {
    padding-right: 1.6rem !important;
    padding-left: 1.6rem !important;
  }

  .pr_galery {
    padding-top: 10rem;
    padding-bottom: 4rem;
  }

  .galery_items {
    display: flex;
    flex-direction: column;
    gap: 2.4rem;
    align-items: center;
  }

  .galery_itext_top h4 {
    font-size: 16px;
    text-align: center;
  }

  .galery_itext_top span {
    font-size: 14px;
    text-align: center;
  }

  .galery_itext_top {
    gap: 12px;
  }

  .w1 {
    width: 348px;
    height: 348px;
    object-fit: cover;
  }

  .w2 {
    width: 348px;
    height: 260px;
    object-fit: cover;
  }

  .bot_t {
    width: 100%;
    text-align: center;
    font-size: 16px;
  }

  .galery_itext_bot {
    align-items: center;
  }
}