/* Gallery - keep original mosaic grid (from pre-redesign); section chrome only modernized */

#hd #a8 {
    background: var(--accent);
    color: #3d1f0a;
    font-weight: 600;
}

#zse1 {
    margin: 0;
    padding: 36px 0 64px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(232, 192, 122, .1), transparent 45%),
        var(--ink-deep);
    color: rgba(245, 243, 237, .9);
}

#zd1 {
    margin: 60px 0;
    padding: 0 95px;
}

.zd2 {
    display: grid;
    padding: 2px 10px;
    grid-template-columns: 250px 250px 250px 250px;
    grid-gap: 10px;
}

.zh11 {
    font-weight: 600;
    font-size: 1.4rem;
    text-align: center;
    margin: 16px 0 0;
    font-family: var(--font-display);
    color: #fff;
}

.zp1 {
    text-align: center;
    margin: 10px 0 0;
}

.zi1 {
    margin: 4px;
    transition: 1s all;
    box-shadow: 0 0 3px #000;
    display: block;
    border-radius: 5px;
    object-fit: cover;
    width: auto;
    height: auto;
    cursor: zoom-in;
}

.zi1:hover {
    transform: scale(1.3);
    z-index: 2;
    position: relative;
}

.zi2 {
    width: 250px;
    height: 250px;
}

.zi3 {
    width: 500px;
    height: 250px;
}

.zi4 {
    width: 250px;
    height: 500px;
}

.zi5 {
    width: 500px;
    height: 500px;
}

._1 {
    grid-row: 1 / 3;
}

._3 {
    grid-column: 2 / 4;
    grid-row: 2;
}

._4 {
    grid-column: 4;
    grid-row: 2;
}

._5 {
    grid-column: 3 / 6;
    grid-row: 1;
}

._6 {
    grid-column: 4;
    grid-row: 3 / 4;
}

._7 {
    grid-column: 2 / 4;
    grid-row: 3 / 4;
}

._8 {
    grid-column: 1;
    grid-row: 3;
}

._9 {
    grid-column: 4 / 6;
    grid-row: 4 / 6;
}

._10 {
    grid-column: 3;
    grid-row: 4;
}

._11 {
    grid-column: 2 / 4;
}

._12 {
    grid-column: 1;
    grid-row: 5;
}

._13 {
    grid-column: 1 / 3;
    grid-row: 4 / 5;
}

#zs1 {
    padding: 12px 0;
    background: var(--accent);
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    border-radius: 9px;
    display: block;
    width: 200px;
    text-align: center;
    margin: -17px auto 0;
    border: none;
    font-family: var(--font-body);
    transition: transform .35s var(--ease-out), box-shadow .35s ease;
}

@media only screen and (max-width: 1200px) {
    .zd2 {
        display: grid;
        padding: 2px 10px;
        grid-template-columns: 250px 250px 250px;
    }

    ._1 {
        grid-row: 7 / 9;
    }

    ._2 {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    ._3 {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    ._4 {
        grid-column: 3 / 4;
        grid-row: 2 / 3;
    }

    ._5 {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    ._6 {
        grid-column: 1;
        grid-row: 7 / 9;
    }

    ._7 {
        grid-column: 2 / 4;
        grid-row: 3 / 5;
    }

    ._8 {
        grid-column: 1;
        grid-row: 3 / 5;
    }

    ._9 {
        grid-column: 2 / 3;
        grid-row: 7 / 9;
    }

    ._10 {
        grid-column: 3;
        grid-row: 5 / 6;
    }

    ._11 {
        grid-column: 2 / 4;
        grid-row: 6;
    }

    ._12 {
        grid-column: 1;
        grid-row: 6 / 7;
    }

    ._13 {
        grid-column: 1 / 3;
        grid-row: 5 / 6;
    }
}

/* Mobile/tablet: drop mosaic sizing so images keep natural aspect ratio */
@media only screen and (max-width: 915px) {
    #zd1 {
        padding: 0;
        margin: 28px 0;
    }

    .zd2 {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 10px;
        padding: 0;
        margin: 0;
        grid-template-columns: none;
        grid-gap: 0;
    }

    .zd2 .zi1,
    .zd2 .zi2,
    .zd2 .zi3,
    .zd2 .zi4,
    .zd2 .zi5 {
        width: 100% !important;
        max-width: 100%;
        height: auto !important;
        aspect-ratio: auto;
        object-fit: contain;
        margin: 0;
        flex: 0 0 auto;
        align-self: stretch;
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .zd2 ._6 {
        display: block;
    }

    .zi1:hover {
        transform: none;
    }
}

@media (hover: hover) and (pointer: fine) {
    #zs1:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(232, 137, 58, .4);
    }
}

html:has(body.glbox-open),
body.glbox-open {
    overflow: hidden;
}

.glbox {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 72px 88px 48px;
    background: rgba(7, 24, 36, .94);
    overflow: hidden;
}

.glbox[hidden] {
    display: none;
}

.glbox-stage {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.glbox-img {
    display: block;
    max-width: min(1100px, 100%);
    max-height: calc(100vh - 180px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    opacity: 0;
    transition: opacity .2s ease;
}

.glbox-img.is-ready {
    opacity: 1;
}

.glbox-count {
    color: rgba(245, 243, 237, .86);
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: .04em;
}

.glbox-close,
.glbox-nav {
    position: absolute;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: rgba(232, 137, 58, .95);
    cursor: pointer;
    transition: transform .2s var(--ease-out), background .2s ease;
}

.glbox-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.glbox-close svg,
.glbox-nav svg {
    width: 22px;
    height: 22px;
    display: block;
}

.glbox-nav {
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    border-radius: 50%;
}

.glbox-prev {
    left: 18px;
}

.glbox-next {
    right: 18px;
}

@media (hover: hover) and (pointer: fine) {
    .glbox-close:hover,
    .glbox-nav:hover {
        transform: scale(1.06);
        background: #f09a4e;
    }
}

@media only screen and (max-width: 700px) {
    .glbox {
        padding: 64px 56px 48px;
    }

    .glbox-img {
        max-height: calc(100vh - 160px);
    }

    .glbox-nav {
        width: 44px;
        height: 44px;
        margin-top: -22px;
    }

    .glbox-prev {
        left: 8px;
    }

    .glbox-next {
        right: 8px;
    }
}
