/* ===========================
   GALLERY PAGE - Modern Design
   Emil Kowalski Style
   =========================== */

/* Hero */
.gallery-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-text-primary);
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  will-change: transform;
}

.gallery-hero-bg img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  opacity: 0.4;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(44,40,37,0.4) 0%, rgba(44,40,37,0.7) 100%);
  z-index: 2;
}

.gallery-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--space-6);
}

.gallery-hero .breadcrumb {
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: var(--space-8);
}

.gallery-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--duration-fast) var(--ease-out);
}

.gallery-hero .breadcrumb a:hover {
  color: var(--color-gold);
}

.gallery-hero-label {
  display: inline-block;
  font-family: var(--font-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  background: var(--gradient-gold-text);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-6);
}

.gallery-hero-title {
  font-family: var(--font-primary);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: var(--weight-light);
  color: var(--color-white);
  line-height: 0.95;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-8);
}

.gallery-hero-title-line {
  display: block;
}

.gallery-hero-title-line--accent {
  background: var(--gradient-gold-text);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gold-shimmer 4s ease-in-out infinite;
  font-style: italic;
}

.gallery-hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.7);
  max-width: 500px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

/* Gallery Section */
.gallery-section {
  padding: var(--space-40) var(--space-6);
  background-color: var(--color-white);
}

.gallery-section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.gallery-section-label {
  display: inline-block;
  font-family: var(--font-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  background: var(--gradient-gold-text);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

.gallery-section-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}

.gallery-section-divider {
  width: 80px;
  height: 2px;
  background: var(--gradient-gold);
  margin: 0 auto var(--space-6);
}

.gallery-section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Filter Buttons */
.gallery-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-16);
}

.gallery-filter {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-beige-dark);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.gallery-filter:hover {
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.gallery-filter.active {
  background: var(--gradient-gold);
  background-size: 200% 200%;
  animation: gold-shimmer 3s ease-in-out infinite;
  color: var(--color-white);
  border-color: transparent;
}

.gallery-filter-count {
  font-size: var(--text-xs);
  opacity: 0.7;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: var(--container-2xl);
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item-inner {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.gallery-item--wide .gallery-item-inner {
  aspect-ratio: 2/1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44, 40, 37, 0.9) 0%, rgba(44, 40, 37, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
}

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

.gallery-item-category {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  background: var(--gradient-gold);
  background-size: 200% 200%;
  animation: gold-shimmer 3s ease-in-out infinite;
  color: var(--color-white);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
  width: fit-content;
}

.gallery-item-title {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.gallery-item-btn {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  transform: scale(0.8);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out);
}

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

.gallery-item-btn:hover {
  background: var(--color-gold);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 400ms var(--ease-out), visibility 400ms var(--ease-out);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: var(--text-xl);
  cursor: pointer;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  transition: background var(--duration-fast) var(--ease-out);
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: var(--text-xl);
  cursor: pointer;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  transition: background var(--duration-fast) var(--ease-out);
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev { left: var(--space-6); }
.lightbox-next { right: var(--space-6); }

.lightbox-caption {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-sm);
}

.lightbox-counter {
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-item--wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .gallery-section {
    padding: var(--space-24) var(--space-4);
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .gallery-item--wide {
    grid-column: span 1;
  }
  
  .gallery-item--wide .gallery-item-inner {
    aspect-ratio: 4/3;
  }
  
  .gallery-filters {
    gap: var(--space-2);
  }
  
  .gallery-filter {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
  
  .lightbox-nav {
    width: 44px;
    height: 44px;
  }
  
  .lightbox-prev { left: var(--space-2); }
  .lightbox-next { right: var(--space-2); }
}
