.gallery-hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 48px; padding-block: 48px 38px; }
.gallery-intro h1 { margin: 12px 0 18px; max-width: 560px; font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: 1.08; letter-spacing: -.045em; }
.gallery-intro > p:not(.eyebrow) { max-width: 510px; color: #4d6480; font-size: 1rem; line-height: 1.65; }
.gallery-hero figure { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.gallery-hero figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.gallery-hero figcaption { padding: 11px 16px; color: #375676; font-size: .8rem; }
.gallery-section { padding-bottom: 56px; }
.gallery-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-block: 16px 24px; border-top: 1px solid var(--line); }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-filters button { min-height: 44px; padding: 10px 15px; border: 1px solid #d1e2f6; border-radius: 24px; background: #fff; color: #375676; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.gallery-filters button:hover { background: #f0f6ff; }
.gallery-filters button[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.gallery-count { margin: 0; color: #5d728c; font-size: .8rem; }
.gallery-count [data-gallery-count] { font-weight: 800; color: var(--blue); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.gallery-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 6px 20px rgba(10,40,85,.04); }
.gallery-photo { display: block; position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: #edf3f9; }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .35s ease; }
.gallery-photo:focus-visible { outline-offset: -4px; }
.gallery-zoom { position: absolute; bottom: 14px; right: 14px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #fff; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--blue); font-size: 1.4rem; box-shadow: 0 4px 15px rgba(10,40,85,.12); }
.gallery-card-copy { padding: 18px 20px 22px; }
.gallery-card-copy .gallery-category { margin: 0 0 7px; color: var(--blue); font-size: .65rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.gallery-card-copy h2 { margin: 0 0 8px; font-size: 1.13rem; line-height: 1.3; letter-spacing: -.02em; }
.gallery-card-copy > p:last-child { margin: 0; color: #536b86; font-size: .84rem; line-height: 1.55; }
@media (hover: hover) and (pointer: fine) { .gallery-photo:hover img { transform: scale(1.035); } }

body.photo-modal-open { overflow: hidden; }
.photo-dialog { width: min(1000px, calc(100% - 40px)); max-height: calc(100dvh - 32px); margin: auto; padding: 14px; overflow-y: auto; border: 1px solid #395171; border-radius: 14px; background: #0c1d34; color: #fff; box-shadow: 0 24px 100px #0007; }
.photo-dialog::backdrop { background: rgba(3,12,25,.85); }
.photo-dialog-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-bottom: 8px; }
[data-photo-position] { padding-left: 6px; font-size: .8rem; color: #c4d4e7; font-variant-numeric: tabular-nums; }
.photo-dialog button { display: grid; flex: 0 0 44px; place-items: center; min-width: 44px; min-height: 44px; padding: 4px; border: 1px solid #536985; border-radius: 8px; background: #18304d; color: #fff; font-size: 1.4rem; cursor: pointer; }
.photo-dialog button:hover { background: #254669; }
.photo-dialog-image { display: block; width: 100%; height: min(67dvh, 720px); object-fit: contain; background: #071323; }
.photo-dialog-bottom { display: flex; gap: 20px; justify-content: space-between; align-items: center; padding: 16px 0 2px; }
.photo-dialog-bottom > div { flex: 1; min-width: 0; text-align: center; }
.photo-dialog-bottom h2 { margin: 0 0 5px; font-size: 1.1rem; line-height: 1.35; }
.photo-dialog-bottom p { margin: 0; color: #c4d4e7; font-size: .82rem; line-height: 1.4; }
@media (max-width: 950px) {
  .gallery-hero { gap: 26px; padding-top: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 700px) {
  .gallery-hero { grid-template-columns: 1fr; gap: 24px; padding-block: 30px; }
  .gallery-intro h1 { max-width: 520px; font-size: 2.15rem; }
  .gallery-intro .about-link { margin-top: 6px; }
  .gallery-card-copy { padding: 15px; }
  .gallery-card-copy h2 { font-size: 1rem; }
  .photo-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 10px; }
  .photo-dialog-image { height: 55dvh; }
  .photo-dialog-bottom { gap: 10px; }
  .photo-dialog-bottom h2 { font-size: .93rem; }
  .photo-dialog-bottom p { font-size: .73rem; }
}
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 20px; }
  .gallery-filters { gap: 7px; }
  .gallery-filters button { font-size: .74rem; padding-inline: 12px; }
  .gallery-intro h1 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { .gallery-photo:hover img { transform: none; } }
