/* ATP Clean gallery: native horizontal rail, 2026-11-07. */
html body .home-gallery{width:calc(100% - 48px);max-width:1280px;margin:36px auto 48px;padding:28px 30px 26px;box-sizing:border-box;border:1px solid #d9e5e9;border-radius:24px;background:#eaf0f3;color:#243c47}
.home-gallery-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}
.home-gallery-heading h2{font-size:clamp(30px,3vw,44px);line-height:1.15;font-weight:600;letter-spacing:-.035em;margin:0;color:#243c47}
.home-gallery-controls{display:flex;gap:10px;flex:none}
.home-gallery-controls button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #426b7d;border-radius:50%;background:#426b7d;color:white;font-size:27px;line-height:1;cursor:pointer;transition:background-color .18s,opacity .18s}
.home-gallery-controls button:hover{background:#304f5e}
.home-gallery-controls button:disabled{background:transparent;color:#6c8794;border-color:#aebfc8;opacity:.65;cursor:default}
.home-gallery-controls button:focus-visible,.home-gallery-rail:focus-visible{outline:3px solid #426b7d;outline-offset:4px}
.home-gallery-rail{display:flex;gap:20px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior-x:contain;border-radius:13px;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y}
.home-gallery-rail::-webkit-scrollbar{display:none}
.gallery-photo-slot{flex:0 0 calc((100% - 40px)/3.2);aspect-ratio:4/3;scroll-snap-align:start;border-radius:13px;border:1px solid #cddae0;box-sizing:border-box;background:linear-gradient(150deg,#e0e8ec 0%,#d5e1e7 70%,#cedde4 100%);position:relative;overflow:hidden}
.gallery-photo-slot:after{content:"";position:absolute;inset:52% -15% -30%;border-radius:50%;transform:rotate(-12deg);background:#b8d0dc26;pointer-events:none}
.gallery-photo-slot img{width:100%;height:100%;object-fit:cover;display:block}
.home-gallery-progress{height:4px;background:#cad7de;border-radius:3px;margin-top:24px;overflow:hidden}
.home-gallery-progress-fill{display:block;height:100%;width:75%;border-radius:3px;background:#426b7d;transition:margin-left .15s linear}
@media(min-width:1800px){html body .home-gallery{width:94%;max-width:1800px;padding:34px 38px}.gallery-photo-slot{aspect-ratio:3/2}}
@media(max-width:900px){.gallery-photo-slot{flex-basis:calc((100% - 20px)/2.2)}}
@media(max-width:600px){html body .home-gallery{width:calc(100% - 32px);padding:24px 18px;border-radius:20px;margin:28px auto 36px}.home-gallery-heading{gap:12px;margin-bottom:20px}.home-gallery-heading h2{font-size:30px}.home-gallery-controls{gap:8px}.home-gallery-controls button{width:40px;height:40px;font-size:24px}.home-gallery-rail{gap:14px}.gallery-photo-slot{flex-basis:86%;aspect-ratio:4/3}.home-gallery-progress{margin-top:20px}}
@media(prefers-reduced-motion:reduce){.home-gallery-rail{scroll-behavior:auto}.home-gallery-progress-fill,.home-gallery-controls button{transition:none}}

/* Owner media: preserve complete before/after comparisons and portrait video. */
.gallery-media-card{padding:0;cursor:pointer;color:#243c47;text-align:left;background:#dfe8ed}
.gallery-media-card:after{display:none}.gallery-media-card img{width:100%;height:100%;object-fit:contain;transition:filter .2s}.gallery-media-card:hover img{filter:brightness(.96)}
.gallery-media-card:focus-visible{outline:3px solid #426b7d;outline-offset:-4px}
.gallery-video-badge{position:absolute;left:12px;bottom:12px;padding:7px 12px;background:#243c47e8;color:white;border:1px solid #ffffff80;border-radius:20px;font-size:14px;font-weight:600;line-height:1.3;pointer-events:none}
.gallery-lightbox{box-sizing:border-box;width:min(1100px,calc(100vw - 32px));max-width:none;max-height:94dvh;margin:auto;padding:16px;background:#f6f8f9;color:#243c47;border:1px solid #b7cbd5;border-radius:18px;box-shadow:0 24px 90px #0006}
.gallery-lightbox::backdrop{background:#14252de8}.gallery-lightbox-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.gallery-lightbox-title{font-size:16px;font-weight:600;line-height:1.4;margin:0}.gallery-lightbox-close{border:1px solid #426b7d;background:white;color:#243c47;border-radius:50%;width:40px;height:40px;font-size:28px;cursor:pointer;flex:none}
.gallery-lightbox-content{display:flex;align-items:center;justify-content:center;min-height:120px;background:#e5ecef;border-radius:10px;overflow:hidden}
.gallery-lightbox-content img,.gallery-lightbox-content video{display:block;width:auto;max-width:100%;height:auto;max-height:75dvh;object-fit:contain}
.gallery-lightbox-content video{width:auto;min-width:0;background:#14252d}.gallery-lightbox-nav{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:12px}.gallery-lightbox-nav button{border:1px solid #426b7d;background:#426b7d;color:white;padding:9px 16px;border-radius:20px;font-size:16px;cursor:pointer}.gallery-lightbox-nav button:disabled{opacity:.4;cursor:default}.gallery-lightbox-count{font-size:14px;color:#42606c}.gallery-lightbox button:focus-visible{outline:3px solid #426b7d;outline-offset:3px}
@media(max-width:600px){.gallery-lightbox{padding:12px;width:calc(100vw - 16px);border-radius:14px}.gallery-lightbox-content img,.gallery-lightbox-content video{max-height:68dvh}.gallery-lightbox-title{font-size:15px}}
.gallery-media-card>video{display:block;width:100%;height:100%;object-fit:contain;background:#dfe8ed;pointer-events:none}

/* Approved natural media proportions, equal display height. */
.home-gallery-rail{align-items:stretch}
.gallery-media-card{flex:0 0 auto!important;height:390px!important;width:calc(390px * var(--gallery-ratio))!important;aspect-ratio:auto!important}
.gallery-media-card>img,.gallery-media-card>video{width:100%!important;height:100%!important;object-fit:contain!important}
@media(max-width:600px){.gallery-media-card{height:340px!important;width:calc(340px * var(--gallery-ratio))!important;max-width:100%!important}}
