/* ═══════════════════════════════════════════════════════════════
   GALLERY PAGE — 3D PHOTO CARD GRID  ·  Power Saver Electric Corp
   Uniform cards · Symmetrical layout · Luxury dark editorial style
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.glry-hero {
  position: relative;
  background: #05070b;
  margin-top: 110px;
  padding: 38px 0 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  min-height: auto;
}
.glry-hero-overlay {
  display: none !important;
}
.glry-hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.glry-hero-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}
.glry-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  justify-content: center;
}
.glry-hero-eyebrow span {
  display: block;
  width: 30px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}
.glry-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 700;
  font-style: normal;
  line-height: 1.12;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 0 rgba(255,255,255,0.05), 0 6px 40px rgba(0,0,0,0.7);
}
.glry-hero h1 em {
  font-style: italic;
  color: var(--gold);
  display: inline;
}
.glry-hero-divider {
  width: 56px; height: 1px;
  background: var(--grad-gold);
  opacity: 0.85;
  margin: 0 auto 1rem;
  box-shadow: 0 0 10px rgba(198,168,90,0.45);
}
.glry-hero-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 auto 1.4rem;
}
.glry-hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 2rem;
  padding: 1rem 2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(198,168,90,0.15);
  border-radius: 4px;
  backdrop-filter: blur(10px);
}
.glry-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.glry-hero-stat strong {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.glry-hero-stat span {
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.glry-hero-stat-div {
  width: 1px;
  height: 36px;
  background: rgba(198,168,90,0.25);
}
.glry-scroll-hint {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: rgba(255,255,255,0.3);
  font-size: 1rem;
  text-decoration: none;
  animation: glryBounce 2s ease-in-out infinite;
  transition: color 0.2s;
}
.glry-scroll-hint:hover { color: var(--gold); }
@keyframes glryBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ════════════════════════════════════
   FILTER TABS
════════════════════════════════════ */
.glry-filters {
  position: sticky;
  top: 100px;
  z-index: 50;
  background: rgba(6,8,13,0.97);
  border-bottom: 1px solid rgba(198,168,90,0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.glry-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.glry-filter-list::-webkit-scrollbar { display: none; }
.glry-filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 1px;
  text-transform: none;
  color: rgba(255,255,255,0.42);
  padding: 1.2rem 1.4rem;
  white-space: nowrap;
  position: relative;
  transition: color 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.glry-filter-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1.4rem;
  right: 1.4rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.glry-filter-btn:hover { color: rgba(255,255,255,0.75); }
.glry-filter-btn.active { color: var(--gold); }
.glry-filter-btn.active::after { transform: scaleX(1); }
.glry-filter-btn i { font-size: 0.7rem; opacity: 0.8; }

/* ════════════════════════════════════
   MAIN GALLERY SECTION
════════════════════════════════════ */
.glry-main {
  background: #06080d;
  padding: 2.4rem 0 3.2rem;
}

/* ════════════════════════════════════
   3D PHOTO CARD GRID
   — Uniform size, symmetrical columns
════════════════════════════════════ */
.glry-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  /* Reset masonry columns */
  columns: unset;
  column-gap: unset;
}

/* ── 3D Card Base ── */
.glry-tile {
  /* Remove old masonry props */
  break-inside: unset;
  margin-bottom: 0;

  /* Fixed aspect ratio — all cards the same */
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
  background: #0a0c12;
  display: block;

  /* 3D card effect */
  border-radius: 14px;
  border: 1px solid rgba(198,168,90,0.12);
  box-shadow:
    0 8px 32px rgba(0,0,0,0.55),
    0 2px 6px  rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.04);

  /* 3D perspective & transform base */
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg) translateZ(0);
  transition:
    transform   0.45s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow  0.45s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.3s ease;

  will-change: transform, box-shadow;
}

/* 3D lift & tilt on hover */
.glry-tile:hover {
  transform: perspective(900px) rotateX(-3deg) rotateY(2deg) translateY(-8px) translateZ(20px);
  box-shadow:
    0 28px 60px rgba(0,0,0,0.7),
    0 8px 20px  rgba(0,0,0,0.5),
    0 0 0 1px  rgba(198,168,90,0.28),
    inset 0 1px 0 rgba(255,255,255,0.07),
    /* Gold rim glow */
    0 0 24px rgba(198,168,90,0.12);
  border-color: rgba(198,168,90,0.38);
}

/* 3D top highlight edge */
.glry-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 40%, rgba(198,168,90,0.18) 60%, transparent 100%);
  z-index: 4;
  pointer-events: none;
  border-radius: 14px 14px 0 0;
}

/* 3D left-edge specular shine */
.glry-tile::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  z-index: 4;
  pointer-events: none;
  border-radius: 14px 0 0 14px;
}

/* Image fills the card uniformly */
.glry-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.55s cubic-bezier(0.25,0.46,0.45,0.94);
  /* 4K crisp rendering — full source resolution at every DPI */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  image-rendering: high-quality;
  /* GPU compositor layer — eliminates sub-pixel blur */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  border-radius: 13px;
}
.glry-tile:hover img { transform: translateZ(0) scale(1.07); }

/* ── Card Overlay (slides up from bottom) ── */
.glry-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6,8,13,0.94) 0%,
    rgba(6,8,13,0.60) 40%,
    rgba(6,8,13,0.10) 75%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.38s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.4rem;
  gap: 0.4rem;
  border-radius: 13px;
  z-index: 3;
}
.glry-tile:hover .glry-tile-overlay { opacity: 1; }

/* Category badge */
.glry-tile-cat {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  /* Solid gold + stronger shadow for bright image legibility */
  color: #C6A85A;
  display: flex;
  align-items: center;
  gap: 5px;
  text-shadow: 0 1px 5px rgba(0,0,0,0.95), 0 2px 12px rgba(0,0,0,0.8);
}
.glry-tile-cat i { font-size: 0.58rem; }

/* Caption */
.glry-tile-caption {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  font-style: italic;
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.95), 0 3px 16px rgba(0,0,0,0.8);
}

/* Zoom icon */
.glry-tile-zoom {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(10,14,24,0.65);
  border: 1px solid rgba(198,168,90,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 0.72rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.75);
  z-index: 5;
  backdrop-filter: blur(6px);
}
.glry-tile:hover .glry-tile-zoom {
  opacity: 1;
  transform: scale(1);
}

/* ── Card Number Badge (bottom-right corner) ── */
.glry-tile-num {
  position: absolute;
  bottom: 0.75rem;
  right: 0.9rem;
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 700;
  font-style: italic;
  /* Raised from 0.08 → 0.18 — subtle but legible at all viewport sizes */
  color: rgba(198,168,90,0.18);
  line-height: 1;
  letter-spacing: -2px;
  pointer-events: none;
  z-index: 2;
  user-select: none;
  transition: color 0.35s ease;
}
.glry-tile:hover .glry-tile-num {
  color: rgba(198,168,90,0.28);
}

/* ── No Results ── */
.glry-no-results {
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 1rem;
  padding: 4rem 0;
  letter-spacing: 0.05em;
  grid-column: 1 / -1;
}
.glry-no-results a { color: var(--gold); text-decoration: none; }

/* ════════════════════════════════════
   CTA SECTION
════════════════════════════════════ */
.glry-cta {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #0d1f3a 60%, var(--navy-mid) 100%);
  border-top: 1px solid rgba(198,168,90,0.12);
  border-bottom: 1px solid rgba(198,168,90,0.08);
  padding: 2.8rem 0;
  overflow: hidden;
  text-align: center;
}
.glry-cta-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(0,200,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.glry-cta-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}
.glry-cta-eyebrow {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.glry-cta h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.glry-cta h2 em { font-style: italic; color: var(--gold); }
.glry-cta p {
  font-size: 1rem;
  color: var(--mid-gray);
  line-height: 1.8;
  margin-bottom: 2.2rem;
}
.glry-cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ════════════════════════════════════
   LIGHTBOX
════════════════════════════════════ */
.glry-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.glry-lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.glry-lb-inner {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.glry-lb-inner img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.8),
    0 0 0 1px rgba(198,168,90,0.15);
  transition: opacity 0.2s ease;
}
.glry-lb-caption {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(255,255,255,0.6);
  text-align: center;
  letter-spacing: 0.03em;
  margin: 0;
}
.glry-lb-counter {
  position: absolute;
  bottom: -2.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 2px;
  white-space: nowrap;
}
.glry-lb-close,
.glry-lb-prev,
.glry-lb-next {
  position: fixed;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  border-radius: 50%;
  width: 48px;
  height: 48px;
}
.glry-lb-close { top: 1.5rem; right: 1.5rem; }
.glry-lb-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.glry-lb-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }
.glry-lb-close:hover,
.glry-lb-prev:hover,
.glry-lb-next:hover {
  background: rgba(198,168,90,0.2);
  border-color: rgba(198,168,90,0.4);
  color: var(--gold);
}

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */

/* Tablet landscape */
@media (max-width: 1100px) {
  .glry-masonry {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* Tablet portrait */
@media (max-width: 800px) {
  .glry-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .glry-hero { margin-top: 76px; }
  .glry-filters { top: 88px; }
  .glry-hero h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); }
  .glry-hero-stats { gap: 1.2rem; padding: 1rem 1.5rem; }
  .glry-hero-stat strong { font-size: 1.4rem; }
  .glry-lb-prev { left: 0.5rem; }
  .glry-lb-next { right: 0.5rem; }
  .glry-cta { padding: 3rem 0; }
}

/* Mobile */
@media (max-width: 520px) {
  .glry-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .glry-hero { margin-top: 76px; }
  .glry-filters { top: 76px; }
  .glry-hero-stats { flex-direction: row; gap: 1rem; padding: 0.9rem 1.2rem; }
  .glry-tile-overlay { padding: 1rem 0.85rem; }
  .glry-tile-caption { font-size: 0.84rem; }
  .glry-filter-btn { padding: 1rem 0.9rem; font-size: 0.75rem; }
  .glry-lb-inner img { max-height: 70vh; }
}

/* Very small */
@media (max-width: 380px) {
  .glry-masonry {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .glry-hero { margin-top: 62px; }
  .glry-filters { top: 62px; }
}


/* ══════════════════════════════════════════════════════════════
   GALLERY — FINAL LUXURY REFINEMENT v1
   Cinematic hero · premium tiles · polished hover · sharp images
   STRICT: No images moved, resized, reordered, or replaced.
   ══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   HERO — cinematic black depth + atmosphere
───────────────────────────────────────── */
.glry-hero {
  /* Near-absolute black base with deep cool-navy uplift at horizon */
  background:
    radial-gradient(
      ellipse 115% 65% at 50% 115%,
      rgba(4,14,36,0.82) 0%,
      rgba(2,4,8,1) 52%
    ),
    #020406;
  padding: 42px 0 32px;
}

/* Subtle cinematic vignette overlay — re-enable for gallery hero */
.glry-hero-overlay {
  display: block !important;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 42%, rgba(1,3,6,0.6) 100%),
    radial-gradient(ellipse 70% 40% at 50% 108%, rgba(6,28,72,0.28) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Hero headline — weight + cinematic shadow */
.glry-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.05;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.04),
    0 3px 12px rgba(0,0,0,0.85),
    0 14px 60px rgba(0,0,0,0.75);
  margin-bottom: 0.9rem;
}
.glry-hero h1 em {
  font-style: italic;
  color: var(--gold);
  text-shadow:
    0 0 24px rgba(198,168,90,0.18),
    0 3px 14px rgba(0,0,0,0.65);
}

/* Eyebrow — crisper gold readability */
.glry-hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 4.5px;
  color: rgba(198,168,90,0.92);
  margin-bottom: 0.85rem;
}
.glry-hero-eyebrow span {
  width: 28px;
  opacity: 0.55;
}

/* Divider — refined glow */
.glry-hero-divider {
  opacity: 0.82;
  box-shadow: 0 0 12px rgba(198,168,90,0.38);
  margin-bottom: 0.9rem;
}

/* Sub text — lighter, more readable */
.glry-hero-sub {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.48);
  line-height: 1.72;
  margin-bottom: 1.6rem;
}

/* Stats capsule — slightly deeper, more premium */
.glry-hero-stats {
  background: rgba(255,255,255,0.035);
  border-color: rgba(198,168,90,0.18);
  padding: 0.95rem 2rem;
  gap: 1.8rem;
}
.glry-hero-stat strong {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.glry-hero-stat span {
  font-size: 0.6rem;
  letter-spacing: 2.2px;
  color: rgba(255,255,255,0.38);
}
.glry-hero-stat-div {
  background: rgba(198,168,90,0.2);
  height: 32px;
}

/* Scroll hint — softer */
.glry-scroll-hint {
  color: rgba(255,255,255,0.25);
  bottom: 1.6rem;
}


/* ─────────────────────────────────────────
   FILTER TABS — premium bar
───────────────────────────────────────── */
.glry-filters {
  background: rgba(4,6,10,0.98);
  border-bottom: 1px solid rgba(198,168,90,0.08);
}
.glry-filter-btn {
  font-size: 0.8rem;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.38);
  padding: 1.15rem 1.3rem;
  transition: color 0.22s ease;
}
.glry-filter-btn::after {
  left: 1.3rem;
  right: 1.3rem;
  height: 2px;
  background: linear-gradient(to right, var(--gold), rgba(198,168,90,0.5));
}
.glry-filter-btn:hover {
  color: rgba(255,255,255,0.72);
}
.glry-filter-btn.active {
  color: rgba(198,168,90,0.95);
}
.glry-filter-btn i {
  font-size: 0.68rem;
  opacity: 0.7;
}


/* ─────────────────────────────────────────
   MAIN GALLERY SECTION
───────────────────────────────────────── */
.glry-main {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(4,10,24,0.5) 0%, transparent 60%),
    #04060a;
  padding: 2.2rem 0 3.4rem;
}

/* Grid gap slightly refined */
.glry-masonry {
  gap: 20px;
}


/* ─────────────────────────────────────────
   GALLERY TILES — card depth + image polish
───────────────────────────────────────── */

/* Card base — deeper, more premium */
.glry-tile {
  border-radius: 12px;
  border-color: rgba(198,168,90,0.1);
  box-shadow:
    0 6px 28px rgba(0,0,0,0.6),
    0 2px 6px rgba(0,0,0,0.42),
    inset 0 1px 0 rgba(255,255,255,0.035);
  /* Smooth lift only — no 3D tilt, cleaner luxury feel */
  transition:
    transform   0.4s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow  0.4s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.28s ease;
}

/* Hover — refined: clean lift, no aggressive tilt */
.glry-tile:hover {
  transform: translateY(-6px) translateZ(0);
  box-shadow:
    0 24px 52px rgba(0,0,0,0.68),
    0 6px 18px rgba(0,0,0,0.48),
    0 0 0 1px rgba(198,168,90,0.24),
    inset 0 1px 0 rgba(255,255,255,0.055);
  border-color: rgba(198,168,90,0.32);
}

/* Top edge highlight — refined */
.glry-tile::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.1) 35%,
    rgba(198,168,90,0.14) 55%,
    transparent 100%
  );
  border-radius: 12px 12px 0 0;
}
.glry-tile::after {
  border-radius: 12px 0 0 12px;
}

/* ── IMAGE POLISH — clarity, contrast, cinematic grade ── */
/* All images get a consistent cinematic base grade:
   deeper blacks · refined contrast · cool-tint preservation
   No over-saturation · No fake HDR · No glow */
.glry-tile img {
  border-radius: 11px;
  /* Cinematic base: deeper darks, crisp highlights, cool-tint preservation */
  filter:
    contrast(1.1)
    saturate(1.06)
    brightness(0.97);
  transition:
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter    0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  will-change: transform, filter;
}

/* Hover — subtle brightening + zoom */
.glry-tile:hover img {
  transform: translateZ(0) scale(1.05);
  filter:
    contrast(1.14)
    saturate(1.1)
    brightness(1.02);
}

/* Night/blue lighting photos — preserve rich blues without oversaturation */
.glry-tile[data-cat="marina"] img {
  filter:
    contrast(1.12)
    saturate(1.08)
    brightness(0.96)
    hue-rotate(-1deg);
}
.glry-tile[data-cat="marina"]:hover img {
  filter:
    contrast(1.16)
    saturate(1.12)
    brightness(1.02)
    hue-rotate(0deg);
  transform: translateZ(0) scale(1.05);
}

/* Daytime/technical photos — service, commercial, generators, elevators */
.glry-tile[data-cat="service"] img,
.glry-tile[data-cat="commercial"] img,
.glry-tile[data-cat="generators"] img,
.glry-tile[data-cat="elevators"] img {
  filter:
    contrast(1.1)
    saturate(1.05)
    brightness(0.97);
}
.glry-tile[data-cat="service"]:hover img,
.glry-tile[data-cat="commercial"]:hover img,
.glry-tile[data-cat="generators"]:hover img,
.glry-tile[data-cat="elevators"]:hover img {
  filter:
    contrast(1.14)
    saturate(1.08)
    brightness(1.02);
  transform: translateZ(0) scale(1.04);
}


/* ─────────────────────────────────────────
   CARD OVERLAY — premium typography
───────────────────────────────────────── */
.glry-tile-overlay {
  background: linear-gradient(
    to top,
    rgba(2,4,10,0.98) 0%,
    rgba(2,4,10,0.72) 38%,
    rgba(2,4,10,0.15) 72%,
    transparent 100%
  );
  padding: 1.4rem 1.3rem;
  gap: 0.32rem;
  transition: opacity 0.32s ease;
  border-radius: 11px;
}

/* Category badge — sharper */
.glry-tile-cat {
  font-size: 0.72rem;
  letter-spacing: 1.8px;
  color: #D4B870;
  text-shadow: 0 1px 5px rgba(0,0,0,1), 0 2px 10px rgba(0,0,0,0.9);
  gap: 4px;
}
.glry-tile-cat i { font-size: 0.55rem; }

/* Caption — more weight, cleaner */
.glry-tile-caption {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,1);
  line-height: 1.28;
  letter-spacing: -0.012em;
  text-shadow: 0 2px 10px rgba(0,0,0,1), 0 1px 4px rgba(0,0,0,0.9);
}

/* Zoom icon — subtler, premium */
.glry-tile-zoom {
  width: 34px;
  height: 34px;
  background: rgba(6,10,18,0.6);
  border-color: rgba(198,168,90,0.28);
  font-size: 0.68rem;
  backdrop-filter: blur(8px);
  transition: opacity 0.28s ease, transform 0.28s ease, background 0.22s ease, border-color 0.22s ease;
}
.glry-tile:hover .glry-tile-zoom {
  opacity: 1;
  transform: scale(1);
  background: rgba(198,168,90,0.12);
  border-color: rgba(198,168,90,0.45);
}

/* Ghost number — refined */
.glry-tile-num {
  font-size: 2.2rem;
  color: rgba(198,168,90,0.18);
  bottom: 0.65rem;
  right: 0.8rem;
  letter-spacing: -2px;
}
.glry-tile:hover .glry-tile-num {
  color: rgba(198,168,90,0.28);
}


/* ─────────────────────────────────────────
   LIGHTBOX — premium polish
───────────────────────────────────────── */
.glry-lightbox {
  background: rgba(1,2,4,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.glry-lb-inner img {
  border-radius: 8px;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.85),
    0 0 0 1px rgba(198,168,90,0.12);
  /* Slight sharpening in lightbox for full-resolution feel */
  filter: contrast(1.06) saturate(1.05) brightness(1.0);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}
.glry-lb-caption {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.52);
  letter-spacing: 0.04em;
}
.glry-lb-counter {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 2.5px;
}
.glry-lb-close,
.glry-lb-prev,
.glry-lb-next {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  width: 46px;
  height: 46px;
  font-size: 0.9rem;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}
.glry-lb-close:hover,
.glry-lb-prev:hover,
.glry-lb-next:hover {
  background: rgba(198,168,90,0.14);
  border-color: rgba(198,168,90,0.38);
  color: var(--gold);
}


/* ─────────────────────────────────────────
   CTA SECTION — premium authority
───────────────────────────────────────── */
.glry-cta {
  background: linear-gradient(
    155deg,
    #060c1a 0%,
    #0a1628 48%,
    #060c1a 100%
  );
  border-top-color: rgba(198,168,90,0.1);
  padding: 3.6rem 0;
}
.glry-cta-overlay {
  background: radial-gradient(
    ellipse 55% 65% at 50% 50%,
    rgba(0,150,255,0.032) 0%,
    transparent 68%
  );
}
.glry-cta-eyebrow {
  font-size: 0.66rem;
  letter-spacing: 3px;
  color: rgba(198,168,90,0.82);
  margin-bottom: 1rem;
}
.glry-cta h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.07;
  color: #fff;
  text-shadow:
    0 2px 8px rgba(0,0,0,0.6),
    0 16px 55px rgba(0,0,0,0.45);
  margin-bottom: 0.9rem;
}
.glry-cta h2 em {
  font-style: italic;
  color: var(--gold);
  text-shadow:
    0 0 26px rgba(198,168,90,0.18),
    0 2px 12px rgba(0,0,0,0.6);
}
.glry-cta p {
  font-size: 0.96rem;
  color: rgba(255,255,255,0.48);
  line-height: 1.82;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.glry-cta-btns {
  gap: 0.85rem;
}
.glry-cta-btns .btn {
  padding: 0.82rem 2rem;
  font-size: 0.79rem;
  letter-spacing: 1.6px;
  min-width: 178px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}


/* ─────────────────────────────────────────
   NO RESULTS STATE
───────────────────────────────────────── */
.glry-no-results {
  color: rgba(255,255,255,0.28);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}
.glry-no-results a { color: rgba(198,168,90,0.7); }
.glry-no-results a:hover { color: var(--gold); }


/* ─────────────────────────────────────────
   RESPONSIVE QA — Luxury Final Pass
───────────────────────────────────────── */

/* Large tablet / small desktop */
@media (max-width: 1100px) {
  .glry-masonry { gap: 18px; }
  .glry-hero { padding: 36px 0 28px; }
  .glry-cta { padding: 3.2rem 0; }
}

/* Tablet portrait */
@media (max-width: 800px) {
  .glry-masonry { gap: 15px; }
  .glry-hero { padding: 32px 0 24px; }
  .glry-hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.7rem);
    letter-spacing: -0.02em;
  }
  .glry-hero-stats {
    gap: 1.2rem;
    padding: 0.9rem 1.5rem;
  }
  .glry-hero-stat strong { font-size: 1.5rem; }
  .glry-cta { padding: 2.8rem 0; }
  .glry-cta h2 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
  .glry-cta-btns {
    flex-direction: column;
    align-items: center;
    gap: 0.72rem;
  }
  .glry-cta-btns .btn {
    width: 100%;
    max-width: 300px;
    min-width: 0;
  }
  /* Ensure overlays don't bleed on tablet */
  .glry-tile-overlay { padding: 1.2rem 1.1rem; }
  .glry-tile-caption { font-size: 0.86rem; }
}

/* Mobile */
@media (max-width: 520px) {
  .glry-masonry { gap: 12px; }
  .glry-hero { padding: 28px 0 20px; }
  .glry-hero h1 {
    font-size: clamp(1.65rem, 7.5vw, 2.2rem);
    letter-spacing: -0.015em;
  }
  .glry-hero-sub { font-size: 0.85rem; }
  .glry-hero-stats {
    flex-direction: row;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem;
  }
  .glry-hero-stat strong { font-size: 1.35rem; }
  .glry-filter-btn {
    padding: 0.95rem 0.85rem;
    font-size: 0.73rem;
    letter-spacing: 0.5px;
  }
  .glry-tile-overlay { padding: 0.9rem 0.8rem; gap: 0.25rem; }
  .glry-tile-caption { font-size: 0.82rem; }
  .glry-tile-cat { font-size: 0.68rem; letter-spacing: 1.5px; }
  .glry-tile-zoom { width: 30px; height: 30px; font-size: 0.62rem; }
  .glry-cta { padding: 2.4rem 0; }
  .glry-cta h2 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .glry-cta p { font-size: 0.9rem; }
  .glry-lb-inner img { max-height: 68vh; }
  /* Prevent image overflow on small screens */
  .glry-tile { overflow: hidden; }
  .glry-tile img {
    /* Ensure no bleed on small cards */
    object-fit: cover;
    object-position: center center;
  }
}


/* ══════════════════════════════════════════════════════════════
   GALLERY — FINAL POLISH v2
   Sequential numbering 01–56 · caption accuracy · spacing · QA
   ══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   GHOST NUMBER — scale for 2-digit up to 56
   Keeps the watermark subtle at all sizes
───────────────────────────────────────── */
.glry-tile-num {
  font-size: 2rem;          /* slightly tighter — still atmospheric */
  letter-spacing: -1.5px;
  color: rgba(198,168,90,0.18);
  bottom: 0.6rem;
  right: 0.75rem;
}
.glry-tile:hover .glry-tile-num {
  color: rgba(198,168,90,0.28);
}

/* ─────────────────────────────────────────
   GRID — consistent even gaps
───────────────────────────────────────── */
.glry-masonry {
  /* Force perfectly equal row & column gaps */
  gap: 18px;
  /* Eliminate any residual grid-row vs grid-column mismatch */
  row-gap: 18px;
  column-gap: 18px;
}

/* ─────────────────────────────────────────
   MAIN SECTION — tighten top gap after sticky filter
───────────────────────────────────────── */
.glry-main {
  padding: 1.8rem 0 3rem;
}

/* ─────────────────────────────────────────
   CARD BORDER RADIUS — match inner image exactly
───────────────────────────────────────── */
.glry-tile {
  border-radius: 10px;
}
.glry-tile::before {
  border-radius: 10px 10px 0 0;
}
.glry-tile::after {
  border-radius: 10px 0 0 10px;
}
.glry-tile img {
  border-radius: 9px;
}
.glry-tile-overlay {
  border-radius: 9px;
}

/* ─────────────────────────────────────────
   IMAGE OBJECT-POSITION — keep subject centred
   Portrait images: centre-top so faces/subjects
   show; landscape images: centre.
───────────────────────────────────────── */
/* Portrait tiles (768×1024 source) — shift focus upward */
.glry-tile img[width="768"] {
  object-position: center 20%;
}
/* Landscape tiles — dead centre */
.glry-tile img[width="1024"] {
  object-position: center center;
}

/* ─────────────────────────────────────────
   HOVER — refined, luxury, no over-animation
───────────────────────────────────────── */
.glry-tile {
  transition:
    transform   0.38s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow  0.38s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.26s ease;
}
.glry-tile:hover {
  transform: translateY(-5px) scale(1.005);
}
.glry-tile img {
  transition:
    transform 0.48s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    filter    0.48s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.glry-tile:hover img {
  transform: translateZ(0) scale(1.045);   /* slightly gentler zoom */
}

/* ─────────────────────────────────────────
   FILTER BAR — align icon + label baseline
───────────────────────────────────────── */
.glry-filter-btn {
  align-items: center;
  line-height: 1;
}

/* ─────────────────────────────────────────
   CTA — tighten paragraph margin
───────────────────────────────────────── */
.glry-cta p {
  margin-bottom: 1.8rem;
}

/* ─────────────────────────────────────────
   RESPONSIVE QA — v2 pass
───────────────────────────────────────── */
@media (max-width: 1100px) {
  .glry-masonry { gap: 16px; row-gap: 16px; column-gap: 16px; }
}

@media (max-width: 800px) {
  .glry-masonry { gap: 14px; row-gap: 14px; column-gap: 14px; }
  .glry-tile-num { font-size: 1.7rem; }
  .glry-main { padding: 1.5rem 0 2.5rem; }
}

@media (max-width: 520px) {
  .glry-masonry { gap: 10px; row-gap: 10px; column-gap: 10px; }
  .glry-tile-num { font-size: 1.4rem; letter-spacing: -1px; }
  .glry-main { padding: 1.2rem 0 2rem; }
  /* Portrait images: show top on very small cards */
  .glry-tile img[width="768"] { object-position: center 15%; }
}

@media (max-width: 380px) {
  .glry-masonry { gap: 8px; row-gap: 8px; column-gap: 8px; }
  .glry-tile-num { font-size: 1.2rem; }
}

/* Very small phones */
@media (max-width: 380px) {
  .glry-hero { padding: 24px 0 18px; }
  .glry-masonry { gap: 10px; }
  .glry-hero-stats { gap: 0.7rem; padding: 0.75rem 0.9rem; }
  .glry-hero-stat strong { font-size: 1.2rem; }
  .glry-cta h2 { font-size: clamp(1.5rem, 9vw, 2rem); }
}
