/* ============================================================
   GALERIA
   ============================================================ */

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--c-border-soft);
}

.filter-btn {
    padding: 9px 20px;
    background: linear-gradient(180deg, var(--c-cream) 0%, var(--c-cream-dark) 100%);
    border: 1px solid #d4be8a;
    border-radius: 22px;
    color: var(--c-primary);
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--t-base);
}

.filter-btn:hover {
    background: linear-gradient(180deg, #efe0b8 0%, #e0cfa5 100%);
    box-shadow: 0 2px 10px rgba(120, 90, 40, 0.22);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
    box-shadow: 0 2px 10px rgba(107, 58, 42, 0.3);
}

/* === Grupy dat === */
.gallery-date-group { margin-bottom: 38px; }

.gallery-date-heading {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--c-primary);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--c-cream-dark);
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* === Siatka === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}

.gallery-item {
    background: var(--c-card);
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--sh-sm);
    border: 1px solid var(--c-border-soft);
    cursor: pointer;
    transition: transform var(--t-base), box-shadow var(--t-base);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--sh-lg);
}

.gallery-thumb {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
}

.gallery-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}

.gallery-item:hover .gallery-thumb img { transform: scale(1.08); }

.gallery-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(107, 58, 42, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-base);
}

.gallery-item:hover .gallery-overlay { background: rgba(107, 58, 42, 0.35); }

.zoom-icon {
    font-size: 2.2rem;
    opacity: 0;
    color: white;
    transition: opacity var(--t-base), transform var(--t-base);
    transform: scale(0.8);
}

.gallery-item:hover .zoom-icon { opacity: 1; transform: scale(1); }

.gallery-caption { padding: 12px 14px; }

.gallery-caption p {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 0.88rem;
    color: var(--c-text);
    text-align: center;
}

.gallery-date {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    color: var(--c-text-muted);
    margin-top: 4px;
    text-align: center;
}

/* === Wideo === */
.gallery-thumb video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}

.gallery-overlay-video { background: rgba(0, 0, 0, 0.25); }
.gallery-item-video:hover .gallery-overlay-video { background: rgba(0, 0, 0, 0.5); }

.play-icon {
    font-size: 3rem;
    color: white;
    opacity: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    transition: all var(--t-base);
}

.gallery-item-video:hover .play-icon {
    opacity: 1;
    transform: scale(1.18);
}

.lightbox-content-video { max-width: 92%; max-height: 92vh; }
.lightbox-content-video video {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--r-md);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.empty-state {
    text-align: center;
    padding: 70px 20px;
    color: var(--c-text-muted);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
}

/* === Lightbox === */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.active { display: flex; }

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.4rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: color var(--t-fast);
}

.lightbox-close:hover { color: var(--c-gold-light); }

.lightbox-content {
    max-width: 92%;
    max-height: 92vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--r-md);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-info { margin-top: 14px; color: white; }

.lightbox-info h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0 0 6px 0;
    color: var(--c-gold-light);
}

.lightbox-info p {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .gallery-filters { gap: 6px; }
    .filter-btn { padding: 7px 14px; font-size: 0.82rem; }
}
