/* ========================================
   SUPREME CONTRACTING VA - gallery.css
   ======================================== */

.gallery-section {
  padding: 4rem 1.5rem 5rem;
  background: #f7f7f7;
}
.gallery-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== FILTER TABS ===== */
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.gallery-filter {
  background: #ffffff;
  border: 1.5px solid #e0e0e0;
  color: #111111;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.gallery-filter:hover {
  border-color: #CC0000;
  color: #CC0000;
}
.gallery-filter.is-active {
  background: #CC0000;
  border-color: #CC0000;
  color: #ffffff;
}

/* ===== GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}
.gallery-item {
  position: relative;
  background: #eaeaea;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery-item:hover img {
  transform: scale(1.04);
}
.gallery-item[hidden] {
  display: none;
}
.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 50%);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-empty {
  text-align: center;
  color: #666;
  padding: 3rem 1rem;
  font-size: 1rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox.is-open {
  display: flex;
}
.lightbox__stage {
  position: relative;
  max-width: 95vw;
  max-height: 88vh;
}
.lightbox__img {
  max-width: 95vw;
  max-height: 88vh;
  display: block;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox__btn {
  position: absolute;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  font-family: inherit;
}
.lightbox__btn:hover {
  background: #CC0000;
  border-color: #CC0000;
}
.lightbox__close {
  top: -56px;
  right: 0;
}
.lightbox__prev {
  left: -68px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__next {
  right: -68px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__counter {
  position: absolute;
  bottom: -44px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

@media (max-width: 720px) {
  .lightbox {
    padding: 1rem;
  }
  .lightbox__close {
    top: -48px;
    right: 0;
  }
  .lightbox__prev {
    left: 6px;
    top: auto;
    bottom: -56px;
    transform: none;
  }
  .lightbox__next {
    right: 6px;
    top: auto;
    bottom: -56px;
    transform: none;
  }
  .lightbox__counter {
    bottom: -44px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
}
