.post-single-title {
    font-family: var(--font-accent);
    text-wrap-style: balance; /* fallback */
    text-wrap-style: pretty;
    margin-block: 0.5rem 1.25rem;
}

.post-single-header {
    margin-inline: 1rem;
    display: grid;
    justify-content: center;

    > div {
        margin: auto;
        text-align: center;
    }
}

.post {
    border-top: 1.25rem solid transparent;
}

.post-single-header {
    .post-card-label {
        text-align: center;
        margin: auto;
    }
}
@media screen and (min-width: 990px) {
    .post-single-title {
        font-size: 4rem;
        max-width: 39.125rem;
        text-align: center;
    }

    .post {
        align-items: start;
        display: grid;
        gap: 0 3rem;
        grid-template-areas: "header header" "content aside" "meta aside";

        aside {
            grid-area: aside;
            position: sticky;
            top: 0;
        }
    }

    .post-single-header {
        grid-area: header; /* parent grid */

        /* Own grid */
        display: grid;
        justify-content: center;

    }

    .post-single-meta {
        grid-area: meta;
    }
}

.post-feature-image {
    display: block;
    margin-inline: 0;

    a {
      color: var(--accent-primary);
    }

    figcaption {
      margin-block: 0.5rem;
    }

    img, picture {
        width: 100%;
        margin: auto;
        max-height: unset;
    }
}


@media screen and (min-width: 990px) {
    .tag-hash-hasslideshow {
        .post-feature-image {
            border: 2px solid var(--accent-tertiary);
        }

        .post-feature-image:not(.landscape) {
            max-height: 35rem;
            height: 35rem;
        }
    }
}

.tag-hash-hasslideshow {
    picture {
        height: inherit;
        padding: 0.5rem;

        img {
            display: block;
            height: 100%;
            object-fit: contain;
            width: auto;
        }
    }
}

.post-template {
    img {
        block-size: auto;
    }
}

@media screen and (min-width: 630px) {
    .post-template {
        .content_container {
            padding-inline: 0;
        }
    }
}

.post-template {
    figcaption {
        margin-inline: 1rem;
        font-size: 0.8rem;
        font-style: italic;
    }
}

@media screen and (min-width: 990px) {
  .post-template figcaption {
    margin-inline: 0;
  }
}

.post-content {
    align-items: start;
    grid-area: content;

    a {
        color: var(--accent-primary);
    }

    > * {
        font-size: 1.1875rem;
        line-height: 2.06rem;
    }

    > *:not(img,iframe,figure,blockquote) {
        margin-inline: 1rem;
    }

    blockquote {
        line-height: 1.6rem;
    }
}

@media screen and (min-width: 990px) {
    .post-content {
        > *:not(img,iframe,figure,blockquote) {
            margin-inline: 0;
        }
    }
}


.post-single-pagination {
    display: grid;
    grid-template: auto auto / auto;
    gap: 1rem;
    margin-block: 5rem 2rem;

    img {
        display: none;
    }

    h4 {
        font-weight: normal;
        margin: 0 1rem;
    }
}

@media screen and (min-width: 990px) {
    .post-single-pagination {
        border-block: 5px solid var( --accent-quaternary);
        font-size: 1.25rem;
        gap: 5rem;
        grid-template: auto / 1fr 1fr;

        img {
            display: block;
            inline-size: 3.75rem;
        }
    }
}

.post-single-next, .post-single-prev {
    align-items: center;
    background: var(--accent-quaternary);
    color: currentColor;
    display: flex;
    flex: 0 0 auto;
    font-family: var(--font-accent);
    gap: 1.5rem;
    justify-content: center;
    text-decoration: none;
    padding-block: 0.5rem;

    svg {
        display: inline-block;
        block-size: 1rem;
        inline-size: 1rem;
    }

    &:hover, &:focus {
        text-decoration: underline;
        color: var(--accent-primary);
        svg {
            fill: currentColor;
        }
    }
}


@media screen and (min-width: 990px) {
    .post-single-next, .post-single-prev {
        background: inherit;
        gap: 1rem;

        svg {
            block-size: 3.5rem;
            inline-size: 3.5rem;
        }
    }

    .post-single-prev {
        justify-content: start;
    }

    .post-single-next {
        justify-content: end;
    }
}


.post-single-share a,
.post-slideshow-trigger {
    background: var(--accent-primary);
    border: 0px;
    color: var(--background);
    font-family: var(--font-accent);
    font-weight: bold;
    display: block;
    line-height: 1;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
}

.post-feature-image + .post-slideshow-trigger {
    inline-size: 100%
}

@media screen and (min-width: 990px) {
    .post-single-share {
        margin-inline: 0;

        a {
            display: inline-block;
            margin-inline-end: 1rem;
        }
    }

    .post-slideshow-trigger {
        margin-inline-end: 1rem;
    }
}

.post-tags {
  align-items: center;
  display: grid;
  grid-template-columns: min-content auto;
  gap: 0.5rem;
  font: bold 0.875rem / 1 var(--font-accent);

  h4, p {
    margin: 0;
    padding: 0;
  }

  p {
     color: var(--accent-tertiary);
  }
}

.tag-hash-hasslideshow {
    .kg-button-card {
        inset-block: 1rem;
        inset-inline: auto;

        a.kg-btn {
            border-radius: 0;
            font: normal 1.25rem / 1 var(--font-accent);
            gap: 0.5rem;
            text-transform: capitalize;
            padding-inline: 1rem;

            &::before {
                content: '\00a0';
                background: transparent url('/assets/images/slideshowicon.svg')center center no-repeat;
                display: inline-flex;
                width: 2rem;
                height: 2rem;
                text-decoration: none;
            }
        }
    }

    .post-feature-image {
        position: relative;
    }
}


@media screen and (min-width: 990px) {
    .tag-hash-hasslideshow {
        .kg-button-card {
            justify-content: end;
            position: absolute;
            inset-block: auto 1rem;
            inset-inline: auto 1rem;
        }
    }
}
