/* ── GALLERY BASE ───────────────────────────────────────────── */
.modular-gallery {
    padding-top: 32px;
    margin-bottom: 2rem;
}

/* ── SHARED ITEM ────────────────────────────────────────────── */
.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--bg2, #111);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.gallery-item img[data-src] {
    background: var(--bg2, #1a1a1a);
}
.gallery-item:hover img {
    transform: scale(1.04);
    opacity: 0.72;
}
.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    background: rgba(0, 0, 0, 0.42);
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
.gallery-overlay-icon {
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    padding: 9px;
    color: #fff;
    display: block;
    backdrop-filter: blur(2px);
}

/* ── STYLE: GRID (domyślny) ─────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px;
    margin-bottom: 24px;
}
.gallery-grid .gallery-item {
    height: 220px;
}

/* ── STYLE: MOSAIC ──────────────────────────────────────────── */
.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 6px;
    margin-bottom: 24px;
}
.gallery-mosaic .gallery-item {
    height: auto;
}
.gallery-mosaic .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}
@media (max-width: 640px) {
    .gallery-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
    }
    .gallery-mosaic .gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
}

/* ── LOAD MORE ──────────────────────────────────────────────── */
.gallery-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 4px 0 32px;
    padding: 18px 0;
    background: none;
    border: none;
    border-top: 1px solid var(--border, rgba(255,255,255,0.08));
    color: var(--text-muted, #888);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: inherit;
}
.gallery-load-more::before,
.gallery-load-more::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, rgba(255,255,255,0.08));
}
.gallery-load-more .load-more-chevron {
    width: 20px;
    height: 20px;
    border: 1px solid currentColor;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease, border-color 0.2s ease;
}
.gallery-load-more:hover:not(:disabled) {
    color: var(--accent, #c8a97e);
}
.gallery-load-more:hover:not(:disabled) .load-more-chevron {
    transform: translateY(2px);
}
.gallery-load-more:disabled {
    opacity: 0.35;
    cursor: wait;
}
.gallery-load-more:disabled .load-more-chevron {
    animation: chevron-pulse 0.8s ease-in-out infinite alternate;
}
@keyframes chevron-pulse {
    from { opacity: 0.4; }
    to   { opacity: 1;   }
}

/* ── SECTION DIVIDER ────────────────────────────────────────── */
.gallery-section-divider {
    display: flex;
    align-items: center;
    margin: 32px 0 20px;
    gap: 12px;
    color: var(--text-muted, #888);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.gallery-section-divider::before,
.gallery-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.3;
}

/* ── VIDEO ──────────────────────────────────────────────────── */
.gallery-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.gallery-video-wrapper {
    background: var(--bg2, #111);
    position: relative;
}
.gallery-video-wrapper video {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    display: block;
}
