.page-hero.reference-hero{min-height:260px;background-image:url('assets/projekte/wehrklappe-fischaufstieg.webp');background-position:center 54%}
.reference-nav{border-bottom:1px solid var(--line);background:#fff}
.reference-nav nav{display:flex;gap:10px;flex-wrap:wrap;padding-top:19px;padding-bottom:19px}
.reference-nav a{display:inline-flex;align-items:center;padding:9px 14px;border:1px solid #c5d6e4;color:var(--navy);font-size:.88rem;font-weight:700;text-decoration:none;border-radius:3px}
.reference-nav a:hover,.reference-nav a:focus-visible{background:var(--navy);color:#fff;border-color:var(--navy)}
.reference-section{padding:46px 0 58px}
.reference-section-head{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);align-items:end;gap:32px;margin-bottom:25px}
.reference-section-head h2{font-size:clamp(1.7rem,3vw,2.35rem);margin-bottom:0}
.reference-section-head>p{margin-bottom:0;color:var(--ink);font-size:1.06rem;font-weight:500;line-height:1.65}
.reference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.reference-card{background:#fff;border:1px solid var(--line);overflow:hidden;box-shadow:0 5px 20px rgba(3,35,78,.045)}
.reference-image{display:block;position:relative;width:100%;aspect-ratio:4/3;padding:0;border:0;cursor:zoom-in;background:#e6ecf1;overflow:hidden}
.reference-image img{width:100%;height:100%;object-fit:contain;transition:transform .25s}
.reference-image:hover img{transform:scale(1.025)}
.reference-image:focus-visible{outline:3px solid var(--gold);outline-offset:-3px}
.enlarge-hint{position:absolute;right:10px;bottom:10px;display:flex;align-items:center;gap:6px;padding:5px 9px;background:rgba(6,42,96,.9);color:#fff;font:700 .73rem/1.4 Arial,sans-serif;border-radius:2px}
.enlarge-hint svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}
.reference-copy{padding:23px 23px 25px}
.reference-copy h3{font-size:1.15rem;line-height:1.3;margin-bottom:10px}
.reference-copy p{font-size:.94rem;line-height:1.6;margin-bottom:0;color:#4d5b69}
.reference-lightbox{position:fixed;inset:0;width:min(1250px,calc(100% - 48px));max-width:none;max-height:calc(100dvh - 40px);padding:18px 24px 22px;border:1px solid #47617e;border-radius:4px;background:#082445;color:#fff;box-shadow:0 20px 80px #0008;overflow:auto}
.reference-lightbox::backdrop{background:rgba(1,14,30,.9)}
.lightbox-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}
.lightbox-counter{color:#c6d8eb;font-size:.85rem}
.lightbox-close{display:flex;align-items:center;gap:12px;padding:7px 12px;border:1px solid #849bb5;border-radius:3px;background:transparent;color:#fff;font:700 .9rem Arial,sans-serif;cursor:pointer}
.lightbox-close span{font-size:1.7rem;line-height:1}
.lightbox-stage{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:12px}
.lightbox-image{margin:auto;max-width:100%;width:auto;height:auto;max-height:calc(100dvh - 255px);object-fit:contain}
.lightbox-prev,.lightbox-next{width:42px;min-height:52px;border:1px solid #849bb5;border-radius:3px;background:#163b65;color:#fff;font:2rem Arial,sans-serif;cursor:pointer}
.reference-lightbox button:hover{background:#285480}
.reference-lightbox button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.lightbox-caption{padding:18px 54px 0}
.lightbox-caption h2{font-size:1.25rem;color:#fff;line-height:1.3;margin-bottom:7px}
.lightbox-caption p{margin-bottom:0;color:#d5e2f0;font-size:.94rem}
body.gallery-open{overflow:hidden}
@media(max-width:1050px){.reference-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.reference-section-head{display:block}.reference-section-head>p{max-width:none;margin-top:12px}.reference-nav nav{gap:8px}.reference-nav a{font-size:.8rem;padding:8px 11px}.reference-grid{grid-template-columns:1fr;gap:22px}.reference-section{padding:34px 0 42px}.reference-lightbox{width:calc(100% - 16px);padding:12px;max-height:calc(100dvh - 16px)}.lightbox-stage{grid-template-columns:30px minmax(0,1fr) 30px;gap:6px}.lightbox-prev,.lightbox-next{width:30px;min-height:48px}.lightbox-caption{padding:16px 0 0}.lightbox-image{max-height:calc(100dvh - 310px)}.lightbox-caption h2{font-size:1.1rem}}
@media(prefers-reduced-motion:reduce){.reference-image img{transition:none}}
