.gallery-page {
    width: min(1420px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3.25rem 0 1rem;
}
.gallery-intro {
    max-width: 900px;
    margin: 0 auto 2.25rem;
    text-align: center;
}
.gallery-kicker {
    margin: 0 0 .65rem;
    color: #176a48;
    font-family: Arial, sans-serif;
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .16em;
}
.gallery-intro h1 {
    margin: 0 0 .75rem;
    color: #173f32;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 1;
}
.gallery-intro > p:not(.gallery-kicker) {
    color: #4e5f58;
    font-size: 1.18rem;
    line-height: 1.65;
}
.gallery-note {
    display: inline-block;
    margin-top: .25rem;
    padding: .55rem .85rem;
    border-radius: 999px;
    background: #edf6f1;
    color: #176a48 !important;
    font-family: Arial, sans-serif;
    font-size: .9rem !important;
    font-weight: 700;
}
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 0 0 2rem;
}
.gallery-filter {
    border: 1px solid #c7d8cf;
    border-radius: 999px;
    background: #fff;
    color: #176a48;
    padding: .65rem 1rem;
    font: 700 .92rem Arial, sans-serif;
    cursor: pointer;
}
.gallery-filter:hover,
.gallery-filter:focus-visible,
.gallery-filter.is-active {
    background: #176a48;
    border-color: #176a48;
    color: #fff;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.15rem;
}
.gallery-card {
    margin: 0;
    overflow: hidden;
    border: 1px solid #d6e2dc;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(19, 65, 48, .08);
}
.gallery-card[hidden] { display: none; }
.gallery-open {
    display: block;
    width: 100%;
    height: 250px;
    padding: 0;
    border: 0;
    background: #e9efec;
    cursor: zoom-in;
    overflow: hidden;
}
.gallery-open img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s ease;
}
.gallery-open:hover img,
.gallery-open:focus-visible img { transform: scale(1.035); }
.gallery-card figcaption {
    padding: .8rem 1rem .9rem;
    color: #244b3c;
    font-family: Arial, sans-serif;
    font-size: .92rem;
    font-weight: 700;
}
.gallery-empty {
    max-width: 760px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #d6e2dc;
    border-radius: 12px;
    background: #f7faf8;
    text-align: center;
}
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 70px;
    align-items: center;
    background: rgba(5, 20, 15, .94);
    padding: 2rem;
}
.gallery-lightbox figure {
    margin: 0;
    min-width: 0;
    text-align: center;
}
.gallery-lightbox figure img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 10px 45px rgba(0,0,0,.4);
}
.gallery-lightbox figcaption {
    margin-top: .85rem;
    color: #fff;
    font: 600 1rem Arial, sans-serif;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 3rem;
    line-height: 1;
}
.lightbox-prev,
.lightbox-next {
    font-size: 4.5rem;
    line-height: 1;
    opacity: .85;
}
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover { opacity: 1; }
body.lightbox-open { overflow: hidden; }
@media (max-width: 1050px) {
    .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .gallery-page { padding-top: 2.25rem; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-open { height: 190px; }
    .gallery-lightbox {
        grid-template-columns: 45px minmax(0, 1fr) 45px;
        padding: 1rem .5rem;
    }
    .lightbox-prev, .lightbox-next { font-size: 3.5rem; }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-open { height: 260px; }
}


/* Version 12 - gallery finishing touches */
.gallery-card figcaption,
.gallery-card .caption,
.gallery-caption {
    font-size: 1rem;
    font-weight: 700;
    color: #164d3a;
    padding: .8rem 1rem 1rem;
    line-height: 1.25;
}
.lightbox-caption,
#lightbox-caption,
.gallery-lightbox-caption {
    background: rgba(3, 36, 28, .96);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    padding: .8rem 1rem;
}
@media (max-width: 700px) {
    .gallery-card figcaption,
    .gallery-card .caption,
    .gallery-caption {
        font-size: .95rem;
    }
}
