/* Coppermine-style gallery content, scoped so it sits inside the active WordPress theme. */
.dfm-gallery,.dfm-album-page,.dfm-photo-page{color:var(--dfm-text,inherit);background:var(--dfm-bg,transparent);font-family:var(--dfm-font,inherit)}
.dfm-gallery a,.dfm-album-page a,.dfm-photo-page a{color:var(--dfm-link,inherit)}
.dfm-gallery a:hover,.dfm-album-page a:hover,.dfm-photo-page a:hover{opacity:.88}
.dfm-cat,.dfm-album,.dfm-grid li,.dfm-photo{border-color:var(--dfm-border,rgba(128,128,128,.25))}
.dfm-cat{border-bottom-style:var(--dfm-border-style,solid)}
.dfm-cat__children{list-style:none;margin:.45em 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.3em .85em;font-size:.9em}
.dfm-cat__children li{margin:0;padding:0}
.dfm-album{background:var(--dfm-card,transparent);border:1px var(--dfm-border-style,solid) var(--dfm-border,transparent);border-radius:var(--dfm-radius,0);padding:.4em}
.dfm-cat__thumb,.dfm-album__thumb{border-radius:var(--dfm-radius,0);overflow:hidden}
.dfm-pager a,.dfm-pager__cur{border-color:var(--dfm-border,rgba(128,128,128,.4));border-style:var(--dfm-border-style,solid);border-radius:var(--dfm-radius,0)}
.dfm-pager__cur{background:var(--dfm-accent,rgba(128,128,128,.15))}
.dfm-crumbs ol{list-style:none;margin:0 0 1em;padding:0;display:flex;flex-wrap:wrap;gap:.4em;font-size:.9em}
.dfm-crumbs li+li::before{content:"›";margin-right:.4em;opacity:.6}
.dfm-cats{display:flex;flex-direction:column;gap:1.25em;margin:1em 0 2em}
.dfm-cat{display:grid;grid-template-columns:var(--dfm-cat-thumb-w,175px) minmax(0,1fr) auto;gap:1.25em;align-items:start;padding:.75em 0 1.25em;border-bottom:1px solid var(--dfm-border,rgba(128,128,128,.25));background:var(--dfm-card,transparent)}
.dfm-cat__thumb{width:var(--dfm-cat-thumb-w,175px);height:var(--dfm-cat-thumb-h,200px);aspect-ratio:var(--dfm-cat-thumb-ratio,175/200)}
.dfm-cat__thumb img,.dfm-cat__thumb .dfm-noimg{display:block;width:100%;height:100%;object-fit:cover}
.dfm-cat__title{margin:0 0 .25em;font-size:1.2em}
.dfm-cat__desc{margin:0;opacity:.85}
.dfm-cat__count{text-align:right;font-size:.9em;opacity:.8;white-space:nowrap}
.dfm-noimg{display:block;background:repeating-linear-gradient(45deg,rgba(128,128,128,.12) 0 8px,rgba(128,128,128,.2) 8px 16px);min-height:60px}
.dfm-albums{list-style:none;margin:1em 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:1.25em}
.dfm-album__thumb{display:block;height:var(--dfm-album-thumb-h,200px);aspect-ratio:var(--dfm-album-thumb-ratio,175/200)}
.dfm-album__thumb img,.dfm-album__thumb .dfm-noimg{display:block;width:100%;height:100%;object-fit:cover}
.dfm-album__title{margin:.4em 0 .1em;font-size:1em}
.dfm-album__meta{margin:0;font-size:.85em;opacity:.8}
.dfm-grid{list-style:none;margin:1em 0;padding:0;display:grid;gap:10px;grid-template-columns:repeat(var(--dfm-cols,5),minmax(0,1fr))}
.dfm-grid li{margin:0;text-align:center}
.dfm-grid img{max-width:100%;height:auto}
.dfm-cols-1{--dfm-cols:1}.dfm-cols-2{--dfm-cols:2}.dfm-cols-3{--dfm-cols:3}.dfm-cols-4{--dfm-cols:4}.dfm-cols-5{--dfm-cols:5}.dfm-cols-6{--dfm-cols:6}.dfm-cols-7{--dfm-cols:7}.dfm-cols-8{--dfm-cols:8}.dfm-cols-9{--dfm-cols:9}.dfm-cols-10{--dfm-cols:10}.dfm-cols-11{--dfm-cols:11}.dfm-cols-12{--dfm-cols:12}
.dfm-sort,.dfm-album-meta{font-size:.9em;opacity:.85}
.dfm-pager{display:flex;flex-wrap:wrap;gap:.4em;margin:1em 0;justify-content:center}
.dfm-pager a,.dfm-pager__cur{padding:.2em .6em;border:1px solid rgba(128,128,128,.4);text-decoration:none}
.dfm-pager__cur{font-weight:700;background:rgba(128,128,128,.15)}
.dfm-photo-nav{display:flex;justify-content:center;gap:1.5em;margin:.5em 0 1em}
.dfm-photo-nav .is-off{opacity:.4}
.dfm-photo{margin:0 0 1.5em;text-align:center}
.dfm-photo__img{max-width:100%;height:auto}
.dfm-photo figcaption{margin-top:.6em;font-size:.95em;opacity:.85}
/* Preview strip inside news/update posts */
.dfm-preview{display:flex;flex-wrap:wrap;gap:8px;margin:1.2em 0;justify-content:center}
.dfm-preview--grid2,.dfm-preview--grid3,.dfm-preview--grid4,.dfm-preview--grid5,.dfm-preview--grid6{display:grid;justify-content:center}
.dfm-preview--grid2{grid-template-columns:repeat(2,175px)}.dfm-preview--grid3{grid-template-columns:repeat(3,175px)}.dfm-preview--grid4{grid-template-columns:repeat(4,175px)}.dfm-preview--grid5{grid-template-columns:repeat(5,175px)}.dfm-preview--grid6{grid-template-columns:repeat(6,175px)}
.dfm-preview__item img,.dfm-preview__item .dfm-noimg{display:block;max-width:100%;height:auto}
@media (max-width:760px){.dfm-preview--grid3,.dfm-preview--grid4,.dfm-preview--grid5,.dfm-preview--grid6{grid-template-columns:repeat(2,minmax(0,175px))}.dfm-cat{grid-template-columns:100px 1fr}.dfm-cat__thumb{width:100px}.dfm-cat__count{grid-column:2;text-align:left}.dfm-grid{--dfm-cols:3}}
/* eLinks */
.dfm-elinks{margin:1.5em 0;padding:.8em 1em;border:1px solid rgba(128,128,128,.35)}
.dfm-elinks--light{background:rgba(255,255,255,.6);color:#222}
.dfm-elinks--dark{background:#1d1f21;color:#eee;border-color:#444}
.dfm-elinks--dark a{color:#9fd0ff}
.dfm-elinks__title{margin:0 0 .4em;font-weight:700;text-decoration:underline}
.dfm-elinks__list{margin:0;padding-left:1.2em}
.dfm-elinks__where{opacity:.7;font-size:.9em}
/* Lightbox */
.dfm-lb{position:fixed;inset:0;background:rgba(0,0,0,.88);display:flex;align-items:center;justify-content:center;z-index:100000;padding:2vmin}
.dfm-lb img{max-width:96vw;max-height:92vh;object-fit:contain}
.dfm-lb__close{position:absolute;top:10px;right:14px;font:700 28px/1 system-ui;color:#fff;background:none;border:0;cursor:pointer;padding:6px 10px}
.dfm-lb__close:focus{outline:2px solid #fff}
/* Layout blocks (Last updated albums, Last additions, Most viewed, Last viewed, Who is online?) */
.dfm-block{margin:0 0 1.75em;padding:1em 1.1em 1.1em;border:1px var(--dfm-border-style,solid) var(--dfm-border,rgba(128,128,128,.3));border-radius:var(--dfm-radius,0);background:var(--dfm-card,transparent)}
.dfm-block__title{margin:0 0 .75em;padding:0 0 .5em;font-size:1.1em;text-transform:uppercase;letter-spacing:.02em;border-bottom:3px solid var(--dfm-accent,rgba(128,128,128,.4))}
.dfm-block__grid{margin:0;gap:12px}
.dfm-tile{padding:.75em .5em;border:1px var(--dfm-border-style,solid) var(--dfm-border,rgba(128,128,128,.25));border-radius:var(--dfm-radius,0);text-align:center;overflow:hidden}
.dfm-tile__thumb{display:block;margin:0 auto .5em;max-width:var(--dfm-thumb-w,175px)}
.dfm-tile__thumb img,.dfm-tile__thumb .dfm-noimg{display:block;width:100%;height:auto;max-height:var(--dfm-thumb-h,200px);object-fit:cover}
.dfm-tile__title{overflow-wrap:anywhere;margin:.2em 0 .4em;font-weight:700;font-size:.95em}
.dfm-tile__meta{margin:.15em 0;font-size:.78em;text-transform:uppercase;letter-spacing:.03em;opacity:.8}
.dfm-stats{margin:.6em 0 1.4em;text-align:center;font-size:.8em;text-transform:uppercase;letter-spacing:.03em;opacity:.85}
.dfm-online{margin:0;line-height:1.7;font-size:.9em}
@media (max-width:760px){.dfm-block__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.dfm-tile--lastalb .dfm-tile__thumb{max-width:var(--dfm-lastalb-thumb-w,175px)}
.dfm-tile--lastalb .dfm-tile__thumb img,.dfm-tile--lastalb .dfm-tile__thumb .dfm-noimg{max-height:var(--dfm-lastalb-thumb-h,200px)}
.dfm-albums{grid-template-columns:repeat(auto-fill,minmax(var(--dfm-album-thumb-w,175px),1fr))}
.dfm-album__thumb{max-width:var(--dfm-album-thumb-w,175px)}

/* ---- Gallery Images widget (.dfm-lw) ---- */
.dfm-lw-align--center{text-align:center}.dfm-lw-align--right{text-align:right}.dfm-lw-align--left{text-align:left}
.dfm-lw--sb-padding{padding-bottom:var(--lw-sb,16px)}.dfm-lw--sb-margin{margin-bottom:var(--lw-sb,16px)}
.dfm-lw{--lw-w:90px;--lw-ratio:1/1;--lw-cols:2;--lw-gap:6px;--lw-bw:0px;--lw-bs:solid;--lw-bc:#ccc;--lw-bh:#e8366d;--lw-pad:0px;--lw-padbg:#fff;--lw-r:0px;max-width:100%}
.dfm-lw__grid{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:var(--lw-gap);width:100%;max-width:calc(var(--lw-cols) * var(--lw-w) + (var(--lw-cols) - 1) * var(--lw-gap))}
.dfm-lw--al-left .dfm-lw__grid{margin-right:auto;justify-content:flex-start}
.dfm-lw--al-center .dfm-lw__grid{margin-left:auto;margin-right:auto;justify-content:center}
.dfm-lw--al-right .dfm-lw__grid{margin-left:auto;justify-content:flex-end}
.dfm-lw__item{margin:0;padding:0;min-width:0;flex:0 0 calc((100% - (var(--lw-cols) - 1) * var(--lw-gap)) / var(--lw-cols));max-width:var(--lw-w)}
.dfm-lw__link{display:block;position:relative;text-decoration:none;color:inherit;transition:transform .25s ease}
/* the frame: border + padding live here; the picture sits inside it */
.dfm-lw__frame{display:flex;box-sizing:border-box;width:100%;aspect-ratio:var(--lw-ratio);border:var(--lw-bw) var(--lw-bs) var(--lw-bc);padding:var(--lw-pad);border-radius:var(--lw-r);transition:box-shadow .25s ease,border-color .25s ease}
.dfm-lw--padfill .dfm-lw__frame{background:var(--lw-padbg)}
.dfm-lw__img{display:block;position:relative;flex:1 1 auto;min-width:0;min-height:0;overflow:hidden;background:rgba(128,128,128,.15);border-radius:max(0px,calc(var(--lw-r) - var(--lw-bw) - var(--lw-pad)))}
.dfm-lw__img img,.dfm-lw__img .dfm-noimg{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;transition:transform .35s ease,filter .3s ease,opacity .3s ease}
.dfm-lw__more{margin:.6em 0 0}
.dfm-lw__note{font-size:.85em;opacity:.7;margin:0}
/* shape */
.dfm-lw--shape-rounded{--lw-r:12px}
.dfm-lw--shape-circle{--lw-r:50%}
.dfm-lw--shape-circle .dfm-lw__img{border-radius:50%}
/* shadow */
.dfm-lw--sh-soft .dfm-lw__frame{box-shadow:0 2px 8px rgba(0,0,0,.3)}
.dfm-lw--sh-strong .dfm-lw__frame{box-shadow:0 5px 16px rgba(0,0,0,.55)}
/* colour treatment */
.dfm-lw--fx-gray .dfm-lw__img img{filter:grayscale(1)}
.dfm-lw--fx-sepia .dfm-lw__img img{filter:sepia(.85)}
.dfm-lw--fx-muted .dfm-lw__img img{filter:saturate(.45)}
.dfm-lw--fx-dim .dfm-lw__img img{filter:brightness(.75)}
/* hover (also for keyboard focus) */
.dfm-lw--bhover .dfm-lw__link:hover .dfm-lw__frame,.dfm-lw--bhover .dfm-lw__link:focus-visible .dfm-lw__frame{border-color:var(--lw-bh)}
.dfm-lw--hv-zoom .dfm-lw__link:hover img,.dfm-lw--hv-zoom .dfm-lw__link:focus-visible img{transform:scale(1.14)}
.dfm-lw--hv-lift .dfm-lw__link:hover,.dfm-lw--hv-lift .dfm-lw__link:focus-visible{transform:translateY(-4px)}
.dfm-lw--hv-lift .dfm-lw__link:hover .dfm-lw__frame,.dfm-lw--hv-lift .dfm-lw__link:focus-visible .dfm-lw__frame{box-shadow:0 8px 14px rgba(0,0,0,.35)}
.dfm-lw--hv-brighten .dfm-lw__link:hover img,.dfm-lw--hv-brighten .dfm-lw__link:focus-visible img{filter:brightness(1.18)}
.dfm-lw--hv-fade .dfm-lw__link:hover img,.dfm-lw--hv-fade .dfm-lw__link:focus-visible img{opacity:.7}
.dfm-lw--hv-reveal .dfm-lw__link:hover img,.dfm-lw--hv-reveal .dfm-lw__link:focus-visible img{filter:none}
.dfm-lw--hv-gray .dfm-lw__link:hover img,.dfm-lw--hv-gray .dfm-lw__link:focus-visible img{filter:grayscale(1)}
.dfm-lw--hv-tilt .dfm-lw__link:hover,.dfm-lw--hv-tilt .dfm-lw__link:focus-visible{transform:rotate(-3deg) scale(1.05)}
.dfm-lw--hv-glow .dfm-lw__link:hover .dfm-lw__frame,.dfm-lw--hv-glow .dfm-lw__link:focus-visible .dfm-lw__frame{box-shadow:0 0 12px 3px var(--dfm-link,#4aa3ff)}
/* captions */
.dfm-lw__cap{font-size:.8em;line-height:1.25;overflow-wrap:anywhere}
.dfm-lw--cap-below .dfm-lw__cap{display:block;margin-top:.3em}
.dfm-lw--cap-hover .dfm-lw__cap{position:absolute;left:0;right:0;bottom:0;padding:.4em .5em;background:rgba(0,0,0,.72);color:#fff;text-align:inherit;transform:translateY(100%);transition:transform .25s ease;pointer-events:none}
.dfm-lw--cap-hover .dfm-lw__link:hover .dfm-lw__cap,.dfm-lw--cap-hover .dfm-lw__link:focus-visible .dfm-lw__cap{transform:translateY(0)}
@media (prefers-reduced-motion:reduce){.dfm-lw__link,.dfm-lw__frame,.dfm-lw__img img,.dfm-lw__cap{transition:none!important}.dfm-lw--hv-lift .dfm-lw__link:hover,.dfm-lw--hv-tilt .dfm-lw__link:hover,.dfm-lw--hv-zoom .dfm-lw__link:hover img{transform:none!important}}

/* Cell styling: category cells, thumbnail cells and block panels. Every var is optional; the fallbacks are the original look. */
.dfm-gallery .dfm-cat{padding:var(--dfm-cat-pad,.75em 0 1.25em);background-color:var(--dfm-cat-bg,var(--dfm-card,transparent));background-image:var(--dfm-cat-img,none);background-size:var(--dfm-cat-img-size,cover);background-position:var(--dfm-cat-img-pos,center);background-repeat:var(--dfm-cat-img-repeat,no-repeat);color:var(--dfm-cat-text,inherit);font-family:var(--dfm-cat-font,inherit)}
.dfm-gallery .dfm-album{padding:var(--dfm-thumb-pad,.4em)}
.dfm-gallery .dfm-tile{padding:var(--dfm-thumb-pad,.75em .5em)}
.dfm-gallery .dfm-grid li:not(.dfm-tile),.dfm-album-page .dfm-grid li:not(.dfm-tile){padding:var(--dfm-thumb-pad,0)}
.dfm-gallery .dfm-album,.dfm-gallery .dfm-tile,.dfm-gallery .dfm-grid li,.dfm-album-page .dfm-grid li{background-image:var(--dfm-thumb-img,none);background-size:var(--dfm-thumb-img-size,cover);background-position:var(--dfm-thumb-img-pos,center);background-repeat:var(--dfm-thumb-img-repeat,no-repeat);color:var(--dfm-thumb-text,inherit);font-family:var(--dfm-thumb-font,inherit)}
.dfm-gallery .dfm-album{background-color:var(--dfm-thumb-bg,var(--dfm-card,transparent))}
.dfm-gallery .dfm-tile,.dfm-gallery .dfm-grid li,.dfm-album-page .dfm-grid li{background-color:var(--dfm-thumb-bg,transparent)}
.dfm-gallery .dfm-block{padding:var(--dfm-block-pad,1em 1.1em 1.1em);background-color:var(--dfm-block-bg,var(--dfm-card,transparent));background-image:var(--dfm-block-img,none);background-size:var(--dfm-block-img-size,cover);background-position:var(--dfm-block-img-pos,center);background-repeat:var(--dfm-block-img-repeat,no-repeat);color:var(--dfm-block-text,inherit);font-family:var(--dfm-block-font,inherit)}

/* Album list as cards: title bar, then a bordered cell with the picture beside the details (Coppermine-style). */
.dfm-gallery .dfm-albums--card{grid-template-columns:repeat(auto-fit,minmax(min(100%,max(15em,calc((100% - (var(--dfm-album-cols,2) - 1) * 2.5em) / var(--dfm-album-cols,2)))),1fr));gap:2.25em 2.5em;margin:1.5em 0 2em}
.dfm-gallery .dfm-albums--card .dfm-album--card{background:none;background-image:none;border:0;border-radius:0;padding:0;color:inherit;font-family:inherit;min-width:0}
.dfm-album--card .dfm-album__title{display:flex;align-items:center;gap:.7em;margin:0 0 .9em;font-style:italic;font-weight:700;font-size:1.05em;line-height:1.2;overflow-wrap:break-word;min-width:0}
.dfm-album--card .dfm-album__title::before{content:"";flex:0 0 2.4em;height:1.2em;background:var(--dfm-album-head,var(--dfm-link,currentColor))}
.dfm-album--card .dfm-album__title::after{content:"";flex:1 1 0;min-width:.5em;height:1.2em;background:var(--dfm-album-bar,currentColor)}
.dfm-album--card .dfm-album__title a{flex:0 1 auto;text-decoration:none}
.dfm-gallery .dfm-album--card .dfm-album__body{display:flex;flex-wrap:wrap;align-items:stretch;border:1px var(--dfm-border-style,solid) var(--dfm-border,rgba(128,128,128,.3));border-radius:var(--dfm-radius,0);padding:var(--dfm-thumb-pad,0);background-color:var(--dfm-thumb-bg,var(--dfm-card,transparent));background-image:var(--dfm-thumb-img,none);background-size:var(--dfm-thumb-img-size,cover);background-position:var(--dfm-thumb-img-pos,center);background-repeat:var(--dfm-thumb-img-repeat,no-repeat);color:var(--dfm-thumb-text,inherit);font-family:var(--dfm-thumb-font,inherit)}
.dfm-album--card .dfm-album__pic{flex:0 0 auto;display:flex;align-items:center;justify-content:center;padding:1.25em;border-right:1px var(--dfm-border-style,solid) var(--dfm-border,rgba(128,128,128,.3))}

.dfm-album--card .dfm-album__info{flex:1 1 11em;min-width:0;padding:1.5em 1.5em;font-size:.95em}
.dfm-album--card .dfm-album__info p{margin:0 0 .75em}
.dfm-album--card .dfm-album__info p:last-child{margin-bottom:0}
@media (max-width:700px){.dfm-gallery .dfm-albums--card{grid-template-columns:minmax(0,1fr)}}
.dfm-album--card .dfm-album__meta,.dfm-album--card .dfm-album__views{font-size:.9em;opacity:1;text-transform:none;letter-spacing:0;font-weight:400}

/* Picture left, details to its right and top-aligned (details only drop below the picture when there is truly no room). */
.dfm-album--card .dfm-album__pic{max-width:100%;align-self:stretch}
.dfm-album--card .dfm-album__info{flex:1 1 8em;padding:1.25em 1.25em;text-align:left}
