/* Gallery Page Styles */
.page-gallery .site-header {
  background: none;
  padding: 0;
  min-height: auto;
}

.page-gallery .site-header::after {
  display: none;
}

.page-gallery .site-header__inner {
  position: relative;
}

.gallery-main {
  background: linear-gradient(180deg, #0a0a0a 0%, rgba(6, 6, 6, 0.9) 35%, #020202 100%);
  padding: clamp(20px, 3vw, 30px) clamp(24px, 6vw, 54px) clamp(90px, 10vw, 130px);
  margin-top: 0;
}

.gallery-section {
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery-loading,
.gallery-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-muted);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(20px, 3vw, 32px);
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-stroke);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.15);
}

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

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

/* Video styles in gallery items */
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover video {
  transform: scale(1.05);
}

/* Video overlay with play icon */
.gallery-video-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 24px;
  pointer-events: none;
  transition: var(--transition-base);
  z-index: 1;
}

.gallery-item:hover .gallery-video-overlay {
  background: rgba(0, 0, 0, 0.8);
  border-color: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Lightbox Modal */
.gallery-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.gallery-lightbox.active {
  display: flex;
}

.gallery-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.gallery-lightbox video {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  background: #000;
}

.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  transition: var(--transition-base);
  backdrop-filter: blur(8px);
}

.gallery-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: var(--transition-base);
  backdrop-filter: blur(8px);
}

.gallery-lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.gallery-lightbox-prev {
  left: 20px;
}

.gallery-lightbox-next {
  right: 20px;
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .gallery-lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .gallery-lightbox-prev {
    left: 10px;
  }

  .gallery-lightbox-next {
    right: 10px;
  }

  .gallery-lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

