/* =========================
   Gallery Section
========================= */
.gallery-section{padding:80px 0 100px}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(280px, 1fr));
  gap:20px;
}

/* =========================
   Gallery Item
========================= */
.gallery-item{
  position:relative;
  border-radius:var(--radius-md);
  overflow:hidden;
  cursor:pointer;
  aspect-ratio:4/3;
  background:var(--bg-alt);
  box-shadow:var(--shadow-sm);
  transition:var(--transition);
}
.gallery-item:hover{
  transform:translateY(-5px);
  box-shadow:var(--shadow-lg);
}

.gallery-img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s ease;
}
.gallery-item:hover .gallery-img{
  transform:scale(1.08);
}

/* Overlay on hover */
.gallery-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(to top, rgba(0,40,90,.85) 0%, rgba(0,40,90,.2) 50%, transparent 100%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-end;
  padding:20px;
  opacity:0;
  transition:opacity .3s ease;
}
.gallery-item:hover .gallery-overlay{
  opacity:1;
}
.gallery-overlay i{
  font-size:2rem;
  color:#fff;
  margin-bottom:8px;
  transform:translateY(10px);
  transition:transform .3s ease;
}
.gallery-item:hover .gallery-overlay i{
  transform:translateY(0);
}
.gallery-overlay span{
  color:#fff;
  font-size:.9rem;
  font-weight:500;
  text-align:center;
  text-transform:capitalize;
}

/* =========================
   Empty State
========================= */
.gallery-empty{
  text-align:center;
  padding:80px 20px;
  background:var(--bg-alt);
  border-radius:var(--radius-lg);
  border:2px dashed var(--border);
}
.empty-icon{
  font-size:4rem;
  color:var(--text-muted);
  opacity:.3;
  margin-bottom:20px;
}
.gallery-empty h3{
  font-size:1.5rem;
  margin-bottom:10px;
}
.gallery-empty p{
  color:var(--text-muted);
  margin-bottom:10px;
}
.gallery-empty code{
  background:var(--primary-light);
  color:var(--primary);
  padding:2px 8px;
  border-radius:4px;
  font-size:.9rem;
}

/* =========================
   Lightbox
========================= */
.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.92);
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  visibility:hidden;
  transition:opacity .3s ease, visibility .3s ease;
  backdrop-filter:blur(5px);
}
.lightbox.active{
  opacity:1;
  visibility:visible;
}

.lightbox-content{
  position:relative;
  max-width:90vw;
  max-height:85vh;
  display:flex;
  flex-direction:column;
  align-items:center;
}
.lightbox-content img{
  max-width:100%;
  max-height:75vh;
  object-fit:contain;
  border-radius:var(--radius-sm);
  box-shadow:0 20px 60px rgba(0,0,0,.5);
  transform:scale(.9);
  transition:transform .3s ease;
}
.lightbox.active .lightbox-content img{
  transform:scale(1);
}

.lightbox-caption{
  color:#fff;
  margin-top:16px;
  font-size:1rem;
  text-align:center;
  text-transform:capitalize;
  opacity:.9;
}

/* Lightbox Controls */
.lightbox-close,
.lightbox-prev,
.lightbox-next{
  position:absolute;
  background:rgba(255,255,255,.1);
  border:1px solid rgba(255,255,255,.2);
  color:#fff;
  width:50px;height:50px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.2rem;
  cursor:pointer;
  transition:var(--transition);
  z-index:10;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover{
  background:#fff;
  color:#000;
}

.lightbox-close{
  top:30px;
  right:30px;
}
.lightbox-prev{
  left:30px;
  top:50%;
  transform:translateY(-50%);
}
.lightbox-next{
  right:30px;
  top:50%;
  transform:translateY(-50%);
}

/* =========================
   Responsive
========================= */
@media (max-width: 768px){
  .gallery-grid{
    grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
    gap:12px;
  }
  .gallery-overlay span{
    font-size:.75rem;
  }
  .lightbox-prev, .lightbox-next{
    width:40px;height:40px;
    font-size:1rem;
  }
  .lightbox-prev{left:10px}
  .lightbox-next{right:10px}
  .lightbox-close{top:15px;right:15px;width:40px;height:40px}
}