/* ===== Archive Page ===== */

.archive-page {
  padding-bottom: 3rem;
}

.archive-subtitle {
  color: var(--text-tertiary);
  font-size: 0.88rem;
  margin-bottom: 2rem;
  margin-top: -0.25rem;
}

/* ===== Album Grid ===== */

.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.album-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  display: block;
  aspect-ratio: 3 / 2;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
}

.album-card:hover {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-3px);
}

.album-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.album-card:hover .album-cover {
  transform: scale(1.03);
}

.album-cover-placeholder {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
}

.album-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1rem 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
  color: #fff;
}

.album-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.album-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.album-location::after {
  content: "\00b7";
  margin-left: 0.5rem;
}

/* ===== Single Album ===== */

.album-single {
  padding-bottom: 3rem;
}

.album-header {
  margin: 3rem 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.album-back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.82rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.album-back:hover {
  color: var(--accent);
}

.album-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.album-header-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.album-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  line-height: 1.6;
}

/* ===== Photo Grid (Masonry) ===== */

.photo-grid {
  column-count: 2;
  column-gap: 0.75rem;
  margin-top: 1.5rem;
}

.photo-item {
  break-inside: avoid;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.photo-item:hover {
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: scale(1.01);
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.3s;
}

.photo-item:hover img {
  filter: brightness(1.05);
}

/* ===== Lightbox ===== */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  z-index: 1000;
}

.lightbox::backdrop {
  background: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.lightbox-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  animation: lightbox-in 0.2s ease;
}

@keyframes lightbox-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #fff;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  line-height: 1;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* ===== Responsive ===== */

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

  .photo-grid {
    column-count: 1;
  }

  .lightbox-nav {
    padding: 0.4rem 0.65rem;
    font-size: 1.5rem;
  }

  .lightbox-prev {
    left: 0.75rem;
  }

  .lightbox-next {
    right: 0.75rem;
  }

  .album-header h1 {
    font-size: 1.5rem;
  }
}
