/* =========================================================
   GALERIA — grid estilo Instagram (home + álbum)
========================================================= */
.gl-item,
.gl-item *{
  user-select:none;
  -webkit-user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.gl-item{
  display:block;
  text-decoration:none;
  cursor:pointer;
}

.gl-item .gl-thumb{
  position:relative;
  overflow:hidden;
  aspect-ratio:1 / 1;
  background:#0a0a0a;
  border-radius:var(--thumbRadius, 18px);
  border:1px solid rgba(255,255,255,.10);
  transform:translateZ(0);
}

.gl-item .imgwrap{
  width:100%;
  height:100%;
  overflow:hidden;
  line-height:0;
}

.gl-item .gl-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform:scale(1);
  transition:transform .35s cubic-bezier(.2,.8,.2,1), filter .35s ease;
  -webkit-user-drag:none;
}

.gl-item .ig-overlay{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  background:rgba(0,0,0,0);
  opacity:0;
  transition:background .28s ease, opacity .28s ease;
  pointer-events:none;
}

.gl-item .ig-overlay-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  transform:translateY(8px) scale(.92);
  opacity:0;
  transition:transform .28s ease, opacity .28s ease;
}

.gl-item .ig-overlay-icon .ico{
  width:22px;
  height:22px;
  stroke-width:2.2px;
  filter:drop-shadow(0 2px 8px rgba(0,0,0,.45));
}

.gl-item:hover .gl-thumb img,
.gl-item:focus-visible .gl-thumb img{
  transform:scale(1.08);
  filter:saturate(1.08) contrast(1.04);
}

.gl-item:hover .ig-overlay,
.gl-item:focus-visible .ig-overlay{
  background:rgba(0,0,0,.42);
  opacity:1;
}

.gl-item:hover .ig-overlay-icon,
.gl-item:focus-visible .ig-overlay-icon{
  opacity:1;
  transform:translateY(0) scale(1);
}

.gl-item:focus-visible .gl-thumb{
  outline:2px solid rgba(34,197,94,.65);
  outline-offset:2px;
}

/* =========================================================
   LIGHTBOX — estilo Instagram (#galLb)
========================================================= */
body.gal-lb-open{
  overflow:hidden !important;
}

body.gal-lb-open .btn-topo-site{
  display:none !important;
}

#galLb button{
  box-shadow:none;
  filter:none;
  font-family:inherit;
}

#galLb .lb-close{
  position:absolute;
  top:18px;
  right:18px;
  z-index:30;
  width:42px;
  height:42px;
  padding:0;
  min-width:0;
  min-height:0;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  backdrop-filter:blur(8px);
  transition:transform .2s ease, background .2s ease;
  box-shadow:none !important;
}

#galLb .lb-close:hover{
  transform:scale(1.06);
  background:rgba(255,255,255,.18) !important;
  filter:none !important;
}

#galLb .lb-tap-top{
  padding:0;
  min-width:0;
  min-height:0;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

#galLb{
  position:fixed;
  inset:0;
  z-index:999999;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .28s ease, visibility .28s ease;
}

#galLb.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

#galLb .backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.94);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}

#galLb .panel{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  padding:0;
  transition:transform .26s ease, opacity .26s ease;
}

#galLb .lb-progress{
  position:relative;
  z-index:25;
  display:flex;
  gap:4px;
  padding:14px 56px 10px 14px;
}

#galLb .lb-progress-seg{
  flex:1 1 0;
  height:3px;
  border-radius:999px;
  background:rgba(255,255,255,.22);
  overflow:hidden;
}

#galLb .lb-progress-seg i{
  display:block;
  height:100%;
  width:0;
  border-radius:inherit;
  background:#fff;
  transition:width .28s ease;
}

#galLb .lb-progress-seg.is-done i,
#galLb .lb-progress-seg.is-active i{
  width:100%;
}

#galLb .stage{
  position:relative;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  touch-action:none;
  padding:0 0 88px;
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
}

#galLb.is-dragging .stage{
  cursor:grabbing;
}

#galLb .lb-viewport{
  position:absolute;
  inset:0 0 88px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

#galLb .lb-zoom-wrap{
  display:flex;
  align-items:center;
  justify-content:center;
  transform-origin:center center;
  will-change:transform, opacity;
  transition:transform .32s cubic-bezier(.22,.85,.24,1), opacity .28s ease;
}

#galLb.is-dragging .lb-zoom-wrap{
  transition:none !important;
}

#galLb .lb-photo{
  max-width:min(920px, 96vw);
  max-height:min(78vh, 920px);
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
  border-radius:6px;
  user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
}

#galLb .lb-tap-top{
  position:absolute;
  top:0;
  left:0;
  right:56px;
  height:76px;
  z-index:28;
  border:0;
  background:transparent;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}

#galLb .lb-caption{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:20;
  padding:28px 18px 18px;
  background:linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
  pointer-events:none;
}

#galLb .lb-caption-title{
  font-size:15px;
  font-weight:800;
  color:#fff;
  margin-bottom:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

#galLb .lb-caption-count{
  font-size:12px;
  font-weight:700;
  color:rgba(255,255,255,.72);
}

#galLb .lb-caption-hint{
  margin-top:6px;
  font-size:11px;
  color:rgba(255,255,255,.52);
}

@media (max-width: 700px){
  #galLb .lb-close{
    top:10px;
    right:10px;
    width:38px;
    height:38px;
  }

  #galLb .lb-progress{
    padding:12px 50px 8px 10px;
  }

  #galLb .lb-caption{
    padding:22px 14px 16px;
  }

  #galLb .lb-caption-hint{
    display:none;
  }
}
