/* ══════════════════════════════════════════════════════════
   J.A.K.H.I.C.C — gallery.css
   Extends style.css · Gallery Page Styles Only
   ══════════════════════════════════════════════════════════ */

/* ── Max-width container for gallery ── */
.gallery-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 5%;
}

/* ══════════════════════════════════
   HERO BANNER
══════════════════════════════════ */
.gallery-hero {
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 140px 5% 80px;
  background: var(--surface);
  text-align: center;
}

.gallery-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(51, 102, 255, .07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 60%, rgba(0, 198, 169, .06) 0%, transparent 55%);
}

/* Top border accent */
.gallery-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--teal), transparent);
}

.gallery-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.gallery-hero-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 900;
  color: var(--dark);
  line-height: 1.1;
  margin: 14px 0 18px;
}

.gallery-hero-title span {
  color: var(--blue);
}

.gallery-hero-body {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 36px;
}

/* Stats row */
.gallery-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--card);
  border: 1px solid rgba(51, 102, 255, .12);
  border-radius: 100px;
  padding: 12px 28px;
  box-shadow: var(--shadow-md);
}

.gstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.gstat-num {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
}

.gstat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 2px;
}

.gstat-divider {
  width: 1px;
  height: 36px;
  background: rgba(51, 102, 255, .12);
}

/* ══════════════════════════════════
   GALLERY SECTION
══════════════════════════════════ */
.gallery-section {
  padding: 70px 0 90px;
  background: var(--bg);
}

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1.5px solid rgba(51, 102, 255, .12);
  border-radius: 100px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .25s ease;
  box-shadow: var(--shadow-sm);
}

.filter-btn i {
  font-size: 12px;
}

.filter-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-md);
}

.filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 6px 20px rgba(51, 102, 255, .3);
}

/* ══════════════════════════════════
   MASONRY GRID
══════════════════════════════════ */
.masonry-grid {
  columns: 4;
  column-gap: 18px;
}

/* Individual item */
.masonry-item {
  break-inside: avoid;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(30px) scale(.97);
  transition: opacity .5s ease, transform .5s ease, filter .3s;
}

/* Staggered load-in */
.masonry-item.loaded {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Filter hide animation */
.masonry-item.hidden {
  opacity: 0;
  transform: scale(.9);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
  height: 0;
  margin: 0;
  overflow: hidden;
}

/* ── Card ── */
.masonry-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(51, 102, 255, .1);
  box-shadow: var(--shadow-sm);
  background: var(--light);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s;
}

.masonry-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

.masonry-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform .5s ease, filter .4s;
  filter: brightness(.96) saturate(.9);
}

/* Tall items stretch more */
.masonry-item.tall .masonry-card img {
  aspect-ratio: 3 / 4.5;
}

/* Wide items are shallower */
.masonry-item.wide .masonry-card img {
  aspect-ratio: 16 / 9;
}

/* Standard item */
.masonry-item:not(.tall):not(.wide) .masonry-card img {
  aspect-ratio: 4 / 3;
}

.masonry-card:hover img {
  transform: scale(1.07);
  filter: brightness(1) saturate(1.05);
}

/* ── Overlay ── */
.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(51, 102, 255, .65) 0%,
    rgba(0, 198, 169, .2) 50%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 16px;
  opacity: 0;
  transition: opacity .35s ease;
}

.masonry-card:hover .masonry-overlay {
  opacity: 1;
}

/* Zoom button */
.overlay-zoom {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background .2s, transform .2s;
  align-self: flex-start;
  margin-top: 12px;
  margin-left: auto;
}

.overlay-zoom:hover {
  background: rgba(255, 255, 255, .35);
  transform: scale(1.1);
}

/* Category tag */
.overlay-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 100px;
  padding: 5px 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Hidden utility (replaces inline style="display:none") ── */
.hidden-state {
  display: none !important;
}
.empty-state {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
  gap: 16px;
}

.empty-state i {
  font-size: 48px;
  color: rgba(51, 102, 255, .2);
}

.empty-state p {
  font-size: 16px;
}

/* ══════════════════════════════════
   LIGHTBOX
══════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s, visibility .3s;
}

.lightbox.open {
  visibility: visible;
  opacity: 1;
}

/* Dark backdrop */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 15, 30, .92);
  backdrop-filter: blur(12px);
}

/* Panel */
.lightbox-panel {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 900px;
  max-height: 90vh;
  background: var(--card);
  border: 1px solid rgba(51, 102, 255, .15);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .5);
  display: flex;
  flex-direction: column;
  transform: scale(.92);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.lightbox.open .lightbox-panel {
  transform: scale(1);
}

/* Top stripe */
.lightbox-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  z-index: 2;
}

/* Image wrapper */
.lb-img-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0f1a;
  min-height: 300px;
  max-height: calc(90vh - 70px);
  overflow: hidden;
}

.lb-img {
  max-width: 100%;
  max-height: calc(90vh - 70px);
  object-fit: contain;
  display: block;
  transition: opacity .3s ease;
}

/* Spinner */
.lb-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-size: 28px;
  background: rgba(10, 15, 26, .7);
}

/* Footer bar */
.lb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--surface);
  border-top: 1px solid rgba(51, 102, 255, .1);
  gap: 12px;
}

.lb-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 198, 169, .08);
  border: 1px solid rgba(0, 198, 169, .2);
  border-radius: 100px;
  padding: 5px 14px;
  color: var(--teal-dim);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.lb-counter {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* Close & nav buttons */
.lb-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.lb-close:hover {
  background: rgba(220, 50, 50, .4);
  transform: scale(1.08);
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.lb-nav:hover {
  background: rgba(51, 102, 255, .5);
  transform: translateY(-50%) scale(1.08);
}

.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* ══════════════════════════════════
   CTA STRIP
══════════════════════════════════ */
.gallery-cta-strip {
  background: var(--blue);
  padding: 56px 5%;
  position: relative;
  overflow: hidden;
}

.gallery-cta-strip::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}

.gallery-cta-strip::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(0, 198, 169, .1);
}

.cta-strip-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.cta-strip-inner h3 {
  font-family: var(--font-head);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 8px;
}

.cta-strip-inner p {
  color: rgba(255, 255, 255, .75);
  font-size: 15px;
  line-height: 1.6;
  max-width: 520px;
}

.cta-strip-inner .btn-primary-custom {
  background: #fff;
  color: var(--blue);
  flex-shrink: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
  white-space: nowrap;
}

.cta-strip-inner .btn-primary-custom:hover {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 198, 169, .35);
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 1200px) {
  .masonry-grid { columns: 3; }
}

@media (max-width: 900px) {
  .masonry-grid { columns: 2; }
  .gallery-hero-stats { flex-wrap: wrap; border-radius: 20px; padding: 14px 20px; }
  .gstat { padding: 8px 16px; }
}

@media (max-width: 600px) {
  .masonry-grid    { columns: 2; column-gap: 12px; }
  .masonry-item    { margin-bottom: 12px; }
  .filter-bar      { gap: 8px; }
  .filter-btn      { padding: 8px 16px; font-size: 12px; }
  .lb-nav          { width: 36px; height: 36px; font-size: 13px; }
  .cta-strip-inner { flex-direction: column; text-align: center; }
  .gallery-hero    { padding: 120px 5% 60px; }
}
