/* Phone gallery used by phones.html.
   All selectors are scoped under .img-gallery so the higher specificity wins
   over the WordPress-blog .gallery / .gallery-item rules in style2.css. */

.img-gallery {
  padding: 80px 30px;
  background-color: #f9f9f9;
}

.img-gallery .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 320px;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Each tile fills its grid cell completely. min-width/height: 0 prevents grid
   items from honouring their content's intrinsic size — without this, tall
   <img> elements grow past their row and overlap the row below. */
.img-gallery .gallery-item {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
  border: 2px solid #609bbb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.img-gallery .gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 992px) {
  .img-gallery .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 300px;
  }
}

@media (max-width: 576px) {
  .img-gallery .gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }
}

/* Lightbox (modal) */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
  border-radius: 4px;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
