/* Responsive Gallery Styles */

:root {
  --gallery-gap: 12px;
  --thumb-height: 220px;
  --overlay-bg: rgba(0, 0, 0, 0.9);
  --btn-bg: rgba(255, 255, 255, 0.12);
  --btn-color: #fff;
}

/* Force dark text on menu trigger and items for this page */
#header a[href="#menu"],
#header .logo a,
#menu .links a,
#menu .links a:hover {
  color: #000;
}

.main-wrapper {
  padding: 3rem 0;
}

.gallery-header {
  text-align: center;
  margin: 0 0 1rem 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gallery-gap);
}

.gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: var(--thumb-height);
  object-fit: cover;
  transform: scale(1);
  transition: transform 180ms ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.lightbox .close-btn,
.lightbox .prev-btn,
.lightbox .next-btn {
  position: absolute;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: background 150ms ease;
}

.lightbox .close-btn { top: 16px; right: 16px; }
.lightbox .prev-btn { left: 16px; }
.lightbox .next-btn { right: 16px; }

.lightbox .close-btn:hover,
.lightbox .prev-btn:hover,
.lightbox .next-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* Responsive tweaks */
@media (max-width: 480px) {
  :root { --thumb-height: 180px; }
  .lightbox .prev-btn,
  .lightbox .next-btn { font-size: 1.4rem; padding: 0.4rem 0.6rem; }
}
