/*-- -------------------------- -->
<---   Crooz Consulting Blog    -->
<--- -------------------------- -*/

/* Shared tokens used across the blog templates. Colours derive from the
   global palette in style.css so a brand change flows through here too. */
:root {
    --blogSurface: #ffffff;
    --blogSurfaceAlt: #f7f7f7;
    --blogBorder: #e5e5e5;
    --blogMuted: #767676;
    --blogRadius: 0.5rem;
}

/* Every blog section spans the full width of the page regardless of what the
   surrounding document is doing. */
#blog-banner,
#blog-list,
#blog-single,
#blog-related,
#blog-404 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Blog posts are written in the block editor. WordPress ships a constrained
   layout rule that caps block children at --wp--style--global--content-size
   (often ~620px) and centres them, which reads as a narrow column stranded in
   the middle of the article. The article column is already a comfortable
   measure, so let the blocks fill it. */
.cs-post-content .is-layout-constrained > :not(.alignleft):not(.alignright):not(.alignfull),
.cs-post-content .is-layout-flow > :not(.alignleft):not(.alignright):not(.alignfull) {
    max-width: 100%;
}

/*-- -------------------------- -->
<---        Blog Banner         -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    #blog-banner {
        /* Clears the fixed site header */
        padding: clamp(9rem, 18vw, 14rem) 1rem clamp(4rem, 10vw, 8rem);
        overflow: hidden;
        position: relative;
        z-index: 1;
    }
    #blog-banner .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    #blog-banner .cs-int-title {
        /* 39px - 61px */
        font-size: clamp(2.4375rem, 6.4vw, 3.8125rem);
        font-family: 'Playfair Display', serif;
        font-weight: 700;
        line-height: 1.2em;
        text-align: left;
        max-width: 24ch;
        margin: 0;
        color: var(--bodyTextColorWhite);
        position: relative;
    }
    #blog-banner .cs-int-topper {
        font-size: var(--topperFontSize);
        line-height: 1.2em;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 700;
        margin: 0;
        color: var(--secondaryLight);
        display: block;
    }
    #blog-banner .cs-int-text {
        font-size: clamp(1rem, 1.6vw, 1.25rem);
        line-height: 1.5em;
        max-width: 46ch;
        margin: 0;
        color: var(--bodyTextColorWhite);
        opacity: 0.9;
    }
    #blog-banner .cs-banner-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 1rem;
        margin-top: 0.5rem;
        color: var(--bodyTextColorWhite);
        opacity: 0.9;
        font-size: 0.9375rem;
    }
    #blog-banner .cs-banner-meta a {
        color: inherit;
    }
    #blog-banner .cs-background {
        width: 100%;
        height: 100%;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
    }
    #blog-banner .cs-background:before {
        /* darkening overlay so the title always passes contrast */
        content: "";
        width: 100%;
        height: 100%;
        background: #1a1a1a;
        opacity: 0.68;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
    }
    #blog-banner .cs-background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
    }
    #blog-banner .cs-wave {
        width: 48rem;
        height: auto;
        display: block;
        position: absolute;
        left: 50%;
        bottom: -1px;
        transform: translateX(-50%);
        z-index: -1;
    }
}
@media only screen and (min-width: 48rem) {
    #blog-banner .cs-wave {
        width: 100%;
        left: 0;
        transform: none;
    }
}
@media only screen and (min-width: 0rem) {
    body.dark-mode #blog-banner .cs-wave path {
        fill: var(--dark);
    }
}

/*-- -------------------------- -->
<---   Blog Toolbar / Filters   -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    .cs-blog-toolbar {
        width: 100%;
        display: flex;
        flex-direction: column;
        /* 16px - 24px */
        gap: clamp(1rem, 2.5vw, 1.5rem);
        padding-bottom: clamp(1.5rem, 3vw, 2rem);
        border-bottom: 1px solid var(--blogBorder);
    }
    .cs-blog-search {
        width: 100%;
        max-width: 30rem;
        display: flex;
        gap: 0.5rem;
    }
    .cs-filter-nav {
        width: 100%;
    }
    .cs-filter-group {
        margin: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }
    .cs-filter-li {
        list-style: none;
        margin: 0;
    }
    .cs-filter {
        font-size: 0.9375rem;
        font-weight: 700;
        line-height: 1;
        text-decoration: none;
        padding: 0.6875rem 1.125rem;
        color: var(--bodyTextColor);
        background-color: var(--blogSurfaceAlt);
        border: 1px solid var(--blogBorder);
        border-radius: 2rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    }
    .cs-filter:hover {
        color: #fff;
        background-color: var(--primary);
        border-color: var(--primary);
    }
    .cs-filter:hover .cs-filter-count {
        background-color: rgba(255, 255, 255, 0.25);
        color: #fff;
    }
    .cs-filter.cs-active {
        color: #fff;
        background-color: var(--primary);
        border-color: var(--primary);
    }
    .cs-filter.cs-active .cs-filter-count {
        background-color: rgba(255, 255, 255, 0.25);
        color: #fff;
    }
    .cs-filter-count {
        font-size: 0.75rem;
        font-weight: 700;
        line-height: 1;
        min-width: 1.25rem;
        padding: 0.1875rem 0.375rem;
        box-sizing: border-box;
        text-align: center;
        color: var(--bodyTextColor);
        background-color: rgba(0, 0, 0, 0.07);
        border-radius: 1rem;
        transition: background-color 0.3s, color 0.3s;
    }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
    .cs-blog-toolbar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    .cs-blog-search {
        width: auto;
        max-width: 22rem;
        flex: 1;
        order: 2;
    }
    .cs-filter-nav {
        width: auto;
        order: 1;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode .cs-blog-toolbar {
        border-bottom-color: var(--accent);
    }
    body.dark-mode .cs-filter {
        color: var(--bodyTextColorWhite);
        background-color: var(--medium);
        border-color: var(--accent);
    }
    body.dark-mode .cs-filter:hover,
    body.dark-mode .cs-filter.cs-active {
        color: var(--dark);
        background-color: var(--secondaryLight);
        border-color: var(--secondaryLight);
    }
    body.dark-mode .cs-filter-count {
        color: var(--bodyTextColorWhite);
        background-color: rgba(255, 255, 255, 0.12);
    }
    body.dark-mode .cs-filter:hover .cs-filter-count,
    body.dark-mode .cs-filter.cs-active .cs-filter-count {
        color: var(--dark);
        background-color: rgba(0, 0, 0, 0.2);
    }
}

/*-- -------------------------- -->
<---       Blog Card Grid       -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    #blog-list {
        padding: var(--sectionPadding);
        background-color: var(--blogSurface);
    }
    #blog-list .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        gap: clamp(2.5rem, 5vw, 4rem);
    }
    #blog-list .cs-card-group {
        width: 100%;
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: clamp(1.25rem, 2.5vw, 2rem);
    }
    #blog-list .cs-item {
        list-style: none;
        grid-column: span 12;
        display: flex;
        background-color: var(--blogSurface);
        border: 1px solid var(--blogBorder);
        border-radius: var(--blogRadius);
        overflow: hidden;
        transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    }
    #blog-list .cs-item:hover {
        transform: translateY(-0.4375rem);
        box-shadow: 0px 12px 36px rgba(0, 0, 0, 0.12);
        border-color: var(--primary);
    }
    #blog-list .cs-item:hover .cs-picture img {
        transform: scale(1.06);
    }
    /* One anchor wraps the whole card: no nested interactive elements. */
    #blog-list .cs-link {
        width: 100%;
        text-decoration: none;
        display: flex;
        flex-direction: column;
    }
    #blog-list .cs-picture {
        width: 100%;
        height: clamp(12.5rem, 32vw, 15rem);
        background-color: var(--blogSurfaceAlt);
        display: block;
        overflow: hidden;
        position: relative;
        flex: none;
    }
    #blog-list .cs-picture img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        transition: transform 0.6s;
    }
    /* Fallback tile when a post has no featured image */
    #blog-list .cs-picture.cs-placeholder {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
        display: flex;
        justify-content: center;
        align-items: center;
    }
    #blog-list .cs-placeholder-mark {
        font-family: 'Playfair Display', serif;
        font-size: 2.5rem;
        font-weight: 700;
        color: #fff;
        opacity: 0.5;
    }
    #blog-list .cs-flex {
        /* 20px - 32px */
        padding: clamp(1.25rem, 3vw, 2rem);
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    #blog-list .cs-category {
        font-size: 0.8125rem;
        line-height: 1.2em;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 700;
        margin: 0 0 0.75rem 0;
        color: var(--primary);
        display: block;
    }
    #blog-list .cs-h3 {
        font-size: clamp(1.25rem, 2vw, 1.5rem);
        font-family: 'Playfair Display', serif;
        line-height: 1.3em;
        font-weight: 700;
        margin: 0 0 0.75rem 0;
        color: var(--headerColor);
        transition: color 0.3s;
    }
    #blog-list .cs-item:hover .cs-h3 {
        color: var(--primary);
    }
    #blog-list .cs-item-text {
        font-size: 1rem;
        line-height: 1.5em;
        margin: 0 0 1.5rem 0;
        color: var(--bodyTextColor);
    }
    #blog-list .cs-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        margin: auto 0 1rem 0;
        font-size: 0.875rem;
        color: var(--blogMuted);
    }
    #blog-list .cs-meta-dot {
        width: 0.25rem;
        height: 0.25rem;
        border-radius: 50%;
        background-color: currentColor;
        display: block;
        flex: none;
    }
    #blog-list .cs-link-text {
        font-size: 1rem;
        font-weight: 700;
        color: var(--primary);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    #blog-list .cs-link-text:after {
        content: "\2192";
        transition: transform 0.3s;
    }
    #blog-list .cs-item:hover .cs-link-text:after {
        transform: translateX(0.25rem);
    }

    /* Lead post on page 1 */
    #blog-list .cs-item.cs-featured .cs-picture {
        height: clamp(14rem, 45vw, 24rem);
    }
    #blog-list .cs-item.cs-featured .cs-h3 {
        font-size: clamp(1.5rem, 3.4vw, 2.25rem);
    }

    #blog-list .cs-empty {
        text-align: center;
        padding: clamp(2rem, 6vw, 4rem) 1rem;
    }
    #blog-list .cs-empty-title {
        font-family: 'Playfair Display', serif;
        font-size: clamp(1.5rem, 3vw, 2rem);
        margin: 0 0 1rem 0;
        color: var(--headerColor);
    }
    #blog-list .cs-empty-text {
        font-size: 1.125rem;
        line-height: 1.5em;
        margin: 0 auto 2rem;
        max-width: 40ch;
        color: var(--bodyTextColor);
    }
    #blog-list .cs-empty-search {
        width: 100%;
        max-width: 30rem;
        margin: 0 auto 2.5rem;
    }
    #blog-list .cs-empty .cs-button-solid {
        font-size: 1rem;
        font-weight: 700;
        line-height: 3.5rem;
        text-align: center;
        text-decoration: none;
        min-width: 9.375rem;
        padding: 0 2rem;
        color: #fff;
        background-color: var(--primary);
        border-radius: 0.25rem;
        display: inline-block;
        transition: background-color 0.3s;
    }
    #blog-list .cs-empty .cs-button-solid:hover {
        background-color: #1a1a1a;
        color: #fff;
    }
}
/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
    #blog-list .cs-item {
        grid-column: span 6;
    }
    #blog-list .cs-item.cs-featured {
        grid-column: span 12;
    }
    #blog-list .cs-item.cs-featured .cs-link {
        flex-direction: row;
    }
    #blog-list .cs-item.cs-featured .cs-picture {
        width: 50%;
        height: auto;
        min-height: 22rem;
    }
    #blog-list .cs-item.cs-featured .cs-flex {
        width: 50%;
        justify-content: center;
        padding: clamp(2rem, 4vw, 3.5rem);
    }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    #blog-list .cs-item {
        grid-column: span 4;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode #blog-list {
        background-color: var(--dark);
    }
    body.dark-mode #blog-list .cs-item {
        background-color: var(--medium);
        border-color: var(--accent);
    }
    body.dark-mode #blog-list .cs-item:hover {
        border-color: var(--secondaryLight);
    }
    body.dark-mode #blog-list .cs-picture {
        background-color: var(--accent);
    }
    body.dark-mode #blog-list .cs-h3,
    body.dark-mode #blog-list .cs-empty-title {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode #blog-list .cs-item:hover .cs-h3 {
        color: var(--secondaryLight);
    }
    body.dark-mode #blog-list .cs-item-text,
    body.dark-mode #blog-list .cs-empty-text {
        color: var(--bodyTextColorWhite);
        opacity: 0.85;
    }
    body.dark-mode #blog-list .cs-category,
    body.dark-mode #blog-list .cs-link-text {
        color: var(--secondaryLight);
    }
    body.dark-mode #blog-list .cs-meta {
        color: var(--bodyTextColorWhite);
        opacity: 0.7;
    }
}

/*-- -------------------------- -->
<---         Pagination         -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    .cs-pagination {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .cs-pagination-ul {
        margin: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }
    .cs-pagination-li {
        list-style: none;
        margin: 0;
    }
    .cs-pagination .page-numbers {
        font-size: 1rem;
        font-weight: 700;
        line-height: 1;
        text-decoration: none;
        min-width: 2.75rem;
        min-height: 2.75rem;
        padding: 0 0.875rem;
        box-sizing: border-box;
        color: var(--bodyTextColor);
        background-color: var(--blogSurfaceAlt);
        border: 1px solid var(--blogBorder);
        border-radius: 0.25rem;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    }
    .cs-pagination .page-numbers:hover {
        color: #fff;
        background-color: var(--primary);
        border-color: var(--primary);
    }
    .cs-pagination .page-numbers.current {
        color: #fff;
        background-color: var(--primary);
        border-color: var(--primary);
    }
    .cs-pagination .page-numbers.dots {
        background: transparent;
        border-color: transparent;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode .cs-pagination .page-numbers {
        color: var(--bodyTextColorWhite);
        background-color: var(--medium);
        border-color: var(--accent);
    }
    body.dark-mode .cs-pagination .page-numbers:hover,
    body.dark-mode .cs-pagination .page-numbers.current {
        background-color: var(--secondary);
        border-color: var(--secondary);
        color: var(--dark);
    }
}

/*-- -------------------------- -->
<---        Single Post         -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    #blog-single {
        padding: var(--sectionPadding);
        background-color: var(--blogSurface);
    }
    #blog-single .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        gap: clamp(3rem, 6vw, 5rem);
    }
    #blog-single .cs-main {
        width: 100%;
        min-width: 0;
    }
    #blog-single .cs-feature-image {
        width: 100%;
        margin: 0 0 clamp(2rem, 4vw, 3rem) 0;
        border-radius: var(--blogRadius);
        overflow: hidden;
        display: block;
    }
    #blog-single .cs-feature-image img {
        width: 100%;
        height: auto;
        display: block;
    }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    #blog-single .cs-container {
        flex-direction: row;
        align-items: flex-start;
        gap: clamp(2.5rem, 4vw, 4rem);
    }
    #blog-single .cs-main {
        flex: 1;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode #blog-single {
        background-color: var(--dark);
    }
}

/*-- -------------------------- -->
<---     Post Content Typography -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    .cs-post-content {
        font-size: clamp(1rem, 1.5vw, 1.125rem);
        line-height: 1.7em;
        color: var(--bodyTextColor);
    }
    .cs-post-content > *:first-child {
        margin-top: 0;
    }
    .cs-post-content > *:last-child {
        margin-bottom: 0;
    }
    .cs-post-content p {
        margin: 0 0 1.5rem 0;
    }
    .cs-post-content h2,
    .cs-post-content h3,
    .cs-post-content h4,
    .cs-post-content h5,
    .cs-post-content h6 {
        font-family: 'Playfair Display', serif;
        font-weight: 700;
        line-height: 1.3em;
        color: var(--headerColor);
        margin: 2.5rem 0 1rem 0;
    }
    .cs-post-content h2 {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }
    .cs-post-content h3 {
        font-size: clamp(1.25rem, 2.4vw, 1.5rem);
    }
    .cs-post-content h4 {
        font-size: clamp(1.125rem, 2vw, 1.25rem);
    }
    .cs-post-content a {
        color: var(--primary);
        text-decoration: underline;
        text-underline-offset: 0.15em;
        transition: opacity 0.3s;
    }
    .cs-post-content a:hover {
        opacity: 0.75;
    }
    .cs-post-content ul,
    .cs-post-content ol {
        margin: 0 0 1.5rem 0;
        padding-left: 1.5rem;
    }
    .cs-post-content li {
        margin-bottom: 0.5rem;
        line-height: 1.7em;
    }
    .cs-post-content img,
    .cs-post-content iframe,
    .cs-post-content video {
        max-width: 100%;
        height: auto;
        border-radius: var(--blogRadius);
        display: block;
    }
    .cs-post-content figure {
        margin: 2rem 0;
    }
    .cs-post-content figcaption {
        font-size: 0.875rem;
        text-align: center;
        margin-top: 0.75rem;
        color: var(--blogMuted);
    }
    .cs-post-content blockquote {
        margin: 2rem 0;
        padding: 1.25rem 1.5rem;
        border-left: 4px solid var(--primary);
        background-color: var(--blogSurfaceAlt);
        border-radius: 0 var(--blogRadius) var(--blogRadius) 0;
        font-style: italic;
        color: var(--headerColor);
    }
    .cs-post-content blockquote p:last-child {
        margin-bottom: 0;
    }
    .cs-post-content code {
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        font-size: 0.9em;
        padding: 0.15em 0.4em;
        background-color: var(--blogSurfaceAlt);
        border: 1px solid var(--blogBorder);
        border-radius: 0.25rem;
    }
    .cs-post-content pre {
        margin: 2rem 0;
        padding: 1.25rem;
        background-color: #1a1a1a;
        border-radius: var(--blogRadius);
        overflow-x: auto;
    }
    .cs-post-content pre code {
        padding: 0;
        background: transparent;
        border: none;
        color: #fafbfc;
    }
    .cs-post-content hr {
        margin: 2.5rem 0;
        border: none;
        border-top: 1px solid var(--blogBorder);
    }
    .cs-post-content table {
        width: 100%;
        margin: 2rem 0;
        border-collapse: collapse;
        display: block;
        overflow-x: auto;
    }
    .cs-post-content th,
    .cs-post-content td {
        padding: 0.75rem;
        border: 1px solid var(--blogBorder);
        text-align: left;
    }
    .cs-post-content th {
        background-color: var(--blogSurfaceAlt);
        font-weight: 700;
        color: var(--headerColor);
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode .cs-post-content {
        color: var(--bodyTextColorWhite);
        opacity: 0.92;
    }
    body.dark-mode .cs-post-content h2,
    body.dark-mode .cs-post-content h3,
    body.dark-mode .cs-post-content h4,
    body.dark-mode .cs-post-content h5,
    body.dark-mode .cs-post-content h6,
    body.dark-mode .cs-post-content th {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode .cs-post-content a {
        color: var(--secondaryLight);
    }
    body.dark-mode .cs-post-content blockquote {
        background-color: var(--medium);
        border-left-color: var(--secondary);
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode .cs-post-content code {
        background-color: var(--medium);
        border-color: var(--accent);
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode .cs-post-content th {
        background-color: var(--medium);
    }
    body.dark-mode .cs-post-content th,
    body.dark-mode .cs-post-content td,
    body.dark-mode .cs-post-content hr {
        border-color: var(--accent);
    }
    body.dark-mode .cs-post-content figcaption {
        color: var(--bodyTextColorWhite);
        opacity: 0.7;
    }
}

/*-- -------------------------- -->
<---   Tags / Author / PostNav  -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    .cs-tag-group {
        margin: clamp(2rem, 4vw, 3rem) 0 0 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }
    .cs-tag-group li {
        list-style: none;
    }
    .cs-tag {
        font-size: 0.875rem;
        line-height: 1;
        text-decoration: none;
        padding: 0.5rem 0.875rem;
        color: var(--bodyTextColor);
        background-color: var(--blogSurfaceAlt);
        border: 1px solid var(--blogBorder);
        border-radius: 2rem;
        display: inline-block;
        transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    }
    .cs-tag:hover {
        color: #fff;
        background-color: var(--primary);
        border-color: var(--primary);
    }

    .cs-author-box {
        margin: clamp(2.5rem, 5vw, 3.5rem) 0 0 0;
        padding: clamp(1.5rem, 3vw, 2rem);
        background-color: var(--blogSurfaceAlt);
        border-radius: var(--blogRadius);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .cs-author-avatar img {
        border-radius: 50%;
        display: block;
    }
    .cs-author-name {
        font-family: 'Playfair Display', serif;
        font-size: 1.25rem;
        font-weight: 700;
        margin: 0 0 0.5rem 0;
        color: var(--headerColor);
    }
    .cs-author-bio {
        font-size: 1rem;
        line-height: 1.6em;
        margin: 0;
        color: var(--bodyTextColor);
    }

    .cs-post-nav {
        margin: clamp(2.5rem, 5vw, 3.5rem) 0 0 0;
        padding: clamp(1.5rem, 3vw, 2rem) 0 0 0;
        border-top: 1px solid var(--blogBorder);
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .cs-post-nav-link {
        text-decoration: none;
        display: flex;
        flex-direction: column;
        gap: 0.375rem;
    }
    .cs-post-nav-link.cs-next {
        text-align: right;
        align-items: flex-end;
    }
    .cs-post-nav-label {
        font-size: 0.8125rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-weight: 700;
        color: var(--primary);
    }
    .cs-post-nav-title {
        font-size: 1.0625rem;
        line-height: 1.4em;
        font-weight: 700;
        color: var(--headerColor);
        transition: color 0.3s;
    }
    .cs-post-nav-link:hover .cs-post-nav-title {
        color: var(--primary);
    }
}
@media only screen and (min-width: 48rem) {
    .cs-author-box {
        flex-direction: row;
        align-items: center;
    }
    .cs-post-nav {
        grid-template-columns: 1fr 1fr;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode .cs-tag {
        color: var(--bodyTextColorWhite);
        background-color: var(--medium);
        border-color: var(--accent);
    }
    body.dark-mode .cs-tag:hover {
        background-color: var(--secondary);
        border-color: var(--secondary);
        color: var(--dark);
    }
    body.dark-mode .cs-author-box {
        background-color: var(--medium);
    }
    body.dark-mode .cs-author-name,
    body.dark-mode .cs-post-nav-title {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode .cs-author-bio {
        color: var(--bodyTextColorWhite);
        opacity: 0.85;
    }
    body.dark-mode .cs-post-nav {
        border-top-color: var(--accent);
    }
    body.dark-mode .cs-post-nav-label {
        color: var(--secondaryLight);
    }
    body.dark-mode .cs-post-nav-link:hover .cs-post-nav-title {
        color: var(--secondaryLight);
    }
}

/*-- -------------------------- -->
<---       Related Posts        -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    #blog-related {
        padding: var(--sectionPadding);
        background-color: var(--blogSurfaceAlt);
    }
    #blog-related .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
    }
    #blog-related .cs-title {
        text-align: center;
        margin: 0 auto clamp(2rem, 4vw, 3rem);
    }
    #blog-related .cs-card-group {
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: clamp(1.25rem, 2.5vw, 2rem);
    }
    #blog-related .cs-item {
        list-style: none;
        grid-column: span 12;
        background-color: var(--blogSurface);
        border: 1px solid var(--blogBorder);
        border-radius: var(--blogRadius);
        overflow: hidden;
        transition: transform 0.3s, box-shadow 0.3s;
    }
    #blog-related .cs-item:hover {
        transform: translateY(-0.4375rem);
        box-shadow: 0px 12px 36px rgba(0, 0, 0, 0.12);
    }
    #blog-related .cs-link {
        text-decoration: none;
        display: block;
    }
    #blog-related .cs-picture {
        width: 100%;
        height: 11.25rem;
        background-color: var(--blogSurfaceAlt);
        display: block;
        overflow: hidden;
        position: relative;
    }
    #blog-related .cs-picture img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
    }
    #blog-related .cs-picture.cs-placeholder {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    }
    #blog-related .cs-flex {
        padding: 1.5rem;
    }
    #blog-related .cs-h3 {
        font-family: 'Playfair Display', serif;
        font-size: 1.125rem;
        line-height: 1.4em;
        font-weight: 700;
        margin: 0 0 0.5rem 0;
        color: var(--headerColor);
        transition: color 0.3s;
    }
    #blog-related .cs-item:hover .cs-h3 {
        color: var(--primary);
    }
    #blog-related .cs-meta {
        font-size: 0.875rem;
        margin: 0;
        color: var(--blogMuted);
    }
}
@media only screen and (min-width: 48rem) {
    #blog-related .cs-item {
        grid-column: span 4;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode #blog-related {
        background-color: rgba(0, 0, 0, 0.2);
    }
    body.dark-mode #blog-related .cs-item {
        background-color: var(--medium);
        border-color: var(--accent);
    }
    body.dark-mode #blog-related .cs-h3 {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode #blog-related .cs-item:hover .cs-h3 {
        color: var(--secondaryLight);
    }
    body.dark-mode #blog-related .cs-meta {
        color: var(--bodyTextColorWhite);
        opacity: 0.7;
    }
}

/*-- -------------------------- -->
<---          Sidebar           -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    .cs-sidebar {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: clamp(1.5rem, 3vw, 2rem);
    }
    .cs-widget {
        padding: clamp(1.25rem, 3vw, 1.75rem);
        background-color: var(--blogSurfaceAlt);
        border: 1px solid var(--blogBorder);
        border-radius: var(--blogRadius);
    }
    .cs-widget-title {
        font-family: 'Playfair Display', serif;
        font-size: 1.125rem;
        font-weight: 700;
        line-height: 1.2em;
        margin: 0 0 1.25rem 0;
        padding: 0 0 0.75rem 0;
        border-bottom: 2px solid var(--primary);
        color: var(--headerColor);
    }
    .cs-widget ul {
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
    }
    .cs-widget li {
        list-style: none;
        font-size: 0.9375rem;
        line-height: 1.5em;
        color: var(--bodyTextColor);
    }
    .cs-widget a {
        color: var(--bodyTextColor);
        text-decoration: none;
        transition: color 0.3s;
    }
    .cs-widget a:hover {
        color: var(--primary);
    }
    /* Recent post list with thumbnails */
    .cs-recent-li > a {
        display: flex;
        align-items: flex-start;
        gap: 0.875rem;
    }
    .cs-recent-thumb {
        width: 4rem;
        height: 4rem;
        border-radius: 0.375rem;
        object-fit: cover;
        flex: none;
        background-color: var(--blogBorder);
    }
    .cs-recent-title {
        font-size: 0.9375rem;
        font-weight: 700;
        line-height: 1.4em;
        display: block;
        color: var(--headerColor);
        transition: color 0.3s;
    }
    .cs-recent-li a:hover .cs-recent-title {
        color: var(--primary);
    }
    .cs-recent-date {
        font-size: 0.8125rem;
        color: var(--blogMuted);
        display: block;
        margin-top: 0.25rem;
    }
    .cs-widget-cta {
        background: linear-gradient(135deg, var(--primary) 0%, #1d4d49 100%);
        border: none;
        text-align: left;
    }
    .cs-widget-cta .cs-widget-title {
        color: #fff;
        border-bottom-color: rgba(255, 255, 255, 0.35);
    }
    .cs-widget-cta p {
        font-size: 0.9375rem;
        line-height: 1.6em;
        margin: 0 0 1.25rem 0;
        color: #fff;
        opacity: 0.92;
    }
    .cs-widget-cta .cs-button-solid {
        font-size: 0.9375rem;
        font-weight: 700;
        line-height: 2.75rem;
        text-align: center;
        text-decoration: none;
        width: 100%;
        padding: 0 1.25rem;
        box-sizing: border-box;
        color: var(--primary);
        background-color: #fff;
        border-radius: 0.25rem;
        display: inline-block;
        transition: transform 0.3s;
    }
    .cs-widget-cta .cs-button-solid:hover {
        transform: translateY(-2px);
        color: var(--primary);
    }
}
/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    .cs-sidebar {
        width: 20.5rem;
        flex: none;
        position: sticky;
        top: 7rem;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode .cs-widget {
        background-color: var(--medium);
        border-color: var(--accent);
    }
    body.dark-mode .cs-widget-title,
    body.dark-mode .cs-recent-title {
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode .cs-widget-title {
        border-bottom-color: var(--secondary);
    }
    body.dark-mode .cs-widget li,
    body.dark-mode .cs-widget a {
        color: var(--bodyTextColorWhite);
        opacity: 0.9;
    }
    body.dark-mode .cs-widget a:hover,
    body.dark-mode .cs-recent-li a:hover .cs-recent-title {
        color: var(--secondaryLight);
        opacity: 1;
    }
    body.dark-mode .cs-recent-date {
        color: var(--bodyTextColorWhite);
        opacity: 0.65;
    }
    body.dark-mode .cs-widget-cta {
        background: linear-gradient(135deg, var(--primary) 0%, #143733 100%);
    }
    body.dark-mode .cs-widget-cta .cs-button-solid {
        color: var(--primary);
        background-color: #fff;
        opacity: 1;
    }
}

/*-- -------------------------- -->
<---   Core / Block Widgets     -->
<--- -------------------------- -*/

/*
  WordPress seeds a new widget area with its own block widgets (Search,
  Latest Posts, Categories, Archives...). Those render as .widget_block /
  .wp-block-* markup rather than the theme's .cs-widget classes, so they need
  their own skin -- otherwise they inherit default black text and vanish
  against the dark background.
*/
@media only screen and (min-width: 0rem) {
    .cs-sidebar .widget_block,
    .cs-sidebar .widget {
        padding: clamp(1.25rem, 3vw, 1.75rem);
        background-color: var(--blogSurfaceAlt);
        border: 1px solid var(--blogBorder);
        border-radius: var(--blogRadius);
        color: var(--bodyTextColor);
    }
    .cs-sidebar .widget_block > *:first-child,
    .cs-sidebar .widget > *:first-child {
        margin-top: 0;
    }
    .cs-sidebar .widget_block > *:last-child,
    .cs-sidebar .widget > *:last-child {
        margin-bottom: 0;
    }
    /* Widget headings, whichever level the block uses */
    .cs-sidebar .widget_block h1,
    .cs-sidebar .widget_block h2,
    .cs-sidebar .widget_block h3,
    .cs-sidebar .widget_block h4,
    .cs-sidebar .wp-block-heading,
    .cs-sidebar .widget-title,
    .cs-sidebar .wp-block-search__label {
        font-family: 'Playfair Display', serif;
        font-size: 1.125rem;
        font-weight: 700;
        line-height: 1.2em;
        margin: 0 0 1.25rem 0;
        padding: 0 0 0.75rem 0;
        border-bottom: 2px solid var(--primary);
        color: var(--headerColor);
        display: block;
    }
    .cs-sidebar .widget_block ul,
    .cs-sidebar .widget ul {
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0.875rem;
    }
    .cs-sidebar .widget_block li,
    .cs-sidebar .widget li {
        list-style: none;
        font-size: 0.9375rem;
        line-height: 1.5em;
        color: var(--bodyTextColor);
    }
    .cs-sidebar .widget_block a,
    .cs-sidebar .widget a {
        color: var(--bodyTextColor);
        text-decoration: none;
        transition: color 0.3s;
    }
    .cs-sidebar .widget_block a:hover,
    .cs-sidebar .widget a:hover {
        color: var(--primary);
    }
    /* Core search block */
    .cs-sidebar .wp-block-search__inside-wrapper {
        display: flex;
        gap: 0.5rem;
    }
    .cs-sidebar .wp-block-search__input {
        font-family: inherit;
        font-size: 1rem;
        width: 100%;
        height: 3rem;
        padding: 0 1rem;
        box-sizing: border-box;
        color: var(--headerColor);
        background-color: #fff;
        border: 1px solid var(--blogBorder);
        border-radius: 0.25rem;
    }
    .cs-sidebar .wp-block-search__input:focus {
        outline: none;
        border-color: var(--primary);
    }
    .cs-sidebar .wp-block-search__button {
        font-family: inherit;
        font-size: 1rem;
        font-weight: 700;
        height: 3rem;
        margin: 0;
        padding: 0 1.25rem;
        color: #fff;
        background-color: var(--primary);
        border: none;
        border-radius: 0.25rem;
        cursor: pointer;
        transition: background-color 0.3s;
    }
    .cs-sidebar .wp-block-search__button:hover {
        background-color: #1a1a1a;
    }
    /* Latest posts / categories / archives blocks */
    .cs-sidebar .wp-block-latest-posts__post-date,
    .cs-sidebar .wp-block-latest-posts__post-author {
        font-size: 0.8125rem;
        color: var(--blogMuted);
        display: block;
        margin-top: 0.25rem;
    }
    .cs-sidebar .wp-block-categories select,
    .cs-sidebar .wp-block-archives select,
    .cs-sidebar select {
        font-family: inherit;
        font-size: 0.9375rem;
        width: 100%;
        padding: 0.6875rem 0.75rem;
        box-sizing: border-box;
        color: var(--headerColor);
        background-color: #fff;
        border: 1px solid var(--blogBorder);
        border-radius: 0.25rem;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode .cs-sidebar .widget_block,
    body.dark-mode .cs-sidebar .widget {
        background-color: var(--medium);
        border-color: var(--accent);
        color: var(--bodyTextColorWhite);
    }
    body.dark-mode .cs-sidebar .widget_block h1,
    body.dark-mode .cs-sidebar .widget_block h2,
    body.dark-mode .cs-sidebar .widget_block h3,
    body.dark-mode .cs-sidebar .widget_block h4,
    body.dark-mode .cs-sidebar .wp-block-heading,
    body.dark-mode .cs-sidebar .widget-title,
    body.dark-mode .cs-sidebar .wp-block-search__label {
        color: var(--bodyTextColorWhite);
        border-bottom-color: var(--secondary);
    }
    body.dark-mode .cs-sidebar .widget_block li,
    body.dark-mode .cs-sidebar .widget li,
    body.dark-mode .cs-sidebar .widget_block a,
    body.dark-mode .cs-sidebar .widget a,
    body.dark-mode .cs-sidebar .widget_block p,
    body.dark-mode .cs-sidebar .widget p {
        color: var(--bodyTextColorWhite);
        opacity: 0.9;
    }
    body.dark-mode .cs-sidebar .widget_block a:hover,
    body.dark-mode .cs-sidebar .widget a:hover {
        color: var(--secondaryLight);
        opacity: 1;
    }
    body.dark-mode .cs-sidebar .wp-block-search__input,
    body.dark-mode .cs-sidebar .wp-block-categories select,
    body.dark-mode .cs-sidebar .wp-block-archives select,
    body.dark-mode .cs-sidebar select {
        color: var(--bodyTextColorWhite);
        background-color: rgba(255, 255, 255, 0.1);
        border-color: var(--accent);
    }
    body.dark-mode .cs-sidebar .wp-block-search__input::placeholder {
        color: var(--bodyTextColorWhite);
        opacity: 0.6;
    }
    body.dark-mode .cs-sidebar .wp-block-search__button {
        color: var(--dark);
        background-color: var(--secondaryLight);
    }
    body.dark-mode .cs-sidebar .wp-block-search__button:hover {
        background-color: #fff;
    }
    body.dark-mode .cs-sidebar .wp-block-latest-posts__post-date,
    body.dark-mode .cs-sidebar .wp-block-latest-posts__post-author {
        color: var(--bodyTextColorWhite);
        opacity: 0.65;
    }
}

/*-- -------------------------- -->
<---        Search Form         -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    .cs-search-form {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    .cs-search-label {
        flex: 1;
        display: block;
    }
    .cs-search-input {
        font-family: inherit;
        font-size: 1rem;
        width: 100%;
        height: 3rem;
        padding: 0 1rem;
        box-sizing: border-box;
        color: var(--headerColor);
        background-color: #fff;
        border: 1px solid var(--blogBorder);
        border-radius: 0.25rem;
        transition: border-color 0.3s;
    }
    .cs-search-input:focus {
        outline: none;
        border-color: var(--primary);
    }
    .cs-search-input::placeholder {
        color: var(--blogMuted);
    }
    .cs-search-submit {
        font-family: inherit;
        font-size: 1rem;
        font-weight: 700;
        height: 3rem;
        padding: 0 1.25rem;
        color: #fff;
        background-color: var(--primary);
        border: none;
        border-radius: 0.25rem;
        cursor: pointer;
        transition: background-color 0.3s;
    }
    .cs-search-submit:hover {
        background-color: #1a1a1a;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode .cs-search-input {
        color: var(--bodyTextColorWhite);
        background-color: rgba(255, 255, 255, 0.1);
        border-color: var(--accent);
    }
    body.dark-mode .cs-search-input::placeholder {
        color: var(--bodyTextColorWhite);
        opacity: 0.6;
    }
    body.dark-mode .cs-search-submit {
        background-color: var(--secondary);
        color: var(--dark);
    }
    body.dark-mode .cs-search-submit:hover {
        background-color: var(--secondaryLight);
    }
}

/*-- -------------------------- -->
<---            404             -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    #blog-404 {
        /* No banner on this template, so clear the fixed site header here. */
        padding: clamp(9rem, 18vw, 14rem) 1rem clamp(3.75rem, 7.82vw, 6.25rem);
        background-color: var(--blogSurface);
    }
    #blog-404 .cs-container {
        width: 100%;
        max-width: 46rem;
        margin: auto;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #blog-404 .cs-error {
        font-family: 'Playfair Display', serif;
        font-size: clamp(5rem, 18vw, 10rem);
        font-weight: 700;
        line-height: 1;
        margin: 0;
        color: var(--primary);
        opacity: 0.18;
    }
    #blog-404 .cs-title {
        text-align: center;
        margin: -1rem auto 1rem;
    }
    #blog-404 .cs-text {
        text-align: center;
        margin: 0 auto 2.5rem;
    }
    #blog-404 .cs-404-search {
        width: 100%;
        max-width: 30rem;
        margin: 0 auto 2.5rem;
    }
    #blog-404 .cs-button-solid {
        font-size: 1rem;
        font-weight: 700;
        line-height: 3.5rem;
        text-align: center;
        text-decoration: none;
        min-width: 9.375rem;
        padding: 0 2rem;
        color: #fff;
        background-color: var(--primary);
        border-radius: 0.25rem;
        display: inline-block;
        position: relative;
        z-index: 1;
        overflow: hidden;
    }
    #blog-404 .cs-button-solid:before {
        content: "";
        width: 0%;
        height: 100%;
        background: #000;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1;
        border-radius: 0.25rem;
        transition: width 0.3s;
    }
    #blog-404 .cs-button-solid:hover:before {
        width: 100%;
    }
}
/* Dark Mode */
@media only screen and (min-width: 0rem) {
    body.dark-mode #blog-404 {
        background-color: var(--dark);
    }
    body.dark-mode #blog-404 .cs-error {
        color: var(--secondaryLight);
    }
}

/*-- -------------------------- -->
<---       Accessibility        -->
<--- -------------------------- -*/

.cs-screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
    #blog-list .cs-item,
    #blog-list .cs-picture img,
    #blog-related .cs-item,
    #blog-list .cs-link-text:after {
        transition: none !important;
        transform: none !important;
    }
}
