/* -----------------------------------
   GLOBAL BASE STYLES
------------------------------------ */

html,
body {
  background-color: #1e1e1e !important;
  margin: 0;
  padding: 0;
  color: #fff;
}

header {
  background-color: #1e1e1e;
  margin-bottom: 5rem;
}

/* -----------------------------------
   HEADER / BACK LINK
------------------------------------ */

.back-link {
  text-decoration: none;
  color: #d80808;
  font-size: 1.2rem;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

/* -----------------------------------
   GALLERY POST MAIN CONTENT
------------------------------------ */

.gallery-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.gallery-post {
  margin-top: 2rem;
}

.gallery-post h1 {
  margin: 0 0 1rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  font-size: 2.8rem;
  text-shadow:
    0 0 5px rgba(255, 255, 255, 0.5),
    0 0 10px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 0, 0, 0.3);
}

.gallery-post h3 {
  font-size: 2rem;
  color: #e0e0e0;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  text-shadow:
    0 0 4px rgba(255, 255, 255, 0.4),
    0 0 8px rgba(255, 0, 0, 0.2);
}

/* -----------------------------------
   POST META (DETAIL TYPE / DATE)
------------------------------------ */

.post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  font-weight: 500;
  font-family: 'Rajdhani', sans-serif;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.1);
}

.detail-type,
.date {
  margin: 0;
  color: #f5f5f5;
  font-size: 1.6rem;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.2);
}

.detail-type span {
  color: #ff2d2d;
  font-weight: 700;
  text-shadow:
    0 0 3px rgba(255, 45, 45, 0.4),
    0 0 6px rgba(255, 45, 45, 0.2);
}

/* -----------------------------------
   BEFORE & AFTER SECTION
------------------------------------ */

.before-after {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.before,
.after {
  flex: 1;
  padding: 0 2rem;
}

.before h3,
.after h3 {
  font-size: 2.3rem;
  font-weight: 500;
  text-align: center;
  margin-bottom: 1.5rem;
}

/* -----------------------------------
   IMAGE GALLERIES
------------------------------------ */

.image-gallery {
  column-count: 2;
  column-gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
}

.image-gallery img {
  width: 100%;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  display: block;
  break-inside: avoid;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: zoom-in;
}

/* Separate image hover */
.before-image,
.after-image {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.before-image:hover,
.after-image:hover {
  transform: scale(1.05);
}



/* -----------------------------------
   STICKY EDGE LABELS (BEFORE/AFTER)
------------------------------------ */

.edge-label {
  position: fixed;
  top: 120px;
  z-index: 9999;
  font-size: 1.3rem;
  font-weight: bold;
  font-family: 'Rajdhani', sans-serif;
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-transform: uppercase;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.edge-label.visible {
  opacity: 1;
}

.before-stick {
  left: 9rem;
}

.after-stick {
  right: 9rem;
}

/* -----------------------------------
   LIGHTBOX OVERLAY
------------------------------------ */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  cursor: zoom-out;
}

.lightbox-overlay.is-open {
  display: flex;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10001;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.lightbox-stage {
  max-width: 90%;
  max-height: 90%;
  width: min(90vw, 1200px);
  height: min(90vh, 900px);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

/* -----------------------------------
   MOBILE RESPONSIVE FIXES
------------------------------------ */

@media (max-width: 768px) {
  .before-after {
    flex-direction: column;
    gap: 3rem;
    padding: 0 1rem;
  }

  .before,
  .after {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0;
  }

  .before h3,
  .after h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    width: 100%;
    position: static; /* cancel sticky */
  }

  .image-gallery {
    column-count: 1;
    column-gap: 0;
    width: 100%;
  }

  .gallery-post {
    padding: 1rem;
  }

  .edge-label {
    display: none !important;
  }

  .lightbox-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 52px;
    height: 52px;
    font-size: 2.2rem;
  }
}
