/* ── LIGHTBOX ── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: #000; z-index: 1000;
  flex-direction: column; align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }

.lb-toolbar {
  position: absolute; top: 0; right: 0; z-index: 10;
  display: flex; align-items: center;
  padding: 0.8rem 1rem; gap: 0.6rem;
  background: linear-gradient(to bottom left, rgba(0,0,0,0.6), transparent);
  border-radius: 0 0 0 12px;
  transition: opacity 0.4s;
}
.lightbox.ui-hidden .lb-toolbar { opacity: 0; pointer-events: none; }

.lb-btn {
  background: none; border: none; cursor: pointer;
  color: #666; transition: color 0.3s; padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { color: #fff; }
.lb-btn svg { width: 20px; height: 20px; }

.lb-img-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; position: relative;
}
.lb-img-wrap::after {
  content: ''; position: absolute; inset: 0; z-index: 2; cursor: default;
}
.lb-img-wrap img {
  max-width: 90vw; max-height: 90vh; object-fit: contain;
  filter: grayscale(100%) contrast(1.06); display: block;
  transition: transform 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  -webkit-user-select: none; user-select: none; pointer-events: none;
}

/* Fullscreen */
.lightbox.fullscreen-mode { padding: 0; }
.lightbox.fullscreen-mode .lb-img-wrap { width: 100vw; height: 100vh; }
.lightbox.fullscreen-mode .lb-img-wrap img {
  max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; object-fit: contain;
}
.lightbox:-webkit-full-screen { background: #000; }
.lightbox:-moz-full-screen    { background: #000; }
.lightbox:fullscreen           { background: #000; }

/* Navegação */
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,0.15);
  font-size: 2.5rem; cursor: pointer; padding: 1.5rem 1rem;
  transition: color 0.3s; line-height: 1; z-index: 10;
}
.lb-nav:hover { color: rgba(255,255,255,0.9); }
.lb-prev { left: 0; }
.lb-next { right: 0; }
.lightbox.ui-hidden .lb-nav { opacity: 0; pointer-events: none; }

/* Contador */
.lb-counter {
  position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  font-size: 0.7rem; letter-spacing: 0.3em; color: #444;
  font-family: 'NexaHeavy', Georgia, serif; z-index: 10;
  transition: opacity 0.4s;
}
.lightbox.ui-hidden .lb-counter { opacity: 0; }

/* EXIF */
.exif-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 3.5rem 2rem 1.8rem;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 60%, transparent);
  font-family: 'NexaHeavy', Georgia, serif;
  font-size: 0.78rem; letter-spacing: 0.15em; line-height: 2.1;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease; z-index: 5;
}
.exif-panel.visible { opacity: 1; }
.exif-row { display: flex; gap: 1.5rem; }
.exif-label { color: rgba(255,255,255,0.35); min-width: 100px; }
.exif-val   { color: rgba(255,255,255,0.88); }

/* Mobile */
@media (max-width: 768px) {
  .exif-panel { font-size: 0.62rem; letter-spacing: 0.12em; padding: 2.5rem 1.2rem 1.2rem; }
  .exif-label { min-width: 72px; }
  .lb-img-wrap img { max-width: 100vw; max-height: 82vh; }
  .lb-nav { font-size: 1.8rem; padding: 0.4rem; }
  .lb-prev { left: 0; }
  .lb-next { right: 0; }
  .lb-counter { font-size: 0.6rem; bottom: 0.8rem; }
}
