.gallery-page { color: #272566; }
.gallery-content { padding-block: 44px 56px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 28px 24px; }
.gallery-card { overflow: hidden; border: 1px solid #e4e3ef; border-radius: 10px; background: #fff; transition: box-shadow .2s,border-color .2s; }
.gallery-card:hover { border-color: #aaa8cd; box-shadow: 0 6px 20px #27256614; }
.gallery-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.gallery-card__image { aspect-ratio: 4/3; overflow: hidden; background: #f3f3f8; display: grid; place-items: center; }
.gallery-card__image img,.gallery-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-card__placeholder { font: 700 24px 'Playfair Display',Georgia,serif; }
.gallery-card__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 20px; gap: 20px; }
.gallery-page .gallery-card h2 { color: #272566; font: 600 20px/1.4 'Source Sans 3',Arial,sans-serif; letter-spacing: 0; text-transform: none; margin: 0; overflow-wrap: anywhere; }
.gallery-card__action { display: flex; justify-content: space-between; width: 100%; padding-top: 14px; margin-top: auto; border-top: 1px solid #e4e3ef; color: #3e3d8b; font-size: 16px; font-weight: 600; }
.gallery-card__link:hover .gallery-card__action { color: #e23b32; }
.gallery-page a:focus-visible,.gallery-page button:focus-visible { outline: 3px solid #f44336; outline-offset: 3px; }
.gallery-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.gallery-page .gallery-toolbar h2 { margin: 0; color: #272566; font: 700 28px/1.3 'Playfair Display',Georgia,serif; letter-spacing: 0; }
.gallery-back { flex-shrink: 0; color: #3e3d8b; font-weight: 600; text-decoration: none; padding-top: 5px; }
.gallery-photo { display: block; position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 10px; background: #f3f3f8; }
.gallery-photo__view { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 16px; color: #fff; background: linear-gradient(transparent,#171640d9); font-weight: 600; }
.gallery-empty { padding: 40px 24px; background: #f5f5f9; border-radius: 8px; color: #555; }
.gallery-pagination { margin-top: 36px; }
.gallery-pagination nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.gallery-pagination .page-link { color: #3e3d8b; border-color: #e4e3ef; }
.gallery-pagination .active>.page-link { background: #3e3d8b; border-color: #3e3d8b; color: #fff; }
.gallery-viewer { width: min(1100px,94vw); max-height: 94dvh; padding: 52px 24px 20px; border: 0; border-radius: 12px; background: #171630; color: #fff; }
.gallery-viewer::backdrop { background: #000c; }
.gallery-viewer figure { margin: 0; text-align: center; }
.gallery-viewer figure img { display: block; max-width: 100%; max-height: 65dvh; width: auto; height: auto; margin: auto; object-fit: contain; }
.gallery-viewer figcaption { margin-top: 14px; font-size: 16px; }
.gallery-viewer button { border: 1px solid #fff; background: transparent; color: #fff; width: 40px; height: 40px; border-radius: 50%; font-size: 24px; line-height: 1; }
.gallery-viewer__close { position: absolute; top: 8px; right: 12px; }
.gallery-viewer__controls { display: flex; justify-content: center; gap: 16px; margin-top: 16px; }
@media (max-width:1199px) { .gallery-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width:900px) { .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; } .gallery-toolbar { flex-direction: column; gap: 12px; } }
@media (max-width:575px) { .gallery-content { padding-block: 28px 36px; } .gallery-grid { grid-template-columns: minmax(0,1fr); } .gallery-card__body { padding: 18px; } .gallery-pagination nav>div { flex-wrap: wrap; gap: 12px; justify-content: center!important; } .gallery-viewer { padding-inline: 12px; } }
