.public-gallery { background: #f5f7fb; color: #253249; }
.public-gallery-heading { margin: 0 0 30px; }
.public-gallery-heading > span { color: #5374a8; font: 600 11px/1.5 sans-serif; letter-spacing: 2px; }
.public-gallery-heading h1 { font-size: clamp(26px,4vw,38px); font-weight: 650; margin: 8px 0 10px; }
.public-gallery-heading p { max-width: 780px; color: #6a778c; line-height: 1.7; overflow-wrap: anywhere; white-space: pre-wrap; }
.public-gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.public-gallery-card { display: block; color: #253249; text-decoration: none; background: #fff; border: 1px solid #e1e7f0; border-radius: 12px; overflow: hidden; box-shadow: 0 3px 12px #20305008; transition: transform .2s,box-shadow .2s; }
.public-gallery-card:hover { color: #253249; transform: translateY(-3px); box-shadow: 0 8px 24px #20305015; }
.public-gallery-card:focus-visible { outline: 3px solid #3156a3; outline-offset: 4px; }
.public-gallery-card > img, .public-gallery-placeholder { width: 100%; height: 220px; object-fit: cover; background: #e9edf5; }
.public-gallery-placeholder { display: grid; place-items: center; font-size: 42px; color: #95a6c0; }
.public-gallery-card-body { padding: 20px; }
.public-gallery-card h2 { font-size: 19px; font-weight: 600; margin: 10px 0; overflow-wrap: anywhere; }
.public-gallery-card p { color: #768196; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.public-gallery-count { font-size: 12px; color: #5374a8; }
.public-gallery-view { font-size: 13px; font-weight: 600; color: #3156a3; }
.public-gallery-back { display: inline-block; color: #3156a3; margin-bottom: 22px; text-decoration: none; font-size: 14px; }
.public-gallery-thumbnails { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.public-gallery-thumbnails .public-gallery-card > img { height: 180px; }
.public-gallery-thumbnails .public-gallery-card-body { padding: 12px 15px; }
.public-gallery-thumbnails h2 { font-size: 14px; margin: 0; line-height: 1.5; }
.public-gallery-empty { padding: 40px 20px; border: 1px dashed #cbd5e3; border-radius: 10px; text-align: center; color: #6a778c; }
#gallery-lightbox { padding: 50px 65px 20px; border: 0; background: #111827; color: #fff; width: min(1100px,96vw); max-width: 96vw; max-height: 94vh; border-radius: 10px; }
#gallery-lightbox::backdrop { background: #040812e8; }
#gallery-lightbox figure { margin: 0; }
#lightbox-image { display: block; max-width: 100%; max-height: 72vh; width: auto; margin: auto; object-fit: contain; }
#gallery-lightbox figcaption { display: flex; justify-content: space-between; gap: 15px; padding-top: 15px; font-size: 14px; }
#lightbox-title { overflow-wrap: anywhere; }
#lightbox-counter { color: #b6c2d7; white-space: nowrap; }
#gallery-lightbox button { position: absolute; color: #fff; border: 0; background: #ffffff15; border-radius: 6px; width: 40px; height: 40px; font-size: 30px; line-height: 1; }
#gallery-lightbox button:focus-visible { outline: 2px solid #fff; }
.lightbox-close { top: 8px; right: 12px; }
.lightbox-prev { left: 10px; top: 48%; }
.lightbox-next { right: 10px; top: 48%; }
@media (max-width: 991px) { .public-gallery-grid, .public-gallery-thumbnails { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 575px) { .public-gallery-grid { gap: 14px; } .public-gallery-grid:not(.public-gallery-thumbnails) { grid-template-columns: 1fr; } .public-gallery-thumbnails .public-gallery-card > img { height: 130px; } #gallery-lightbox { padding: 50px 42px 15px; } #gallery-lightbox button { width: 30px; } }
@media (prefers-reduced-motion: reduce) { .public-gallery-card { transition: none; } }
