/* ============================================
   PROJECT PAGE SHARED STYLES
   ============================================ */

/* Project Hero - Default (override with page-specific style for background image) */
.hero--project {
  background: linear-gradient(135deg, rgba(72, 52, 212, 0.85) 0%, rgba(108, 92, 231, 0.85) 100%);
  background-size: cover;
  background-position: center;
}

/* Project content with more left padding */
.project-content .container {
  padding-left: 80px;
}

/* Screenshot Gallery - Tight Grid */
.screenshot-gallery {
  display: flex;
  height: 350px;
  background: #333;
}

.screenshot-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex: 1;
  height: 100%;
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.screenshot-item:hover img {
  transform: scale(1.05);
  opacity: 0.8;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(72, 52, 212, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 40px;
}

.lightbox.active {
  display: flex;
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__image {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox__close {
  position: absolute;
  top: -50px;
  right: 0;
  background: transparent;
  border: none;
  color: #f5a623;
  cursor: pointer;
  padding: 10px;
  transition: opacity 0.3s ease;
}

.lightbox__close:hover {
  opacity: 0.7;
}

.lightbox__close svg {
  width: 36px;
  height: 36px;
}

/* Masonry Gallery */
.masonry-gallery {
  columns: 3;
  column-gap: 16px;
  padding: 40px 40px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.masonry-gallery--2col {
  columns: 2;
  max-width: 100%;
}

.masonry-gallery--4col {
  columns: 4;
  max-width: 100%;
}

.masonry-gallery--row {
  columns: unset;
  display: flex;
  flex-direction: row;
  gap: 16px;
  max-width: 100%;
}

.masonry-gallery--row .masonry-item {
  flex: 1;
  margin-bottom: 0;
}

.masonry-gallery--grid3 {
  columns: unset;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 100%;
}

.masonry-gallery--grid3 .masonry-item {
  margin-bottom: 0;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.masonry-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(59, 35, 155, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.masonry-item__overlay svg {
  color: white;
  width: 40px;
  height: 40px;
}

.masonry-item:hover img {
  transform: scale(1.04);
}

.masonry-item:hover .masonry-item__overlay {
  opacity: 1;
}

@media (max-width: 1100px) {
  .masonry-gallery--4col { columns: 3; }
}

@media (max-width: 900px) {
  .masonry-gallery { columns: 2; }
  .masonry-gallery--4col { columns: 2; }
}

@media (max-width: 500px) {
  .masonry-gallery { columns: 1; }
  .masonry-gallery--2col { columns: 1; }
  .masonry-gallery--4col { columns: 1; }
}

/* Responsive */
@media (max-width: 768px) {
  .project-content .container {
    padding-left: 20px;
  }
  
  .screenshot-gallery {
    flex-wrap: wrap;
    height: auto;
  }
  
  .screenshot-item {
    flex: 0 0 50%;
    height: 175px;
  }
  
  .lightbox {
    padding: 20px;
  }
  
  .lightbox__close {
    top: -40px;
  }
  
  .lightbox__close svg {
    width: 30px;
    height: 30px;
  }
}
