/**
 * Custom CSS for the blog page / views / widgets
 *
 * Note: Manually added because the source code and build scripts for the
 * 'dist' is not available.
 */

/* Overflow nav menu fix */
.navigation-block__bottom {
    overflow: hidden;
}

/* Blog posts overview */

.section-blog-posts {
    padding-block-start: 70px;
}

.section-blog-posts h2 {
    text-wrap: balance;
    margin-bottom: 40px;
}

.section-blog-posts .content-section>p {
    color: inherit;
    font-size: 24px;
    line-height: 1.5;
    margin-bottom: 40px;
}

.section-blog-posts .blog-posts {
    display: grid;
    gap: 40px;
}

.section-blog-posts .blog-posts article {
    display: grid;
    grid-template-areas:
        ". date"
        "thumbnail title"
        "thumbnail excerpt"
        "thumbnail open-btn";
    grid-template-rows: 30px auto;
    grid-template-columns: 33% 66%;
    grid-column-gap: 40px;
}

.section-blog-posts .blog-posts article>span {
    grid-area: date;
    align-self: center;
}

.section-blog-posts .blog-posts article>img {
    grid-area: thumbnail;
    align-self: start;
    max-width: 100%;
    max-height: 300px;
    object-fit: cover;
}

.section-blog-posts .blog-posts article>h3 {
    grid-area: title;
    padding-block-end: 20px;
    font-size: 48px;
    text-wrap: balance;
}

.section-blog-posts .blog-posts article>p {
    grid-area: excerpt;
    padding-block-end: 20px;
    color: inherit;
    font-size: 18px;
    line-height: 1.5;
}

.section-blog-posts .blog-posts article>a {
    grid-area: open-btn;
    align-self: end;
    width: fit-content;
}

@media screen and (max-width: 992px) {
    .section-blog-posts .blog-posts {
        grid-auto-rows: auto;
    }

    .section-blog-posts .blog-posts article {
        grid-template-areas:
            "date"
            "title"
            "thumbnail"
            "excerpt"
            "open-btn";
        grid-template-columns: auto;
    }

    .section-blog-posts .blog-posts article>img {
        padding-block-end: 20px;
    }
}

/* Single blog post */

.section-blog-post-content {
    padding-block-start: 70px;
}

.section-blog-post-content .content-section {
    max-width: 90ch;
}

.section-blog-post-content .blog-breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 16px;
}

.section-blog-post-content .blog-breadcrumb a {
    color: #00aa8f;
    text-decoration: underline;
    transition: text-decoration-color .4s ease-in-out;
    display: inline;
    text-align: left;
}

.section-blog-post-content .blog-breadcrumb a:hover {
    text-decoration-color: transparent;
}

.section-blog-post-content .content-section .text-section {
    padding-block: 20px;
}

.section-blog-post-content .content-section :is(h2, h3, h4, h5, h6) {
    padding-block-end: 40px;
    text-wrap: balance;
}

.section-blog-post-content .content-section :is(p, ol, ul) {
    padding-block-end: 20px;
}

.section-blog-post-content .content-section ol {
    list-style: decimal;
}

.section-blog-post-content .content-section ul {
    list-style: disc;
}

.section-blog-post-content .content-section :is(ol, ul) li:not(:last-child) {
    padding-block-end: 10px;
}

.section-blog-post-content .content-section :is(ol, ul) {
    color: inherit;
    font-size: 24px;
    line-height: 1.5;
    padding-inline-start: 70px;
}

@media only screen and (max-width:1439px) {
    .section-blog-post-content .content-section :is(ol, ul) {
        font-size: 20px;
        line-height: 1.4;
    }
}

@media only screen and (max-width:767px) {
    .section-blog-post-content .content-section :is(h2, h3, h4, h5, h6) {
        padding-block-end: 20px;
    }

    .section-blog-post-content .content-section :is(ol, ul) {
        font-size: 18px;
        line-height: 1.33;
        padding-inline-start: 40px;
    }
}

/* Fix hero text spacing problems */

@media only screen and (max-width: 575px) {
    body:has(.section-blog-post-content) .section-top .hero {
        max-width: 100%;
    }
}

@media only screen and (max-width: 767px) {
    body:has(.section-blog-post-content) .section-top .hero {
        max-width: 100%;
    }
}

@media only screen and (max-width: 380px) {
    body:has(.section-blog-post-content) h1 {
        font-size: 50px;
    }
}
