/**
 * Medium-inspired reading typography for blog posts and long-form CMS content.
 */

.article-page {
    --article-text: rgba(31, 31, 31, 0.92);
    --article-text-muted: rgba(31, 31, 31, 0.62);
    --article-border: rgba(0, 0, 0, 0.08);
    --article-max-width: 680px;
    --article-body-size: 1.0625rem;
    --article-body-leading: 1.7;
}

@media (min-width: 768px) {
    .article-page {
        --article-body-size: 1.1875rem;
        --article-body-leading: 1.75;
    }
}

.article-page.sidebar-page-container {
    padding-top: 100px;
}

@media (min-width: 768px) {
    .article-page.sidebar-page-container {
        padding-top: 120px;
    }
}

.article-layout {
    max-width: var(--article-max-width);
}

@media (min-width: 992px) {
    .article-layout {
        max-width: none;
    }
}

/* Breadcrumb — small wayfinding only, no duplicate title */
.article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--article-text-muted);
    margin-bottom: 1.25rem;
}

.article-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    color: var(--title-color);
}

.article-breadcrumb-sep {
    opacity: 0.5;
}

/* Featured image */
.article-featured-image {
    margin-bottom: 1.25rem;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Article intro: image → category → title → byline */
.article-intro {
    margin-bottom: 1.75rem;
}

.article-category {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background-color: var(--theme-color);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.article-category:hover {
    color: #fff;
    opacity: 0.9;
}

.article-masthead-title,
h1.article-masthead-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.25rem, 4.2vw + 0.65rem, 2.125rem);
    line-height: 1.28;
    font-weight: 700;
    letter-spacing: -0.018em;
    color: var(--title-color);
    margin: 0 0 0.65rem;
    word-break: break-word;
    hyphens: auto;
}

@media (min-width: 768px) {
    .article-masthead-title,
    h1.article-masthead-title {
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--article-text-muted);
}

.article-byline-sep {
    opacity: 0.6;
}

.article-dek {
    font-family: 'Inter', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--article-text-muted);
    margin: 0.75rem 0 0;
}

/* Prose body */
.article-prose,
.article-prose.cms-content {
    font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
    font-size: var(--article-body-size);
    line-height: var(--article-body-leading);
    color: var(--article-text);
    letter-spacing: -0.003em;
    word-break: break-word;
}

.article-prose > :first-child {
    margin-top: 0;
}

.article-prose p {
    margin: 0 0 1.35em;
    color: var(--article-text);
}

.article-prose h1,
.article-prose h2,
.article-prose h3,
.article-prose h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--title-color);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 2em 0 0.65em;
}

.article-prose h2 {
    font-size: 1.375rem;
}

.article-prose h3 {
    font-size: 1.1875rem;
}

.article-prose h4 {
    font-size: 1.0625rem;
}

@media (min-width: 768px) {
    .article-prose h2 {
        font-size: 1.5rem;
    }

    .article-prose h3 {
        font-size: 1.25rem;
    }

    .article-prose h4 {
        font-size: 1.125rem;
    }
}

.article-prose a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(31, 31, 31, 0.4);
    text-underline-offset: 0.15em;
}

.article-prose a:hover {
    color: var(--theme-color);
}

.article-prose ul,
.article-prose ol {
    margin: 0 0 1.35em;
    padding-left: 1.35em;
}

.article-prose li {
    margin-bottom: 0.5em;
}

.article-prose blockquote {
    font-style: italic;
    color: var(--article-text-muted);
    border-left: 3px solid var(--article-border);
    margin: 1.75em 0;
    padding: 0.15em 0 0.15em 1.25em;
    background: transparent;
    border-radius: 0;
}

.article-prose img {
    max-width: 100%;
    height: auto;
    margin: 2em auto;
    border-radius: 10px;
}

/* Sidebar below content on mobile, left on desktop */
@media (max-width: 991px) {
    .article-page-row .sidebar-side {
        margin-top: 3rem;
        padding-top: 2rem;
        border-top: 1px solid var(--article-border);
    }

    .article-page-row .blog-sidebar {
        margin-right: 0;
    }
}

@media (min-width: 992px) {
    .article-page-row .sidebar-side .blog-sidebar {
        margin-right: 40px;
    }
}

/* Category footer tag */
.article-page--blog .post-share-option {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--article-border);
}

.article-page--blog .post-share-option .tags-list li h6 {
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--article-text-muted);
}

/* Blog index — Medium-style listing: compact header, topic chips, feed first */
.blog-index-intro {
    margin-bottom: 1.25rem;
}

.blog-index-title,
h1.blog-index-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.375rem, 3.2vw + 0.7rem, 1.875rem);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--title-color);
    margin: 0;
}

.blog-topic-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 0 1.75rem;
    padding: 0 0 0.35rem;
}

.blog-topic-chips::-webkit-scrollbar {
    display: none;
}

.blog-topic-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    color: var(--article-text);
    background: transparent;
    border: 1px solid var(--article-border);
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}

.blog-topic-chip:hover {
    color: var(--title-color);
    border-color: rgba(0, 0, 0, 0.18);
}

.blog-topic-chip.is-active {
    color: #fff;
    background-color: var(--theme-color);
    border-color: var(--theme-color);
}

.blog-topic-chip.is-active:hover {
    color: #fff;
    opacity: 0.92;
}

@media (max-width: 991px) {
    .article-page--blog-index .news-block-two .inner-box {
        margin-bottom: 2.5rem;
    }
}
