/* Control padding in homepage post list so as to put a border between them. */
.wp-container-core-post-template-is-layout-1 > * {
    margin-block-start: 0;
    margin-block-end: 0;
    border-bottom: 1px solid black;
    padding-bottom: var(--wp--preset--spacing--60);
    padding-top: var(--wp--preset--spacing--60);
}

.wp-container-core-post-template-is-layout-1 > *:last-child {
    border-bottom: none;
}

.wp-container-core-post-template-is-layout-1 > * + * {
    margin-block-start: 0;
    margin-block-end: 0;
}

.wp-container-core-post-template-is-layout-1 > * > .is-layout-constrained > div {
    margin-block-start: 0;
}

.wp-container-core-post-template-is-layout-1 h2.wp-block-post-title + .wp-block-post-author-name {
    margin-block-end: 2em;
}

.wp-container-core-post-template-is-layout-1 h2.wp-block-post-title:has(+ .wp-block-post-author-name) {
    margin-block-end: 0;
}

/* Post images on the home page (before we decided to hide them; see below). */
body.home ul.wp-block-post-template li.wp-block-post > div.wp-block-group figure {
    float: right;
    padding-left: var(--wp--preset--spacing--40);
    padding-bottom: var(--wp--preset--spacing--40);
}

body.home ul.wp-block-post-template li.wp-block-post > div.wp-block-group figure img {
    max-width: 20vw;
}

body.home #pinned-text p:first-of-type {
    margin-top: 0;
}

@media (max-width: 781px) {
    body.home ul.wp-block-post-template li.wp-block-post > div.wp-block-group figure img {
        max-width: 40vw;
    }
}

@media (max-width: 500px) {
    body.home ul.wp-block-post-template li.wp-block-post > div.wp-block-group figure {
        float: none;
        padding-left: 0;
        padding-bottom: 0;
    }

    body.home ul.wp-block-post-template li.wp-block-post > div.wp-block-group figure img {
        max-width: 100%;
    }
}

/* A corny way of removing post images from the list on the home page. */
body.home ul.wp-block-post-template li.wp-block-post > div.wp-block-group figure.wp-block-post-featured-image {
    display: none;
}

/* Pinned text */
#pinned-text {
    background-color: #fff59e;
}

#pinned-text a:where(:not(.wp-element-button)) {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

a:where(:not(.wp-element-button)) {
    color: var(--wp--preset--color--contrast);
}

#pinned-text a:where(:not(.wp-element-button)):hover {
    text-decoration: underline;
    color: var(--wp--preset--color--contrast);
}

/* Couldn't help adding some top-padding between #pinned-text and the first item */
div#pinned-text + .wp-block-query {
    padding-top: 30px;
}

/* Top nav */
.wp-block-navigation__responsive-container.is-menu-open {
    padding-top: clamp(1rem,var(--wp--preset--spacing--70),20rem);
}

.has-modal-open .wp-block-navigation__responsive-close {
    margin-left: 0;
}

.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open {
    background-color: rgb(34, 55, 89);
    color: #fff;
}

.wp-block-navigation__responsive-container.hidden-by-default ul.wp-block-page-list li {
    margin-bottom: 1.5rem;
}

.wp-block-navigation__responsive-container-close {
    right: auto;
    left: 0;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
    font-size: var(--wp--preset--font-size--large);
}

/* Detail pages */
.wp-block-post-author-name .wp-block-post-author-name {
    display: inline;
}
