:root {
    --blog-post-width: 56rem;
    --blog-post-reading-width: 48rem;
}

.page-blog-post {
    .container__footer .conhecer_portifolio {
        display: none;
    }
}

.blog-post-banner {
    width: 100%;
    height: 14rem;
    overflow: hidden;
    border-bottom: 0.25rem solid var(--aunare-purple);
    background: #eee;

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

.container__blog-post,
.container__related-posts {
    width: calc(100% - (var(--page-gutter) * 2));
    max-width: var(--blog-post-width);
    margin-right: auto;
    margin-left: auto;
}

.container__blog-post {
    display: grid;
    gap: 1.75rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.blog-post-heading {
    max-width: var(--blog-post-reading-width);
    display: grid;
    gap: 0.875rem;

    time {
        color: var(--medium-text);
        font-size: 0.75rem;
    }

    > a {
        width: fit-content;
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        color: var(--medium-text);
        font-size: 0.8125rem;
        font-weight: 600;
    }

    > a:hover {
        color: var(--aunare-purple);
    }

    h1 {
        color: var(--aunare-purple);
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.2;
    }

    > p {
        color: var(--medium-text);
        font-size: 1rem;
        line-height: 1.55;
    }
}

.blog-post-content {
    max-width: var(--blog-post-reading-width);
    color: var(--medium-text);
    font-size: 0.9375rem;
    line-height: 1.7;

    h2,
    h3,
    h4 {
        margin-top: 2rem;
        margin-bottom: 0.75rem;
        color: var(--aunare-purple);
        font-weight: 700;
        line-height: 1.3;
    }

    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.1875rem; }
    h4 { font-size: 1rem; }

    p,
    ul,
    ol,
    blockquote,
    img {
        margin-bottom: 1.125rem;
    }

    ul,
    ol {
        padding-left: 1.5rem;
    }

    li + li {
        margin-top: 0.375rem;
    }

    blockquote {
        padding: 1rem 1.25rem;
        border-left: 0.25rem solid var(--aunare-green);
        color: var(--aunare-purple);
        font-size: 1.0625rem;
        background: rgba(79, 158, 99, 0.08);
    }

    a {
        color: var(--aunare-purple);
        font-weight: 600;
        text-decoration: underline;
    }

    img {
        max-width: 100%;
        height: auto;
        border-radius: 0.5rem;
    }
}

.blog-post-cta {
    width: fit-content;
    max-width: var(--blog-post-reading-width);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--aunare-purple);
    transition: background 180ms ease, transform 180ms ease;
}

.blog-post-cta:hover {
    background: #36163a;
    transform: translateY(-0.0625rem);
}

.container__related-posts {
    display: grid;
    gap: 1.5rem;
    padding-top: 2.5rem;
    padding-bottom: 4rem;
    border-top: 1px solid rgba(76, 31, 81, 0.24);

    > h2 {
        color: var(--aunare-purple);
        font-size: 1.25rem;
        font-weight: 700;
    }

    > div {
        display: grid;
        gap: 1.25rem;
    }

    article {
        overflow: hidden;
        border-radius: 0.625rem;
        background: var(--white);
        box-shadow: 0 0.25rem 0.875rem rgba(76, 31, 81, 0.14);

        > img {
            width: 100%;
            aspect-ratio: 1 / 1;
            object-fit: cover;
        }

        > div {
            display: grid;
            gap: 0.5rem;
            padding: 1rem;
        }

        time {
            color: var(--medium-text);
            font-size: 0.6875rem;
        }

        h3 {
            color: var(--aunare-purple);
            font-size: 0.9375rem;
            line-height: 1.35;
        }

        p {
            display: -webkit-box;
            overflow: hidden;
            color: var(--medium-text);
            font-size: 0.75rem;
            line-height: 1.5;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 4;
        }

        a {
            width: fit-content;
            color: var(--aunare-green);
            font-size: 0.8125rem;
            font-weight: 600;
        }
    }
}

@media (min-width: 768px) {
    .blog-post-banner {
        height: 24rem;
    }

    .container__blog-post {
        padding-top: 3rem;
        padding-bottom: 4.5rem;
    }

    .blog-post-heading {
        h1 {
            font-size: 2.25rem;
        }

        > p {
            font-size: 1.125rem;
        }
    }

    .blog-post-content {
        font-size: 1rem;
    }

    .container__related-posts {
        padding-top: 3rem;
        padding-bottom: 5rem;

        > div {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }
}

@media (min-width: 1200px) {
    .blog-post-banner {
        height: 28rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-post-cta {
        transition: none;
    }
}
