.home-gallery-section { max-width: 1180px; margin: 0 auto; padding: 4px 20px 78px; }
.home-photo-grid { columns: 3 280px; column-gap: 16px; }
.home-photo-grid figure { break-inside: avoid; margin: 0 0 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgba(24,33,61,.06); }
.home-photo-grid button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.home-photo-grid img { display: block; width: 100%; height: auto; background: #e7ecfa; transition: transform .35s ease; }
.home-photo-grid button:hover img { transform: scale(1.025); }
.home-photo-grid figcaption { padding: 11px 14px 13px; color: var(--muted); font-size: 12px; font-weight: 700; }

.photo-lightbox { width: min(1120px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: visible; border: 0; background: transparent; color: #fff; }
.photo-lightbox::backdrop { background: rgba(5,13,34,.86); backdrop-filter: blur(7px); }
.photo-lightbox figure { display: grid; max-height: calc(100dvh - 80px); margin: 0; place-items: center; }
.photo-lightbox img { display: block; max-width: 100%; max-height: calc(100dvh - 126px); border-radius: 12px; object-fit: contain; box-shadow: 0 20px 70px rgba(0,0,0,.38); }
.photo-lightbox figcaption { padding: 14px 0 0; color: #fff; font-size: 14px; font-weight: 800; text-align: center; }
.photo-lightbox-close,.photo-lightbox-nav { position: fixed; display: grid; width: 46px; height: 46px; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(10,19,48,.78); color: #fff; font: 400 28px/1 Whitney,sans-serif; cursor: pointer; transition: background .2s,transform .2s; }
.photo-lightbox-close:hover,.photo-lightbox-nav:hover { background: var(--blue); transform: scale(1.06); }
.photo-lightbox-close { top: 22px; right: 22px; font-size: 31px; }
.photo-lightbox-nav { top: 50%; transform: translateY(-50%); }
.photo-lightbox-nav:hover { transform: translateY(-50%) scale(1.06); }
.photo-lightbox-prev { left: 22px; }
.photo-lightbox-next { right: 22px; }

@media (max-width: 640px) {
  .home-gallery-section { padding: 0 14px 58px; }
  .home-photo-grid { columns: 2 150px; column-gap: 10px; }
  .home-photo-grid figure { margin-bottom: 10px; border-radius: 13px; }
  .photo-lightbox { width: min(100% - 18px,1120px); }
  .photo-lightbox img { max-height: calc(100dvh - 142px); }
  .photo-lightbox-close { top: 12px; right: 12px; }
  .photo-lightbox-nav { width: 40px; height: 40px; }
  .photo-lightbox-prev { left: 10px; }
  .photo-lightbox-next { right: 10px; }
}
