/* SH Visual: project galleries v1.0
   Layout comes from CSS classes on Elementor containers:
   .shv-gal     one image set; every frame in it opens in the same lightbox slideshow
     .shv-mosaic  the first five frames: one large, four small
     .shv-extra   the rest, revealed by the .shv-more button
     .shv-grid3 .shv-grid4 .shv-duo .shv-single .shv-tall .shv-stack  other set layouts
   .shv-tile > .shv-frame > image widget, followed by a .shv-cap caption heading
   Frame modifier: .shv-contain keeps a whole drawing visible. */

.shv-gal{--shv-gap:16px;--shv-row:22px}
.e-con.shv-gal{gap:var(--shv-row)!important}
.e-con.shv-mosaic,.e-con.shv-extra,.e-con.shv-grid3,.e-con.shv-grid4,.e-con.shv-duo,.e-con.shv-single,.e-con.shv-tall,.e-con.shv-stack{display:grid!important;gap:var(--shv-gap);align-items:stretch;padding:0!important;width:100%}
.e-con.shv-mosaic{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-flow:row dense}
.e-con.shv-mosaic>.shv-tile:first-child{grid-column:span 2;grid-row:span 2}
.e-con.shv-mosaic.shv-flip>.shv-tile:first-child{grid-column:3/span 2;grid-row:1/span 2}
.e-con.shv-grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
.e-con.shv-grid4{grid-template-columns:repeat(4,minmax(0,1fr))}
.e-con.shv-duo{grid-template-columns:repeat(2,minmax(0,1fr))}
.e-con.shv-single{grid-template-columns:minmax(0,1fr)}
.e-con.shv-tall{grid-template-columns:repeat(6,minmax(0,1fr))}
.e-con.shv-tall>.shv-tile{grid-column:span 2}
.e-con.shv-tall>.shv-tile.shv-wide{grid-column:span 3}
.e-con.shv-stack{grid-template-columns:repeat(3,minmax(0,1fr))}
.e-con.shv-stack>.shv-tile:nth-child(-n+2){grid-row:span 2}

/* The rest of a set: three across, rows balanced so none is left half empty */
@media (min-width:1025px){
.e-con.shv-extra{grid-template-columns:repeat(6,minmax(0,1fr))}
.e-con.shv-extra>.shv-tile{grid-column:span 2}
.e-con.shv-extra>.shv-tile:nth-child(3n+1):nth-last-child(2),.e-con.shv-extra>.shv-tile:nth-child(3n+1):nth-last-child(2)~.shv-tile,.e-con.shv-extra>.shv-tile:nth-child(3n+1):nth-last-child(4),.e-con.shv-extra>.shv-tile:nth-child(3n+1):nth-last-child(4)~.shv-tile{grid-column:span 3}
.e-con.shv-extra>.shv-tile:only-child{grid-column:1/-1}
}
.e-con.shv-extra>.shv-tile:only-child>.shv-frame{aspect-ratio:21/9}

/* Tiles and frames */
.e-con.shv-tile{display:flex!important;flex-direction:column;gap:10px;min-width:0;padding:0!important}
.e-con.shv-frame{display:block!important;position:relative;overflow:hidden;border-radius:14px;background:#E7DDD1;aspect-ratio:3/2;padding:0!important;transform:translateZ(0);transition:transform .5s cubic-bezier(.2,.7,.2,1),box-shadow .5s cubic-bezier(.2,.7,.2,1)}
.e-con.shv-frame>.elementor-element,.shv-frame .elementor-widget-container,.shv-frame a{display:block!important;width:100%!important;height:100%!important;margin:0!important;max-width:none!important}
.shv-frame img{display:block!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover;border-radius:0!important;transition:transform .9s cubic-bezier(.2,.7,.2,1)}
.shv-frame a{cursor:zoom-in}
.shv-frame.shv-contain img{object-fit:contain;padding:5%;box-sizing:border-box}
.shv-tall>.shv-tile:not(.shv-wide)>.shv-frame{aspect-ratio:2/3}
.shv-single>.shv-tile>.shv-frame{aspect-ratio:16/9}
.shv-duo>.shv-tile>.shv-frame{aspect-ratio:16/10}
.shv-mosaic>.shv-tile:first-child>.shv-frame,.shv-stack>.shv-tile:nth-child(-n+2)>.shv-frame{aspect-ratio:auto;flex:1 1 auto;min-height:0}
.shv-cap .elementor-heading-title{transition:color .3s ease}
.shv-frame a:focus-visible{outline:2px solid #211B18;outline-offset:-5px}
@media (hover:hover){
.shv-tile:hover>.shv-frame{transform:translateY(-3px);box-shadow:0 18px 40px rgba(120,98,78,.10)}
.shv-tile:hover>.shv-frame img{transform:scale(1.045)}
.shv-tile:hover .shv-cap .elementor-heading-title{color:#2B2320!important}
}

/* View all / Show fewer */
html.shv-js .shv-gal:not(.is-open) .shv-extra{display:none!important}
.shv-gal.is-open .shv-extra>.shv-tile{animation:shv-in .6s cubic-bezier(.2,.7,.2,1) both;animation-delay:calc(var(--i,0) * 50ms)}
@keyframes shv-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
html:not(.shv-js) .shv-more{display:none!important}
.shv-more .elementor-button-text::after{content:"+";display:inline-block;margin-left:.75em;font-size:1.35em;font-weight:300;line-height:0;vertical-align:-.06em;transition:transform .35s cubic-bezier(.2,.7,.2,1)}
.shv-gal.is-open .shv-more .elementor-button-text::after{transform:rotate(45deg)}
body.elementor-editor-active .shv-gal .shv-extra{display:grid!important}

/* Gallery filter chips */
.e-con.shv-filter{display:flex!important;flex-wrap:wrap;gap:8px}
.shv-filter .elementor-button{transition:background-color .25s ease,color .25s ease,border-color .25s ease}
.shv-filter .elementor-button.is-active{background-color:#211B18!important;border-color:#211B18!important;color:#F7F2EB!important}
.shv-filter .elementor-button.is-active .elementor-button-text{color:#F7F2EB!important}
html.shv-js .shv-block.is-hidden{display:none!important}
.shv-block.is-shown{animation:shv-in .5s cubic-bezier(.2,.7,.2,1) both}

@media (max-width:1024px){
.shv-gal{--shv-gap:12px}
.e-con.shv-grid3,.e-con.shv-grid4{grid-template-columns:repeat(2,minmax(0,1fr))}
.e-con.shv-grid3>.shv-tile:first-child:nth-last-child(3){grid-column:1/-1}
.e-con.shv-extra{grid-template-columns:repeat(2,minmax(0,1fr))}
.e-con.shv-extra>.shv-tile:last-child:nth-child(odd){grid-column:1/-1}
.e-con.shv-extra>.shv-tile:last-child:nth-child(odd)>.shv-frame{aspect-ratio:21/9}
}
@media (max-width:767px){
.shv-gal{--shv-gap:10px;--shv-row:18px}
.e-con.shv-mosaic{grid-template-columns:repeat(2,minmax(0,1fr))}
.e-con.shv-mosaic>.shv-tile:first-child,.e-con.shv-mosaic.shv-flip>.shv-tile:first-child{grid-column:1/-1;grid-row:auto}
.shv-mosaic>.shv-tile:first-child>.shv-frame{aspect-ratio:16/10;flex:none}
.e-con.shv-duo{grid-template-columns:minmax(0,1fr)}
.e-con.shv-stack{grid-template-columns:repeat(2,minmax(0,1fr))}
.e-con.shv-stack>.shv-tile:nth-child(-n+2){grid-row:auto}
.shv-stack>.shv-tile:nth-child(-n+2)>.shv-frame{aspect-ratio:2/3;flex:none}
.shv-cap .elementor-heading-title{font-size:10px!important;letter-spacing:.12em!important}
.e-con.shv-filter{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-bottom:4px!important}
.e-con.shv-filter::-webkit-scrollbar{display:none}
.shv-filter>.elementor-element{flex:0 0 auto}
}
@media (prefers-reduced-motion:reduce){
.shv-frame,.shv-frame img,.shv-cap .elementor-heading-title,.shv-more .elementor-button-text::after{transition:none!important}
.shv-gal.is-open .shv-extra>.shv-tile,.shv-block.is-shown{animation:none!important}
.shv-tile:hover>.shv-frame,.shv-tile:hover>.shv-frame img{transform:none!important}
}
