/* ==========================================================================
   gallery.css — galeria modular de serviços realizados
   ========================================================================== */
.work-gallery {
  padding: 104px 0;
  background: linear-gradient(180deg, #f7f8fa 0%, #ffffff 100%);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 235px;
  gap: 18px;
}
.gallery-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #0c1b2a;
  box-shadow: 0 14px 35px rgba(0, 17, 33, .13);
  cursor: zoom-in;
  text-align: left;
}
.gallery-card--wide { grid-column: span 2; }
.gallery-card--tall { grid-row: span 2; }
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}
.gallery-card:hover img,
.gallery-card:focus-visible img {
  transform: scale(1.045);
  filter: brightness(.82);
}
.gallery-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 48px 20px 18px;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 17, 33, .92));
}
.gallery-overlay strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  line-height: 1;
  text-transform: uppercase;
}
.gallery-overlay small { color: rgba(255,255,255,.78); font-size: 12px; }
.gallery-card:focus-visible { outline: 3px solid var(--orange, #f2860f); outline-offset: 3px; }
.gallery-lightbox {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(0, 10, 20, .92);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.gallery-lightbox.is-open { opacity: 1; visibility: visible; }
.gallery-lightbox__image {
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 25px 80px rgba(0,0,0,.5);
}
.gallery-lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
body.gallery-open { overflow: hidden; }
@media (max-width: 850px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 220px; }
  .gallery-card--wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .work-gallery { padding: 78px 0; }
  .gallery-grid { display: flex; overflow-x: auto; gap: 14px; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .gallery-card, .gallery-card--wide, .gallery-card--tall { flex: 0 0 84%; height: 360px; scroll-snap-align: center; }
  .gallery-overlay strong { font-size: 22px; }
}
