.gallery-showcase{margin-top:3.2rem;padding-top:2.4rem;border-top:1px solid rgba(226,189,125,.18)}.gallery-showcase[hidden]{display:none}.gallery-showcase-heading{display:flex;align-items:end;justify-content:space-between;gap:1.2rem;margin-bottom:1.4rem;text-align:right}.gallery-showcase-heading h3{margin:.15rem 0 0;color:var(--gold2,#f1d49a);font:700 clamp(1.7rem,5vw,2.6rem)/1.4 'Aref Ruqaa',serif}.gallery-open-button{flex:0 0 auto}.gallery-open-button:disabled{opacity:.48;cursor:wait}.gallery-status{margin:0 0 1rem;padding:.8rem 1rem;border-radius:14px;background:rgba(255,255,255,.025);color:var(--muted,#cdbda8);text-align:center}.gallery-status.error{color:#ffadb3}.gallery-status.empty{color:var(--gold2,#f1d49a)}

/* Natural flowing preview: frameless images, variable widths and real aspect ratios. */
.gallery-preview{columns:3 190px;column-gap:18px;text-align:right}.gallery-flow-item{display:inline-block;width:100%;margin:0 0 22px;padding:0;border:0;background:transparent;color:#fff;break-inside:avoid;cursor:zoom-in;text-align:right}.gallery-flow-item:nth-child(3n+1){width:91%;margin-left:9%}.gallery-flow-item:nth-child(3n+2){width:100%}.gallery-flow-item:nth-child(3n){width:86%;margin-right:14%}.gallery-flow-item img{display:block;width:100%;height:auto;max-height:520px;object-fit:cover;border-radius:clamp(12px,2vw,20px);box-shadow:0 18px 44px rgba(0,0,0,.2);filter:saturate(.96) contrast(1.01) brightness(.96);transition:transform .35s ease,filter .35s ease,box-shadow .35s ease}.gallery-flow-item:hover img,.gallery-flow-item:focus-visible img{transform:translateY(-2px) scale(1.008);filter:saturate(1) brightness(1);box-shadow:0 24px 54px rgba(0,0,0,.3)}.gallery-flow-caption{display:block;padding:.55rem .15rem 0;color:var(--gold2,#f1d49a);font-family:'Aref Ruqaa',serif;font-size:1rem;line-height:1.5;text-align:center}.gallery-flow-item:focus-visible{outline:0}.gallery-flow-item:focus-visible img{box-shadow:0 0 0 2px var(--gold2,#f1d49a),0 24px 54px rgba(0,0,0,.3)}

/* Legacy tiles also become frameless if the old renderer finishes first. */
.gallery-tile{position:relative;display:inline-block;width:100%;margin:0 0 20px;padding:0;overflow:visible;break-inside:avoid;border:0!important;border-radius:0!important;background:transparent!important;color:#fff;box-shadow:none!important;cursor:zoom-in}.gallery-tile img{display:block;width:100%;height:auto!important;aspect-ratio:auto!important;object-fit:cover;border-radius:clamp(12px,2vw,20px);box-shadow:0 18px 44px rgba(0,0,0,.2);filter:saturate(.96) contrast(1.01) brightness(.96)}.gallery-tile span{position:static;display:block;padding:.55rem .15rem 0;background:none;color:var(--gold2,#f1d49a);font-family:'Aref Ruqaa',serif;text-align:center;text-shadow:none}

.gallery-dialog{position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;background:#0e0709;color:#fff8eb}.gallery-dialog:not([open]){display:none}.gallery-dialog::backdrop{background:rgba(5,2,3,.86);backdrop-filter:blur(8px)}.gallery-dialog-shell{height:100%;overflow:auto;background:radial-gradient(circle at 80% 0,rgba(116,53,64,.34),transparent 34rem),#0e0709}.gallery-dialog-header{position:sticky;z-index:4;top:0;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.1rem max(1rem,env(safe-area-inset-right)) 1rem max(1rem,env(safe-area-inset-left));border-bottom:1px solid rgba(226,189,125,.16);background:rgba(14,7,9,.84);backdrop-filter:blur(18px)}.gallery-dialog-header p{margin:0;color:var(--gold,#e2bd7d);font-size:.78rem;letter-spacing:.14em}.gallery-dialog-header h2{margin:.1rem 0 0;color:var(--gold2,#f1d49a);font:700 clamp(1.45rem,4vw,2.25rem)/1.3 'Aref Ruqaa',serif}.gallery-icon-button{display:grid;place-items:center;width:46px;height:46px;padding:0;border:1px solid rgba(226,189,125,.32);border-radius:50%;background:rgba(255,255,255,.04);color:#fff8eb;font:300 2rem/1 Arial,sans-serif;cursor:pointer}

.gallery-wall{columns:4 240px;column-gap:20px;padding:22px max(16px,calc((100vw - 1480px)/2)) 90px}.gallery-wall .gallery-flow-item{width:100%;margin:0 0 20px}.gallery-wall .gallery-flow-item:nth-child(4n+1){width:92%;margin-left:8%}.gallery-wall .gallery-flow-item:nth-child(4n+2){width:100%}.gallery-wall .gallery-flow-item:nth-child(4n+3){width:88%;margin-right:12%}.gallery-wall .gallery-flow-item:nth-child(4n){width:96%;margin-left:4%}.gallery-wall .gallery-flow-item img{max-height:none}.gallery-wall .gallery-tile{margin-bottom:20px}

.gallery-lightbox{position:fixed;z-index:20;inset:0;display:grid;grid-template-columns:64px minmax(0,1fr) 64px;grid-template-rows:minmax(0,1fr) auto;align-items:center;gap:10px 12px;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:rgba(7,3,5,.96);backdrop-filter:blur(20px)}.gallery-lightbox[hidden]{display:none}.gallery-lightbox figure{grid-column:2;grid-row:1;max-width:min(1120px,100%);max-height:calc(100dvh - 175px);margin:auto;text-align:center}.gallery-lightbox figure>img{display:block;max-width:100%;max-height:calc(100dvh - 225px);margin:auto;border-radius:16px;box-shadow:0 30px 100px rgba(0,0,0,.55);object-fit:contain}.gallery-lightbox figcaption{min-height:1.7rem;margin-top:.7rem;color:var(--gold2,#f1d49a);font-family:'Aref Ruqaa',serif}.lightbox-close{position:absolute;z-index:2;top:max(16px,env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left))}.gallery-nav{display:grid;place-items:center;width:54px;height:54px;padding:0;border:1px solid rgba(226,189,125,.28);border-radius:50%;background:rgba(255,255,255,.04);color:#fff8eb;font:300 2.4rem/1 Arial,sans-serif;cursor:pointer}.gallery-nav-previous{grid-column:1;grid-row:1}.gallery-nav-next{grid-column:3;grid-row:1}.gallery-position{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));color:rgba(255,248,235,.62);font-size:.82rem;direction:ltr}

.gallery-thumbnail-rail{grid-column:1/-1;grid-row:2;display:flex;align-items:flex-end;justify-content:center;gap:10px;width:min(720px,calc(100vw - 36px));min-height:86px;margin:0 auto;direction:ltr}.gallery-thumb{flex:0 0 auto;padding:0;overflow:hidden;border:1px solid rgba(226,189,125,.3);border-radius:13px;background:#12080b;box-shadow:0 8px 24px rgba(0,0,0,.28);cursor:pointer;transition:transform .22s ease,opacity .22s ease,border-color .22s ease}.gallery-thumb img{display:block;width:100%;height:100%;object-fit:cover}.gallery-thumb.current{width:82px;height:82px;border-color:rgba(241,212,154,.95);opacity:1}.gallery-thumb.near{width:68px;height:68px;opacity:.78}.gallery-thumb.near img{filter:blur(.8px) saturate(.9) brightness(.9)}.gallery-thumb.far{width:54px;height:54px;opacity:.55}.gallery-thumb.far img{filter:blur(1.55px) saturate(.82) brightness(.84)}.gallery-thumb:hover,.gallery-thumb:focus-visible{transform:translateY(-3px);opacity:1;border-color:rgba(241,212,154,.85);outline:0}.gallery-thumb:hover img,.gallery-thumb:focus-visible img{filter:blur(.2px) saturate(.98) brightness(.98)}.gallery-thumb.current img{filter:none}.gallery-is-open{overflow:hidden}

@media(max-width:760px){.gallery-showcase-heading{align-items:stretch;flex-direction:column}.gallery-open-button{width:100%}.gallery-preview{columns:2 135px;column-gap:12px}.gallery-flow-item,.gallery-flow-item:nth-child(n){width:100%;margin-right:0;margin-left:0;margin-bottom:14px}.gallery-flow-item img,.gallery-tile img{border-radius:13px}.gallery-flow-caption{font-size:.9rem}.gallery-wall{columns:2 140px;column-gap:10px;padding:12px 10px 80px}.gallery-wall .gallery-flow-item,.gallery-wall .gallery-flow-item:nth-child(n){width:100%;margin-right:0;margin-left:0;margin-bottom:10px}.gallery-lightbox{grid-template-columns:44px minmax(0,1fr) 44px;gap:7px;padding-inline:6px}.gallery-nav{width:40px;height:40px;font-size:1.8rem}.gallery-lightbox figure{max-height:calc(100dvh - 150px)}.gallery-lightbox figure>img{max-height:calc(100dvh - 205px);border-radius:11px}.gallery-thumbnail-rail{gap:7px;min-height:68px}.gallery-thumb.current{width:64px;height:64px}.gallery-thumb.near{width:53px;height:53px}.gallery-thumb.far{width:43px;height:43px}.lightbox-close{width:40px;height:40px}.gallery-position{font-size:.72rem}}
@media(max-width:390px){.gallery-preview{columns:2}.gallery-wall{columns:2}.gallery-preview .gallery-flow-item:nth-child(n+6),.gallery-preview .gallery-tile:nth-child(n+6){display:none}.gallery-thumb.far{display:none}}
@media(prefers-reduced-motion:reduce){.gallery-flow-item img,.gallery-thumb{transition:none}}
