/* ✅ RajISG Legacy Gallery Styles */

body {
  background: #2a3439;
  color: #f3f3f3;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
}

.legacy-gallery {
  padding: 60px 30px;
  max-width: 1300px;
  margin: auto;
}

.gallery-header {
  text-align: center;
  margin-bottom: 50px;
}

.gallery-header h1 {
  font-size: 3em;
  color: #C7A647;
  margin-bottom: 10px;
}

.gallery-header p {
  font-size: 1.2em;
  color: #ccc;
}

.year-block {
  margin-bottom: 60px;
}

.year-block h2 {
  font-size: 2.2em;
  border-bottom: 2px solid #557080;
  color: #f7d97c;
  margin-bottom: 20px;
}

.gallery-card img {
  border: 2px solid rgba(255, 215, 0, 0.15); /* soft gold edge */
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.12); /* outer glow */
  border-radius: 8px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gallery-card:hover img {
  box-shadow: 0 0 24px rgba(255, 215, 0, 0.35); /* stronger glow on hover */
  transform: scale(1.02);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 25px;
}

.gallery-card {
  background: #111926;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.gallery-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border: none;
}

/* 📝 Caption Block (Hidden in Grid, Shown in Lightbox) */
.caption-block {
  display: none;
  padding: 15px;
  border-top: 1px solid #2e3c4e;
  background: #101923;
  color: #ccc;
  font-size: 0.95em;
  border-radius: 6px;
}

.caption-block[contenteditable="true"] {
  outline: 1px dashed #445;
  cursor: text;
}

.caption-time {
  color: #888;
  font-size: 0.85em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.caption-headline {
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 4px;
}

.caption-body {
  color: #ddd;
  line-height: 1.5em;
}

.keywords {
  margin-top: 6px;
  color: #79b6ff;
  font-size: 0.85em;
  font-style: italic;
}

/* 👀 Caption Preview (Visible in Grid Only) */
.caption-preview {
  padding: 12px;
  background: #111926;
  font-size: 0.92em;
  border-top: 1px solid #2e3c4e;
  color: #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.caption-preview .caption-time {
  color: #888;
  font-size: 0.75em;
  text-transform: uppercase;
}

.caption-preview .caption-headline {
  font-weight: bold;
  color: #FFD700;
}

.caption-preview .read-more {
  color: #79b6ff;
  font-size: 0.85em;
  font-style: italic;
  margin-top: 6px;
}

/* ✅ Lightbox Overlay Engarfe */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 28, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  padding: 30px;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  background: #111926;
  border-radius: 16px;
  overflow: auto;
  box-shadow: 0 0 40px rgba(0,0,0,0.6);
  padding: 20px;
  position: relative;
  transform: scale(0.96);
  opacity: 0;
  transition: all 0.4s ease;
}

.lightbox-content.visible {
  transform: scale(1);
  opacity: 1;
}

.lightbox-content img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.25);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.lightbox-caption {
  margin-top: 15px;
  font-size: 1.05em;
  color: #f3f3f3;
  border-top: 1px solid #2e3c4e;
  padding-top: 10px;
}

.lightbox-caption .caption-time {
  color: #aaa;
  font-size: 0.85em;
  text-transform: uppercase;
}

.lightbox-caption .caption-headline {
  color: #FFD700;
  font-weight: bold;
  margin: 6px 0;
}

.lightbox-caption .caption-body {
  color: #eee;
  line-height: 1.5em;
}

.lightbox-caption .keywords {
  margin-top: 10px;
  color: #79b6ff;
  font-size: 0.9em;
  font-style: italic;
}

.close-lightbox {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2em;
  color: #FFD700;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-lightbox:hover {
  color: #fffdd0;
}

/* ✅ Responsive Tweaks */
@media (max-width: 768px) {
  .gallery-header h1 {
    font-size: 2.2em;
  }

  .year-block h2 {
    font-size: 1.6em;
  }

  .gallery-card img {
    height: 180px;
  }

  .lightbox-content {
    padding: 15px;
  }

  .lightbox-caption {
    font-size: 1em;
  }
}
