body { padding-top: var(--nav-h); background: var(--black); }

/* HERO */
.gal-hero {
  background: var(--dark); padding: 56px 80px 44px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.gal-hero::before {
  content: 'GALERIA'; position: absolute; right: -20px; bottom: -40px;
  font-family: var(--font-display); font-size: 20vw;
  color: rgba(255,255,255,.025); line-height: 1; pointer-events: none;
}
.gal-hero-inner { position: relative; z-index: 1; }
.gal-hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 110px);
  letter-spacing: 1px; line-height: .9; margin-bottom: 14px;
}
.gal-hero-title span { color: var(--red); }
.gal-hero-sub {
  font-size: 15px; font-weight: 300; color: var(--lgrey);
  max-width: 480px; line-height: 1.7;
}

/* FILTROS */
.gal-filters {
  display: flex; align-items: center;
  padding: 0 80px; background: var(--panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  position: sticky; top: var(--nav-h); z-index: 100;
}
.gal-filters::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 16px 22px; background: none; border: none;
  font-family: var(--font-cond); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--grey);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .2s; flex-shrink: 0;
}
.filter-btn:hover { color: var(--lgrey); }
.filter-btn.active { color: var(--white); border-bottom-color: var(--red); }

/* BODY */
.gal-body { padding: 44px 80px 80px; }
.gal-info {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.gal-count {
  font-family: var(--font-cond); font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--grey);
}
.gal-count span { color: var(--white); }

/* MASONRY GRID */
.masonry {
  columns: 4 260px; column-gap: 6px;
}
.gal-item {
  break-inside: avoid; margin-bottom: 6px;
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--panel); display: block;
}
.gal-item.hidden { display: none; }
.gal-img {
  width: 100%; height: auto; display: block;
  transition: transform .5s ease, opacity .4s ease;
  opacity: 0;
}
.gal-img.loaded { opacity: 1; }
.gal-item:hover .gal-img { transform: scale(1.03); }
.gal-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, transparent 55%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; opacity: 0; transition: opacity .3s;
}
.gal-item:hover .gal-overlay { opacity: 1; }
.gal-title {
  font-family: var(--font-cond); font-size: 14px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--white);
  margin-bottom: 3px;
}
.gal-sub {
  font-size: 11px; color: rgba(255,255,255,.6);
  font-family: var(--font-cond); letter-spacing: 1px; text-transform: uppercase;
}
.gal-cat-tag {
  position: absolute; top: 10px; left: 10px;
  background: var(--red); color: var(--white);
  font-family: var(--font-cond); font-size: 9px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; padding: 3px 8px;
  opacity: 0; transition: opacity .3s;
}
.gal-item:hover .gal-cat-tag { opacity: 1; }

/* SKELETON */
.gal-skeleton {
  columns: 4 260px; column-gap: 6px;
}
.sk-gal {
  break-inside: avoid; margin-bottom: 6px;
  background: var(--panel); animation: skpulse 1.4s ease-in-out infinite;
}
.sk-gal-1 { height: 280px; }
.sk-gal-2 { height: 180px; }
.sk-gal-3 { height: 340px; }
.sk-gal-4 { height: 220px; }
@keyframes skpulse { 0%,100%{opacity:1} 50%{opacity:.3} }

/* EMPTY */
.gal-empty {
  text-align: center; padding: 100px 40px;
}
.gal-empty-icon { font-size: 64px; opacity: .2; margin-bottom: 20px; }
.gal-empty-title {
  font-family: var(--font-display); font-size: 36px;
  letter-spacing: 1px; margin-bottom: 10px;
}
.gal-empty-sub { font-size: 14px; color: var(--grey); margin-bottom: 24px; }
.gal-empty-hint {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border2);
  padding: 12px 20px;
  font-family: var(--font-cond); font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--grey);
}

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.96);
  z-index: 2000; display: none;
  align-items: center; justify-content: center;
  padding: 32px;
}
.lightbox.open { display: flex; }
.lb-wrap { max-width: 90vw; max-height: 90vh; position: relative; }
.lb-img {
  max-width: 100%; max-height: 88vh;
  object-fit: contain; display: block;
  box-shadow: 0 0 60px rgba(0,0,0,.8);
}
.lb-close {
  position: fixed; top: 20px; right: 24px;
  font-size: 34px; color: var(--grey); cursor: pointer;
  background: none; border: none; transition: color .2s; z-index: 10;
}
.lb-close:hover { color: var(--white); }
.lb-prev, .lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.07); border: none;
  color: var(--white); font-size: 32px;
  padding: 18px 22px; cursor: pointer;
  transition: background .2s; z-index: 10;
}
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,.14); }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lb-info {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  text-align: center;
}
.lb-info-title {
  font-family: var(--font-cond); font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--white);
  margin-bottom: 4px;
}
.lb-info-counter {
  font-family: var(--font-cond); font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--grey);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .gal-hero, .gal-body { padding: 48px 28px; }
  .gal-filters { padding: 0 8px; }
  .masonry, .gal-skeleton { columns: 2 180px; column-gap: 4px; }
  .gal-item { margin-bottom: 4px; }
}
@media (max-width: 480px) {
  .masonry, .gal-skeleton { columns: 2 140px; column-gap: 3px; }
}
