/* Keep the gallery action in the heading row, clear of the photos. */
.main_gallery .main-gallery-heading {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:16px 24px;
    margin-bottom:28px;
}
.main_gallery .main-gallery-heading h1 { padding:0; margin:0; }
.main_gallery .more {
    position:static;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    box-sizing:border-box;
    min-height:48px;
    max-width:100%;
    padding:12px 22px;
    border:1px solid #1b1b1b;
    border-radius:999px;
    background:#1b1b1b;
    color:#fff;
    font-size:14px;
    font-weight:600;
    line-height:1.4;
    text-decoration:none;
    text-align:center;
    transition:background .2s,color .2s;
}
.main_gallery .more svg { width:18px; height:18px; flex:none; }
.main_gallery .more:focus-visible { outline:2px solid #1b1b1b; outline-offset:4px; }
.main_gallery .more:active { background:#444; }
.main_gallery .list ul { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.main_gallery .list li { min-width:0; }
.main_gallery .list li a { display:block; overflow:hidden; border-radius:12px; }
.main_gallery .list li a img { width:100%; height:auto; aspect-ratio:239/250; object-fit:cover; }
@media(hover:hover) {
    .main_gallery .more:hover { background:#fff; color:#1b1b1b; }
}
@media(max-width:767px) {
    .main_gallery { padding:0 16px 40px; }
    .main_gallery .main-gallery-heading { gap:12px 16px; margin-bottom:20px; }
    .main_gallery .more { min-height:44px; padding:10px 16px; gap:10px; font-size:13px; }
    .main_gallery .list ul { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
}
@media(prefers-reduced-motion:reduce) {
    .main_gallery .more { transition:none; }
}
