/* =========================================================
   SELVARA — GALLERY PRO + MASSIVE LIBRARY
   Update: SELVARA_UPDATE_005_GALLERY_PRO_MASS_IMPORT
   ========================================================= */
.gallery-premium-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at 75% 25%,rgba(213,239,40,.16),transparent 28%);
  pointer-events:none;
}
.gallery-premium-hero-copy{
  position:relative;
  z-index:3;
}
.gallery-premium-count{
  display:inline-flex;
  align-items:baseline;
  gap:8px;
  margin-top:22px;
  padding:10px 16px;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:rgba(0,0,0,.25);
  backdrop-filter:blur(10px);
  color:#fff;
}
.gallery-premium-count strong{
  color:var(--lime);
  font-size:1.35rem;
}
.gallery-premium-section{
  position:relative;
  background:
    radial-gradient(circle at 10% 10%,rgba(213,239,40,.08),transparent 22%),
    #fff;
}
.gallery-premium-toolbar{
  display:grid;
  gap:24px;
  margin-bottom:38px;
}
.gallery-premium-search{
  width:min(100%,720px);
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:12px;
  padding:5px 6px 5px 18px;
  border:1px solid #e5e5e5;
  border-radius:999px;
  background:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,.06);
}
.gallery-premium-search span{
  font-size:1.55rem;
  color:#777;
}
.gallery-premium-search input{
  width:100%;
  border:0;
  outline:0;
  padding:13px 12px 13px 0;
  background:transparent;
  font:inherit;
}
.gallery-filter-wrap{
  margin-bottom:0!important;
}
.gallery-filter-btn{
  border:1px solid transparent;
  cursor:pointer;
}
.gallery-filter-btn.active{
  box-shadow:0 8px 20px rgba(165,190,0,.2);
}
.gallery-pro-grid{
  columns:4 240px;
  column-gap:20px;
}
.gallery-pro-card{
  display:block;
  break-inside:avoid;
  margin:0 0 20px;
  border-radius:22px;
  overflow:hidden;
  background:#111;
  box-shadow:0 16px 38px rgba(0,0,0,.12);
  transition:transform .4s cubic-bezier(.2,.75,.25,1),box-shadow .4s ease;
}
.gallery-pro-card:hover{
  transform:translateY(-8px);
  box-shadow:0 28px 65px rgba(0,0,0,.2);
}
.gallery-pro-media{
  position:relative;
  overflow:hidden;
  min-height:180px;
  background:#111;
}
.gallery-pro-media img,
.gallery-pro-media video{
  width:100%;
  height:auto;
  display:block;
  transition:transform .8s cubic-bezier(.18,.75,.25,1),filter .45s ease;
}
.gallery-pro-card:hover .gallery-pro-media img,
.gallery-pro-card:hover .gallery-pro-media video{
  transform:scale(1.065);
  filter:brightness(.82) saturate(1.08);
}
.gallery-pro-media::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 35%,rgba(0,0,0,.62));
  opacity:.45;
  pointer-events:none;
  transition:opacity .35s ease;
}
.gallery-pro-card:hover .gallery-pro-media::after{
  opacity:.8;
}
.gallery-pro-open{
  position:absolute;
  z-index:3;
  left:50%;
  top:50%;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--lime);
  color:#111;
  font-size:1.8rem;
  opacity:0;
  transform:translate(-50%,-50%) scale(.75);
  transition:opacity .35s ease,transform .35s ease;
}
.gallery-pro-card:hover .gallery-pro-open{
  opacity:1;
  transform:translate(-50%,-50%) scale(1);
}
.gallery-pro-category{
  position:absolute;
  z-index:3;
  left:14px;
  bottom:14px;
  max-width:calc(100% - 28px);
  padding:7px 11px;
  border-radius:999px;
  background:rgba(0,0,0,.55);
  color:#fff;
  font-size:.67rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  backdrop-filter:blur(8px);
}
.gallery-pro-copy{
  position:relative;
  z-index:4;
  display:grid;
  gap:5px;
  padding:16px 17px 18px;
  background:#111;
  color:#fff;
}
.gallery-pro-copy strong{
  font-family:'Barlow Condensed',sans-serif;
  font-size:1.25rem;
  line-height:1;
  text-transform:uppercase;
}
.gallery-pro-copy span{
  color:rgba(255,255,255,.62);
  font-size:.83rem;
  line-height:1.45;
}
.gallery-load-more-wrap{
  display:flex;
  justify-content:center;
  margin-top:38px;
}
.gallery-empty-state{
  padding:50px 20px;
  text-align:center;
  color:var(--muted);
}
.gallery-empty-state[hidden],
.gallery-load-more-wrap button[hidden]{
  display:none;
}
.global-lightbox .lightbox-wrapper{
  max-width:min(94vw,1300px);
  max-height:90vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.global-lightbox #lightboxContent{
  display:flex;
  align-items:center;
  justify-content:center;
  max-width:100%;
  max-height:82vh;
}
.global-lightbox #lightboxCaption{
  margin-top:12px;
  max-width:min(90vw,900px);
  padding:9px 16px;
  border-radius:999px;
  background:rgba(0,0,0,.7);
  color:#fff;
  text-align:center;
}
@media(max-width:900px){
  .gallery-pro-grid{columns:3 220px}
}
@media(max-width:680px){
  .gallery-pro-grid{columns:2 160px;column-gap:14px}
  .gallery-pro-card{margin-bottom:14px;border-radius:17px}
  .gallery-pro-copy{padding:13px 14px 15px}
  .gallery-pro-open{display:none}
}
@media(max-width:420px){
  .gallery-pro-grid{columns:1}
}
@media(prefers-reduced-motion:reduce){
  .gallery-pro-card,
  .gallery-pro-media img,
  .gallery-pro-media video,
  .gallery-pro-open{transition:none}
}

/* Home premium collage integration */
.gallery-home-premium-item{
  box-shadow:0 14px 36px rgba(0,0,0,.10);
  transition:transform .4s ease,box-shadow .4s ease;
}
.gallery-home-premium-item:hover{
  transform:translateY(-6px);
  box-shadow:0 24px 55px rgba(0,0,0,.18);
}


/* Neutraliza los pseudo-elementos del diseño anterior en Gallery PRO */
.gallery-pro-card::before,
.gallery-pro-card::after{
  content:none!important;
  display:none!important;
}

/* =========================================================
   SELVARA — LIVING GALLERY MOSAIC
   Update: 005A
   ========================================================= */
.gallery-home-premium-item{
  isolation:isolate;
  background:#0b0b0b;
}
.gallery-home-premium-item img{
  opacity:1;
  transform:scale(1.001);
  transition:
    opacity .65s ease,
    transform 1s cubic-bezier(.2,.72,.2,1),
    filter .55s ease;
}
.gallery-home-premium-item.is-changing img{
  opacity:0;
  transform:scale(1.045);
  filter:blur(7px) saturate(.82);
}
.gallery-home-premium-item.has-changed img{
  animation:selvaraGalleryImageIn .85s cubic-bezier(.2,.72,.2,1) both;
}
.gallery-home-premium-item.has-changed::after{
  opacity:.35;
  animation:selvaraGalleryGlow .85s ease both;
}
@keyframes selvaraGalleryImageIn{
  0%{opacity:0;transform:scale(1.065);filter:blur(8px) saturate(.82)}
  100%{opacity:1;transform:scale(1.001);filter:blur(0) saturate(1)}
}
@keyframes selvaraGalleryGlow{
  0%{background:linear-gradient(135deg,rgba(213,239,40,.35),rgba(0,0,0,.18));opacity:.72}
  100%{background:linear-gradient(180deg,transparent,rgba(0,0,0,.18));opacity:.12}
}
@media(prefers-reduced-motion:reduce){
  .gallery-home-premium-item img{
    transition:opacity .2s linear;
  }
  .gallery-home-premium-item.has-changed img,
  .gallery-home-premium-item.has-changed::after{
    animation:none;
  }
}
