/* ============================================================
   Blok: Galeria (Lightbox)
   motyw-t/galeria-lightbox
   ============================================================ */

.t-galeria {
    display: grid;
    grid-template-columns: repeat( var(--t-gallery-cols, 3), 1fr );
    gap: 12px;
    margin: 2rem 0;
}

/* ── Kafelek ── */
.t-galeria-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ── Miniatura z zachowanymi proporcjami (padding-top trick) ── */
.t-galeria-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #e8e8e8;
}

.t-galeria-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

.t-galeria-item:hover .t-galeria-thumb img {
    transform: scale(1.05);
}

/* ── Placeholder gdy brak miniatury ── */
.t-galeria-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #bbb;
    background: #f0f0f0;
}

/* ── Overlay z przyciskiem Play (video) ── */
.t-galeria-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.25s;
}

.t-galeria-item:hover .t-galeria-play-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.t-galeria-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    font-size: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    text-indent: 3px; /* optyczna korekta strzałki */
}

.t-galeria-item:hover .t-galeria-play-btn {
    transform: scale(1.1);
    background: #fff;
}

/* ── Podpis ── */
.t-galeria-caption {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

/* ── Responsywność ── */
@media (max-width: 767px) {
    .t-galeria {
        grid-template-columns: repeat( min(var(--t-gallery-cols, 3), 2), 1fr );
        gap: 8px;
    }
}

@media (max-width: 479px) {
    .t-galeria {
        grid-template-columns: 1fr 1fr;
    }
}
