

.home-gallery {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    color: #24372a;
}

.gallery-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 28px;
}

.gallery-eyebrow {
    color: #39804e;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.gallery-heading h2 {
    margin: 8px 0;
    color: #1d3b28;
    font-size: 34px;
}

.gallery-heading p {
    margin: 0;
    color: #718075;
    line-height: 1.7;
}

.gallery-view-more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 19px;
    border: 1px solid #2f7847;
    border-radius: 7px;
    color: #2f7847;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: .2s ease;
}

.gallery-view-more:hover {
    background: #2f7847;
    color: #fff;
}

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

.gallery-panel {
    min-width: 0;
    padding: 22px;
    border: 1px solid #e0e9e1;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(34, 67, 42, .045);
}

.gallery-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.gallery-panel-heading h3 {
    margin: 0 0 5px;
    color: #254b32;
    font-size: 21px;
}

.gallery-panel-heading p {
    margin: 0;
    color: #7a867c;
    font-size: 12px;
}

.gallery-count {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eaf4ec;
    color: #2f7847;
    font-size: 13px;
    font-weight: 800;
}

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

/* Image card is now a button (opens the preview), no caption in the grid */
.gallery-image-card {
    position: relative;
    display: block;
    width: 100%;
    height: 190px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 9px;
    background: #edf2ed;
    font: inherit;
    cursor: zoom-in;
}

.gallery-image-card:focus-visible {
    outline: 3px solid #7cc58a;
    outline-offset: 2px;
}

.gallery-image-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.gallery-image-card:hover img {
    transform: scale(1.06);
}

.gallery-image-fallback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #edf2ed;
    color: #728075;
    font-size: 12px;
}

.gallery-image-fallback span {
    font-size: 26px;
}

.gallery-video-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e4ebe4;
    border-radius: 9px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: box-shadow .2s ease, transform .2s ease;
}

.gallery-video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(34, 67, 42, .1);
}

.video-thumbnail {
    display: flex;
    height: 125px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #234b32, #54845d);
    color: #fff;
}

.video-play {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .65);
    font-size: 17px;
}

.video-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.video-card-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 12px;
}

.video-card-info h4 {
    margin: 0;
    color: #294632;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.video-card-info p {
    margin: 0;
    color: #7a867c;
    font-size: 11px;
}

.video-open {
    margin-top: auto;
    padding-top: 7px;
    color: #2f7847;
    font-size: 11px;
    font-weight: 700;
}

.gallery-empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 160px;
    padding: 20px;
    border: 1px dashed #d4dfd5;
    border-radius: 8px;
    color: #778379;
    font-size: 13px;
    text-align: center;
}

/* ---------- Lightbox ---------- */

.home-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 30px;
    background: rgba(10, 20, 12, .92);
}

.home-lightbox.active {
    display: flex;
}

.home-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 1100px;
    max-height: 100%;
}

.home-lightbox-content img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 8px;
}

.home-lightbox-caption {
    text-align: center;
}

.home-lightbox-caption h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.home-lightbox-caption p {
    margin: 0;
    color: #d6e6d9;
    font-size: 13px;
}

.home-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.home-lightbox-close:hover,
.home-lightbox-close:focus-visible {
    background: rgba(255, 255, 255, .3);
    outline: none;
}
.gallery-count {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eaf4ec;
    color: #2f7847;
    font-size: 13px;
    font-weight: 800;
}

.gallery-see-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 11px 14px;
    border: 1px dashed #b9d3bf;
    border-radius: 8px;
    color: #2f7847;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s ease;
}

.gallery-see-more:hover {
    background: #2f7847;
    border-color: #2f7847;
    color: #fff;
}
/* ---------- Responsive ---------- */

@media (max-width: 850px) {
    .gallery-columns {
        grid-template-columns: 1fr;
    }

    .gallery-image-card {
        height: 220px;
    }

    .video-thumbnail {
        height: 145px;
    }
}

@media (max-width: 480px) {
    .home-gallery {
        padding: 0 14px;
        margin: 35px auto;
    }

    .gallery-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-heading h2 {
        font-size: 29px;
    }

    .gallery-panel {
        padding: 14px;
    }

    .gallery-grid {
        gap: 9px;
    }

    .gallery-image-card {
        height: 145px;
    }

    .video-thumbnail {
        height: 110px;
    }

    .video-card-info {
        padding: 9px;
    }
}
