/* ==========================================================================
   Blog post — one article
   ========================================================================== */

/* The header sits under the transparent navigation row, like every page
   banner, so no page background shows through behind it */
.post__header {
    position: relative;
    margin-top: calc(var(--header-row-height) * -1);
    padding: calc(var(--header-row-height) + 70px) 0 60px;
    background-color: var(--color-maroon-dark);
    background-image: linear-gradient(
        90deg,
        var(--color-dark-grey) 0%,
        var(--color-maroon-dark) 56%
    );
}

.post__header-inner {
    max-width: 860px;
    margin-inline: auto;
    padding-inline: 15px;
}

.post__breadcrumb {
    margin-bottom: 25px;
}

.post__title {
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--color-white);
}

.post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-breadcrumb-text);
}

/* --- The article itself --- */

.post__body {
    padding: 70px 0 90px;
    background-color: var(--color-white);
}

.post__body-inner {
    max-width: 760px;
    margin-inline: auto;
    padding-inline: 15px;
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--color-text);
}

/* The article body is written elsewhere — these are the tags an imported
   post actually uses, so the styling is set on the elements themselves */
.post__body-inner p,
.post__body-inner ul,
.post__body-inner ol,
.post__body-inner blockquote,
.post__body-inner table {
    margin-bottom: 22px;
}

.post__body-inner h2,
.post__body-inner h3,
.post__body-inner h4 {
    margin: 45px 0 18px;
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-maroon-dark);
}

.post__body-inner h2 {
    font-size: 32px;
}

.post__body-inner h3 {
    font-size: 26px;
}

.post__body-inner h4 {
    font-size: 22px;
}

.post__body-inner > *:first-child {
    margin-top: 0;
}

/* The reset strips list markers, so put them back inside prose */
.post__body-inner ul,
.post__body-inner ol {
    padding-left: 24px;
    list-style: disc;
}

.post__body-inner ol {
    list-style: decimal;
}

.post__body-inner li {
    margin-bottom: 10px;
}

.post__body-inner strong,
.post__body-inner b {
    font-weight: 600;
    color: var(--color-secondary);
}

.post__body-inner a {
    color: var(--color-maroon-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s;
}

.post__body-inner a:hover,
.post__body-inner a:focus-visible {
    color: var(--color-secondary);
}

.post__body-inner blockquote {
    padding-left: 22px;
    border-left: 3px solid var(--color-maroon-dark);
    font-style: italic;
}

.post__body-inner table {
    width: 100%;
    border-collapse: collapse;
}

.post__body-inner th,
.post__body-inner td {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    text-align: left;
}

.post__footer {
    padding: 0 0 90px;
    text-align: center;
    background-color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {

    .post__header {
        padding: calc(var(--header-row-height) + 55px) 30px 50px;
    }

    .post__header-inner,
    .post__body-inner {
        padding-inline: 0;
    }

    .post__title {
        font-size: 38px;
    }

    .post__body {
        padding: 55px 30px 70px;
    }

    .post__body-inner {
        font-size: 17px;
    }

    .post__body-inner h2 {
        font-size: 28px;
    }

    .post__body-inner h3 {
        font-size: 23px;
    }

    .post__footer {
        padding-bottom: 70px;
    }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {

    .post__header {
        padding: calc(var(--header-row-height) + 40px) 20px 40px;
    }

    .post__title {
        font-size: 30px;
    }

    .post__body {
        padding: 45px 20px 60px;
    }

    .post__body-inner {
        font-size: 16px;
    }

    .post__body-inner h2 {
        font-size: 24px;
    }

    .post__body-inner h3 {
        font-size: 20px;
    }

    /* A wide table scrolls rather than stretching the page */
    .post__body-inner table {
        display: block;
        overflow-x: auto;
    }
}
