.footer-water {
    position: relative;
    background: radial-gradient(ellipse at 93% -35%, #205b6b 0, transparent 53%), #102c42;
    border-block-start: 2px solid #6ab6bd;
    padding-block: 2.2rem 1.65rem;
}
.water-footer-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(9rem, .7fr);
    gap: clamp(1.05rem, 3.2vw, 2.6rem);
}
.footer-brand { display: inline-flex; align-items: center; gap: .55rem; font-size: 1.09rem; font-weight: 700; color: #fff; text-decoration: none; }
.footer-brand:hover { color: #d3f3f5; }
.footer-brand img { flex: 0 0 42px; }
.footer-brand-block p { margin: .52rem 0 0; color: #d9eaf0; line-height: 1.9; font-size: .88rem; max-width: 24rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .16rem .75rem; align-content: start; }
.footer-links strong { grid-column: 1/-1; margin-block-end: .38rem; }
.footer-links a { display: flex; align-items: center; min-height: 39px; color: #e0eff2; text-underline-offset: .3em; font-size: .88rem; }
.footer-links a:hover { color: white; }
.footer-contacts { display: grid; align-content: start; gap: .36rem; }
.footer-contacts strong { margin-block-end: .2rem; }
.footer-contacts .button { min-height: 44px; width: 100%; max-width: 16rem; }
.footer-contacts .secondary { border-color: #83b1b8; }
.footer-brand-block { position: relative; }
.footer-brand-block::before {
    position: absolute;
    pointer-events: none;
    inset: -1.1rem -1.1rem auto auto;
    width: 6rem;
    height: 5rem;
    background: radial-gradient(ellipse at center, transparent 38%, #9bdee31a 39% 41%, transparent 42% 52%, #9bdee310 53% 55%, transparent 56%);
    content: "";
}

.gallery-heading { display: flex; gap: .55rem; align-items: center; }
.gallery-heading::before { content: ""; flex: 0 0 .56rem; height: .56rem; border-radius: 0 58% 58% 58%; transform: rotate(45deg); background: #238a9b; }
article .gallery:has(>a[data-photo]) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; }
.gallery > a[data-photo] {
    position: relative; display: block; min-width: 0; overflow: hidden;
    border: 1px solid #becfd4; border-radius: .72rem;
    background: #edf5f6; color: #172f42; text-decoration: none;
}
.gallery > a[data-photo] img { display: block; border-radius: 0; transition: filter .16s ease; }
.gallery > a[data-photo]:hover img { filter: brightness(1.07); }
.gallery > a[data-photo]:focus-visible { outline-offset: 3px; }
.gallery-caption { display: block; padding: .5rem .62rem; font-size: .84rem; font-weight: 600; line-height: 1.65; }
.gallery-more { display: inline-flex; align-items: center; min-height: 44px; }
.gallery-zoom {
    position: absolute; inset: .48rem auto auto .48rem; display: grid; place-items: center;
    width: 1.85rem; height: 1.85rem; border-radius: .5rem;
    color: #fff; background: #102c42de; font-size: 1.1rem;
}

body:has(.photo-viewer[open]) { overflow: hidden; }
.photo-viewer {
    box-sizing: border-box; padding: 0; border: 1px solid #82afb7; border-radius: .9rem;
    width: min(94vw, 65rem); max-width: none; max-height: 94dvh;
    background: #102c42; color: #fff; overflow: auto; font-family: inherit;
}
.photo-viewer::backdrop { background: #061521de; }
.photo-viewer-layout { display: grid; gap: .5rem; padding: .65rem; }
.photo-viewer-bar { display: flex; justify-content: space-between; align-items: center; color: #e1f1f3; font-size: .89rem; }
.photo-viewer button {
    min-width: 44px; min-height: 44px; padding: .28rem .6rem; border-radius: .5rem;
    border: 1px solid #84afb7; color: #fff; background: #1b424e;
    font: inherit; cursor: pointer;
}
.photo-viewer button:hover { background: #255966; }
.photo-viewer button:focus-visible { outline: 2px solid #ffdc93; outline-offset: 2px; }
.photo-viewer .photo-close { font-size: 1.6rem; line-height: 1; }
.photo-stage { display: grid; place-items: center; background: #081c2c; border-radius: .55rem; min-height: min(46dvh, 18rem); }
.photo-stage img { display: block; width: auto; height: auto; max-width: 100%; max-height: 69dvh; object-fit: contain; }
.photo-stage .photo-loading { visibility: hidden; }
.photo-stage .photo-error { padding: .65rem; text-align: center; }
.photo-original { color: #aee8ed; }
.photo-viewer-controls { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .35rem; }
.photo-viewer-controls button:last-child { grid-column: 3; }
.photo-viewer-controls > p { grid-column: 2; grid-row: 1; text-align: center; margin: 0; line-height: 1.6; font-size: .85rem; }
.photo-viewer [hidden] { display: none; }

@media (max-width: 760px) {
    .footer-water { padding-block: 1.25rem calc(4.85rem + env(safe-area-inset-bottom)); }
    .water-footer-grid { grid-template-columns: minmax(0,1fr); gap: .88rem; }
    .footer-brand-block::before { inset-inline-end: auto; inset-inline-start: 0; }
    .footer-links { padding-block: .72rem; border-block: 1px solid #376175; }
    .footer-links a { min-height: 44px; }
    .footer-contacts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .footer-contacts strong { grid-column: 1/-1; }
    .footer-contacts .button { max-width: none; font-size: .78rem; padding-inline: .33rem; }
    article .gallery:has(>a[data-photo]) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .48rem; }
    .gallery-caption { padding: .38rem .48rem; font-size: .77rem; }
    .photo-viewer-layout { padding: .48rem; }
    .photo-stage img { max-height: 63dvh; }
}
@media (prefers-reduced-motion: reduce) { .gallery > a[data-photo] img { transition: none; } }
