/* ============================================================
   ISOLATED GALLERY STYLESHEET — RANJU DHAMA PHOTOGRAPHY
   All classes namespaced under .gallery-* for zero side effects
   Palette: Void Black (#050505), Crimson (#8B0000), Gold (#D4AF37)
   ============================================================ */

/* RESET & BASE FOR GALLERY PAGES */
.gallery-body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #222222;
  font-family: 'Outfit', 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* NAVIGATION HEADER FOR GALLERY */
.gallery-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 85px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  z-index: 1000;
}
.gallery-nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #111111;
}
.gallery-nav-logo img {
  height: 42px;
  width: auto;
  filter: brightness(0);
}
.gallery-nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 400;
  color: #111111;
  letter-spacing: 0.05em;
}
.gallery-nav-brand span {
  font-style: italic;
  color: #666666;
  font-size: 1.25rem;
  margin-left: 4px;
}
.gallery-nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.gallery-nav-links a {
  color: #444444;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.3s ease;
}
.gallery-nav-links a:hover,
.gallery-nav-links a.active {
  color: #111111;
}

/* CUSTOM FOLLOWER CURSOR BADGE */
.gallery-cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(139, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 35px rgba(139, 0, 0, 0.7), inset 0 0 15px rgba(212, 175, 55, 0.2);
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
}
.gallery-cursor-follower.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* MAIN GALLERY CONTAINER & AMBIENT BACKDROP */
.gallery-container {
  min-height: 100vh;
  padding-top: 140px;
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}
.gallery-container::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 0, 0, 0.28) 0%, rgba(5, 5, 5, 0) 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}
.gallery-container::after {
  content: '';
  position: absolute;
  bottom: 5%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(5, 5, 5, 0) 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
}

/* ALBUM HUB HERO HEADLINE */
.gallery-hub-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.gallery-hub-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #D4AF37;
  margin-bottom: 14px;
  font-weight: 500;
}
.gallery-hub-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 300;
  color: #F8F6F0;
  line-height: 1.05;
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}
.gallery-hub-title em {
  font-style: italic;
  color: #D4AF37;
}

/* 3D TILT ALBUM CARDS GRID */
.gallery-cards-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 48px;
  position: relative;
  z-index: 1;
  perspective: 1200px;
}

.gallery-card {
  position: relative;
  background: #0D0B0B;
  border: 1px solid rgba(139, 0, 0, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 0, 0, 0.2);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.4s ease, box-shadow 0.4s ease;
  text-decoration: none;
  display: block;
}
.gallery-card:hover {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(139, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
}

.gallery-card-cover {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
}
.gallery-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease;
  filter: brightness(0.88) contrast(1.05);
}
.gallery-card:hover .gallery-card-cover img {
  transform: scale(1.08);
  filter: brightness(1) contrast(1.1);
}

.gallery-card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #D4AF37;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
  z-index: 2;
}

.gallery-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 36px 30px 28px;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.6) 60%, rgba(5, 5, 5, 0) 100%);
  z-index: 2;
  transform: translateZ(30px);
}
.gallery-card-tag {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #D4AF37;
  font-weight: 600;
  margin-bottom: 8px;
}
.gallery-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 300;
  color: #FFFFFF;
  line-height: 1.1;
  margin: 0 0 10px 0;
}
.gallery-card-title em {
  font-style: italic;
  color: #D4AF37;
}
.gallery-card-desc {
  font-size: 0.84rem;
  color: rgba(245, 243, 239, 0.7);
  font-weight: 300;
  margin: 0;
}

/* INDIVIDUAL ALBUM EDITORIAL CONTAINER */
.gallery-album-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}
.gallery-album-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(139, 0, 0, 0.3);
}
.gallery-album-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #111111;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}
.gallery-album-back-btn:hover {
  background: #111111;
  color: #FFFFFF;
  border-color: #111111;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  transform: translateX(-4px);
}
.gallery-editorial-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.2rem;
  font-weight: 300;
  color: #111111;
  margin: 0;
}
.gallery-editorial-title em {
  font-style: italic;
  color: #666666;
}
.gallery-editorial-sub {
  font-size: 0.82rem;
  color: #666666;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 4px 0 0 0;
}

/* ASYMMETRICAL EDITORIAL GRID LAYOUT */
.gallery-asymmetrical-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 32px;
  align-items: center;
}

.gallery-photo-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0B0909;
  border: 1px solid rgba(139, 0, 0, 0.25);
  box-shadow: 0 15px 35px rgba(0,0,0,0.7);
  cursor: pointer;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* GPU Accelerated Anti-Gravity Floating */
  will-change: transform;
  animation: galleryAntiGravity 6s ease-in-out infinite alternate;
}

.gallery-photo-item:nth-child(2n) { animation-duration: 7s; animation-delay: -1.5s; }
.gallery-photo-item:nth-child(3n) { animation-duration: 8s; animation-delay: -3s; }
.gallery-photo-item:nth-child(4n) { animation-duration: 6.5s; animation-delay: -4.5s; }
.gallery-photo-item:nth-child(5n) { animation-duration: 7.5s; animation-delay: -2s; }

@keyframes galleryAntiGravity {
  0% { transform: translate3d(0, 0px, 0) rotate(0deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(0.4deg); }
  100% { transform: translate3d(0, 8px, 0) rotate(-0.4deg); }
}

.gallery-photo-item:hover {
  animation-play-state: paused;
  transform: translate3d(0, -8px, 0) scale(1.02) !important;
  border-color: #D4AF37;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(139, 0, 0, 0.6);
  z-index: 10;
}

.gallery-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease;
  filter: brightness(0.92) contrast(1.04);
}
.gallery-photo-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.02) contrast(1.08);
}

.gallery-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(to top, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-photo-item:hover .gallery-caption-overlay {
  opacity: 1;
}
.gallery-caption-overlay span {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: #D4AF37;
  text-transform: uppercase;
}

/* ASYMMETRICAL GRID SPANS */
.gallery-span-hero { grid-column: span 8; height: 540px; }
.gallery-span-tall { grid-column: span 4; height: 540px; }
.gallery-span-wide { grid-column: span 7; height: 400px; }
.gallery-span-detail { grid-column: span 5; height: 400px; }
.gallery-span-full { grid-column: span 12; height: 580px; }

@media (max-width: 900px) {
  .gallery-nav { padding: 0 24px; }
  .gallery-nav-links { display: none; }
  .gallery-asymmetrical-grid { grid-template-columns: 1fr; gap: 24px; }
  .gallery-span-hero, .gallery-span-tall, .gallery-span-wide, .gallery-span-detail, .gallery-span-full {
    grid-column: span 1;
    height: 380px;
  }
  .gallery-album-header-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* FULLSCREEN LIGHTBOX MODAL WITH THUMBNAIL STRIP */
.gallery-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 5, 0.96);
  backdrop-filter: blur(20px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.gallery-lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  position: relative;
  z-index: 2;
}
.gallery-lightbox-counter {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  color: #D4AF37;
  font-weight: 500;
}
.gallery-lightbox-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: #F8F6F0;
  font-weight: 300;
}
.gallery-lightbox-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(139, 0, 0, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.gallery-lightbox-close:hover {
  background: #8B0000;
  border-color: #D4AF37;
  transform: scale(1.1) rotate(90deg);
}

.gallery-lightbox-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 80px;
}
.gallery-lightbox-stage img {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 30px rgba(139,0,0,0.3);
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 13, 13, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
}
.gallery-lightbox-nav.prev { left: 30px; }
.gallery-lightbox-nav.next { right: 30px; }
.gallery-lightbox-nav:hover {
  background: #8B0000;
  border-color: #D4AF37;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.6);
}

.gallery-lightbox-thumbs {
  padding: 16px 40px 24px;
  background: rgba(5, 5, 5, 0.95);
  border-top: 1px solid rgba(139, 0, 0, 0.25);
  overflow-x: auto;
  white-space: nowrap;
  text-align: center;
  scrollbar-width: thin;
  scrollbar-color: #8B0000 #050505;
}
.gallery-lightbox-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-lightbox-thumbs::-webkit-scrollbar-thumb { background: #8B0000; border-radius: 2px; }

.gallery-thumb-item {
  display: inline-block;
  width: 64px;
  height: 44px;
  margin: 0 6px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.3s ease;
}
.gallery-thumb-item.active {
  border-color: #D4AF37;
  opacity: 1;
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}
.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
