/* ===== Gallery pages (/gallery, /services/<slug>) ===== */
.gallery-section{padding:40px 20px}
.gallery-title{font-size:36px;color:#e51b24;text-align:center;font-weight:500;margin-bottom:40px}
.rn-filters{text-align:center;margin-bottom:30px}
.rn-filters .filter-button{margin:0 4px 8px;font-size:13px;font-weight:900;border-radius:5px}
.rn-filters .filter-button.active,.rn-filters .filter-button:hover{background:#e51b24!important;border-color:#e51b24!important;color:#fff!important}
/* Every tile is the same 4:3 box no matter what size the uploaded picture is */
.rn-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.rn-tile{position:relative;aspect-ratio:4/3;overflow:hidden;background:#e9eef2;border-radius:2px}
.rn-tile a{display:block;width:100%;height:100%}
.rn-tile img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s}
.rn-tile:hover img{transform:scale(1.04)}
.modelnumber{position:absolute;top:10px;right:10px;z-index:1;padding:5px 8px;background:#fff;color:#000;font-weight:900;line-height:1.1;pointer-events:none}
.rn-grid>p{grid-column:1/-1}
@media(max-width:1100px){.rn-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:768px){.rn-grid{grid-template-columns:repeat(2,1fr);gap:10px}.gallery-title{font-size:28px}}
/* Projects page (static) tiles use the same box */
.gallery_product{margin-bottom:30px}
.gallery_product img{width:100%;height:100%;object-fit:cover}
/* ===== Lightbox: one fixed 4:3 stage for every picture ===== */
body.rn-lb-open{overflow:hidden}
.rn-lb{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center}
.rn-lb-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.88)}
.rn-lb-stage{position:relative;margin:0;aspect-ratio:4/3;width:min(92vw,1000px,calc(84vh*4/3));background:#047fc3;box-shadow:0 10px 50px rgba(0,0,0,.6)}
.rn-lb-stage img{width:100%;height:100%;object-fit:contain;display:block;opacity:1;transition:opacity .2s}
.rn-lb.loading .rn-lb-stage img{opacity:0}
.rn-lb-model{position:absolute;top:14px;right:14px;background:#fff;color:#000;font-weight:900;font-size:20px;padding:6px 12px}
.rn-lb-spin{position:absolute;inset:0;margin:auto;width:42px;height:42px;border:4px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:rnspin .8s linear infinite;display:none}
.rn-lb.loading .rn-lb-spin{display:block}
@keyframes rnspin{to{transform:rotate(360deg)}}
.rn-lb-close,.rn-lb-nav{position:absolute;z-index:2;background:rgba(255,255,255,.14);color:#fff;border:0;cursor:pointer;line-height:1}
.rn-lb-close{top:14px;right:18px;font-size:34px;width:44px;height:44px;border-radius:50%}
.rn-lb-nav{top:50%;transform:translateY(-50%);font-size:24px;width:48px;height:64px}
.rn-lb-prev{left:10px}.rn-lb-next{right:10px}
.rn-lb-close:hover,.rn-lb-nav:hover{background:rgba(255,255,255,.3)}
.rn-lb-count{position:absolute;bottom:14px;left:0;right:0;text-align:center;color:#fff;font-size:14px;z-index:2}
@media(max-width:600px){.rn-lb-nav{width:38px;height:52px}}
