.wpgg-gallery { margin: 1.5em 0; }

.wpgg-filters {
    list-style: none;
    margin: 0 0 2em 0;
    padding: 0;
    display: flex;
    gap: 8px;
}
.wpgg-filters li {
    width: 100%;
}
.wpgg-filter {
    padding: 8px 14px;
    border-radius: 30px;
    text-decoration: none;
    color: #333;
    background: #dadada;
    cursor: pointer;
    font-family: Gotham, serif;
    font-size: 14px;
    display: block;
    text-align: center;
    font-weight: 400;
}

.wpgg-filter.is-active,
.wpgg-filter:hover {
    background: #cf0000;
    color: #fff;
}

/* ---------- Items shared styles ---------- */

.wpgg-grid { display: grid; gap: 12px; }

.wpgg-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.wpgg-item:hover {
    transform: translateY(0px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.wpgg-item .wpgg-img-link,
.wpgg-item .wpgg-video-link {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    position: relative;
    cursor: zoom-in;
}

.wpgg-item .wpgg-video-link { cursor: pointer; }

/* Play badge over video thumbs */
.wpgg-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.wpgg-item .wpgg-video-link:hover .wpgg-play-badge {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.05);
}

.wpgg-video-empty {
    display: block;
    width: 100%;
    height: 100%;
    background: #1d2327;
}

.wpgg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wpgg-item-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 10px;
    font-size: 13px;
    color: #fff;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
	display: none;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.wpgg-lb {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease;
}

.wpgg-lb.is-open {
    opacity: 1;
    visibility: visible;
}

.wpgg-lb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.wpgg-lb-stage {
    position: relative;
    z-index: 2;
    max-width: min(92vw, 1400px);
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpgg-lb-stage img,
.wpgg-lb-stage video {
    max-width: 100%;
    max-height: 86vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    background: #000;
}

.wpgg-lb-loader {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wpgg-lb-spin 0.8s linear infinite;
    z-index: 1;
}

@keyframes wpgg-lb-spin { to { transform: rotate(360deg); } }

.wpgg-lb-caption {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 6px 14px;
    border-radius: 3px;
    max-width: 80vw;
}

.wpgg-lb-caption:empty { display: none; }

.wpgg-lb-counter {
    position: absolute;
    z-index: 3;
    top: 18px;
    left: 18px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.wpgg-lb-btn {
    position: absolute;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    border: 0;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, transform 0.1s ease;
}

.wpgg-lb-btn:hover { background: rgba(0, 0, 0, 0.85); }
.wpgg-lb-btn:active { transform: scale(0.95); }

.wpgg-lb-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wpgg-lb-btn svg { width: 22px; height: 22px; }

.wpgg-lb-close { top: 14px; right: 14px; }
.wpgg-lb-prev  { left: 14px;  top: 50%; transform: translateY(-50%); }
.wpgg-lb-next  { right: 14px; top: 50%; transform: translateY(-50%); }

.wpgg-lb-prev:active { transform: translateY(-50%) scale(0.95); }
.wpgg-lb-next:active { transform: translateY(-50%) scale(0.95); }

.wpgg-lb.is-single .wpgg-lb-prev,
.wpgg-lb.is-single .wpgg-lb-next,
.wpgg-lb.is-single .wpgg-lb-counter {
    display: none;
}

/* Body scroll lock while lightbox is open */
body.wpgg-lb-open { overflow: hidden; }

/* Smaller buttons / tighter spacing on phones */
@media (max-width: 600px) {
    .wpgg-lb-btn { width: 40px; height: 40px; }
    .wpgg-lb-close { top: 10px; right: 10px; }
    .wpgg-lb-prev  { left: 8px; }
    .wpgg-lb-next  { right: 8px; }
    .wpgg-lb-counter { top: 12px; left: 12px; font-size: 12px; }
    .wpgg-lb-caption { bottom: 14px; font-size: 13px; }
}

/* ---------- 3 columns ---------- */

.wpgg-layout-cols-3 .wpgg-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
}
.wpgg-layout-cols-3 .wpgg-item { aspect-ratio: 1 / 1; }

/* ---------- 4 columns ---------- */

.wpgg-layout-cols-4 .wpgg-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
}
.wpgg-layout-cols-4 .wpgg-item { aspect-ratio: 1 / 1; }

/* ---------- Collage ----------
 * 4-column grid with a repeating 10-item pattern: visible positions 1 and 8
 * of every block of 10 are 2x2. Position is computed in JS so filtering
 * preserves the pattern.
 */

.wpgg-layout-collage .wpgg-grid {
    grid-template-columns: repeat(4, 1fr);
    /*grid-auto-rows: 120px;*/
    grid-auto-flow: dense;
}
.wpgg-layout-collage .wpgg-item { aspect-ratio: 1/1; }

/* ---------- Feature ----------
 * 4-column grid with a repeating 13-item pattern: visible position 5 of
 * every block of 13 is the 2x2 feature tile.
 */

.wpgg-layout-feature .wpgg-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 120px;
    grid-auto-flow: dense;
}
.wpgg-layout-feature .wpgg-item { aspect-ratio: auto; }

/* Big tile rule used by both Collage and Feature. */
.wpgg-layout-collage .wpgg-item.wpgg-tile-big,
.wpgg-layout-feature .wpgg-item.wpgg-tile-big {
    grid-column: span 2;
    grid-row: span 2;
}

/* ---------- Mobile: collapse to 2 columns ---------- */

@media (max-width: 600px) {
    .wpgg-layout-cols-3 .wpgg-grid,
    .wpgg-layout-cols-4 .wpgg-grid,
    .wpgg-layout-collage .wpgg-grid,
    .wpgg-layout-feature .wpgg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wpgg-layout-collage .wpgg-item.wpgg-tile-big,
    .wpgg-layout-feature .wpgg-item.wpgg-tile-big {
        grid-column: span 2;
        grid-row: span 1;
    }
    .wpgg-layout-collage .wpgg-item,
    .wpgg-layout-feature .wpgg-item {
        aspect-ratio: 1 / 1;
    }
	.wpgg-filters {
    flex-wrap: wrap;
    justify-content: center;
}
	.wpgg-filters li {
    width: 32%;
}
	.wpgg-filter {
    padding: 8px 10px;
    font-size: 13px;
}
}
