/* Gallery styles are scoped; the existing ErgoMed design remains authoritative. */
body.ergomed-design .eg-gallery{color:#1D324B;background:#fff}
.eg-gallery-wrap{width:calc(100% - 48px);max-width:1240px;margin:auto}
.eg-gallery-intro{position:relative;overflow:hidden;background:#F1F9F4;padding:28px 0 60px}
.eg-gallery-intro::after{content:"";position:absolute;right:-10%;bottom:-115px;width:48%;height:190px;border-radius:50%;background:#B8E2D4;transform:rotate(-12deg);pointer-events:none}
.eg-gallery-intro nav{font-size:14px;margin-bottom:40px}
.eg-gallery-intro nav a{color:#3C765D}
body.ergomed-design .eg-gallery .eyebrow{font-size:13px;font-weight:700;letter-spacing:1.8px;margin:0 0 16px}
body.ergomed-design .eg-gallery h1{font:700 clamp(36px,4vw,58px)/1.12 Arial,Helvetica,sans-serif;margin:0 0 22px;letter-spacing:-1.6px}
.eg-gallery h1 span{color:#3C765D}
.eg-gallery-intro .eg-gallery-wrap>p:last-child{max-width:650px;font-size:18px;line-height:1.7;margin:0}
.eg-gallery-content{padding-top:44px;padding-bottom:64px}
.eg-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:30px}
.eg-gallery-card{margin:0;border:1px solid #d8e6de;border-radius:16px;overflow:hidden;background:#F1F9F4}
.eg-gallery-card:first-child{grid-column:1/-1}
.eg-gallery-card>a{display:block;position:relative;overflow:hidden;background:#B8E2D4}
.eg-gallery-card img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;transition:transform .3s ease}
.eg-gallery-card:first-child img{aspect-ratio:2/1;object-position:center 56%}
.eg-gallery-card>a:hover img{transform:scale(1.025)}
.eg-gallery-card>a:focus-visible{outline:3px solid #3C765D;outline-offset:-4px}
.eg-gallery-zoom{position:absolute;right:20px;bottom:20px;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#F1F9F4;color:#1D324B;font-size:26px}
.eg-gallery-card figcaption{display:flex;align-items:center;gap:18px;padding:20px 24px}
.eg-gallery-number{font-size:13px;font-weight:700;color:#3C765D}
body.ergomed-design .eg-gallery-card h2{font:600 21px/1.4 Arial,Helvetica,sans-serif;margin:0}
.eg-gallery-visit{display:flex;align-items:center;justify-content:space-between;gap:30px;margin-top:48px;padding:36px;border-radius:16px;background:#F1F9F4}
body.ergomed-design .eg-gallery-visit h2{font-size:27px;margin:0 0 12px}
.eg-gallery-visit p:last-child{font-size:16px;line-height:1.7;max-width:620px;margin:0}
.eg-gallery-visit .btn{flex-shrink:0;gap:18px}
.eg-gallery-dialog{border:0;padding:60px 64px 30px;background:#1D324B;color:#fff;max-width:96vw;max-height:94dvh;width:1200px;border-radius:14px;overflow:auto}
.eg-gallery-dialog::backdrop{background:#101e30ed}
.eg-gallery-dialog:not([open]){display:none}
.eg-gallery-dialog figure{margin:0;text-align:center}
.eg-gallery-dialog figure img{display:block;max-height:72dvh;max-width:100%;width:auto;height:auto;margin:auto;object-fit:contain}
.eg-gallery-dialog figcaption{padding:18px 0 0;font-size:16px;line-height:1.5}
.eg-gallery-dialog button{position:absolute;display:grid;place-items:center;border:1px solid #7FB79C;background:#1D324B;color:#F1F9F4;width:42px;height:42px;border-radius:50%;cursor:pointer;font:400 26px/1 Arial,sans-serif;padding:0}
.eg-gallery-dialog button:hover{background:#3C765D}
.eg-gallery-dialog button:focus-visible{outline:3px solid #B8E2D4;outline-offset:3px}
.eg-gallery-close{right:16px;top:12px}
.eg-gallery-prev{left:10px;top:48%}
.eg-gallery-next{right:10px;top:48%}
/* Keep the added Galéria item beside Pre firmy at normal desktop widths. */
@media(min-width:851px) and (max-width:1150px){body.ergomed-design .nb-header-nav .nb-navigation{gap:10px 12px}body.ergomed-design .nb-header-nav .nb-logo{flex-basis:140px}body.ergomed-design .nb-header-nav .nb-nav-actions .nb-mint>.button{padding:12px 16px}}
@media(max-width:700px){.eg-gallery-wrap{width:calc(100% - 36px)}.eg-gallery-intro{padding-bottom:40px}.eg-gallery-intro nav{margin-bottom:30px}.eg-gallery-intro::after{opacity:.45}.eg-gallery-grid{grid-template-columns:1fr;gap:22px}.eg-gallery-card:first-child{grid-column:auto}.eg-gallery-card:first-child img{aspect-ratio:3/2}.eg-gallery-content{padding-top:28px;padding-bottom:40px}.eg-gallery-card figcaption{padding:18px}.eg-gallery-visit{display:block;padding:26px;margin-top:32px}.eg-gallery-visit .btn{margin-top:24px}.eg-gallery-dialog{padding:58px 12px 70px;width:96vw}.eg-gallery-dialog figure img{max-height:62dvh}.eg-gallery-prev,.eg-gallery-next{top:auto;bottom:14px}.eg-gallery-prev{left:calc(50% - 56px)}.eg-gallery-next{right:calc(50% - 56px)}}
@media(prefers-reduced-motion:reduce){.eg-gallery-card img{transition:none}}

/* Borderless photo viewer; controls sit on the photograph. */
body.ergomed-design .eg-gallery-card{border:0;background:transparent}
body.ergomed-design .eg-gallery-zoom svg{width:24px;height:24px}
body.ergomed-design dialog.eg-gallery-dialog{margin:auto;padding:0;border:0;background:transparent;box-shadow:none;border-radius:0;width:80vw;max-width:1440px;max-height:none;overflow:visible;color:#1D324B}
body.ergomed-design .eg-gallery-dialog::backdrop{background:rgba(15,25,37,.72)}
body.ergomed-design .eg-gallery-dialog figure{margin:0;padding:0;line-height:0}
body.ergomed-design .eg-gallery-dialog figure img{display:block;width:100%;max-width:100%;height:auto;max-height:88dvh;margin:0;object-fit:contain;border-radius:10px}
body.ergomed-design .eg-gallery-dialog button{z-index:2;width:46px;height:46px;padding:0;margin:0;border:0;border-radius:50%;background:rgba(255,255,255,.3);backdrop-filter:blur(4px);color:#1D324B;font:500 28px/1 Arial,Helvetica,sans-serif;box-shadow:none;transition:background-color .15s ease}
body.ergomed-design .eg-gallery-dialog button:hover{background:rgba(255,255,255,.65);color:#1D324B}
body.ergomed-design .eg-gallery-dialog button:focus-visible{outline:3px solid #fff;outline-offset:2px}
body.ergomed-design .eg-gallery-dialog .eg-gallery-close{top:12px;right:12px;bottom:auto;left:auto;transform:none}
body.ergomed-design .eg-gallery-dialog .eg-gallery-prev{top:50%;left:12px;right:auto;bottom:auto;transform:translateY(-50%)}
body.ergomed-design .eg-gallery-dialog .eg-gallery-next{top:50%;right:12px;left:auto;bottom:auto;transform:translateY(-50%)}
@media(max-width:700px){body.ergomed-design .eg-gallery-dialog button{width:40px;height:40px;font-size:25px}body.ergomed-design .eg-gallery-dialog .eg-gallery-close{top:8px;right:8px}body.ergomed-design .eg-gallery-dialog .eg-gallery-prev{left:8px}body.ergomed-design .eg-gallery-dialog .eg-gallery-next{right:8px}}
@media(prefers-reduced-motion:reduce){body.ergomed-design .eg-gallery-dialog button{transition:none}}
