.gallery-intro { padding:28px 0 24px; background:var(--soft); }
.gallery-intro .breadcrumbs { margin-bottom:20px; }
.gallery-intro h1 { font-size:clamp(1.9rem,3.3vw,2.75rem); line-height:1.16; margin:0; }
.gallery-section { padding:28px 0 56px; }
.gallery-filters { display:flex; flex-wrap:wrap; gap:10px; }
.gallery-filters button { display:inline-flex; align-items:center; gap:9px; min-height:48px; padding:10px 18px; background:#fff; border:1px solid var(--border); border-radius:8px; font-weight:650; }
.gallery-filters button[aria-pressed=true] { background:var(--accent); border-color:var(--accent); color:#fff; }
.gallery-filters button:hover { border-color:var(--accent); }
.gallery-filters button>span { font-size:.8rem; opacity:.8; }
.gallery-filters .icon { width:19px; height:19px; }
.gallery-toolbar { display:flex; align-items:end; gap:20px; margin:20px 0; }
.gallery-select { display:flex; align-items:center; gap:12px; }
.gallery-select label { font-size:.875rem; font-weight:650; }
.gallery-select select { max-width:100%; width:320px; min-height:44px; border:1px solid #9ba9b5; border-radius:6px; padding:8px 30px 8px 12px; background:#fff; color:var(--text); font-size:1rem; }
.gallery-reset { border:0; background:none; text-decoration:underline; text-underline-offset:4px; color:var(--brand-dark); min-height:44px; padding:8px 0; font-size:.875rem; }
.gallery-count { color:var(--muted); font-size:.875rem; margin:0 0 18px; }
.gallery-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:24px 20px; }
.gallery-card { min-width:0; border:1px solid var(--border); border-radius:12px; overflow:hidden; background:#fff; }
.gallery-open { position:relative; display:block; background:#e9edf0; }
.gallery-open:focus-visible { outline-offset:-5px; }
.gallery-open picture { display:block; }
.gallery-open img { width:100%; height:230px; object-fit:contain; }
.gallery-zoom { position:absolute; bottom:12px; right:12px; display:grid; place-items:center; width:36px; height:36px; background:#fff; color:var(--accent); border-radius:50%; box-shadow:0 2px 8px #0002; }
.gallery-open:hover .gallery-zoom { background:var(--accent); color:#fff; }
.gallery-zoom .icon { width:19px; height:19px; }
.gallery-card figcaption { padding:9px 12px 11px; }
.gallery-type { position:absolute; top:10px; left:10px; max-width:calc(100% - 20px); padding:4px 8px; border:1px solid #ffffffb3; border-radius:6px; background:rgb(255 255 255 / 95%); color:var(--brand-dark); font-size:.6875rem; font-weight:600; line-height:1.4; box-shadow:0 1px 5px #0001; }
.gallery-card h2 { font-size:.8125rem; font-weight:600; letter-spacing:0; line-height:1.4; margin:0 0 4px; }
.gallery-description { font-size:.75rem; line-height:1.45; color:var(--muted); margin:0; }
.gallery-description strong { font-weight:inherit; color:inherit; }
.gallery-more { display:flex; justify-content:center; margin-top:32px; }
.gallery-modal-open { overflow:hidden; }
.gallery-dialog { padding:0; border:0; border-radius:12px; width:min(1120px,calc(100vw - 40px)); max-width:none; max-height:calc(100dvh - 32px); background:#fff; color:var(--text); box-shadow:0 20px 80px #0006; }
.gallery-dialog::backdrop { background:rgb(9 18 26 / 90%); }
.viewer-shell { display:flex; flex-direction:column; }
.viewer-toolbar { display:flex; justify-content:space-between; align-items:center; padding:8px 20px; gap:12px; }
.viewer-position { margin:0; font-size:.875rem; color:var(--muted); }
.viewer-close,.viewer-prev,.viewer-next { display:inline-flex; justify-content:center; align-items:center; min-width:44px; min-height:44px; gap:7px; border:1px solid var(--border); border-radius:8px; background:#fff; }
.viewer-close { padding:7px 12px; font-size:.875rem; }
.viewer-stage { position:relative; display:grid; grid-template-columns:56px minmax(0,1fr) 56px; align-items:center; gap:8px; background:#eef1f3; padding:12px; }
.viewer-media { min-width:0; height:min(60dvh,650px); display:flex; align-items:center; justify-content:center; touch-action:pan-y pinch-zoom; }
.viewer-media img { width:100%; height:100%; object-fit:contain; }
.viewer-prev .icon { transform:rotate(180deg); }
.viewer-prev:disabled,.viewer-next:disabled { opacity:.35; cursor:default; }
.viewer-load { position:absolute; bottom:16px; left:50%; transform:translateX(-50%); background:#fff; border-radius:6px; padding:8px 12px; max-width:75%; text-align:center; font-size:.875rem; }
.viewer-caption { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:18px 24px; }
.viewer-caption>div { max-width:760px; }
.viewer-caption h2 { font-size:1.125rem; line-height:1.4; margin:0 0 6px; }
.viewer-caption p { font-size:.875rem; margin:0; color:var(--muted); }
.viewer-caption .viewer-type { color:var(--brand-dark); font-size:.75rem; font-weight:700; margin-bottom:4px; }
@media(max-width:999px) {
 .gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .viewer-caption { display:block; }
}
@media(max-width:559px) {
 .gallery-intro { padding:20px 0; }
 .gallery-grid { grid-template-columns:1fr; gap:20px; }
 .gallery-filters { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
 .gallery-filters button { padding:10px 12px; }
 .gallery-filters button>span { margin-left:auto; }
 .gallery-toolbar { display:block; margin:16px 0; }
 .gallery-select { display:block; }
 .gallery-select label { display:block; margin-bottom:6px; }
 .gallery-select select { width:100%; }
 .gallery-open img { height:300px; }
 .gallery-dialog { width:100%; max-height:100dvh; height:100dvh; margin:0; border-radius:0; }
 .viewer-toolbar { padding:8px 12px; }
 .viewer-stage { display:block; padding:8px; }
 .viewer-media { height:50dvh; }
 .viewer-prev,.viewer-next { position:absolute; top:50%; transform:translateY(-50%); z-index:1; background:rgb(255 255 255 / 94%); }
 .viewer-prev { left:8px; }
 .viewer-next { right:8px; }
 .viewer-caption { padding:16px; }
 .viewer-close { border:0; }
}
@media(max-height:500px) and (orientation:landscape) {
 .viewer-media { height:55dvh; }
 .viewer-caption { padding:12px 20px; }
}
