/* ===== GALLERY STATS BAR ===== */
.gallery-stats {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 16px 20px;
  position: sticky;
  top: 72px;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

.gallery-stats-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text2);
}

.gallery-stats-count strong,
.gallery-stats-suites strong {
  color: var(--text);
  font-weight: 700;
}

.gallery-stats-divider {
  color: rgba(0, 0, 0, 0.12);
  font-size: 16px;
}

/* ===== GALLERY SECTION ===== */
.gallery-section {
  padding: 40px 20px 80px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== FILTERS ===== */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.gallery-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 22px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.gallery-filter-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.gallery-filter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  border-radius: 100px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}

.gallery-filter-btn:hover {
  border-color: var(--gold);
  color: var(--text);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.15);
}

.gallery-filter-btn:hover svg {
  opacity: 1;
}

.gallery-filter-btn.active {
  color: #fff;
  border-color: var(--gold);
}

.gallery-filter-btn.active::before {
  transform: scaleX(1);
  transform-origin: left;
}

.gallery-filter-btn.active svg {
  opacity: 1;
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  grid-auto-rows: 135px;
  gap: 16px;
  grid-auto-flow: dense;
}

/* ===== GALLERY ITEM ===== */
.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: #f5f5f5;
  grid-row: span 2;
  height: auto;
  min-height: 100%;
}

.gallery-item--tall {
  grid-row: span 3;
}

.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
}

/* ===== SHIMMER LOADING ===== */
.gallery-item-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      #f0f0f0 0%,
      #e0e0e0 40%,
      #f0f0f0 80%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  z-index: 1;
  opacity: 0.6;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  z-index: 2;
}

.gallery-item img.loaded {
  z-index: 2;
}

/* Remove shimmer when image loads */
.gallery-item img.loaded+.gallery-item-shimmer,
.gallery-item img.loaded~.gallery-item-shimmer {
  opacity: 0;
  animation: none;
  transition: opacity 0.3s;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ===== OVERLAY ===== */
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(16, 24, 32, 0.85) 0%,
      rgba(16, 24, 32, 0.5) 30%,
      rgba(16, 24, 32, 0) 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-title {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 2px;
  transform: translateY(10px);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover .gallery-item-title {
  transform: translateY(0);
}

.gallery-item-tag {
  font-size: 10px;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
  transform: translateY(8px);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.05s;
}

.gallery-item:hover .gallery-item-tag {
  transform: translateY(0);
}

/* ===== ITEM ENTRANCE ANIMATION ===== */
@keyframes galleryItemIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== EMPTY STATE ===== */
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text2);
}

.gallery-empty svg {
  opacity: 0.3;
  margin-bottom: 16px;
}

.gallery-empty p {
  font-size: 15px;
  font-weight: 400;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 32, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(8px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active .lightbox-content {
  transform: scale(1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--white);
  font-size: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: rotate(90deg);
}

.lightbox-caption {
  color: var(--white);
  text-align: center;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 16px;
  opacity: 0.9;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 5;
  backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

/* ===== RESPONSIVE ===== */
@media(max-width: 1024px) {
  .gallery-item--wide {
    grid-column: span 1;
  }

  .gallery-item--tall {
    height: 340px;
  }
}

@media(max-width: 768px) {
  .gallery-section {
    padding: 24px 16px 60px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
  }

  .gallery-item {
    height: 240px;
  }

  .gallery-item--tall {
    height: 300px;
  }

  .gallery-filter-btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .gallery-filters {
    gap: 8px;
    margin-bottom: 24px;
  }

  .gallery-stats {
    top: 60px;
    padding: 12px 16px;
  }

  .gallery-stats-inner {
    font-size: 12px;
  }

  .lightbox-content {
    max-width: 95vw;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .lightbox-prev {
    left: 12px;
  }

  .lightbox-next {
    right: 12px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

@media(max-width: 480px) {
  .gallery-section {
    padding: 16px 12px 40px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-item {
    height: 220px;
  }

  .gallery-item--tall {
    height: 280px;
  }

  .gallery-filters {
    gap: 6px;
    margin-bottom: 20px;
  }

  .gallery-filter-btn {
    padding: 6px 14px;
    font-size: 11px;
    border-radius: 50px;
  }

  .gallery-filter-btn svg {
    display: none;
  }

  .gallery-stats {
    padding: 10px 12px;
  }

  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .lightbox-prev {
    left: 6px;
  }

  .lightbox-next {
    right: 6px;
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .lightbox-caption {
    font-size: 13px;
    margin-top: 10px;
  }
}