/* Monochrome social icons in the shared header and contacts. */
.header .mobile-socials { display:none; }
.contacts.shared-contacts .home-social-link:is([href*="vk.ru/"],[href*="max.ru/"]) svg { color:#fff; }
@media (max-width:700px) {
 .header .nav .mobile-socials { display:flex; grid-column:1/-1; flex-wrap:wrap; align-items:center; gap:10px; border-top:1px solid #485158; padding:12px 8px 0; margin-top:5px; }
 .header .nav .mobile-socials > a { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; min-height:44px; padding:0; border-radius:50%; color:#181818; background:#fff; }
 .header .nav .mobile-socials > a:focus-visible { outline:2px solid #ffe0a2; outline-offset:3px; }
}
/* Gallery only: show the whole photo at the maximum size that fits. */
.gallery-reference-page #content-modal[open]:has(.lightbox-photo) {
 display:grid; grid-template-rows:auto minmax(0,1fr); row-gap:8px;
 width:min(1520px,calc(100% - 24px)); max-width:none; height:calc(100% - 24px); height:calc(100dvh - 24px); max-height:none; margin:auto;
 border-radius:12px; padding:8px 12px 12px; overflow:hidden; background:#101114; color:#fff;
}
.gallery-reference-page #content-modal:has(.lightbox-photo)::backdrop { background:#08090be8; }
.gallery-reference-page #content-modal:has(.lightbox-photo) #modal-title {
 display:flex; align-items:center; min-height:44px; padding:0 48px 0 0; color:#fff;
 font-size:clamp(16px,2vw,24px); line-height:1.15; letter-spacing:0;
}
.gallery-reference-page #content-modal:has(.lightbox-photo) > .close { right:10px; top:8px; padding:0; background:#292a2e; color:#fff; border-radius:50%; line-height:1; }
.gallery-reference-page #content-modal:has(.lightbox-photo) #modal-body { display:grid; min-height:0; place-items:center; }
.gallery-reference-page #content-modal .lightbox-photo { width:100%; height:100%; min-height:0; max-height:none; object-fit:contain; margin:0; }
@media (max-width:700px) {
 .gallery-reference-page #content-modal[open]:has(.lightbox-photo) { width:100%; height:100%; height:100dvh; border-radius:0; padding:8px 0; }
 .gallery-reference-page #content-modal:has(.lightbox-photo) #modal-title { padding-left:12px; padding-right:64px; }
}
