/* ============================================
   Drougas Skiasi — Projects Page Styles
   ============================================ */

/* --- Filter Tabs --- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.filter-tab {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.filter-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.gallery-item {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  width: auto;
  cursor: zoom-in;
  text-align: left;
  display: block;
  transition: opacity 300ms ease, transform 300ms ease;
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  position: absolute;
  visibility: hidden;
  pointer-events: none;
}

.gallery-item img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.gallery-item:hover img {
  transform: scale(1.015);
  box-shadow: var(--shadow);
}

.gallery-caption {
  margin-top: 0.4rem;
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
}

.lightbox.open {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  width: min(92vw, 920px);
  max-height: 90vh;
  text-align: center;
}

#lightboxImage {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
}

#lightboxCaption {
  margin-top: 0.5rem;
  color: rgba(253, 250, 246, 0.8);
  text-align: center;
  font-size: 0.92rem;
}

.lightbox-counter {
  margin: 0.25rem 0 0;
  color: rgba(253, 250, 246, 0.45);
  font-size: 0.82rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(26, 23, 20, 0.8);
  border: 1px solid rgba(253, 250, 246, 0.2);
  color: #FDFAF6;
  border-radius: 999px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, border-color 200ms ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.lightbox-close {
  top: 1.1rem;
  right: 1.1rem;
}

.lightbox-nav.prev {
  left: 1rem;
}

.lightbox-nav.next {
  right: 1rem;
}

/* --- Responsive --- */
@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
