/*
 * Daly Landscaping — assets/css/daly-gallery-enhancements.css
 * Gallery layout, interactions and dialog presentation.
 * Maintenance: avoid editing third-party vendor bundles; regression-test changes.
 */
/* Gallery cards and in-page photograph viewer */
.daly-gallery-trigger{position:relative;display:block;width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in;text-align:left;overflow:hidden}
.daly-gallery-trigger img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .25s ease}
.daly-gallery-trigger:hover img{transform:scale(1.035)}
.daly-gallery-trigger:focus-visible{outline:3px solid #44842c;outline-offset:3px}
.daly-gallery-trigger .daly-photo-label{pointer-events:none}
.daly-lightbox[hidden]{display:none!important}
.daly-lightbox{position:fixed;inset:0;z-index:99999;background:rgba(8,16,10,.94);display:flex;align-items:center;justify-content:center;padding:18px;color:#fff}
body.daly-lightbox-open{overflow:hidden}
.daly-lightbox-panel{position:relative;width:min(1100px,100%);max-height:96vh;display:flex;align-items:center;justify-content:center}
.daly-lightbox figure{margin:0;width:100%;text-align:center}
.daly-lightbox-image{display:block;margin:auto;max-width:100%;max-height:calc(96vh - 145px);object-fit:contain}
.daly-lightbox figcaption{display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 45px 0;line-height:1.35}
.daly-lightbox-title{font-size:clamp(17px,2vw,23px);color:white}
.daly-lightbox-description{font-size:14px;color:#e0e8df}
.daly-lightbox-count{font-size:12px;color:#c1cfc1}
.daly-lightbox button{border:0;color:#fff;background:rgba(30,54,34,.78);cursor:pointer;border-radius:50%;width:43px;height:43px;display:grid;place-items:center;font-size:26px}
.daly-lightbox button:hover,.daly-lightbox button:focus-visible{background:#3f7c36;outline:2px solid #fff}
.daly-lightbox-close{position:absolute;right:0;top:0;z-index:2}
.daly-lightbox-prev,.daly-lightbox-next{position:absolute;top:43%;z-index:2}
.daly-lightbox-prev{left:0}.daly-lightbox-next{right:0}
@media(max-width:600px){.daly-lightbox{padding:8px}.daly-lightbox-image{max-height:calc(94vh - 165px)}.daly-lightbox figcaption{padding:14px 22px 0}.daly-lightbox-prev,.daly-lightbox-next{top:40%;width:35px!important;height:35px!important}}

/* Ensure gallery cards sit above Gardeno's decorative gallery overlays. */
#daly-project-gallery .daly-gallery-card{position:relative;isolation:isolate}
#daly-project-gallery .daly-gallery-trigger{position:relative;z-index:10;touch-action:manipulation}
#daly-project-gallery .daly-gallery-card::before,#daly-project-gallery .daly-gallery-card::after{pointer-events:none!important}
.daly-lightbox{z-index:2147483647!important;touch-action:pan-y}
.daly-lightbox-panel{z-index:1}
.daly-lightbox-close{top:8px;right:8px}

/* Native modal: showModal() puts the viewer above all template stacking contexts. */
dialog.daly-lightbox{border:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;padding:18px;position:fixed;inset:0;background:rgba(8,16,10,.96);color:#fff;overflow:auto}
dialog.daly-lightbox:not([open]){display:none!important}
dialog.daly-lightbox[open]{display:flex!important;align-items:center;justify-content:center}
dialog.daly-lightbox::backdrop{background:rgba(8,16,10,.96)}
@media(max-width:600px){dialog.daly-lightbox{padding:8px}}

/* Bootstrap owns all column widths and wrapping. Cards never span rows or columns. */
#daly-project-gallery .daly-gallery-cell {min-width:0;}
#daly-project-gallery .gallary-image {height:100%;min-height:0;overflow:hidden;border-radius:18px;}
#daly-project-gallery .daly-gallery-trigger {height:100%;aspect-ratio:4/3;display:block;}
#daly-project-gallery .daly-gallery-trigger img {display:block;width:100%;height:100%;min-height:0;max-height:none;object-fit:cover;}
@media(max-width:767.98px){
  #daly-project-gallery .daly-gallery-trigger {aspect-ratio: 4/3;}
}

/* Definitive gallery sizing: neutralise legacy Gardeno image sizing. Bootstrap controls columns. */
#projects .daly-gallery-container {padding-inline:clamp(12px,1.3vw,24px);}
#projects #daly-project-gallery {display:flex;flex-wrap:wrap;align-items:stretch;}
#projects #daly-project-gallery > .daly-gallery-cell {display:flex;min-width:0;float:none;}
#projects #daly-project-gallery .daly-gallery-card {position:relative;display:block;width:100%;height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden;border-radius:18px;}
#projects #daly-project-gallery .daly-gallery-trigger {position:relative;display:block;width:100%;height:auto!important;aspect-ratio:4/3;min-height:0!important;max-height:none!important;overflow:hidden;}
#projects #daly-project-gallery .daly-gallery-trigger img {position:absolute;inset:0;display:block;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;object-fit:cover;}
#projects #daly-project-gallery .daly-photo-label {z-index:2;}
@media(max-width:767.98px){#projects #daly-project-gallery .daly-gallery-trigger {aspect-ratio:4/3;}}

/* Gallery polish: filter chips, photographic gradient, and understated hover movement. */
#projects .daly-gallery-filter-wrap{margin-bottom:28px}
#projects .daly-gallery-filters{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}
#projects .daly-gallery-filter{appearance:none;border:1px solid #c9d7cd;background:#fff;color:#254239;border-radius:999px;padding:10px 19px;font-weight:650;font-size:14px;line-height:1.3;cursor:pointer;transition:background-color .2s,color .2s,border-color .2s,transform .2s}
#projects .daly-gallery-filter:hover{background:#edf5ee;border-color:#438052;transform:translateY(-2px)}
#projects .daly-gallery-filter.is-active{background:#285e3b;color:#fff;border-color:#285e3b}
#projects .daly-gallery-filter:focus-visible{outline:3px solid #d5a95b;outline-offset:3px}
#projects #daly-project-gallery .daly-gallery-card{box-shadow:0 8px 28px rgba(15,37,23,.11);transition:box-shadow .3s ease,transform .3s ease}
#projects #daly-project-gallery .daly-gallery-card:hover{box-shadow:0 17px 38px rgba(15,37,23,.19);transform:translateY(-3px)}
#projects #daly-project-gallery .daly-gallery-trigger img{transition:transform .55s cubic-bezier(.2,.75,.3,1)}
#projects #daly-project-gallery .daly-gallery-trigger:hover img,#projects #daly-project-gallery .daly-gallery-trigger:focus-visible img{transform:scale(1.055)}
#projects #daly-project-gallery .daly-gallery-caption{position:absolute;inset:auto 0 0;z-index:11;display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:58px 22px 20px;color:#fff;background:linear-gradient(0deg,rgba(8,25,17,.88),rgba(8,25,17,.48) 55%,transparent);pointer-events:none;text-align:left}
#projects #daly-project-gallery .daly-gallery-caption .daly-photo-label{position:static!important;display:block!important;margin:0!important;padding:0!important;transform:none!important;background:none!important;color:#fff!important;font-size:clamp(16px,1.7vw,21px)!important;font-weight:700!important;line-height:1.25!important;opacity:1!important;visibility:visible!important;box-shadow:none!important}
#projects #daly-project-gallery .daly-gallery-view{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#d7edda;opacity:.88;transition:transform .25s,opacity .25s}
#projects #daly-project-gallery .daly-gallery-trigger:hover .daly-gallery-view,#projects #daly-project-gallery .daly-gallery-trigger:focus-visible .daly-gallery-view{transform:translateX(4px);opacity:1}
@media(max-width:600px){#projects .daly-gallery-filter{padding:9px 13px;font-size:13px}#projects #daly-project-gallery .daly-gallery-caption{padding:48px 16px 15px}}
@media(prefers-reduced-motion:reduce){#projects .daly-gallery-filter,#projects #daly-project-gallery .daly-gallery-card,#projects #daly-project-gallery .daly-gallery-trigger img,#projects #daly-project-gallery .daly-gallery-view{transition:none!important}#projects .daly-gallery-filter:hover,#projects #daly-project-gallery .daly-gallery-card:hover,#projects #daly-project-gallery .daly-gallery-trigger:hover img{transform:none!important}}

#projects .daly-gallery-filter[hidden]{display:none!important}

/* Fullscreen viewing and touch-friendly pinch zoom (image only). */
.daly-lightbox-fullscreen{position:absolute;right:60px;top:8px;z-index:3;font-size:23px!important}
.daly-lightbox-panel:fullscreen{width:100vw;height:100dvh;max-height:none;max-width:none;background:#08100a;padding:20px;box-sizing:border-box}
.daly-lightbox-panel:fullscreen .daly-lightbox-image{max-height:calc(100dvh - 130px)}
.daly-lightbox figure{touch-action:pan-y;overflow:hidden}
.daly-lightbox figure.is-zoomed{touch-action:none}
.daly-lightbox-image{transform-origin:center center;transition:transform .16s ease}
@media(max-width:600px){.daly-lightbox-fullscreen{right:59px;top:8px}}
/* Progressive card reveals: cards remain visible if JS/observer is unavailable. */
@media(prefers-reduced-motion:no-preference){
  #projects #daly-project-gallery .daly-gallery-cell.daly-reveal-ready{opacity:0;transform:translateY(16px);transition:opacity .48s ease,transform .48s cubic-bezier(.2,.7,.2,1);transition-delay:var(--daly-reveal-delay,0ms)}
  #projects #daly-project-gallery .daly-gallery-cell.daly-reveal-ready.daly-is-visible{opacity:1;transform:none}
  #projects #daly-gallery-more{transition:transform .22s ease,box-shadow .22s ease}
  #projects #daly-gallery-more:hover{transform:translateY(-2px)}
}
@media(prefers-reduced-motion:reduce){.daly-lightbox-image{transition:none!important}}
