/* Preserve the original four/two-column gallery while keeping it independent of WordPress. */
.elementor-widget-gallery .elementor-gallery__container { display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; height:auto!important; }
.elementor-widget-gallery .e-gallery-item { position:relative!important; inset:auto!important; width:auto!important; height:auto!important; aspect-ratio:4/3; overflow:hidden; }
.elementor-widget-gallery .e-gallery-image { width:100%; height:100%; background-size:cover; background-position:center; }
.local-gallery-dialog { border:0; padding:0; max-width:94vw; max-height:94vh; background:transparent; color:white; overflow:visible; }
.local-gallery-dialog::backdrop { background:rgb(0 0 0 / .88); }
.local-gallery-dialog img { display:block; max-width:90vw; max-height:82vh; object-fit:contain; }
.local-gallery-controls { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:10px 0; }
.local-gallery-controls button { border:1px solid #fff; border-radius:0; background:#233d68; color:#fff; padding:8px 16px; cursor:pointer; }
@media(max-width:767px) { .elementor-widget-gallery .elementor-gallery__container { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; } }
