
body.zoomed{
  overflow:hidden !important;
  height:100vh !important;
}
.img-gallery-overlay {
  position: fixed;
  inset: 0;
  /*background: rgba(255,255,255,.92);*/
  background: rgba(0,0,0,.92);
  display: none;
  z-index: 9999;
}

/*.dark-mode*/
[data-theme="dark"] .img-gallery-overlay {
  background: rgba(0,0,0,.92);
}

.img-gallery-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-gallery-overlay.open{
  cursor:default !important;
}

.img-gallery-stage {
  max-width: 100vw;
  max-height: 100vh;
  /*overflow: hidden;*/
  overflow: auto;
}

.img-gallery-stage.zoomed {
  overflow: auto;
  width:100% !important;
}

/*content+*/
.img-gallery-content{
  position:absolute;
  bottom:0px;
    width: 100%;
    height: 50%;
  z-index: 11;
  pointer-events: none;
}
.img-gallery-content::after{
  position: absolute;
  inset: 0;
      width: 100%;
    height: 100%;
  content: "";
    z-index: 2;
}
[data-theme="light"] .img-gallery-content::after {
    /*background:*/
    /*    linear-gradient(*/
    /*        to top,*/
    /*        rgba(255,255,255,0.95) 0%,*/
    /*        rgba(255,255,255,0.78) 20%,*/
    /*        rgba(255,255,255,0.35) 45%,*/
    /*        rgba(255,255,255,0.08) 70%,*/
    /*        rgba(255,255,255,0.00) 100%*/
    /*    );*/
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,0.92) 0%,
            rgba(0,0,0,0.72) 22%,
            rgba(0,0,0,0.38) 48%,
            rgba(0,0,0,0.12) 72%,
            rgba(0,0,0,0.00) 100%
        );
}

[data-theme="dark"] .img-gallery-content::after {
    background:
        linear-gradient(
            to top,
            rgba(0,0,0,0.92) 0%,
            rgba(0,0,0,0.72) 22%,
            rgba(0,0,0,0.38) 48%,
            rgba(0,0,0,0.12) 72%,
            rgba(0,0,0,0.00) 100%
        );
}

.img-gallery-text{
  position:absolute;
  bottom:24px;
  /*left:24px;*/
  left:50%;
  transform:translate(-50%, 0);
  width:100%;
  max-width:780px;
  z-index:999;
  color:white;
  /*background:rgba(0,0,0,0.8);*/
  padding:12px 24px 36px 24px;
  /*border-radius:24px;*/
}
.img-gallery-text h2{
  font-size:18px;
  margin-bottom:8px;
}
[data-theme="light"] .img-gallery-text h2{
  /*color: var(--text);*/
  color: var(--text-on-dark);
}
[data-theme="dark"] .img-gallery-text h2{
  color: var(--text);
}

.img-gallery-text p{
  font-size:12px;
}
[data-theme="light"] .img-gallery-text p{
  color: var(--gold);
}
[data-theme="dark"] .img-gallery-text p{
  color: var(--gold);
}


.img-gallery-image {
  display: block;
  margin: auto;
  cursor: zoom-in;
}

.img-gallery-image {
  /*display: block;*/
  /*margin: auto;*/
  /*max-width: 100vw;*/
  /*max-height: 100vh;*/
  /*transform: scale(1);*/
  /*transition: transform 280ms ease;*/
  /*will-change: transform;*/
}
.img-gallery-image{
  transition: transform 280ms ease;
}

.img-gallery-stage.zoomed {
  /*overflow: hidden;*/
  /*display: flex;*/
  /*align-items: center;*/
  /*justify-content: center;*/
}

@media (pointer: fine) {
  .img-gallery-stage.zoomed {
    /*overflow: auto;*/
  }
}

.img-gallery-stage.zoomed .img-gallery-image {
  cursor: zoom-out;
}

.img-gallery-prev,
.img-gallery-next,
.img-gallery-close {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  user-select: none;
  z-index:9999;
}
.img-gallery-prev,
.img-gallery-next,
.img-gallery-close{
  width:40px;
  height:40px;
  background-color:#343434;
  border-radius: 50%;
  display:flex;
  justify-content:center;
  align-items:center;
  transition: background-color 0.2s ease;
  /*opacity:0.5;*/
  /*transition: opacity 0.2s ease;*/
}
.img-gallery-close:hover,
.img-gallery-prev:hover,
.img-gallery-next:hover{
  background-color:#696969;
  /*opacity:1;*/
}
.img-gallery-prev { left: 20px; }
.img-gallery-next { right: 20px; }
.img-gallery-prev svg,
.img-gallery-next svg{
    fill: #fff;
    height: 13px !important;
    margin-top: 1px;
    vertical-align: top;
    width: 15px !important;
}
.img-gallery-next svg {

    margin-left: 1px;
    transform: rotate(180deg);
} 
.img-gallery-close {
  top: 20px;
  right: 25px;
  font-size: 2.5rem;
}
.img-gallery-close svg{
  /*width:100%;*/
  /*height:100%;*/
  /*fill:white;*/
    fill: #fff;
    margin-top: 1px;
    vertical-align: top;
    /*width: 15px;*/
    /*height: 13px;*/
    width: 10px;
    height: 10px;
}

.zoomed .img-gallery-close,
.zoomed .img-gallery-next,
.zoomed .img-gallery-prev{ display:none; }

/*******************/

/*.gallery-section{*/
/*    padding:80px 0;*/
/*    background:#ffffff;*/
/*}*/

/*.dark-mode .gallery-section{*/
/*    background:#0b0b0b;*/
/*}*/

.masonry-gallery.grid-3{
    /*column-count:3;*/
    /*column-gap:18px;*/
    margin-top:40px;
    
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /*grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));*/
    gap: 18px;
    grid-auto-flow: dense;
    
}

@media (max-width: 769px) {

    .masonry-gallery.grid-3{
      grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 469px) {

    .masonry-gallery.grid-3{
      /*grid-template-columns: repeat(1, 1fr);*/
    }

}

.masonry-gallery .item{
  position:relative;
    break-inside:avoid;
    /*margin-bottom:18px;*/
    /*border-radius:10px;*/
    overflow:hidden;
    border:1px solid var(--border);
    background:var(--bg);
}

.item-num{
position:absolute;
top:6px;
left:6px;
z-index:2;
/*color:var(--text-on-dark);*/
font-family: var(--font-mono);
font-size: 18px;
font-weight: 300;
color: var(--text-3);
line-height: 1;
letter-spacing: -0.04em;
margin-bottom: 24px;
transition: color 0.3s;
}

.masonry-gallery img{
    width:100%;
    height:auto;
    display:block;
    cursor:zoom-in;
    transition:transform .35s ease;
}

.masonry-gallery .item:hover img{
    transform:scale(1.03);
}

@media(max-width:1100px){
    .masonry-gallery{ column-count:2; }
}

@media(max-width:700px){

    .masonry-gallery{ column-count:1; }


}


