/* ═══════════════════════════════════════════════════════════════════════
   HONEY COMB VISUALS - Gallery Styles
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Active nav state ───────────────────────────────────────────────── */
.nav-active {
  color: var(--gold) !important;
}

/* ── Gallery Hero ────────────────────────────────────────────────────── */
.gal-hero {
  position: relative;
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.gal-bars {
  position: absolute;
  bottom: 0; left: auto; right: 0;
  width: 40%;
  height: 100%;
  opacity: 0.05;
  flex-direction: column;
}

.gal-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--sp-20) var(--sp-8) var(--sp-16);
}

.gal-headline {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.1;
  margin: var(--sp-3) 0 var(--sp-4);
}
.gal-headline em {
  font-style: italic;
  color: var(--gold);
}

.gal-sub {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 48ch;
  margin: 0 auto;
}

/* ── Filter Bar ──────────────────────────────────────────────────────── */
.gal-filter-wrap {
  position: sticky;
  top: 60px;
  z-index: 40;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-3) clamp(var(--sp-6), 5vw, var(--sp-16));
}

.gal-filters {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.gal-filter {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid transparent;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 2px;
  cursor: pointer;
  transition: color var(--t-ui), border-color var(--t-ui), background var(--t-ui);
}
.gal-filter:hover {
  color: var(--color-text);
  border-color: var(--color-border);
}
.gal-filter.active {
  color: var(--gold);
  border-color: var(--gold);
  background: oklch(from var(--gold-raw) l c h / 0.07);
}

.gal-count {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  white-space: nowrap;
}

/* ── Empty State ─────────────────────────────────────────────────────── */
.gal-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  padding: var(--sp-16) var(--sp-8);
}

.gal-empty-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  max-width: 480px;
}

.gal-empty-icon {
  color: var(--color-text-faint);
  margin-bottom: var(--sp-2);
}

.gal-empty-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  font-weight: 400;
  max-width: none;
}

.gal-empty-copy {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.gal-empty-copy code {
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--gold);
  background: oklch(from var(--gold-raw) l c h / 0.08);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ── Gallery Grid ────────────────────────────────────────────────────── */
.gal-main {
  padding: var(--sp-12) clamp(var(--sp-6), 5vw, var(--sp-16));
  background: var(--color-bg);
  min-height: 60vh;
}

.gal-grid {
  columns: 3;
  column-gap: 12px;
  max-width: var(--content-wide);
  margin: 0 auto;
}

@media (max-width: 900px) {
  .gal-grid { columns: 2; }
}
@media (max-width: 560px) {
  .gal-grid { columns: 1; }
}

/* ── Gallery Card ────────────────────────────────────────────────────── */
.gal-card {
  break-inside: avoid;
  margin-bottom: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.4s var(--ease-out),
    transform 0.4s var(--ease-out),
    border-color var(--t-ui);
}
.gal-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.gal-card:hover {
  border-color: oklch(from var(--gold-raw) l c h / 0.4);
}

/* Wide cards span full width for hero shots */
.gal-card--wide {
  column-span: all;
  max-height: 480px;
}
.gal-card--wide .gal-card-img {
  height: 480px;
}

.gal-card-img {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--color-surface-2);
}

.gal-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out), filter 0.3s var(--ease-out);
  filter: saturate(0.75) brightness(0.85);
}
.gal-card:hover .gal-card-img img {
  transform: scale(1.04);
  filter: saturate(0.9) brightness(0.95);
}

.gal-card-overlay {
  position: absolute;
  inset: 0;
  background: oklch(from var(--gold-raw) 0.1 0.03 85 / 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease-out);
}
.gal-card:hover .gal-card-overlay {
  background: oklch(from var(--gold-raw) 0.1 0.03 85 / 0.3);
}

.gal-card-zoom {
  font-size: 1.5rem;
  color: var(--gold);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.gal-card:hover .gal-card-zoom {
  opacity: 1;
  transform: translateY(0);
}

.gal-card-info {
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.gal-card-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  max-width: none;
  line-height: 1.2;
}

.gal-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.gal-card-date {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 300;
}

.gal-card-pkg {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.gal-card-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  align-self: flex-start;
}
.gal-card-tag[data-type="wedding"] { color: #e8bfa0; background: rgba(200, 120, 60, 0.15); }
.gal-card-tag[data-type="mitzvah"] { color: var(--gold); background: oklch(from var(--gold-raw) l c h / 0.12); }
.gal-card-tag[data-type="gala"]    { color: #a8c4e0; background: rgba(40, 100, 180, 0.15); }
.gal-card-tag[data-type="private"] { color: #b8a8c8; background: rgba(120, 80, 160, 0.15); }

/* ── Lightbox ────────────────────────────────────────────────────────── */
.lb-backdrop {
  position: fixed;
  inset: 0;
  background: oklch(0.05 0.01 250 / 0.94);
  z-index: 200;
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-8);
  pointer-events: none;
}

.lightbox > * {
  pointer-events: auto;
}

.lb-img-wrap {
  max-width: min(90vw, 1100px);
  max-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 24px 80px oklch(0 0 0 / 0.7);
}

.lb-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 202;
  opacity: 0.03;
}

.lb-caption {
  text-align: center;
  margin-top: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.lb-event-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  max-width: none;
}

.lb-meta {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  max-width: none;
}

.lb-close {
  position: fixed;
  top: var(--sp-6);
  right: var(--sp-6);
  font-size: 1.25rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--t-ui), border-color var(--t-ui);
  z-index: 203;
}
.lb-close:hover { color: var(--gold); border-color: var(--gold); }

.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--t-ui), border-color var(--t-ui);
  z-index: 203;
}
.lb-prev { left: var(--sp-6); }
.lb-next { right: var(--sp-6); }
[hidden] { display: none !important; }
.lb-prev:hover,
.lb-next:hover { color: var(--gold); border-color: var(--gold); }

/* ── Instructions Section ────────────────────────────────────────────── */
.gal-instructions {
  padding: clamp(var(--sp-16), 8vw, var(--sp-24)) 0;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.instr-steps {
  list-style: none;
  padding: 0;
  margin-top: var(--sp-10);
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
}

.instr-steps li {
  display: flex;
  gap: var(--sp-6);
  align-items: flex-start;
  max-width: none;
}

.instr-n {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--gold);
  flex-shrink: 0;
  padding-top: 3px;
}

.instr-steps strong {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--sp-1);
}

.instr-steps p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 52ch;
}

.instr-steps code {
  font-family: 'Courier New', monospace;
  font-size: 0.88em;
  color: var(--gold);
  background: oklch(from var(--gold-raw) l c h / 0.08);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .gal-filter-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-3);
  }
  .lb-prev { left: var(--sp-3); }
  .lb-next { right: var(--sp-3); }
  .lb-close { top: var(--sp-3); right: var(--sp-3); }
}
