.gallery-close{
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 999;
  transition: background 0.2s ease, transform 0.15s ease;
}

.gallery-close:hover{
  background: rgba(0,0,0,0.75);
  transform: scale(1.05);
}


/* Gallery wrapper */
.gallery{
  max-width: 1000px;
  margin: 90px auto 50px;
  padding: 0 16px;

  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 per row */
  gap: 14px;
}

/* One image tile */
.gallery a{
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: #111;
}

/* Image itself */
.gallery img{
  width: 100%;
  height: 300px;       
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Hover polish */
.gallery a:hover img{
  transform: scale(1.05);
  opacity: 0.95;
}

/* ===== Responsive (aligned with home.css breakpoints) ===== */
@media (max-width: 900px) {
  .gallery {
    margin: 60px auto 40px;
    gap: 12px;
  }

  .gallery img {
    height: 260px;
  }
}

@media (max-width: 520px) {
  .gallery {
    grid-template-columns: 1fr;
    margin: 50px auto 30px;
    padding: 0 12px;
    gap: 10px;
  }

  .gallery img {
    height: 220px;
  }

  .gallery-close {
    width: 40px;
    height: 40px;
    top: 12px;
    right: 12px;
    font-size: 24px;
  }
}

/*Preview Img*/

.lb{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

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

.lb-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.lb-img{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 600px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}

/* Zoomed image – fixed size per breakpoint */
@media (max-width: 900px) {
  .lb-img {
    width: min(700px, calc(100vw - 40px));
    height: min(500px, calc(100vh - 80px));
    border-radius: 10px;
  }
}

@media (max-width: 520px) {
  .lb-img {
    width: calc(100vw - 24px);
    height: calc(100vh - 120px);
    border-radius: 8px;
  }
}