/* Gallery specific styles */
.gallery-page {
  background: linear-gradient(180deg, #000, #050810);
  overflow-x: hidden;
  height: auto;
}

/* Gallery Header */
.gallery-header {
  height: 40vh;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url(https://picsum.photos/seed/header/1920/1080) no-repeat center center/cover;
  margin-bottom: 40px;
}

.gallery-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gallery-header-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.gallery-title {
  font-size: clamp(32px, 6vw, 64px);
  color: #eaf6ff;
  margin-bottom: 16px;
}

.gallery-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.8);
  font-family: "Lexend", sans-serif;
  font-weight: 300;
}

/* Mosaic Gallery */
.gallery-section {
  padding: 0 24px 80px;
  position: relative;
  z-index: 5;
}

.mosaic-container {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 260px;
  grid-auto-flow: dense;
  gap: 16px;
}

.mosaic-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transform-origin: center;
  will-change: transform, opacity;
}

.mosaic-item.wide {
  grid-column: span 2;
}

.mosaic-item.tall {
  grid-row: span 2;
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.mosaic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mosaic-overlay span {
  color: white;
  font-weight: 600;
  font-size: 18px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.mosaic-item:hover img {
  transform: scale(1.1);
}

.mosaic-item:hover .mosaic-overlay {
  opacity: 1;
}

/* Gallery modal */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gallery-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: transparent;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 1001;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
}

.modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Active navigation link */
.nav-link.active {
  background: rgba(255,255,255,0.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .mosaic-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 200px;
    gap: 12px;
  }
}

@media (max-width: 576px) {
  .gallery-header {
    height: 30vh;
  }
  
  .mosaic-container {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
    gap: 8px;
  }
}
