.gallery {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:20px;
  padding:20px;
}

.gallery-item {
  display:flex;
  flex-direction:column;
  border:2px solid #46415B;
  border-radius:8px;
  overflow:hidden;
  background:#1b1b1b;
  cursor:pointer;
  transition: transform 0.3s, border-color 0.3s;
}

.gallery-item:hover { transform:scale(1.05); border-color:#1e90ff; }

.image-wrapper {
  width:100%;
  aspect-ratio: 4 / 3;
  overflow:hidden;
}

.image-wrapper img {
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.image-info {
  padding:8px;
  text-align:center;
  font-size:0.95em;
  color:#C2B7CC;
  
	  background: linear-gradient(
		  360deg,
		  rgba(15, 13, 32, 0.5) 25%,
		  rgba(53, 30, 74, 0.5) 100%
		);
}

.lightbox {
  display:none;
  position:fixed; top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.95);
  justify-content:center; align-items:center;
  z-index:1000;
  opacity:0;
  transition: opacity 0.3s ease;
}

.lightbox.active { opacity:1; display:flex; }

.lightbox-content {
  position:relative;
  text-align:center;
  max-width:90%;
  max-height:90vh;
  overflow:hidden;
  color:#fff;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.lightbox.active .lightbox-content { transform: scale(1); }

.lightbox-content img {
  width:65vw;
  max-width:65vw;
  height:auto;
  max-height:65vh;
  object-fit:contain;
  border-radius:8px;
  display:block;
  margin:0 auto;
}

.lightbox-text {
  margin-top:15px;
  line-height:1.5;
}
.lightbox-text .title { font-size:2em; font-weight:bold; }
.lightbox-text .date { font-size:0.9em; color:#aaa; }
.lightbox-text .desc { margin-top:8px; }

.arrow {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  font-size:2em;
  padding:10px;
  cursor:pointer;
  user-select:none;
  color:#fff;
  background:rgba(0,0,0,0.4);
  border-radius:50%;
  z-index:1001;
  opacity:0;
  transition: opacity 0.3s ease;
}
.arrow-left { left:20px; }
.arrow-right { right:20px; }
.lightbox.active .arrow { opacity:1; }

.close-button {
  position:fixed;
  top:20px; right:20px;
  font-size:2em;
  cursor:pointer;
  background:rgba(0,0,0,0.4);
  border-radius:50%;
  padding:5px 10px;
  z-index:1001;
  opacity:0;
  transition: opacity 0.3s ease;
}
.lightbox.active ~ .close-button { opacity:1; }

.page-buttons {
  position:fixed;
  bottom:20px; right:20px;
  display:flex; flex-direction:row; gap:10px;
  z-index:1001;
  opacity:0;
  transition: opacity 0.3s ease;
}
.lightbox.active ~ .page-buttons { opacity:1; }

.page-buttons a, .page-buttons button {
  background: rgba(255,255,255,0.1);
  border:none;
  padding:8px 12px;
  border-radius:5px;
  color:#fff;
  cursor:pointer;
  font-size:1.1em;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:6px;
}
.page-buttons button.optional { display:none; }

