/* ==========================================================================
   BLOG - lista wpisów blog.html
   ========================================================================== */

.blog-hero {
    padding-top: 140px;
    padding-bottom: 6rem;
}

.blog-heading {
    margin-bottom: 2rem;
}

.blog-heading h1 {
    max-width: 980px;
}

.blog-heading p {
    max-width: 850px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.blog-card {
    text-align: left;
    padding: 2rem;
    overflow: hidden;
}

.blog-card-image {
    margin: -2rem -2rem 1.5rem;
    height: 220px;
    overflow: hidden;
    background: rgba(255, 42, 75, 0.08);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.06);
}

.blog-card h3 {
    margin-bottom: 0.8rem;
}

.blog-card p {
    margin-bottom: 1.4rem;
}

.blog-card a {
    font-weight: 600;
    color: var(--color-red-primary);
}

.blog-card a:hover {
    color: #cc0022;
}

.blog-category {
    display: inline-flex;
    margin-bottom: 1rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 42, 75, 0.08);
    color: var(--color-red-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.blog-date {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--color-gray-light);
}

/* ==========================================================================
   WPIS BLOGOWY
   ========================================================================== */

.blog-post {
    position: relative;
}

.blog-post-hero {
    padding-top: 140px;
    padding-bottom: 3rem;
}

.blog-post-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.blog-post-hero-text h1 {
    font-size: clamp(1.5rem, 3.8vw, 3.4rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.blog-post-hero-text > p {
    max-width: 680px;
    font-size: 1.1rem;
}

.blog-post-hero-image {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.14);
    background: rgba(255, 255, 255, 0.65);
}

.blog-post-hero-image img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    display: block;
}

.post-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--color-white-muted);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--glass-shadow);
}

.blog-post-content {
    padding-top: 2rem;
    padding-bottom: 6rem;
}

.blog-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: start;
}

.article-content {
    min-width: 0;
    text-align: left;
}

.article-content > p {
    font-size: 1.05rem;
    max-width: 850px;
}

.article-content h2 {
    margin-top: 2.6rem;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.article-content figure {
    margin: 2rem 0;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

.article-content figure img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.article-content ul {
    list-style: none;
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 1.5rem;
}

.article-content ul li {
    position: relative;
    padding-left: 1.6rem;
    color: var(--color-white-muted);
}

.article-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-red-primary);
    font-weight: 700;
}

.article-split {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 2rem;
    align-items: center;
    margin: 2.5rem 0;
}

.article-split figure {
    margin: 0;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 1rem 0 1.5rem;
}

.search-tags span {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    color: var(--color-white-muted);
    font-size: 0.9rem;
    box-shadow: var(--glass-shadow);
}

.article-summary {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.article-summary h2 {
    margin-top: 0;
}

.article-cta {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255, 42, 75, 0.08), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(255, 42, 75, 0.18);
    box-shadow: 0 18px 50px rgba(255, 42, 75, 0.12);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.article-cta h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.article-cta p {
    margin-bottom: 0;
}

/* ==========================================================================
   SIDEBAR WPISU
   ========================================================================== */

.blog-sidebar {
    position: sticky;
    top: 110px;
}

.sidebar-box {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
}

.sidebar-box h3 {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

.sidebar-post {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sidebar-post:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    background: rgba(255, 42, 75, 0.08);
}

.sidebar-post span {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--color-white);
    font-weight: 600;
}

.sidebar-post:hover span,
.sidebar-post.active span {
    color: var(--color-red-primary);
}

.sidebar-categories {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.sidebar-categories li a {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    color: var(--color-white-muted);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-categories li a:hover {
    color: var(--color-red-primary);
}

/* ==========================================================================
   NAWIGACJA WPISÓW I POWIĄZANE
   ========================================================================== */

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: 2rem;
    overflow: hidden;
    border-radius: 24px;
    background: rgba(17, 24, 39, 0.08);
    box-shadow: var(--glass-shadow);
}

.post-navigation a {
    display: block;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.78);
}

.post-navigation a span {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-white-muted);
    font-size: 0.85rem;
}

.post-navigation a strong {
    display: block;
    color: var(--color-white);
}

.post-navigation a:hover strong {
    color: var(--color-red-primary);
}

.related-posts {
    margin-top: 3rem;
}

.related-posts h2 {
    margin-top: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.related-card {
    display: block;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.related-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.related-card strong {
    display: block;
    color: var(--color-white);
    margin-bottom: 0.8rem;
}

.related-card span {
    color: var(--color-red-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-highlight);
}

/* ==========================================================================
   RESPONSYWNOŚĆ BLOGA
   ========================================================================== */

@media (max-width: 1200px) {
    .blog-post-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-post-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-post-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .article-split {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding-top: 110px;
        padding-bottom: 4rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-post-hero {
        padding-top: 110px;
        padding-bottom: 2rem;
    }

    .blog-post-hero-text h1 {
        font-size: 2.35rem;
    }

    .blog-post-hero-image img {
        min-height: 260px;
    }

    .blog-post-content {
        padding-bottom: 4rem;
    }

    .article-content h2 {
        font-size: 1.65rem;
    }

    .article-content > p {
        font-size: 1rem;
    }

    .article-summary,
    .article-cta {
        padding: 1.5rem;
    }

    .article-cta {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .sidebar-post {
        grid-template-columns: 72px 1fr;
    }

    .sidebar-post img {
        width: 72px;
        height: 56px;
    }
}

@media (max-width: 420px) {
    .blog-post-hero-text h1 {
        font-size: 2rem;
    }

    .post-meta {
        gap: 0.5rem;
    }

    .post-meta span {
        font-size: 0.78rem;
    }

    .search-tags span {
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   STRONA KATEGORII BLOGA
   ========================================================================== */

.category-page .blog-heading {
    margin-bottom: 3rem;
}

.category-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sidebar-categories a.active {
    color: var(--color-red-primary);
    font-weight: 700;
}

@media (max-width: 992px) {
    .category-posts {
        grid-template-columns: 1fr;
    }
}

.blog-post-image {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-post-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .blog-post-image {
        height: 200px;
    }
}