/* Match the existing project cards while retaining Salient's native blog grid. */
body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .masonry-blog-item .inner-wrap,
body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .post-featured-img,
body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .post-featured-img img {
    border-radius: 0;
}

body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .content-inner {
    background-color: #312221;
}

body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .post-featured-img::after {
    background: none;
}

body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .content-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(to top, rgba(49, 34, 33, .95) 0%, rgba(49, 34, 33, .7) 30%, rgba(49, 34, 33, 0) 60%);
}

body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .article-content-wrap {
    padding: 10px 15px !important;
}

body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .post-header {
    max-width: 100%;
}

body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .post-header h3.title {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: normal;
    color: #fff;
}

body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .meta-category a {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: normal;
    opacity: 1;
    color: #fff;
}

/* The image remains Salient's featured media; only the header layout changes. */
body.thirdstone-article-has-image .main-content .featured-media-under-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    grid-template-areas: "media content";
    align-items: center;
    gap: clamp(32px, 4vw, 64px);
    direction: ltr;
}

body.thirdstone-article-has-image .featured-media-under-header::before,
body.thirdstone-article-has-image .featured-media-under-header::after {
    display: none;
}

body.thirdstone-article-has-image .featured-media-under-header__content {
    grid-area: content;
    direction: rtl;
    text-align: right;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    min-width: 0;
}

body.thirdstone-article-has-image .featured-media-under-header__featured-media[data-has-img="true"][data-format="default"] {
    grid-area: media;
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    padding-bottom: 0;
    margin-top: 0;
    overflow: hidden;
    border-radius: 0;
}

body.thirdstone-article-has-image .featured-media-under-header__featured-media[data-format="default"] .post-featured-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

body.thirdstone-article-has-image .featured-media-under-header__featured-media[data-format="default"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

@media (max-width: 999px) {
    body.thirdstone-article-has-image .main-content .featured-media-under-header {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "content" "media";
        gap: 24px;
    }
}

@media (max-width: 690px) {
    body.thirdstone-knowledge-index .auto_meta_overlaid_spaced .post-header h3.title {
        font-size: 22px;
    }
}
