/* DevD2 dark mode. Loaded after the Elementor CSS; only active when <html data-theme="dark">.
   Photographs are never filtered or recoloured. Logos keep their original colours (dimmed until hover). */
html[data-theme="dark"] { color-scheme: dark; --dd-bg:#0b0f17; --dd-panel:#121826; --dd-text:#cfd6e2; --dd-head:#f2f5fa; --dd-link:#8fc0ff; --dd-line:#26324a; }
html[data-theme="dark"] body { background: var(--dd-bg) !important; color: var(--dd-text); }
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,.entry-title,.elementor-heading-title,.elementor-image-box-title) { color: var(--dd-head) !important; }
html[data-theme="dark"] :is(p,li,td,th,label,figcaption,.wp-caption-text,.elementor-widget-text-editor,.elementor-icon-box-description,.elementor-image-box-description) { color: var(--dd-text) !important; }
html[data-theme="dark"] a:not(.elementor-button):not(.dd-btn) { color: var(--dd-link) !important; }
html[data-theme="dark"] a:not(.elementor-button):not(.dd-btn):hover { color: #fff !important; }
html[data-theme="dark"] :is(.site-header,.site-footer,#content,main,.page-content) { background: transparent !important; }
html[data-theme="dark"] .site-footer, html[data-theme="dark"] .site-footer * { color: #8f9bb0 !important; }
html[data-theme="dark"] hr, html[data-theme="dark"] .elementor-divider-separator { border-color: var(--dd-line) !important; }
html[data-theme="dark"] :is(.elementor-widget-icon-box,.elementor-cta,.comment-respond) { background: var(--dd-panel) !important; }
html[data-theme="dark"] .elementor-widget-wrap.elementor-element-populated:has(.elementor-widget-image-box) { background-color: var(--dd-panel) !important; box-shadow: 0 0 0 1px var(--dd-line); }
html[data-theme="dark"] .dd-decor { filter: brightness(.05); }
/* logos: original colours, dimmed until hover; they sit on a light plate so dark artwork stays visible */
html[data-theme="dark"] :is(img.custom-logo,.swiper-slide-image) { opacity: .55; transition: opacity .25s ease; filter: none !important; }
html[data-theme="dark"] :is(img.custom-logo,.swiper-slide-image):hover, html[data-theme="dark"] :is(a:focus-visible,a:hover) img.custom-logo { opacity: 1; }
html[data-theme="dark"] .swiper-slide-image { background: #eef2f8; padding: 10px 14px; border-radius: 10px; box-sizing: border-box; }
html[data-theme="dark"] img.custom-logo { background: #eef2f8; padding: 6px 10px; border-radius: 8px; box-sizing: content-box; }

/* theme toggle */
.dd-theme { position: fixed; top: 12px; right: 12px; z-index: 60; border: 1px solid #3a4a6a; background: rgba(11,15,23,.78); color: #dfe7f5; font: 600 13px/1 system-ui,sans-serif; padding: 9px 12px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); }
.dd-theme:hover, .dd-theme:focus-visible { background: #1b2740; outline: 2px solid #8fc0ff; outline-offset: 2px; }
html:not([data-theme="dark"]) .dd-theme { background: rgba(255,255,255,.85); color: #223; border-color: #b9c4d6; }

/* lightbox */
img.dd-zoom { cursor: zoom-in; }
.dd-lb { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(5,8,13,.94); }
.dd-lb.open { display: flex; }
.dd-lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.dd-lb img { width: auto; height: auto; max-width: calc(100vw - 96px); max-height: calc(100vh - 140px); object-fit: contain; display: block; border-radius: 2px; box-shadow: 0 12px 60px rgba(0,0,0,.6); }
.dd-lb figcaption { margin-top: 10px; color: #aeb9cc !important; font: 14px/1.3 system-ui,sans-serif; text-align: center; min-height: 18px; }
.dd-lb .dd-n, .dd-lb .dd-x, .dd-lb .dd-h { position: absolute; color: #cfd6e2; font: 13px system-ui,sans-serif; }
.dd-lb .dd-x { top: 14px; right: 16px; font-size: 26px; background: none; border: 0; cursor: pointer; padding: 4px 10px; }
.dd-lb .dd-n { top: 18px; left: 18px; }
.dd-lb .dd-h { bottom: 12px; left: 0; right: 0; text-align: center; opacity: .6; }
.dd-lb .dd-p, .dd-lb .dd-nx { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #cfd6e2; font-size: 38px; cursor: pointer; padding: 18px 14px; opacity: .7; }
.dd-lb .dd-p { left: 6px; } .dd-lb .dd-nx { right: 6px; }
.dd-lb :is(.dd-p,.dd-nx,.dd-x):hover, .dd-lb :is(.dd-p,.dd-nx,.dd-x):focus-visible { opacity: 1; outline: 2px solid #8fc0ff; }
.dd-lb.playing .dd-n::after { content: "  ▶ slideshow"; color: #8fc0ff; }
@media (prefers-reduced-motion: reduce) { html[data-theme="dark"] :is(img.custom-logo,.swiper-slide-image) { transition: none; } }
html[data-theme="dark"] .elementor-shape .elementor-shape-fill { fill: var(--dd-bg) !important; }
