/* ==========================================================================
   NICHE TECHIES - PREMIUM EDITORIAL BENTO GALLERY (COMPACT & REFINED)
   Compiled to css/gallery.css
   ========================================================================== */

.gallery-page-main {
  padding-top: 5.5rem;
  padding-bottom: 5rem;
  background-color: #fafafc;
  min-height: 100vh;
}

.gallery-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .gallery-container {
    padding: 0 2rem;
  }
}

/* 1. Header Block (Refined Luxury Editorial Style) */
.gallery-header-block {
  text-align: center;
  max-width: 720px;
  margin: 1.25rem auto 2.75rem;
  padding: 0 1rem;
}

.gallery-header-block .gallery-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.gallery-header-block .gallery-main-title {
  font-family: var(--font-heading, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #070e1b;
  margin-bottom: 0.85rem;
}

.gallery-header-block .gallery-main-subtitle {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: clamp(0.9rem, 1.1vw, 0.985rem);
  line-height: 1.65;
  color: #64748b;
  max-width: 560px;
  margin: 0 auto;
}

/* 2. Compact 5-Column Editorial Bento Grid */
.gallery-bento-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 175px;
  grid-auto-flow: dense;
  gap: 14px;
}

@media (max-width: 1180px) {
  .gallery-bento-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 170px;
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .gallery-bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 160px;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .gallery-bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 145px;
    gap: 10px;
  }
}

/* 3. Pure Bento Card (Compact, Ultra-Premium Finish) */
.bento-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.07);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(7, 14, 27, 0.04);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
}

/* Spotlight 2x2: Curated Focal Card */
.bento-card.bento-spotlight {
  grid-column: span 2;
  grid-row: span 2;
}

/* Wide 2x1: Refined Cinematic Landscape */
.bento-card.bento-wide {
  grid-column: span 2;
  grid-row: span 1;
}

/* Tall 1x2: Sleek Vertical Frame */
.bento-card.bento-tall {
  grid-column: span 1;
  grid-row: span 2;
}

@media (max-width: 600px) {
  .bento-card.bento-tall {
    grid-row: span 1;
  }
}

/* Standard 1x1: Compact Proportional Cell */
.bento-card.bento-standard {
  grid-column: span 1;
  grid-row: span 1;
}

.bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 23, 42, 0.15);
  box-shadow: 0 12px 28px -6px rgba(7, 14, 27, 0.14), 0 4px 10px -3px rgba(7, 14, 27, 0.05);
}

.bento-card .bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-img {
  transform: scale(1.05);
}

/* Subtle Glass Sheen on Hover */
.bento-card .bento-hover-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.15), rgba(7, 14, 27, 0.18));
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.bento-card:hover .bento-hover-glow {
  opacity: 1;
}

/* Sleek Frosted Zoom Pill */
.bento-card .bento-zoom-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #070e1b;
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover .bento-zoom-btn {
  opacity: 1;
  transform: scale(1);
}

/* 4. Interactive Lightbox Modal */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 14, 27, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.gallery-lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  outline: none;
}

.gallery-lightbox-figure {
  position: relative;
  max-width: 100%;
  max-height: calc(88vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-image {
  max-width: 90vw;
  max-height: calc(85vh - 70px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
}

.gallery-lightbox-bar {
  width: 100%;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.gallery-lightbox-bar .lightbox-nav-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gallery-lightbox-bar .lightbox-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-lightbox-bar .lightbox-nav-btn:hover {
  background: #ffffff;
  color: #070e1b;
  border-color: #ffffff;
}

.gallery-lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-lightbox-close:hover {
  background: #ffffff;
  color: #070e1b;
  transform: rotate(90deg);
}
