header {
    height: 4vw;
    background-color: #4b4a45;
    font-size: 3vw;
    text-align: center;
    color: aliceblue;
}

.gallery-page,
.gallery-page * {
    box-sizing: border-box;
}
img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 40vw;
    height: 40vw;
    margin-top: 2vw;
}


.activ {
    text-align: center;
    margin: 1.5vw auto 0;
    padding: 0.8vw 1vw;
    background-color: #f5f5f5;
}

.activ a {
    display: inline-block;
    margin: 0.4vw 1vw;
    font-size: 1.6vw;
    color: #4b4a45;
    text-decoration: underline;
    transition: all .1s ease;
}

.activ a:hover {
    text-decoration: none;
    transform: scale(1.05);
}


.excel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35vw;
    height: 1.35vw;
    margin-right: 0.35vw;
    border-radius: 0.15vw;
    background-color: #217346;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 0.9vw;
    font-weight: bold;
    line-height: 1;
    vertical-align: middle;
}


.site-sidebar {
    position: fixed;
    right: 1.2vw;
    top: 10vw;
    z-index: 20;
    box-sizing: border-box;
    width: 12vw;
    padding: 0.8vw;
    background-color: rgba(245, 245, 245, 0.96);
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    text-align: center;
}

.site-sidebar a {
    margin: 0;
    color: #4b4a45;
    text-decoration: none;
}

.site-sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3vw;
    height: 3vw;
    margin: 0 0.25vw 0.65vw;
    vertical-align: middle;
}

.site-sidebar__icon img {
    display: block;
    width: 3vw;
    height: 3vw;
    margin: 0;
}

.site-sidebar__max {
    border-radius: 50%;
    background-color: #111111;
    color: #ffffff !important;
    font-family: Arial, sans-serif;
    font-size: 0.85vw;
    font-weight: bold;
    line-height: 1;
}

.site-sidebar__phone {
    display: block;
    margin-top: 0.45vw !important;
    font-size: 0.95vw;
    line-height: 1.25;
}

.gallery-page {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding: 48px 0 16px;
}

.gallery-heading {
    margin-bottom: 28px;
}

.gallery-heading h1 {
    margin: 0 0 10px;
    color: #343530;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    line-height: 1.15;
}

.gallery-heading p {
    max-width: 680px;
    margin: 0;
    color: #686963;
    font-family: Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
}

.gallery-project {
    margin-bottom: 72px;
    padding: 34px;
    border: 1px solid #d8d9d4;
    border-radius: 6px;
    background: #f1f2ef;
}

.gallery-project__intro {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    align-items: end;
    gap: 48px;
    margin-bottom: 28px;
}

.gallery-project__eyebrow {
    display: block;
    margin-bottom: 9px;
    color: #217346;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.gallery-project h2,
.gallery-subheading h2 {
    margin: 0;
    color: #343530;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1.15;
}

.gallery-project__intro > p {
    margin: 0 0 3px;
    color: #686963;
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.gallery-project__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.gallery-project__grid figure {
    position: relative;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #ffffff;
}

.gallery-project__grid .gallery-project__cover {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-project__grid img {
    display: block;
    width: 100%;
    height: 220px;
    margin: 0;
    background: #dedfda;
    object-fit: cover;
    cursor: zoom-in;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.gallery-project__cover img {
    height: 100%;
    min-height: 452px;
}

.gallery-project__grid figure:hover img,
.gallery-project__grid img:focus-visible {
    filter: brightness(0.92);
    transform: scale(1.015);
}

.gallery-project__grid img:focus-visible {
    outline: 3px solid #217346;
    outline-offset: -3px;
}

.gallery-project__grid figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 26px 14px 12px;
    background: linear-gradient(transparent, rgba(28, 29, 26, 0.82));
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 13px;
    pointer-events: none;
}

.gallery-project__grid figcaption strong {
    font-size: 16px;
}

.gallery-project__grid figcaption span {
    color: #f1f2ef;
}

.gallery-project__link {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    margin-top: 24px;
    padding: 11px 18px;
    border-radius: 4px;
    background: #217346;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.gallery-project__link:hover {
    background: #185d38;
}

.gallery-subheading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 36px;
    margin-bottom: 24px;
}

.gallery-subheading p {
    margin: 0 0 3px;
    color: #686963;
    font-family: Arial, sans-serif;
    font-size: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.gallery-grid img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    border-radius: 4px;
    background-color: #ecece9;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid img:hover,
.gallery-grid img:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid #217346;
    outline-offset: -3px;
    box-shadow: 0 8px 22px rgba(38, 40, 36, 0.2);
    transform: scale(1.02);
}

.gallery-lightbox {
    width: min(1100px, calc(100% - 32px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #22231f;
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox::backdrop {
    background: rgba(18, 19, 17, 0.82);
}

.gallery-lightbox img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 88vh;
    margin: 0;
    object-fit: contain;
}

.gallery-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(24, 25, 22, 0.78);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.gallery-lightbox__previous,
.gallery-lightbox__next {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 58px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 4px;
    background: rgba(24, 25, 22, 0.72);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.gallery-lightbox__previous {
    left: 12px;
}

.gallery-lightbox__next {
    right: 12px;
}

.gallery-lightbox__caption {
    margin: 0;
    padding: 12px 70px 15px;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

@media (max-width: 980px) {
    .gallery-project__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-project__grid .gallery-project__cover {
        grid-column: span 2;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .gallery-page {
        width: calc(100% - 24px);
        padding-top: 30px;
    }

    .gallery-heading h1 {
        font-size: 34px;
    }

    .gallery-heading p {
        font-size: 15px;
    }

    .gallery-project {
        margin-bottom: 52px;
        padding: 20px;
    }

    .gallery-project__intro {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-project h2,
    .gallery-subheading h2 {
        font-size: 29px;
    }

    .gallery-project__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .gallery-project__grid .gallery-project__cover {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .gallery-project__cover img {
        height: 360px;
        min-height: 0;
    }

    .gallery-project__grid img {
        height: 220px;
    }

    .gallery-project__link {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .gallery-subheading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 420px) {
    .gallery-project {
        padding: 14px;
    }

    .gallery-project__grid {
        grid-template-columns: 1fr;
    }

    .gallery-project__grid .gallery-project__cover {
        grid-column: auto;
    }

    .gallery-project__cover img,
    .gallery-project__grid img {
        height: 300px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-lightbox__previous,
    .gallery-lightbox__next {
        width: 40px;
        height: 52px;
    }

    .gallery-lightbox__caption {
        padding-right: 50px;
        padding-left: 50px;
        font-size: 13px;
    }
}
