/* Galeria de projetos: uma composição fotográfica, sem textos concorrendo com as imagens. */
.projects{
  display:block;
  padding:82px 4.5% 96px;
  border:0;
}

.projects .section-intro{
  max-width:1210px;
  margin:0 auto;
  padding:0 0 40px;
}

.projects .section-intro h2{
  max-width:480px;
  margin:0;
  font-size:clamp(31px,4vw,48px);
  line-height:1.06;
}

.projects .section-intro h2 em{font-style:italic}

.project-gallery{
  display:grid;
  grid-template-columns:repeat(var(--gallery-columns),minmax(0,1fr));
  grid-auto-flow:dense;
  grid-auto-rows:clamp(190px,15vw,265px);
  gap:12px;
  width:100%;
}

.project-gallery .project{
  min-width:0;
  margin:0;
  overflow:hidden;
  transform:none!important;
}

.project-gallery .project-photo{
  display:block;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:none;
  cursor:zoom-in;
}

.project-gallery .project img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  filter:none;
  transition:transform .45s ease;
}

.project-gallery .project:hover img{transform:scale(1.035)}

/* Varia a composição sem ampliar a largura das miniaturas. */
.project-gallery.gallery-many .project:nth-of-type(5n + 2),
.project-gallery.gallery-many .project:nth-of-type(7n + 5){grid-row:span 2}

@media (max-width:700px){
  .projects{padding:58px 16px 68px}
  .project-gallery{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:clamp(130px,31vw,210px);gap:8px}
  .projects .section-intro{padding-bottom:20px}
  .project-gallery.gallery-many .project:nth-of-type(5n + 2),
  .project-gallery.gallery-many .project:nth-of-type(7n + 5){grid-row:span 1}
}

.gallery-lightbox{
  width:min(1100px,92vw);
  max-width:none;
  max-height:90vh;
  margin:auto;
  padding:0;
  border:0;
  background:transparent;
  overflow:visible;
}

.gallery-lightbox::backdrop{background:rgba(24,14,16,.88);backdrop-filter:blur(4px)}
.gallery-lightbox img{display:block;max-width:100%;max-height:82vh;margin:auto;object-fit:contain;box-shadow:0 18px 60px rgba(0,0,0,.38)}
.gallery-lightbox p{margin:12px 0 0;color:#fff;text-align:center;font-size:12px;letter-spacing:1.5px;text-transform:uppercase}
.gallery-close{position:absolute;top:-44px;right:0;width:35px;height:35px;border:1px solid rgba(255,255,255,.7);border-radius:50%;background:transparent;color:#fff;font-size:27px;line-height:28px;cursor:pointer}
.gallery-nav{position:absolute;top:50%;z-index:1;width:44px;height:44px;border:1px solid rgba(255,255,255,.7);border-radius:50%;background:rgba(25,15,17,.42);color:#fff;font-size:28px;line-height:36px;cursor:pointer;transform:translateY(-50%)}
.gallery-prev{left:-62px}.gallery-next{right:-62px}
@media(max-width:760px){.gallery-nav{top:auto;bottom:-56px;transform:none}.gallery-prev{left:calc(50% - 50px)}.gallery-next{right:calc(50% - 50px)}.gallery-lightbox p{margin-bottom:52px}}
