/* Blog and article refinements. Kept separate from the compiled theme bundles. */
.article-page .article-head {
    padding-top: clamp(16px, 2vw, 32px);
    margin-bottom: clamp(32px, 5vw, 72px);
}

.article-page .article-head:not(.has-image) {
    margin-bottom: clamp(24px, 3vw, 44px);
}

.article-page .article-head h1 {
    max-width: 1280px;
    margin-bottom: 0;
    font-size: clamp(34px, 4.2vw, 68px);
    line-height: 1.06;
    letter-spacing: -0.035em;
    text-transform: none;
    overflow-wrap: anywhere;
}

.article-page .article-head.has-image h1 {
    margin-bottom: clamp(24px, 3vw, 48px);
}

.article-page .article-head .img-holder {
    height: clamp(260px, 42vw, 620px);
    overflow: hidden;
    background: #f4f1ed;
}

.article-page .article-head .img-holder img {
    object-fit: cover;
}

.article-page .article-content .article {
    width: 100%;
    line-height: 1.7;
}

.article-page .article-sidebar {
    min-width: 0;
    margin-bottom: clamp(28px, 5vw, 48px);
}

.article-page .article-sidebar__inner {
    min-width: 0;
}

.article-page .article-content .article-meta {
    margin-bottom: 0;
    color: #7b7b7b;
    font-weight: 500;
}

.article-page .article-content .article-meta p {
    margin: 0;
}

.article-page .article-content .article-meta a {
    color: #557b50;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-page .article-body h2,
.article-page .article-body h3 {
    scroll-margin-top: 150px;
    text-transform: none;
}

.article-page .article-body h2 {
    margin-top: clamp(36px, 5vw, 60px);
    line-height: 1.18;
}

.article-page .article-body h2:first-child {
    margin-top: 0;
}

.article-page .article-body h3 {
    margin-top: 30px;
    line-height: 1.3;
}

.article-toc {
    margin: 24px 0;
    padding: clamp(18px, 2vw, 22px);
    border: 1px solid #d5ddd5;
    border-left: 3px solid #73996c;
    background: #f8faf7;
}

.article-toc[hidden] {
    display: none;
}

.article-toc details {
    margin: 0;
}

.article-toc__title {
    position: relative;
    padding-right: 34px;
    cursor: pointer;
    font-family: Mart, serif;
    font-size: clamp(18px, 1.45vw, 22px);
    line-height: 1.25;
    list-style: none;
}

.article-toc__title::-webkit-details-marker {
    display: none;
}

.article-toc__title::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 4px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #73996c;
    border-bottom: 2px solid #73996c;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
}

.article-toc details[open] .article-toc__title::after {
    transform: translateY(-30%) rotate(225deg);
}

.article-toc__title:focus-visible,
.article-toc__list a:focus-visible,
.blog-card__link:focus-visible {
    outline: 2px solid #73996c;
    outline-offset: 4px;
}

.article-toc__list {
    display: grid;
    gap: 9px;
    margin: 18px 0 0;
    padding-left: 22px;
}

.article-page .article-toc__list li {
    margin: 0;
    padding-left: 4px;
}

.article-page .article-toc__list a {
    display: inline;
    width: auto;
    padding: 0;
    color: #355d35;
    line-height: 1.45;
    text-transform: none;
}

.article-page .article-toc__list a::before {
    display: none;
}

.article-page .article-toc__list a:hover {
    color: #1e1e1e;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-page .article-share {
    padding-top: 20px;
    border-top: 1px solid #d5ddd5;
}

.article-page .article-share__title {
    margin: 0 0 14px;
    color: #7b7b7b;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-page .article-content .article-sidebar .socials {
    position: static;
    top: auto;
    right: auto;
    display: flex;
    width: fit-content;
    gap: 24px;
    justify-content: flex-start;
}

.article-page .article-content .article-sidebar .socials .social-link,
.article-page .article-content .article-sidebar .socials .social-link:not(:last-of-type) {
    margin-right: 0;
}

.article-page .article-content > .blog-row {
    width: 100%;
}

.blog-page {
    padding-bottom: clamp(72px, 9vw, 136px);
}

.blog-page > h1 {
    max-width: 980px;
    margin: clamp(18px, 3vw, 36px) auto clamp(32px, 5vw, 64px);
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1.04;
    text-align: center;
    text-transform: none;
}

.blog-page .blog-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}

.blog-page .blog-card {
    min-width: 0;
    border: 1px solid #e6ebe4;
    background: #fff;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-page .blog-card__link {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    color: #1e1e1e;
}

.blog-page .blog-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f1ed;
}

.blog-page .blog-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: opacity 0.5s cubic-bezier(.37, .16, .12, 1) 0.2s, transform 0.45s ease;
}

.blog-page .blog-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
    min-height: 132px;
    padding: clamp(20px, 2.4vw, 30px);
}

.blog-page .blog-card__copy {
    min-width: 0;
}

.blog-page .blog-card--text-only .blog-card__link {
    position: relative;
    min-height: clamp(230px, 26vw, 330px);
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0, rgba(115, 153, 108, 0.2), transparent 42%),
        linear-gradient(145deg, #fbfcfa 0%, #f1f5ef 100%);
}

.blog-page .blog-card--text-only .blog-card__link::before {
    content: '';
    position: absolute;
    top: 22px;
    right: 22px;
    width: 72px;
    height: 72px;
    border: 1px solid rgba(115, 153, 108, 0.32);
    border-radius: 50%;
}

.blog-page .blog-card--text-only .blog-card__body {
    position: relative;
    z-index: 1;
    flex: 1;
    align-items: end;
}

.blog-page .blog-card__eyebrow {
    display: block;
    margin-bottom: 18px;
    color: #557b50;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.blog-page .blog-card__title {
    margin: 0;
    font-family: Mart, serif;
    font-size: clamp(21px, 2vw, 28px);
    line-height: 1.22;
    letter-spacing: -0.025em;
    text-transform: none;
    overflow-wrap: anywhere;
}

.blog-page .blog-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #73996c;
    border-radius: 50%;
    color: #557b50;
    font-size: 22px;
    line-height: 1;
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.blog-page > .pagination {
    display: flex;
    width: 100%;
    justify-content: center;
    padding-top: clamp(40px, 6vw, 72px);
}

@media (min-width: 640px) {
    .blog-page .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px;
    }
}

@media (min-width: 1080px) {
    .blog-page .blog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 32px;
    }
}

@media (min-width: 1200px) {
    .article-page .article-content {
        grid-template-columns: minmax(220px, 280px) minmax(0, 850px);
        column-gap: clamp(48px, 6vw, 96px);
        justify-content: center;
    }

    .article-page .article-sidebar {
        grid-column: 1;
        grid-row: 1;
        margin-bottom: 0;
    }

    .article-page .article-sidebar__inner {
        position: sticky;
        top: 120px;
    }

    .article-page .article-sidebar .article-toc__list {
        max-height: min(45vh, 440px);
        overflow-y: auto;
        padding-right: 8px;
        scrollbar-width: thin;
    }

    .article-page .article-content .article {
        grid-column: 2;
        grid-row: 1;
    }

    .article-page .article-content > .blog-row {
        grid-column: 1 / -1;
    }

    .article-page .article-content .article-meta {
        position: static;
        top: auto;
        left: auto;
        margin-bottom: 0;
    }
}

@media (min-width: 1920px) {
    .article-page .article-sidebar__inner {
        top: 140px;
    }
}

@media (min-width: 1700px) {
    .blog-page .blog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (hover: hover) {
    .blog-page .blog-card:hover {
        border-color: #b9cbb5;
        box-shadow: 0 18px 45px rgba(43, 63, 40, 0.1);
        transform: translateY(-4px);
    }

    .blog-page .blog-card:hover .blog-card__image img {
        transform: scale(1.055);
    }

    .blog-page .blog-card:hover .blog-card__arrow {
        color: #fff;
        background: #73996c;
        transform: translateX(3px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-toc__title::after,
    .blog-page .blog-card,
    .blog-page .blog-card__image img,
    .blog-page .blog-card__arrow {
        transition: none;
    }
}

@media print {
    .article-toc details:not([open]) > *:not(summary) {
        display: block;
    }

    .article-page .article-body h2,
    .article-page .article-body h3 {
        scroll-margin-top: 0;
    }
}
