/* ==========================================================================
   Gurock Equipments — Gallery Page Styles
   Extends style.css (tokens, .container, [data-reveal])
   ========================================================================== */

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
}

.gallery-filter {
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-black);
  border: 1.5px solid var(--color-border);
  background: #FFFFFF;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.gallery-filter:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold);
}

.gallery-filter.is-active {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold) 55%, var(--color-gold-dark));
  border-color: transparent;
  color: var(--color-black);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  border: none;
  background: linear-gradient(135deg, #EFEFEF, #E2E2E2);
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -18px rgba(17, 17, 17, 0.35);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0) 40%, rgba(17, 17, 17, 0.82) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

.gallery-item-overlay svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-gold);
  flex-shrink: 0;
}

.gallery-item.is-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------------- Lightbox ---------------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 88vw;
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.94);
  transition: transform 0.35s var(--ease);
}

.lightbox.is-open .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 12px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  margin-top: 18px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.lightbox-close svg { width: 18px; height: 18px; }

.lightbox-close:hover {
  background: var(--color-gold);
  color: var(--color-black);
  transform: rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  transition: background-color 0.3s var(--ease);
}

.lightbox-nav svg { width: 20px; height: 20px; }

.lightbox-nav:hover {
  background: var(--color-gold);
  color: var(--color-black);
}

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

@media (max-width: 700px) {
  .lightbox-nav { width: 42px; height: 42px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 14px; right: 14px; }
}
