/* Lightbox Styles */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 20, 40, 0.95);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}
.lightbox-modal.open {
  display: flex;
}
.lightbox-wrapper {
  display: flex;
  flex-direction: row;
  max-width: 90%;
  max-height: 85vh;
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--rl);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: zoom 0.25s ease-out;
}
[data-theme="dark"] .lightbox-wrapper {
  background: rgba(9, 14, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.lightbox-left {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.2);
  padding: 20px;
}
.lightbox-left img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--r);
  cursor: zoom-in;
}
.lightbox-right {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 85vh;
}
.lightbox-right h3 {
  font-family: var(--fd);
  font-size:1.5rem;
  color: var(--t1);
  line-height: 1.3;
}
.lightbox-right #lightbox-desc {
  font-size:0.906rem;
  color: var(--t2);
  line-height: 1.6;
}
.lightbox-section {
  font-size:0.844rem;
  color: var(--tm);
  border-top: 1px solid var(--bdr);
  padding-top: 16px;
}
.lightbox-section strong {
  color: var(--t1);
  display: block;
  margin-bottom: 4px;
}
#lightbox-caption {
  margin-top: 15px;
  width: 80%;
  text-align: center;
  color: #ccc;
  font-family: var(--fm);
  font-size:0.875rem;
  letter-spacing: 0.5px;
}
.lightbox-close {
  position: fixed;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size:2.5rem;
  font-weight: 300;
  transition: 0.2s;
  cursor: pointer;
  z-index: 100000;
}
.lightbox-close:hover {
  color: var(--g400);
}

/* Dual layout configurations */
.lightbox-modal.no-desc .lightbox-right {
  display: none;
}
.lightbox-modal.no-desc .lightbox-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
}
.lightbox-modal.no-desc .lightbox-left {
  background: transparent;
  padding: 0;
}
.lightbox-modal.no-desc .lightbox-left img {
  max-height: 80vh;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-modal.no-desc #lightbox-caption {
  display: block;
}
.lightbox-modal:not(.no-desc) #lightbox-caption {
  display: none;
}

/* Responsiveness */
@media (max-width: 768px) {
  .lightbox-wrapper {
    flex-direction: column;
    max-height: 90vh;
  }
  .lightbox-left {
    padding: 10px;
  }
  .lightbox-left img {
    max-height: 40vh;
  }
  .lightbox-right {
    padding: 20px;
    max-height: 50vh;
  }
  .lightbox-right h3 {
    font-size:1.25rem;
  }
}

/* GALLERY */
.gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.gallery-item{border-radius:var(--r);overflow:hidden;border:1px solid var(--bdr);background:var(--bg);aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;position:relative;cursor:pointer}
.gallery-item img{width:100%;height:100%;object-fit:cover;transition:transform 0.4s}
.gallery-item:hover img{transform:scale(1.04)}
.gallery-caption{position:absolute;bottom:0;left:0;right:0;padding:10px 12px;background:linear-gradient(transparent,rgba(8,14,30,0.78));color:#fff;font-size:0.719rem;font-weight:500;opacity:0;transition:opacity 0.3s;font-family:var(--fb);line-height:1.4}
.gallery-item:hover .gallery-caption{opacity:1}
.gallery-ph{width:100%;height:100%;background:linear-gradient(135deg,var(--g50),var(--a50));display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;color:var(--tm);font-size:0.75rem}
.gallery-ph svg{width:32px;height:32px;opacity:0.3;stroke:var(--g700)}
