.horizontal-gallery-block {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 40px 0;
}

.horizontal-gallery {
    position: relative;
    width: 100%;
    height: var(--gallery-height, 400px);
}

.horizontal-gallery-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--border-radius, 8px);
    cursor: grab;
}

.horizontal-gallery-container:active {
    cursor: grabbing;
}

.horizontal-gallery-track {
    display: flex;
    height: 100%;
    will-change: transform;
    gap: var(--gallery-gap, 20px);
}

.horizontal-gallery--vertical .horizontal-gallery-track {
    flex-direction: column;
    width: 100%;
}

.horizontal-gallery-item {
    position: relative;
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
}

.horizontal-gallery--vertical .horizontal-gallery-item {
    width: 100%;
    height: auto;
    margin-bottom: var(--gallery-gap, 20px);
}

.horizontal-gallery-item img {
    width: var(--item-width, 300px);
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    border-radius: var(--border-radius, 8px);
}

/* Override dla responsywnych rozmiarów */
.horizontal-gallery-item {
    width: var(--item-width, 300px);
    flex-shrink: 0;
}

/* Responsywne dostosowania */
@media (max-width: 768px) {
    .horizontal-gallery-item {
        width: calc(100vw / var(--items-in-view, 2) - var(--gallery-gap, 20px));
    }

    .horizontal-gallery-item img {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .horizontal-gallery-item {
        width: calc(100vw - var(--gallery-gap, 20px) * 2);
    }
}

/* Image ratio variants */
.horizontal-gallery--square .horizontal-gallery-item {
    width: var(--gallery-height, 400px);
}

.horizontal-gallery--portrait .horizontal-gallery-item {
    width: calc(var(--gallery-height, 400px) * 0.75);
}

.horizontal-gallery--landscape .horizontal-gallery-item {
    width: calc(var(--gallery-height, 400px) * 1.33);
}

.horizontal-gallery--wide .horizontal-gallery-item {
    width: calc(var(--gallery-height, 400px) * 1.77);
}

/* Hover effects */
.horizontal-gallery--hover-scale .horizontal-gallery-item:hover img {
    transform: scale(1.05);
}

.horizontal-gallery--hover-lift .horizontal-gallery-item:hover {
    transform: translateY(-5px);
}

.horizontal-gallery--hover-glow .horizontal-gallery-item:hover img {
    filter: brightness(1.1);
}

/* Captions */
.horizontal-gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    font-size: 14px;
    line-height: 1.4;
    font-family: var(--wp--preset--font-family--body);
}

.horizontal-gallery-caption--bottom {
    bottom: 0;
}

.horizontal-gallery-caption--overlay {
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: var(--border-radius, 8px);
    margin: 0 8px;
}

/* Progress indicator */
.horizontal-gallery-indicator {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.horizontal-gallery-progress {
    height: 100%;
    background: var(--wp--preset--color--gold-accent);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

/* NOWY NOWOCZESNY LIGHTBOX - BEZ MIGANIA */
.horizontal-gallery-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none !important;
    /* Wymusza ukrycie */
    opacity: 0;
    visibility: hidden;
    /* Dodatkowe ukrycie */
    transition: opacity 0.15s ease, visibility 0.15s ease;
    pointer-events: none;
}

.horizontal-gallery-lightbox.active {
    display: block !important;
    /* Wymusza pokazanie */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Backdrop */
.lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

/* Main container */
.lightbox-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header z counter i close */
.lightbox-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
}

/* Content area */
.lightbox-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 20px 20px;
    position: relative;
}

.lightbox-image-wrapper {
    max-width: calc(100vw - 200px);
    max-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    /* BEZ CIENI - czyste zdjęcie */
}

.lightbox-counter {
    color: white;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--wp--preset--font-family--body);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.lightbox-close {
    background: rgba(217, 192, 126, 0.9);
    color: var(--wp--preset--color--dark-bg);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* BEZ CIENI */
}

.lightbox-close:hover {
    background: var(--wp--preset--color--gold-accent);
    transform: scale(1.05);
    /* BEZ CIENI */
}

.lightbox-close svg {
    width: 20px;
    height: 20px;
}

/* Navigation buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(217, 192, 126, 0.9);
    color: var(--wp--preset--color--dark-bg);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* BEZ CIENI */
}

.lightbox-nav:hover:not(:disabled) {
    background: var(--wp--preset--color--gold-accent);
    transform: translateY(-50%) scale(1.05);
    /* BEZ CIENI */
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-nav svg {
    width: 20px;
    height: 20px;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}



/* Responsive */
@media (max-width: 768px) {
    .horizontal-gallery {
        height: 300px;
    }

    .horizontal-gallery-caption {
        font-size: 12px;
        padding: 8px 12px;
    }

    .horizontal-gallery-indicator {
        bottom: -25px;
    }

    /* Mobile lightbox adjustments */
    .lightbox-header {
        padding: 15px 20px;
        height: 60px;
    }

    .lightbox-counter {
        font-size: 14px;
        padding: 6px 12px;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
    }

    .lightbox-close svg {
        width: 18px;
        height: 18px;
    }

    .lightbox-content {
        padding: 60px 15px 15px;
    }

    .lightbox-image-wrapper {
        max-width: calc(100vw - 120px);
        max-height: calc(100vh - 120px);
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-nav svg {
        width: 18px;
        height: 18px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .horizontal-gallery {
        height: 250px;
    }

    .horizontal-gallery-caption {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* Touch devices */
@media (hover: none) {

    .horizontal-gallery--hover-scale .horizontal-gallery-item:hover img,
    .horizontal-gallery--hover-lift .horizontal-gallery-item:hover,
    .horizontal-gallery--hover-glow .horizontal-gallery-item:hover img {
        transform: none;
        filter: none;
        box-shadow: none;
    }
}

/* Accessibility */
.horizontal-gallery-container:focus {
    outline: 2px solid var(--wp--preset--color--gold-accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    .horizontal-gallery-item img,
    .horizontal-gallery-track,
    .horizontal-gallery-progress {
        transition: none !important;
    }
}

/* =================================
 