/* ==========================================================================
   Interactive Photo Gallery & Lightbox Styles
   ========================================================================== */

.gallery-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
  max-width: 100%;
}

@media (max-width: 480px) {
  .gallery-filter-bar {
    gap: 0.4rem;
    margin-bottom: 2rem;
  }
}

.gallery-filter-btn {
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 480px) {
  .gallery-filter-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
  }
}

.gallery-filter-btn:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-300);
}

[data-theme="dark"] .gallery-filter-btn:hover {
  background: rgba(13, 148, 136, 0.15);
  color: var(--primary-300);
}

.gallery-filter-btn.active {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
  color: #ffffff;
  border-color: var(--primary-700);
  box-shadow: 0 4px 12px rgba(14, 75, 82, 0.25);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
}

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

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-tertiary);
  aspect-ratio: 4/3;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

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

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 13, 20, 0.85) 0%, rgba(7, 13, 20, 0.2) 60%, transparent 100%);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  transition: opacity var(--transition-normal);
}

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

.gallery-item-zoom {
  align-self: flex-end;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform var(--transition-fast);
}

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

.gallery-item-info {
  color: #ffffff;
}

.gallery-item-cat {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-300);
}

.gallery-item-title {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.15rem;
  color: #ffffff;
}

/* ==========================================================================
   Fullscreen Lightbox Modal
   ========================================================================== */

.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 14, 0.95);
  backdrop-filter: blur(12px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1rem;
}

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

.lightbox-content-wrap {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-caption-bar {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: #ffffff;
}

.lightbox-counter {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.lightbox-title {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Lightbox Controls */
.lightbox-btn {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 5002;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.lightbox-btn-close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox-btn-prev {
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-btn-next {
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .lightbox-btn-prev { left: 0.5rem; }
  .lightbox-btn-next { right: 0.5rem; }
  .lightbox-btn { width: 40px; height: 40px; }
}
