.gallery-container {
    width: 100%;
    text-align: left;
    padding: 18px 18px 26px;
}

.gallery-intro {
    margin-bottom: 18px;
}

.gallery-intro h1 {
    margin: 0 0 10px;
    text-align: left;
}

.gallery-intro p {
    margin: 0;
    line-height: 1.5;
    color: #2e2e2e;
}

.gallery-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.gallery-filter-btn {
    border: 1px solid #2d7a3d;
    background: #ffffff;
    color: #1a5a2a;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: #2d7a3d;
    color: #ffffff;
}

.gallery-grid {
    column-count: 3;
    column-gap: 14px;
}

.gallery-item {
    width: 100%;
    border: 1px solid #e5eee5;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    margin: 0 0 14px;
    padding: 0;
    break-inside: avoid;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.gallery-item.is-hidden {
    display: none;
}

.tile-slideshow {
    position: relative;
}

.tile-slide {
    display: none;
}

.tile-slide.is-active {
    display: block;
}

.tile-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    display: block;
}

.gallery-placeholder {
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, #3a8d4b 0%, #1a5a2a 100%);
    border-radius: 10px 10px 0 0;
}

.gallery-placeholder.placeholder-tall {
    min-height: 260px;
}

.gallery-placeholder.placeholder-wide {
    min-height: 160px;
}

.gallery-caption {
    display: block;
    padding: 10px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #1f1f1f;
}

.tile-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.tile-nav:hover {
    background: rgba(0, 0, 0, 0.65);
}

.tile-prev {
    left: 8px;
}

.tile-next {
    right: 8px;
}

.tile-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.tile-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
}

.tile-dot.is-active {
    background: #ffffff;
}

.gallery-fullscreen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1400;
    padding: 20px;
}

.gallery-fullscreen.is-open {
    display: flex;
    animation: fullscreenFadeIn 0.2s ease;
}

.fullscreen-stage {
    width: min(1200px, 94vw);
    height: min(86vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-fullscreen.is-open .fullscreen-stage > * {
    animation: fullscreenZoomIn 0.24s ease;
}

.fullscreen-stage .tile-image {
    width: auto;
    height: auto;
    max-width: 94vw;
    max-height: 86vh;
    object-fit: cover;
    border-radius: 12px;
}

.fullscreen-placeholder {
    width: min(94vw, 1100px);
    height: min(80vh, 760px);
    border-radius: 12px;
    font-size: clamp(34px, 5vw, 62px);
}

.fullscreen-close,
.fullscreen-nav {
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.fullscreen-close:hover,
.fullscreen-nav:hover {
    background: rgba(255, 255, 255, 0.35);
}

.fullscreen-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.fullscreen-prev {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.fullscreen-next {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes fullscreenFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fullscreenZoomIn {
    from {
        transform: scale(0.96);
        opacity: 0.65;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 1100px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 700px) {
    .gallery-container {
        padding: 14px 12px 18px;
    }

    .gallery-grid {
        column-count: 1;
    }

    .tile-nav {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    .fullscreen-close,
    .fullscreen-nav {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .fullscreen-prev {
        left: 10px;
    }

    .fullscreen-next {
        right: 10px;
    }
}