/* ==========================================================================
   SSGI Gallery & Lightbox Stylesheet (gallery.css)
   ========================================================================== */

/* Filter Navigation */
.gallery-filter-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.gallery-filter-btn {
  padding: 0.65rem 1.65rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

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

.gallery-filter-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(11, 37, 69, 0.25);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Gallery Item / Card */
.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: var(--primary);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  transition: transform var(--transition-base), box-shadow var(--transition-base), opacity 0.3s ease;
}

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

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

/* Hover Overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 37, 69, 0.2) 0%, rgba(7, 23, 44, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.gallery-tag {
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  background: var(--secondary);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  transform: translateY(10px);
  transition: transform var(--transition-base);
}

.gallery-item:hover .gallery-tag {
  transform: translateY(0);
}

.gallery-title {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  transform: translateY(15px);
  transition: transform var(--transition-base) 0.05s;
}

.gallery-item:hover .gallery-title {
  transform: translateY(0);
}

.gallery-zoom-icon {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.7);
  opacity: 0;
  transition: all var(--transition-base);
}

.gallery-zoom-icon svg {
  width: 18px;
  height: 18px;
}

.gallery-item:hover .gallery-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(7, 23, 44, 0.94);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.lightbox-dialog {
  position: relative;
  max-width: 960px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-figure {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img-wrap {
  position: relative;
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  background: #000000;
}

.lightbox-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lightbox-info {
  margin-top: 1rem;
  text-align: center;
  color: #FFFFFF;
  max-width: 700px;
}

.lightbox-caption {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 0.25rem;
}

.lightbox-category {
  display: inline-block;
  color: var(--secondary-light);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lightbox-counter {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #94A3B8;
}

/* Lightbox Nav & Controls */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 2010;
}

.lightbox-btn:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-btn svg {
  width: 24px;
  height: 24px;
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.lightbox-close:hover {
  background: var(--accent-red);
  transform: rotate(90deg);
}

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