.homepage-gallery { margin: 56px 0; padding: 28px 0; border-top: 1px solid var(--line); letter-spacing: 0; }
.homepage-gallery .section-heading { margin-bottom: 24px; }
.homepage-gallery h2 { font-size: 28px; line-height: 1.35; overflow-wrap: anywhere; }
.gallery-intro { color: var(--muted); line-height: 1.7; }
.homepage-gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.homepage-gallery-grid figure { min-width: 0; margin: 0; }
.homepage-gallery-grid figure > button { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; overflow: hidden; border: 1px solid #46515a; border-radius: 6px; background: #10151a; cursor: zoom-in; }
.homepage-gallery-grid img { display: block; width: 100%; height: 100%; object-fit: contain; }
.homepage-gallery-grid figcaption { margin-top: 10px; color: var(--text); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.homepage-gallery-grid button > svg { position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; padding: 7px; color: #fff; background: #12181fe6; border-radius: 6px; }
.homepage-gallery button:focus-visible, .gallery-lightbox button:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
body.gallery-open { overflow: hidden; }
.gallery-lightbox { width: min(1440px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 16px; border: 1px solid #46515a; border-radius: 8px; color: #f5f7fa; background: #13171b; letter-spacing: 0; }
.gallery-lightbox::backdrop { background: #050708e6; }
.gallery-lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.gallery-lightbox-bar > span { min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
.gallery-lightbox-stage { display: grid; place-items: center; height: min(74dvh, 850px); min-height: 120px; margin: 10px 0; }
.gallery-lightbox-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.gallery-lightbox-navigation { display: flex; justify-content: center; align-items: center; gap: 24px; min-height: 40px; }
.gallery-lightbox-navigation span { min-width: 68px; text-align: center; font-variant-numeric: tabular-nums; }
.gallery-icon-button { display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 9px; border: 1px solid #52616a; border-radius: 6px; background: #242d33; color: #fff; cursor: pointer; }
.gallery-icon-button:disabled { opacity: 0.35; cursor: default; }
.gallery-icon-button svg { width: 20px; height: 20px; }
.gallery-flip { transform: rotate(180deg); }
@media (max-width: 700px) {
    .homepage-gallery-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .homepage-gallery h2 { font-size: 24px; }
    .gallery-lightbox { width: calc(100% - 16px); padding: 10px; max-height: calc(100dvh - 16px); }
    .gallery-lightbox-stage { height: calc(100dvh - 160px); }
}
