/* ============================================
   GALLERY PAGE
   ============================================ */
.gallery-filter {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.gallery-filter__btn {
  padding: 8px 22px;
  border-radius: 30px;
  border: 2px solid var(--cream-dark);
  background: var(--white);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-filter__btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.gallery-filter__btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ---- Grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 12px;
}

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

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

.gallery-item--tall {
  grid-row: span 2;
}

.gallery-item:hover {
  transform: scale(0.98);
  box-shadow: var(--shadow-lg);
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item__content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.gallery-item__emoji {
  font-size: 3.5rem;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item__emoji {
  opacity: 0.3;
  transform: scale(1.2);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s ease;
}

.gallery-item__cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.gallery-item__title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--white);
  margin-bottom: 6px;
}

.gallery-item__view {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox__card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 600px;
  width: 100%;
  position: relative;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lightbox__preview {
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__emoji {
  font-size: 6rem;
  opacity: 0.6;
}

.lightbox__info {
  padding: 24px;
}

.lightbox__cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 8px;
}

.lightbox__title {
  font-size: 1.4rem;
  color: var(--deep-brown);
  margin-bottom: 12px;
}

.lightbox__placeholder {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.lightbox__placeholder code {
  background: var(--cream-dark);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
  color: var(--primary-dark);
}

.lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.35);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox__close:hover {
  background: rgba(0,0,0,0.6);
}

/* ---- Gallery Notice ---- */
.gallery-notice {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--gold);
  max-width: 700px;
  margin: 0 auto;
}

.gallery-notice__icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.gallery-notice h4 {
  color: var(--deep-brown);
  margin-bottom: 6px;
  font-size: 1rem;
}

.gallery-notice p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.gallery-notice code {
  background: var(--cream-dark);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.85em;
  color: var(--primary-dark);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
}

@media (max-width: 400px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .gallery-item--wide,
  .gallery-item--tall {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Uploaded gallery photo fills the card behind the overlay */
.gallery-item { position: relative; overflow: hidden; }
.gallery-item__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lightbox__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
