.gallery-hero {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
    background:
        linear-gradient(rgba(7, 48, 43, 0.76), rgba(8, 39, 43, 0.84)),
        var(--village-hero-image) center / cover no-repeat;
}

.gallery-hero-card {
    max-width: 850px;
    padding: 65px 0;
    background: transparent;
}

.gallery-hero-card h1 {
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    line-height: 1.05;
    color: #fff;
}

.gallery-hero-card p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
}

.gallery-breadcrumb,
.gallery-breadcrumb a {
    color: #66e4b3;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

.gallery-breadcrumb span {
    margin: 0 8px;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gallery-filter a {
    padding: 10px 20px;
    background: #fff;
    border-radius: 30px;
    color: #111;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.gallery-filter a.active,
.gallery-filter a:hover {
    background: #198754;
    color: #fff;
}

.gallery-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    transition: 0.2s;
}

.gallery-card:hover {
    transform: translateY(-5px);
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-body {
    padding: 24px;
}

.gallery-badge {
    display: inline-block;
    background: #d8f3e4;
    color: #08783b;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.gallery-body h5 {
    font-weight: 800;
    margin-bottom: 8px;
}

.gallery-body p {
    color: #666;
    margin-bottom: 0;
}
.gallery-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.gallery-search-box {
    min-width: 260px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 999px;
}

.gallery-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
}

.gallery-card {
    height: 100%;
}

.gallery-lightbox {
    position: relative;
    display: block;
    overflow: hidden;
}

.gallery-card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    color: #fff;
    background: rgba(5, 68, 37, 0.78);
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.gallery-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf8f1;
    font-size: 60px;
}

.gallery-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(5, 68, 37, 0.62);
    opacity: 0;
    transition: opacity 0.25s ease;
    font-weight: 700;
}

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

.gallery-card:hover .gallery-image-overlay {
    opacity: 1;
}

.gallery-meta {
    padding-top: 10px;
    border-top: 1px solid #eef0f2;
    color: #6b7280;
}

.gallery-empty {
    padding: 80px 20px;
    text-align: center;
    background: #f8fbf9;
    border: 1px dashed #cfe0d6;
    border-radius: 18px;
}

.gallery-empty-icon {
    margin-bottom: 15px;
    font-size: 64px;
}

.pagination-custom .pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0;
}

.pagination-custom .page-link {
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #198754;
    border: 1px solid #dee2e6;
    border-radius: 10px;
}

.pagination-custom .page-item.active .page-link {
    color: #fff;
    background: #198754;
    border-color: #198754;
}

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 35px;
    background: rgba(0, 0, 0, 0.9);
}

.gallery-modal.show {
    display: flex;
}

.gallery-modal-content {
    width: min(100%, 1000px);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
}

.gallery-modal-content img {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    background: #111;
}

.gallery-modal-content video {
    display: block;
    width: 100%;
    max-height: 72vh;
    background: #111;
}

.gallery-modal-info {
    padding: 20px 24px;
}

.gallery-modal-info h4 {
    margin-bottom: 7px;
    font-weight: 800;
}

.gallery-modal-info p {
    margin: 0;
    color: #6b7280;
}

.gallery-modal-close {
    position: absolute;
    top: 18px;
    right: 25px;
    z-index: 2;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 48px;
    line-height: 1;
}

.gallery-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .gallery-filter {
        flex-direction: column;
    }

    .gallery-filter > *,
    .gallery-search-box {
        width: 100%;
    }

    .gallery-img {
        height: 230px;
    }

    .gallery-modal {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        min-height: 300px;
    }

    .gallery-hero-card {
        padding: 55px 0;
    }

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