/* ==========================================================================
   GALLERY.CSS — Photo Gallery, Filter Tabs, Masonry Grid, Lightbox
   Plaza Hotel
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Gallery Filter Tabs
   -------------------------------------------------------------------------- */
.gallery-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.375rem;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.gallery-filter-btn:hover {
  border-color: var(--color-accent-light);
  color: var(--color-accent);
  background-color: rgba(139, 105, 20, 0.05);
}

.gallery-filter-btn.active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 2px 10px rgba(139, 105, 20, 0.30);
}

.gallery-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background-color: rgba(0, 0, 0, 0.10);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  line-height: 1;
}

.gallery-filter-btn.active .gallery-filter-count {
  background-color: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   2. Gallery Grid (masonry-like)
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 0.75rem;
}

/* Size variants for masonry effect */
.gallery-item--wide {
  grid-column: span 2;
}

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

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

/* --------------------------------------------------------------------------
   3. Gallery Item
   -------------------------------------------------------------------------- */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  background-color: var(--color-surface);
  /* Items hidden by filter */
  transition: opacity var(--transition), transform var(--transition);
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* --------------------------------------------------------------------------
   4. Gallery Item Hover Overlay
   -------------------------------------------------------------------------- */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 14, 12, 0.70) 0%,
    rgba(15, 14, 12, 0.10) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.125rem;
}

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

.gallery-item-title {
  font-family: var(--font-heading);
  font-size: var(--fs-base);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  line-height: var(--lh-snug);
  margin-bottom: 0.25rem;
}

.gallery-item-category {
  font-size: var(--fs-xs);
  color: var(--color-accent-light);
  font-weight: var(--fw-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Zoom icon */
.gallery-item-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(4px);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  transition: transform var(--transition), opacity var(--transition);
}

.gallery-item:hover .gallery-item-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* --------------------------------------------------------------------------
   5. Lightbox
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   6. Lightbox Image
   -------------------------------------------------------------------------- */
.lightbox-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  display: block;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.70);
  transition: opacity var(--transition);
}

.lightbox-img.is-loading {
  opacity: 0;
}

.lightbox-caption {
  position: absolute;
  bottom: -2.25rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.60);
}

/* --------------------------------------------------------------------------
   7. Lightbox Close Button
   -------------------------------------------------------------------------- */
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  color: var(--color-white);
  font-size: var(--fs-lg);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  line-height: 1;
  backdrop-filter: blur(4px);
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.22);
  transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   8. Lightbox Navigation (prev/next)
   -------------------------------------------------------------------------- */
.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 1rem;
  pointer-events: none;
  z-index: 5;
}

.lightbox-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background-color: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-full);
  color: var(--color-white);
  font-size: var(--fs-xl);
  cursor: pointer;
  pointer-events: auto;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}

.lightbox-nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

.lightbox-prev:hover {
  transform: translateX(-3px);
}

.lightbox-next:hover {
  transform: translateX(3px);
}

.lightbox-nav-btn:disabled {
  opacity: 0.30;
  cursor: not-allowed;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   9. Lightbox Counter
   -------------------------------------------------------------------------- */
.lightbox-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   10. Lightbox Thumbnail Strip (optional)
   -------------------------------------------------------------------------- */
.lightbox-thumbs {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  max-width: 80vw;
  padding: 0.375rem;
  scrollbar-width: none;
}

.lightbox-thumbs::-webkit-scrollbar {
  display: none;
}

.lightbox-thumb {
  flex-shrink: 0;
  width: 52px;
  height: 40px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  opacity: 0.45;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: var(--color-accent-light);
}

.lightbox-thumb:hover {
  opacity: 0.85;
}
