/* ========================================
   VPKT Gallery — Photo Gallery Page
   ======================================== */

/* --- GALLERY HEADER --- */
.gallery-header {
  text-align: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--gutter) 1.5rem;
}
.gallery-header h1 {
  font-family: var(--font-headline);
  font-size: var(--text-4xl);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.gallery-header p {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-secondary);
}

/* --- BREADCRUMB --- */
.gallery-breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 1.25rem;
  display: none;
  align-items: center;
  justify-content: space-between;
}
.gallery-breadcrumb.visible {
  display: flex;
}
.breadcrumb-back {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0;
  transition: color 0.2s ease;
}
.breadcrumb-back:hover {
  color: var(--color-accent);
}

/* --- YEAR FILTER --- */
.year-filter {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.year-pill {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--color-rule);
  border-radius: 2px;
  background: transparent;
  color: var(--color-text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.year-pill:hover {
  color: var(--color-text-secondary);
  border-color: var(--color-text-tertiary);
}
.year-pill.active {
  color: var(--color-text);
  border-color: var(--color-accent);
  background: rgba(196, 85, 58, 0.08);
}

/* --- CATEGORY TABS --- */
.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 2rem;
  flex-wrap: wrap;
}
.gallery-tab {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--color-rule);
  border-radius: 2px;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
}
.gallery-tab:hover {
  color: var(--color-text);
  border-color: var(--color-text-tertiary);
}
.gallery-tab.active {
  color: var(--color-text);
  border-color: var(--color-accent);
  background: rgba(196, 85, 58, 0.08);
}

/* --- UNIFORM GRID --- */
.gallery-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* --- HIDDEN GRID --- */
.gallery-grid--hidden {
  display: none;
}

/* --- ALBUM CARD --- */
.album-card {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--color-rule);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.album-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.album-card.hidden {
  display: none;
}
.album-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.album-card:hover img {
  transform: scale(1.03);
}
.album-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  transition: background 0.3s ease;
}
.album-card:hover .album-card-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.25) 50%, transparent 100%);
}
.album-card-title {
  font-family: var(--font-headline);
  font-size: var(--text-xl);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}
.album-card-count {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- GALLERY ITEM --- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--color-rule);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.gallery-item.hidden {
  display: none;
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.gallery-item:hover img {
  transform: scale(1.03);
}

/* Overlay on hover */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}
.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}
.gallery-item-title {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.15rem;
}
.gallery-item-location {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
}

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}
.lightbox-close:hover {
  color: #fff;
}
.lightbox-caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
}

/* --- RESPONSIVE --- */
@media (max-width: 1023px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 599px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-header h1 {
    font-size: var(--text-3xl);
  }
}
