/**
 * Single Blog Post — Cole Hersee
 * Styles for `single.php`. Matches Figma node 132:976.
 * Tokens come from the theme; 1rem = 10px (62.5% root).
 */

.single_blog {
    background: #fff;
}

/* ---------- Hero ---------- */

.single_blog_hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    min-height: 56rem;
    padding: 14rem 0 8rem;
    display: flex;
    align-items: center;
    isolation: isolate;
    /* Solid navy fallback so the hero never goes black when there is no featured image. */
    background: var(--primary, #002446);
}

.single_blog_hero_bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.single_blog_hero_bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/*
 * Two multiply layers approximate the Figma — a #2D2D2D wash for depth and a
 * #022E58 / #1B1788 navy-indigo wash for brand tone. Multiply preserves the
 * underlying image detail rather than flattening it.
 */
.single_blog_hero_overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 46, 88, 0.55) 0%, rgba(27, 23, 136, 0.45) 100%),
        rgba(45, 45, 45, 0.3);
    mix-blend-mode: multiply;
    z-index: -1;
    pointer-events: none;
}

.single_blog_hero .container {
    width: 100%;
}

.single_blog_hero_inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
    max-width: 90rem;
    margin: 0 auto;
}

.single_blog_hero_title {
    font-family: "Karla", sans-serif;
    font-weight: 700;
    font-size: 6rem;
    line-height: 1.18;
    letter-spacing: -0.3rem;
    color: #fff;
    margin: 0;
}

.single_blog_hero_meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.single_blog_meta_item {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-family: "Inter", sans-serif;
    font-size: 1.4rem;
    line-height: 1.66;
    color: #fff;
}

.single_blog_meta_item > span {
    color: #fff;
}

.single_blog_meta_item svg {
    flex: 0 0 auto;
}

@media (max-width: 991px) {
    .single_blog_hero {
        min-height: 44rem;
        padding: 10rem 0 6rem;
    }

    .single_blog_hero_title {
        font-size: 4rem;
        letter-spacing: -0.2rem;
    }
}

@media (max-width: 500px) {
    .single_blog_hero_title {
        font-size: 3rem;
        letter-spacing: -0.15rem;
    }

    .single_blog_hero_meta {
        gap: 2rem;
    }
}

/* ---------- Body ---------- */

.single_blog_body {
    padding: 8rem 0 4rem;
    background: #fff;
}

.single_blog_body_inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    max-width: 90rem;
    margin: 0 auto;
}

.single_blog_body_inner:has(.single_blog_share) {
    grid-template-columns: 3.2rem 1fr;
}

.single_blog_share {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    padding-top: 0.4rem;
}

.single_blog_share_link {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    color: #DFDFDF;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    border: 0;
}

.single_blog_share_link svg {
    width: 100%;
    height: 100%;
    display: block;
}

.single_blog_share_link:hover,
.single_blog_share_link:focus-visible {
    color: var(--secondary, #1b1788);
    outline: none;
}

.single_blog_content {
    color: #3f3f3f;
    font-family: "Inter", sans-serif;
    font-size: 1.4rem;
    line-height: 1.43;
}

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

.single_blog_content > *:last-child {
    margin-bottom: 0;
}

/* Editors usually open with a lead paragraph — style first <p> as the navy intro per Figma */
.single_blog_content > p:first-of-type {
    font-family: "Karla", sans-serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.25;
    letter-spacing: -0.1rem;
    color: var(--primary, #002446);
    margin-bottom: 2.5rem;
}

.single_blog_content p {
    margin: 0 0 1.6rem;
}

.single_blog_content h2,
.single_blog_content h3,
.single_blog_content h4 {
    font-family: "Karla", sans-serif;
    color: var(--primary, #002446);
    margin: 3rem 0 1.5rem;
}

.single_blog_content ul,
.single_blog_content ol {
    margin: 0 0 1.6rem 0;
    padding-left: 2.2rem;
}

.single_blog_content ul li,
.single_blog_content ol li {
    margin-bottom: 0.4rem;
    font-size: 1.4rem;
    line-height: 1.43;
}

.single_blog_content a {
    color: var(--secondary, #1b1788);
}

.single_blog_content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 2rem 0;
}

@media (max-width: 991px) {
    .single_blog_body {
        padding: 5rem 0 3rem;
    }

    /* Match :has() specificity so desktop `3.2rem 1fr` does not win here; with that grid, `order` put the article in the narrow track. */
    .single_blog_body_inner:has(.single_blog_share) {
        grid-template-columns: 1fr;
    }

    .single_blog_body_inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .single_blog_share {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
        padding-top: 0;
        order: 2;
        justify-content: flex-start;
    }

    .single_blog_content {
        order: 1;
    }
}

/* ---------- Conclusion callout ---------- */

.single_blog_conclusion {
    padding: 4rem 0 8rem;
    background: #fff;
}

.single_blog_conclusion_box {
    background: var(--secondary, #1b1788);
    border-radius: 1rem;
    padding: 5rem 6rem;
    display: grid;
    grid-template-columns: 18rem 1fr;
    gap: 4rem;
    align-items: center;
    color: #fff;
}

.single_blog_conclusion_label {
    font-family: "Karla", sans-serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.25;
    letter-spacing: -0.1rem;
    color: #fff;
}

.single_blog_conclusion_text,
.single_blog_conclusion_text p {
    font-family: "Inter", sans-serif;
    font-size: 2rem;
    line-height: 1.5;
    color: #fff;
    margin: 0 0 1.6rem;
}

.single_blog_conclusion_text > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .single_blog_conclusion {
        padding: 3rem 0 5rem;
    }

    .single_blog_conclusion_box {
        padding: 3.5rem 3rem;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .single_blog_conclusion_text,
    .single_blog_conclusion_text p {
        font-size: 1.6rem;
    }
}

/* ---------- Related posts ---------- */
/* Card styles come from .blog_archive_card (see dist/css/styles.css), shared with the blog archive. */

.single_blog_related {
    padding: 6rem 0 8rem;
    background: #fff;
}

.single_blog_related_title {
    font-family: "Karla", sans-serif;
    font-weight: 700;
    font-size: 5rem;
    line-height: 1.3;
    letter-spacing: -0.25rem;
    color: var(--primary, #002446);
    text-align: center;
    margin: 0 0 5rem;
}

@media (max-width: 991px) {
    .single_blog_related {
        padding: 4rem 0 5rem;
    }

    .single_blog_related_title {
        font-size: 3.5rem;
        letter-spacing: -0.15rem;
        margin-bottom: 3rem;
    }
}
