/* ============================================================
   VITRIALUM DE ORIENTE — galeria.css (Gallery Page)
   ============================================================ */

/* ---- GALLERY GRID ---- */
.gallery-grid {
  columns: 3;
  column-gap: 20px;
  margin-top: 52px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.gallery-item:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.01);
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.8s var(--ease-fluid);
}
.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,63,166,0.92) 0%, rgba(10,14,26,0.2) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
  color: white;
  transform: translateY(14px);
  transition: transform 0.4s ease;
  margin-bottom: 4px;
}
.gallery-overlay p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  transform: translateY(14px);
  transition: transform 0.4s 0.06s ease;
}
.gallery-item:hover .gallery-overlay h3,
.gallery-item:hover .gallery-overlay p { transform: translateY(0); }

.gallery-zoom-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.35s ease;
}
.gallery-item:hover .gallery-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* ---- FILTER TABS (Gallery) ---- */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0;
}
.gal-filter-btn {
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.25s ease;
  font-family: var(--font-body);
}
.gal-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.gal-filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 6px 16px rgba(13,63,166,0.25);
}

/* ---- LIGHTBOX ---- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,14,26,0.96);
  z-index: 99000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  padding: 24px;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  transform: scale(0.85);
  transition: transform 0.4s var(--ease-fluid);
}
.lightbox.open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  transition: background 0.25s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-caption {
  position: absolute;
  bottom: -48px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 1px;
}
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  transition: background 0.25s;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.2); }

/* ---- GALLERY CTA ---- */
.gallery-cta {
  background: var(--dark);
  border-radius: var(--radius-xl);
  padding: 80px 60px;
  text-align: center;
}
.gallery-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  color: white;
  margin-bottom: 14px;
}
.gallery-cta p {
  color: rgba(255,255,255,0.65);
  margin-bottom: 36px;
  font-size: 1rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .gallery-grid { columns: 2; }
}
@media (max-width: 640px) {
  .gallery-grid { columns: 1; }
  .gallery-cta { padding: 56px 24px; border-radius: var(--radius-lg); }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
