.agrind-gallery,
.agrind-gallery * {
    box-sizing: border-box;
}

.agrind-gallery {
    width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: clip;
    background: #f5f7f4;
}

.agrind-gallery__header {
    width: 100%;
    min-width: 0;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 42px;
    background: #194c18;
}

.agrind-gallery__heading {
    min-width: 0;
    flex: 1 1 auto;
}

.agrind-gallery__eyebrow,
.agrind-gallery__title,
.agrind-gallery__helper {
    overflow-wrap: anywhere;
}

.agrind-gallery__eyebrow {
    margin: 0 0 4px;
    font: 700 12px/1.2 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.agrind-gallery__title {
    margin: 0;
    font: 700 31px/1.08 Georgia, 'Times New Roman', serif;
}

.agrind-gallery__close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,.12);
    color: #fff;
    text-decoration: none;
    font: 300 29px/1 Arial, sans-serif;
    transition: transform .2s ease, background-color .2s ease;
}

.agrind-gallery__close:hover,
.agrind-gallery__close:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.22);
    transform: scale(1.04);
}

.agrind-gallery__body {
    width: 100%;
    min-width: 0;
    padding: 36px 24px 80px;
}

.agrind-gallery__inner {
    width: 100%;
    max-width: 960px;
    min-width: 0;
    margin: 0 auto;
}

.agrind-gallery__helper {
    margin: 0 0 28px;
    font: 400 13px/1.5 Arial, sans-serif;
}

.agrind-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    column-gap: 18px;
    row-gap: 16px;
    min-width: 0;
}

.agrind-gallery__column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    row-gap: 16px;
}

.agrind-gallery__card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: #e7ebe5;
    box-shadow: 0 1px 2px rgba(0,0,0,.14);
}

.agrind-gallery__trigger {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.agrind-gallery__trigger[target] {
    cursor: pointer;
}

.agrind-gallery__image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center center;
    transition: transform .3s ease, filter .3s ease;
}

.agrind-gallery__card:hover .agrind-gallery__image {
    transform: scale(1.018);
    filter: saturate(1.04);
}

.agrind-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 32px;
    background: rgba(7, 21, 8, .88);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

.agrind-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.agrind-lightbox__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 94vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.agrind-lightbox__close {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

body.agrind-lightbox-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .agrind-gallery__header {
        min-height: 82px;
        padding: 16px 24px;
    }

    .agrind-gallery__body {
        padding: 30px 20px 56px;
    }

    .agrind-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 14px;
        row-gap: 14px;
    }

    .agrind-gallery__column {
        row-gap: 14px;
    }
}

@media (max-width: 767px) {
    .agrind-gallery__header {
        min-height: 76px;
        gap: 14px;
        padding: 14px 16px;
    }

    .agrind-gallery__title {
        font-size: 25px;
    }

    .agrind-gallery__body {
        padding: 24px 16px 40px;
    }

    .agrind-gallery__helper {
        margin-bottom: 18px;
    }

    .agrind-gallery__grid {
        grid-template-columns: 1fr;
        column-gap: 12px;
        row-gap: 12px;
    }

    .agrind-gallery__column {
        row-gap: 12px;
    }

    .agrind-lightbox {
        padding: 20px 14px;
    }

    .agrind-lightbox__close {
        top: 12px;
        right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .agrind-gallery__image,
    .agrind-gallery__close,
    .agrind-lightbox {
        transition: none;
    }
}
