/* Portal Digital - Galeria (mantendo o layout do site) */

.galleryFeatured{
  border-radius: var(--radius);
  border: 1px solid rgba(46,232,255,.14);
  background: linear-gradient(180deg, rgba(7,20,37,.45), rgba(7,20,37,.20));
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
  padding: 14px;
}

.galleryFeatured__grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 980px){
  .galleryFeatured__grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px){
  .galleryFeatured__grid{ grid-template-columns: repeat(2, 1fr); }
}

.galleryCard{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid rgba(35,48,69,.8);
  background: rgba(17,24,38,.35);
  box-shadow: 0 10px 18px rgba(0,0,0,.18);
  aspect-ratio: 16 / 10;
  cursor:pointer;
}
.galleryCard img{
  width:100%; height:100%; object-fit:cover;
  filter: saturate(1.05) contrast(1.02);
  transform: scale(1.02);
  transition: transform .22s ease;
}
.galleryCard:hover img{ transform: scale(1.06); }
.galleryCard:after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.72) 100%);
  pointer-events:none;
}

.galleryBadge{
  position:absolute; top:10px; left:10px;
  background: #FFDD4A;
  color: #141414;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(0,0,0,.22);
}

.galleryLabel{
  position:absolute; left:10px; right:10px; bottom:10px;
  z-index: 2;
  background: rgba(7,20,37,.72);
  border: 1px solid rgba(46,232,255,.16);
  border-radius: 14px;
  padding: 10px 10px;
  backdrop-filter: blur(10px);
}
.galleryLabel strong{ display:block; font-size: 13px; letter-spacing: .1px; }
.galleryLabel span{ display:block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.galleryFeatured__filters{ margin-top: 12px; }
.chipRow{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip{
  appearance:none;
  border: 1px solid rgba(35,48,69,.65);
  background: rgba(15,22,35,.6);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover{ color: var(--text); border-color: rgba(46,232,255,.24); }
.chip.is-active{
  color: var(--text);
  border-color: rgba(46,232,255,.34);
  background: linear-gradient(180deg, rgba(46,232,255,.14), rgba(255,138,31,.06));
  box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset, var(--glow-cyan);
}

.galleryStrip{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  overflow:auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.galleryStrip::-webkit-scrollbar{ height: 8px; }
.galleryStrip::-webkit-scrollbar-thumb{ background: rgba(46,232,255,.18); border-radius: 999px; }

.stripThumb{
  flex: 0 0 auto;
  width: 160px;
  aspect-ratio: 16/10;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(35,48,69,.75);
  background: rgba(17,24,38,.35);
  scroll-snap-align: start;
  cursor:pointer;
  position:relative;
}
.stripThumb img{ width:100%; height:100%; object-fit:cover; }
.stripThumb:after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.60) 100%);
}
.stripThumb b{
  position:absolute; left:10px; right:10px; bottom:8px;
  font-size: 12px;
  z-index: 2;
}

/* ===== Página de galeria ===== */
.galleryPage__head{
  padding: 28px 0 14px;
}
.galleryPage__title{
  margin: 10px 0 8px;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.4px;
}
.galleryPage__sub{ margin:0; color: var(--muted); max-width: 70ch; }

.galleryControls{
  margin-top: 16px;
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items:center;
}

.searchInput{
  flex: 1 1 260px;
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(35,48,69,.75);
  background: rgba(17,24,38,.35);
}
.searchInput input{
  width:100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.galleryGrid{
  margin-top: 14px;
  display:grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 980px){ .galleryGrid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px){ .galleryGrid{ grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.66);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 90;
}
.lightbox.is-open{ display:flex; }

.lightbox__card{
  width: min(1000px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(46,232,255,.20);
  background: rgba(5,11,24,.90);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
  overflow:hidden;
}
.lightbox__media{ background: #000; }
.lightbox__media img{ width:100%; height: auto; max-height: 72vh; object-fit: contain; }
.lightbox__footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 12px;
}
.lightbox__footer strong{ font-size: 14px; }
.lightbox__footer span{ display:block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.lightbox__actions{ display:flex; gap: 8px; }
.lightbox__btn{
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(35,48,69,.75);
  background: rgba(17,24,38,.35);
  color: var(--text);
  cursor:pointer;
}
.lightbox__btn:hover{ border-color: rgba(46,232,255,.28); }
