.custom-post-layout {
    margin: 0 auto;
    padding: 0.625rem 1rem 2rem 1rem;
}

/* Nagłówek H1 */
.custom-article .entry-title {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: inherit;
}

/* Kategoria */
.post-category {
    margin-bottom: 1.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color:  color-mix(in srgb, var(--ast-global-color-8) 40%, transparent);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--ast-global-color-0);
}

/* Meta informacje */
.post-meta-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    width: 100%;
}

.post-meta-info-details {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
gap: 1rem;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 4rem;
}

.author-avatar {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--ast-global-color-3);
    font-size: 0.75rem;
}

.author-spec {
    font-size: 0.75rem;
    color: var(--ast-global-color-1);
}

.date-reading-time {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding-top: 0.5rem;
    flex-wrap: nowrap;
}

.post-date,
.reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--ast-global-color-0);
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.share-label {
    font-size: 0.75rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 0.5rem;
    border: 1px solid var(--ast-global-color-0);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    padding: 0.4rem;
    background: transparent;
    color: var(--ast-global-color-0);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: var(--ast-global-color-0);
    color: var(--ast-global-color-4);
    border-color: var(--ast-global-color-0);
}

.share-btn.copied {
    background-color: #4caf50;
    color: #fff;
    border-color: #4caf50;
}

/* Separator */
.post-separator {
    border: none;
    height: 1px;
    background-color: var(--ast-global-color-7);
    margin: 2rem auto;
    width: calc(100% - 13%);
}

/* Excerpt */
.post-excerpt {
    margin-bottom: 2rem;
}

/* Featured Image */
.post-featured-image {
    margin: 2rem 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    aspect-ratio: 16 / 7;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 0.5rem;
    object-fit: cover;
    object-position: top;
}

/* Table of Contents */
.table-of-contents {
    background-color: var(--ast-global-color-5);
    padding: 1.5rem 2rem;
    border-radius: 0.5rem;
    margin: 2rem 0;
    border: 1px solid var(--ast-global-color-7);
    justify-self: center;
    width: 80%;
    
}

.toc-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.toc-list {
    list-style: none;
    counter-reset: toc-counter;
    padding-left: 0;
    margin: 0;
}

.toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.toc-list li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    font-weight: 600;
}

.toc-list a {
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Entry Content */
.entry-content {
    margin: 2rem 0 3rem;
}

.entry-content h2 {
    scroll-margin-top: 100px;
}

.entry-content ul,
.entry-content ol {
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* Author Bio Section */
.author-bio-section {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--ast-global-color-7);
}

.author-bio-card {
    display: flex;
    gap: 3rem;
    padding: 2rem;
    background-color: var(--ast-global-color-4);
    border-radius: 0.5rem;
    border: 1px solid var(--ast-global-color-7);
}

.author-bio-avatar {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    align-self: center;
}

.author-bio-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.author-bio-name {
    font-weight: 600;
    margin: 0;
}

.author-bio-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: color-mix(in srgb, var(--ast-global-color-8) 40%, transparent);
    color: var(--ast-global-color-0);
    border: 1px solid var(--ast-global-color-0);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.author-bio-description {
    margin: 0;
}

/* Related Posts Section */
.related-posts-section {
    margin: 3rem 0;
    padding-top: 2rem;
    border-top: 1px solid var(--ast-global-color-7);
}

.related-posts-title {
    margin-bottom: 1.5rem;
}

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

.related-post-card {
    background-color: var(--ast-global-color-4);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.related-post-category {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--ast-global-color-0);
    color: var(--ast-global-color-4);
    font-size: 0.75rem;
    font-weight: 500;
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    border-radius: 0.5rem;
    z-index: 2;
}

.related-post-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 1.25rem;
}

.related-post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    flex: 1;
}

.related-post-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--ast-global-color-0);
     margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-post-layout {
        padding: 20px 15px;
    }

    .custom-article .entry-title {
    font-size: 2.5rem;
    }
    
    .post-meta-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .author-meta {
        margin-right: 0;
    }
    
    .date-reading-time {
        align-items: flex-start;
        gap: 1rem;
    }
    
    .social-share {
        flex-wrap: wrap;
    }

    .table-of-contents {
        width: 100%;  
    }
    
    .author-bio-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 2rem;
    }

    .author-bio-content {
        align-items: center;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
}

@media (max-width: 480px) {

    .custom-article .entry-title {
    font-size: 2rem;
    }

    .entry-content h2 {
    font-size: 1.5rem;
    }
    
    .table-of-contents {
        padding: 1rem 1.25rem;
    }

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