.article-hero {
    position: relative;
    height: 50vh;
    min-height: 350px;
    background: linear-gradient(135deg, var(--color-red) 0%, rgba(122, 31, 61, 1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-top: 70px;
    overflow: hidden;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

.article-hero__inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0.5rem;
    box-sizing: border-box;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.article-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0.6;
}

.article-hero h1 {
    color: white;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease-out;
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 0 0.25rem;
    overflow-wrap: anywhere;
    word-wrap: break-word;
    hyphens: auto;
}

.article-meta {
    animation: fadeInUp 1s ease-out 0.3s both;
    position: relative;
    z-index: 1;
    margin-top: var(--spacing-md);
    font-size: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.25rem;
    padding: 0 0.25rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .article-hero {
        height: auto;
        min-height: 260px;
        padding: 2.5rem 1.25rem 2rem;
    }

    .article-hero__inner {
        padding: 0 0.75rem;
    }

    .article-hero h1 {
        font-size: clamp(1.35rem, 5.5vw, 1.85rem);
        line-height: 1.25;
        padding: 0 0.15rem;
    }

    .article-meta {
        font-size: 0.9rem;
        margin-top: 1rem;
        row-gap: 0.4rem;
        padding: 0 0.15rem;
    }

    .article-meta .article-meta__sep {
        display: none;
    }
}

@media (max-width: 480px) {
    .article-hero {
        padding: 2rem 1rem 1.75rem;
        min-height: 240px;
    }

    .article-hero__inner {
        padding: 0 0.5rem;
    }

    .article-hero h1 {
        font-size: clamp(1.25rem, 6vw, 1.65rem);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.article-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-dark);
}

.article-body p {
    margin-bottom: var(--spacing-md);
}

.article-body img {
    width: 100%;
    border-radius: 16px;
    margin: var(--spacing-lg) 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-gallery {
    margin: var(--spacing-lg) 0 var(--spacing-md) 0 !important;
    position: relative;
    z-index: 10 !important;
    padding-bottom: var(--spacing-md) !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.article-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.article-gallery-grid img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    cursor: zoom-in;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.article-gallery-grid img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .article-gallery {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .article-gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        justify-items: center;
    }

    .article-gallery-grid img {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        transform: none !important;
    }

    .article-body img {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
}

.article-gallery-thumb:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 3px;
}

/* Lightbox galerii artykułu */
.article-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10050;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    padding: 1rem;
    box-sizing: border-box;
}

.article-lightbox.is-open {
    display: flex;
}

body.article-lightbox-open {
    overflow: hidden;
}

.article-lightbox__stage {
    max-width: min(1200px, 92vw);
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-lightbox__stage img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.article-lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.article-lightbox__close:hover {
    background: rgba(220, 20, 60, 0.85);
    transform: scale(1.06);
}

.article-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.article-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.06);
}

.article-lightbox__nav--prev {
    left: 1.25rem;
}

.article-lightbox__nav--next {
    right: 1.25rem;
}

.article-lightbox__counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .article-lightbox__nav {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .article-lightbox__nav--prev {
        left: 0.5rem;
    }

    .article-lightbox__nav--next {
        right: 0.5rem;
    }

    .article-lightbox__close {
        top: 0.75rem;
        right: 0.75rem;
        width: 42px;
        height: 42px;
        font-size: 1.6rem;
    }
}

.article-gallery-swiper {
    width: 100% !important;
    height: 500px !important;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 2;
}

.article-gallery-swiper .swiper-wrapper {
    height: 100%;
}

.article-gallery-swiper .swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    height: 100% !important;
}

.article-gallery-swiper .swiper-slide-active,
.article-gallery-swiper .swiper-slide-next,
.article-gallery-swiper .swiper-slide-prev {
    opacity: 1 !important;
    visibility: visible !important;
}

.article-gallery-swiper .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 1 !important;
}

.article-gallery-swiper .swiper-slide-active img,
.article-gallery-swiper .swiper-slide-next img,
.article-gallery-swiper .swiper-slide-prev img {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Override any Swiper default styles */
.article-gallery-swiper .swiper-wrapper {
    display: flex !important;
}

.article-gallery-swiper .swiper-slide-duplicate {
    opacity: 1 !important;
    visibility: visible !important;
}

.article-gallery-swiper .swiper-pagination-bullet {
    background: var(--color-red);
    opacity: 0.5;
}

.article-gallery-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

.article-gallery-swiper .swiper-button-next,
.article-gallery-swiper .swiper-button-prev {
    color: var(--color-red);
    z-index: 10;
}

.article-gallery-swiper .swiper-pagination {
    z-index: 10;
}

/* Ensure footer doesn't overlap gallery */
footer {
    position: relative !important;
    z-index: 1 !important;
    margin-top: var(--spacing-md) !important;
}

/* Ensure article content is above footer */
article {
    position: relative;
    z-index: 2;
    margin-bottom: var(--spacing-md) !important;
    padding-bottom: var(--spacing-md) !important;
}

.article-content {
    margin-bottom: var(--spacing-md) !important;
    padding-bottom: var(--spacing-md) !important;
}

.article-body {
    margin-bottom: var(--spacing-md) !important;
    padding-bottom: var(--spacing-md) !important;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-red);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

/* Share Buttons — klasy bez „fb/facebook” (mniej blokad adblock) */
.share-buttons .share-action,
.share-buttons button,
.share-buttons .share-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    line-height: 1.2;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 44px;
}

.share-buttons .share-action:hover,
.share-buttons button:hover,
.share-buttons .share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: white !important;
    text-decoration: none;
}

.share-buttons .share-action:active,
.share-buttons button:active,
.share-buttons .share-btn:active {
    transform: translateY(0);
}

.share-action--1,
.share-fb {
    background: linear-gradient(135deg, #1877F2 0%, #0d5fcc 100%) !important;
}

.share-action--1:hover,
.share-fb:hover {
    background: linear-gradient(135deg, #0d5fcc 0%, #0a4ba3 100%) !important;
}

.share-action--2,
.share-li {
    background: linear-gradient(135deg, #0A66C2 0%, #004182 100%) !important;
}

.share-action--2:hover,
.share-li:hover {
    background: linear-gradient(135deg, #004182 0%, #003366 100%) !important;
}

.share-action--3,
.share-tw {
    background: linear-gradient(135deg, #1DA1F2 0%, #0d8bd9 100%) !important;
}

.share-action--3:hover,
.share-tw:hover {
    background: linear-gradient(135deg, #0d8bd9 0%, #0a6fa8 100%) !important;
}

.share-action--4,
.share-copy {
    background: linear-gradient(135deg, var(--color-red) 0%, rgba(122, 31, 61, 1) 100%) !important;
}

.share-action--4:hover,
.share-copy:hover {
    background: linear-gradient(135deg, rgba(122, 31, 61, 1) 0%, rgba(100, 25, 50, 1) 100%) !important;
}

.share-buttons .share-action i,
.share-buttons .share-btn i,
.share-buttons button i {
    font-size: 1.1rem;
}

.share-section {
    margin: var(--spacing-xl) 0 var(--spacing-lg) 0;
    padding: var(--spacing-lg) 0;
    text-align: center;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Pasek udostępniania pod artykułem — zawsze widoczny */
.article-share-bar {
    background: linear-gradient(180deg, #f5f5f5 0%, #fff 100%);
    padding: 2rem 0 3rem;
    border-top: 3px solid var(--color-red);
    position: relative;
    z-index: 5;
    clear: both;
    overflow: visible !important;
}

.article-share-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.article-share-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-burgundy, #7A1F3D);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.article-share-card__title i {
    color: var(--color-red);
    font-size: 1.35rem;
}

.share-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.share-section-title i {
    color: var(--color-red);
    font-size: 1.5rem;
}

.share-buttons {
    display: flex !important;
    gap: var(--spacing-sm);
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 48px;
}

@media (max-width: 480px) {
    .share-buttons .share-action,
    .share-buttons .share-btn,
    .share-buttons button {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
        min-width: 140px;
        padding: 0.7rem 1rem;
        font-size: 0.92rem;
    }
}
