/*! 3HASH efeitos · lightbox — código próprio 3HASH, escrito de raiz (16 Set 2026). Sem dependências. */
/* h3-lightbox.css · v1.0.0
   Tema: redefina qualquer variável em :root (ou numa classe passada em `className`).
   Os valores por omissão vivem em :where(:root) — especificidade zero, qualquer :root do site ganha. */

:where(:root) {
  --h3-lb-bg: rgba(9, 9, 11, 0.96);
  --h3-lb-bg-glow: rgba(255, 255, 255, 0.045);
  --h3-lb-fg: #f5f5f4;
  --h3-lb-muted: rgba(245, 245, 244, 0.56);
  --h3-lb-accent: #d8f36a;
  --h3-lb-accent-fg: #101108;
  --h3-lb-surface: rgba(26, 26, 30, 0.66);
  --h3-lb-surface-hover: rgba(255, 255, 255, 0.11);
  --h3-lb-border: rgba(255, 255, 255, 0.09);
  --h3-lb-radius: 14px;
  --h3-lb-media-radius: 6px;
  --h3-lb-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.75);
  --h3-lb-duration: 440ms;
  --h3-lb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --h3-lb-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --h3-lb-z: 2147483000;
  --h3-lb-gutter: clamp(10px, 6vw, 96px);
  --h3-lb-vpad: 8px;
  --h3-lb-btn: 42px;
  --h3-lb-arrow: 52px;
  --h3-lb-thumb-w: 64px;
  --h3-lb-thumb-h: 46px;
  --h3-lb-panel: #141417;
  --h3-lb-panel-fg: #ececea;
}

.h3-lb {
  position: fixed;
  inset: 0;
  z-index: var(--h3-lb-z);
  color: var(--h3-lb-fg);
  font: 400 14px/1.45 var(--h3-lb-font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  isolation: isolate;
  contain: layout style;
}
.h3-lb *, .h3-lb *::before, .h3-lb *::after { box-sizing: border-box; }
.h3-lb button { font: inherit; color: inherit; }

/* ── fundo ── */
.h3-lb__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(120% 85% at 50% 42%, var(--h3-lb-bg-glow), transparent 62%),
    var(--h3-lb-bg);
  opacity: calc(1 - var(--h3-lb-drag, 0) * 0.9);
}

/* área útil para o conteúdo (medida em JS) */
.h3-lb__area {
  position: absolute;
  top: var(--h3-lb-vpad);
  bottom: var(--h3-lb-vpad);
  left: calc(var(--h3-lb-gutter) + env(safe-area-inset-left, 0px));
  right: calc(var(--h3-lb-gutter) + env(safe-area-inset-right, 0px));
  pointer-events: none;
  visibility: hidden;
}
.h3-lb.is-immersive .h3-lb__area { left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); top: 0; bottom: 0; }

/* ── palco e slides ── */
.h3-lb__stage { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.h3-lb__track { position: absolute; inset: 0; will-change: transform; }
.h3-lb__slide { position: absolute; inset: 0; }
.h3-lb__slide.is-leaving { z-index: 0; pointer-events: none; }
.h3-lb__slide.is-active { z-index: 1; }
.h3-lb--fade .h3-lb__slide:not(.is-active):not(.is-leaving) { opacity: 0; pointer-events: none; }

.h3-lb__zoom { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 50% 50%; }
.h3-lb.is-gesturing .h3-lb__zoom { will-change: transform; }
.h3-lb__zoom.is-resizing {
  transition: left .38s var(--h3-lb-ease), top .38s var(--h3-lb-ease), width .38s var(--h3-lb-ease), height .38s var(--h3-lb-ease);
}

.h3-lb__frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--h3-lb-media-radius);
  overflow: hidden;
  transform-origin: 50% 50%;
  transition: box-shadow .5s ease;
}
.h3-lb.is-ready .h3-lb__slide--image .h3-lb__frame,
.h3-lb.is-ready .h3-lb__slide--video .h3-lb__frame,
.h3-lb.is-ready .h3-lb__slide--iframe .h3-lb__frame { box-shadow: var(--h3-lb-shadow); }
.h3-lb__slide.is-zoomed .h3-lb__frame { border-radius: 0; }

.h3-lb__frame > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
}
.h3-lb__placeholder { object-fit: cover; filter: saturate(1.05); }
.h3-lb__frame > .h3-lb__media { opacity: 0; transition: opacity .32s ease; }
.h3-lb__slide.is-loaded .h3-lb__media { opacity: 1; }
.h3-lb__slide.is-loaded .h3-lb__placeholder { transition: opacity .1s linear .35s; opacity: 0; }

.h3-lb__frame > video, .h3-lb__frame > iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; border: 0; background: #000; opacity: 1;
}
.h3-lb__slide--iframe .h3-lb__frame { background: #0e0e11; }

/* cursores */
.h3-lb.is-zoomable .h3-lb__slide.is-active .h3-lb__frame { cursor: zoom-in; }
.h3-lb.is-zoomable .h3-lb__slide.is-active.is-zoomed .h3-lb__frame { cursor: grab; }
.h3-lb.is-pan .h3-lb__frame, .h3-lb.is-swipe .h3-lb__stage { cursor: grabbing !important; }
.h3-lb.is-idle .h3-lb__stage, .h3-lb.is-idle .h3-lb__frame { cursor: none !important; }

/* conteúdo inline */
.h3-lb__slide--inline .h3-lb__frame { display: grid; place-items: center; overflow: visible; border-radius: 0; }
.h3-lb__inline {
  max-width: min(100%, 760px);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  user-select: text;
  -webkit-user-select: text;
  cursor: auto;
  background: var(--h3-lb-panel);
  color: var(--h3-lb-panel-fg);
  border: 1px solid var(--h3-lb-border);
  border-radius: var(--h3-lb-radius);
  padding: clamp(20px, 4vw, 44px);
  box-shadow: var(--h3-lb-shadow);
  outline: none;
}
.h3-lb__inline:focus-visible { box-shadow: var(--h3-lb-shadow), 0 0 0 2px var(--h3-lb-accent); }

/* carregamento e erro */
.h3-lb__spinner {
  position: absolute;
  left: calc(var(--h3-lb-ax) + var(--h3-lb-aw) / 2 - 17px);
  top: calc(var(--h3-lb-ay) + var(--h3-lb-ah) / 2 - 17px);
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--h3-lb-accent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 2;
}
.h3-lb__slide.is-loading .h3-lb__spinner {
  visibility: visible;
  animation: h3-lb-spin .75s linear infinite, h3-lb-fade-in .3s ease .18s forwards;
}
.h3-lb__slide--image.is-loading.has-box .h3-lb__spinner { width: 28px; height: 28px; left: calc(var(--h3-lb-ax) + var(--h3-lb-aw) / 2 - 14px); top: calc(var(--h3-lb-ay) + var(--h3-lb-ah) / 2 - 14px); }
@keyframes h3-lb-spin { to { transform: rotate(360deg); } }
@keyframes h3-lb-fade-in { to { opacity: 1; } }

.h3-lb__error {
  position: absolute;
  left: calc(var(--h3-lb-ax) + var(--h3-lb-aw) / 2);
  top: calc(var(--h3-lb-ay) + var(--h3-lb-ah) / 2);
  transform: translate(-50%, -50%);
  width: min(340px, calc(100vw - 48px));
  padding: 26px 24px 22px;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  background: var(--h3-lb-surface);
  border: 1px solid var(--h3-lb-border);
  border-radius: var(--h3-lb-radius);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  z-index: 3;
}
.h3-lb__slide.is-error .h3-lb__zoom { visibility: hidden; }
.h3-lb__error-icon { color: var(--h3-lb-accent); display: grid; }
.h3-lb__error-icon svg { width: 30px; height: 30px; }
.h3-lb__error-text { margin: 0; color: var(--h3-lb-fg); font-size: 14px; }
.h3-lb__error-retry {
  margin-top: 4px;
  border: 1px solid var(--h3-lb-border);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s ease;
}
.h3-lb__error-retry:hover { background: var(--h3-lb-surface-hover); }
.h3-lb__error-retry:focus-visible { outline: 2px solid var(--h3-lb-accent); outline-offset: 2px; }

/* ── barra superior ── */
.h3-lb__top, .h3-lb__bottom, .h3-lb__arrow, .h3-lb__progress {
  transition: opacity .35s var(--h3-lb-ease), transform .45s var(--h3-lb-ease);
}
.h3-lb__top {
  position: absolute;
  z-index: 3;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding:
    calc(env(safe-area-inset-top, 0px) + 12px)
    calc(env(safe-area-inset-right, 0px) + 12px)
    8px
    calc(env(safe-area-inset-left, 0px) + 20px);
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent);
}
.h3-lb__top > * { pointer-events: auto; }

.h3-lb__counter {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--h3-lb-muted);
  white-space: nowrap;
}
.h3-lb__counter-current { color: var(--h3-lb-fg); font-weight: 600; }
.h3-lb__counter-sep { opacity: .6; }

.h3-lb__toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  margin-left: auto;
  background: var(--h3-lb-surface);
  border: 1px solid var(--h3-lb-border);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
}

.h3-lb__btn {
  position: relative;
  width: var(--h3-lb-btn);
  height: var(--h3-lb-btn);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .25s var(--h3-lb-ease), opacity .2s ease;
}
.h3-lb__btn svg { width: 20px; height: 20px; }
.h3-lb__btn:hover { background: var(--h3-lb-surface-hover); }
.h3-lb__btn:active { transform: scale(0.9); }
.h3-lb__btn.is-on { color: var(--h3-lb-accent); }
.h3-lb__btn:disabled { opacity: .3; cursor: default; background: transparent; }
.h3-lb__btn--close { margin-left: 4px; }
.h3-lb__btn--close::before {
  content: "";
  position: absolute;
  left: -4px; top: 11px; bottom: 11px;
  width: 1px;
  background: var(--h3-lb-border);
}
.h3-lb__btn:focus-visible, .h3-lb__arrow:focus-visible, .h3-lb__thumb:focus-visible {
  outline: 2px solid var(--h3-lb-accent);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .h3-lb__btn[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    padding: 5px 9px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--h3-lb-fg);
    background: rgba(20, 20, 23, 0.94);
    border: 1px solid var(--h3-lb-border);
    border-radius: 7px;
    opacity: 0;
    transform: translate(-50%, -4px);
    transition: opacity .18s ease, transform .25s var(--h3-lb-ease);
    pointer-events: none;
  }
  .h3-lb__btn--close[data-tip]::after { left: auto; right: 0; transform: translate(0, -4px); }
  .h3-lb__btn[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); transition-delay: .35s; }
  .h3-lb__btn--close[data-tip]:hover::after { transform: translate(0, 0); }
}

/* ── setas ── */
.h3-lb__arrow {
  position: absolute;
  z-index: 3;
  top: calc(var(--h3-lb-ay, 50vh) + var(--h3-lb-ah, 0px) / 2);
  width: var(--h3-lb-arrow);
  height: var(--h3-lb-arrow);
  margin-top: calc(var(--h3-lb-arrow) / -2);
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--h3-lb-border);
  border-radius: 999px;
  background: var(--h3-lb-surface);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  cursor: pointer;
}
.h3-lb__arrow svg { width: 24px; height: 24px; transition: transform .3s var(--h3-lb-ease); }
.h3-lb__arrow--prev { left: calc(env(safe-area-inset-left, 0px) + max(12px, calc(var(--h3-lb-gutter) / 2 - var(--h3-lb-arrow) / 2))); }
.h3-lb__arrow--next { right: calc(env(safe-area-inset-right, 0px) + max(12px, calc(var(--h3-lb-gutter) / 2 - var(--h3-lb-arrow) / 2))); }
.h3-lb__arrow:hover { background: var(--h3-lb-surface-hover); }
.h3-lb__arrow--prev:hover svg { transform: translateX(-2px); }
.h3-lb__arrow--next:hover svg { transform: translateX(2px); }
.h3-lb__arrow:active svg { transform: scale(.88); }
.h3-lb__arrow:disabled { opacity: 0 !important; pointer-events: none; }

/* ── barra inferior: legenda + miniaturas ── */
.h3-lb__bottom {
  position: absolute;
  z-index: 3;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding:
    10px
    calc(env(safe-area-inset-right, 0px) + 16px)
    calc(env(safe-area-inset-bottom, 0px) + 14px)
    calc(env(safe-area-inset-left, 0px) + 16px);
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.34), transparent);
}
.h3-lb__bottom > * { pointer-events: auto; }
.h3-lb__caption {
  max-width: min(68ch, 100%);
  min-height: 1.5em;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 245, 244, 0.86);
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
}
.h3-lb__caption.is-empty { visibility: hidden; }
.h3-lb__caption a { color: var(--h3-lb-accent); }

.h3-lb__thumbs {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  touch-action: pan-x;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
.h3-lb__thumbs::-webkit-scrollbar { display: none; }
.h3-lb--thumbs-hidden .h3-lb__thumbs { display: none; }
.h3-lb__thumbs-track {
  display: flex;
  gap: 8px;
  width: max-content;
  margin: 0 auto;
  padding: 5px 28px;
}
.h3-lb__thumb {
  position: relative;
  flex: none;
  width: var(--h3-lb-thumb-w);
  height: var(--h3-lb-thumb-h);
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0.42;
  cursor: pointer;
  transition: opacity .25s ease, transform .35s var(--h3-lb-ease);
}
.h3-lb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.h3-lb__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: box-shadow .25s ease;
  pointer-events: none;
}
.h3-lb__thumb:hover { opacity: 0.8; }
.h3-lb__thumb[aria-current="true"] { opacity: 1; transform: translateY(-2px); }
.h3-lb__thumb[aria-current="true"]::after { box-shadow: inset 0 0 0 2px var(--h3-lb-accent); }
.h3-lb__thumb-icon { display: grid; place-items: center; width: 100%; height: 100%; color: var(--h3-lb-muted); }
.h3-lb__thumb-badge {
  position: absolute;
  right: 4px; bottom: 4px;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}
.h3-lb__thumb-badge svg { width: 9px; height: 9px; fill: currentColor; stroke-width: 0; }

/* ── barra de progresso da apresentação ── */
.h3-lb__progress {
  position: absolute;
  z-index: 4;
  top: 0; left: 0; right: 0;
  height: 2px;
  pointer-events: none;
  opacity: 0;
}
.h3-lb.is-playing .h3-lb__progress { opacity: 1; }
.h3-lb__progress-bar {
  height: 100%;
  background: var(--h3-lb-accent);
  box-shadow: 0 0 12px var(--h3-lb-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ── estados: entrada/saída, inactividade, arrasto ── */
.h3-lb:not(.is-visible) .h3-lb__top { opacity: 0; transform: translateY(-8px); }
.h3-lb:not(.is-visible) .h3-lb__bottom { opacity: 0; transform: translateY(8px); }
.h3-lb:not(.is-visible) .h3-lb__arrow { opacity: 0; }
.h3-lb.is-idle .h3-lb__top,
.h3-lb.is-idle .h3-lb__bottom,
.h3-lb.is-idle .h3-lb__arrow { opacity: 0; pointer-events: none; }
.h3-lb.is-idle .h3-lb__top *, .h3-lb.is-idle .h3-lb__bottom * { pointer-events: none; }
.h3-lb.is-close .h3-lb__top,
.h3-lb.is-close .h3-lb__bottom,
.h3-lb.is-close .h3-lb__arrow { opacity: 0; transition-duration: .15s; }
.h3-lb.is-immersive .h3-lb__bottom { opacity: 0; pointer-events: none; }
.h3-lb.is-immersive .h3-lb__bottom * { pointer-events: none; }
.h3-lb.is-immersive .h3-lb__top { background: none; }
.h3-lb:fullscreen { background: transparent; }
.h3-lb::backdrop { background: #000; }

/* ── responsivo ── */
@media (max-width: 640px) {
  .h3-lb { --h3-lb-btn: 40px; --h3-lb-arrow: 40px; --h3-lb-thumb-w: 50px; --h3-lb-thumb-h: 38px; --h3-lb-gutter: 0px; --h3-lb-vpad: 4px; }
  .h3-lb__top { padding-left: calc(env(safe-area-inset-left, 0px) + 14px); padding-right: calc(env(safe-area-inset-right, 0px) + 8px); }
  .h3-lb__toolbar { gap: 0; padding: 2px; }
  .h3-lb__btn svg { width: 19px; height: 19px; }
  .h3-lb__arrow { background: rgba(20, 20, 23, 0.45); }
  .h3-lb__arrow--prev { left: calc(env(safe-area-inset-left, 0px) + 8px); }
  .h3-lb__arrow--next { right: calc(env(safe-area-inset-right, 0px) + 8px); }
  .h3-lb__caption { font-size: 13px; -webkit-line-clamp: 2; }
  .h3-lb__slide.is-zoomed .h3-lb__frame, .h3-lb__slide--image .h3-lb__frame { border-radius: 0; }
}
@media (max-width: 380px) {
  .h3-lb { --h3-lb-btn: 36px; }
  .h3-lb__btn--download, .h3-lb__btn--fullscreen { display: none; }
}
@media (hover: none) and (pointer: coarse) and (max-width: 640px) {
  .h3-lb__arrow { display: none; }
}
@media (hover: none) {
  .h3-lb__btn:hover, .h3-lb__arrow:hover { background: transparent; }
  .h3-lb__arrow:hover { background: var(--h3-lb-surface); }
}

/* ── tema claro opcional: className: 'h3-lb--light' ── */
.h3-lb.h3-lb--light {
  --h3-lb-bg: rgba(246, 244, 239, 0.96);
  --h3-lb-bg-glow: rgba(255, 255, 255, 0.7);
  --h3-lb-fg: #17171a;
  --h3-lb-muted: rgba(23, 23, 26, 0.55);
  --h3-lb-accent: #1d4ed8;
  --h3-lb-surface: rgba(255, 255, 255, 0.72);
  --h3-lb-surface-hover: rgba(0, 0, 0, 0.07);
  --h3-lb-border: rgba(0, 0, 0, 0.08);
  --h3-lb-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.35);
  --h3-lb-panel: #ffffff;
  --h3-lb-panel-fg: #17171a;
}
.h3-lb--light .h3-lb__top { background: none; }
.h3-lb--light .h3-lb__bottom { background: none; }
.h3-lb--light .h3-lb__caption { color: rgba(23, 23, 26, 0.82); }
.h3-lb--light .h3-lb__btn[data-tip]::after { background: #fff; color: #17171a; }

/* ── movimento reduzido ── */
@media (prefers-reduced-motion: reduce) {
  .h3-lb *, .h3-lb *::before, .h3-lb *::after { transition-duration: .01ms !important; }
  .h3-lb__slide.is-loading .h3-lb__spinner { animation-duration: 1.6s, .01ms; }
  .h3-lb__zoom.is-resizing { transition: none; }
}

/* ── bloqueio de scroll: elementos fixos do site podem usar --h3-lb-scrollbar ── */
html.h3-lb-locked { overflow: hidden; }
