/**
 * Medium-inspired reading typography for blog posts, services, and project pages.
 * Scoped to .article-page so marketing headings elsewhere stay unchanged.
 */

.article-page {
    --article-text: rgba(41, 41, 41, 0.92);
    --article-text-muted: rgba(41, 41, 41, 0.68);
    --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;
    }
}

/* Layout & spacing */
.article-page.service-details-sec {
    padding-top: 32px;
    padding-bottom: 64px;
}

@media (min-width: 768px) {
    .article-page.service-details-sec {
        padding-top: 64px;
        padding-bottom: 80px;
    }
}

.article-layout {
    max-width: var(--article-max-width);
    margin-left: auto;
    margin-right: auto;
}

/* Medium-style article masthead (replaces dark page hero) */
.article-masthead {
    margin-bottom: 1.5rem;
    text-align: left;
}

@media (min-width: 768px) {
    .article-masthead {
        margin-bottom: 2rem;
    }
}

.article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--body-font);
    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;
    transition: color 0.15s ease;
}

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

.article-breadcrumb-sep {
    opacity: 0.5;
    user-select: none;
}

.article-masthead-title,
h1.article-masthead-title {
    font-family: var(--heading-font);
    font-size: clamp(1.25rem, 4.2vw + 0.65rem, 2.5rem);
    line-height: 1.28;
    font-weight: 700;
    letter-spacing: -0.018em;
    color: var(--heading-color);
    text-transform: none;
    margin: 0 0 0.75rem;
    word-break: break-word;
    hyphens: auto;
}

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

.article-masthead .article-dek {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.article-masthead .article-meta {
    margin-bottom: 0;
    padding-top: 0.25rem;
}

/* Blog article intro — Medium mobile order: image → category → title → byline → body */
.article-page--blog .article-breadcrumb {
    margin-bottom: 1rem;
}

.article-featured-image--lead {
    margin-bottom: 1.25rem;
}

.article-intro {
    margin-bottom: 1.75rem;
}

.article-category {
    display: inline-block;
    font-family: var(--body-font);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--heading-color);
    background-color: var(--primary-color);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
    transition: opacity 0.15s ease;
}

.article-category:hover {
    opacity: 0.85;
    color: var(--heading-color);
}

.article-intro .article-masthead-title,
.article-intro h1.article-masthead-title {
    margin-bottom: 0.65rem;
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--body-font);
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--article-text-muted);
    margin-bottom: 1rem;
}

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

.article-intro .article-dek {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Related posts — bottom of article only (Medium "more from" pattern) */
.article-more-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--article-border);
}

.article-more-posts-title {
    font-family: var(--body-font);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--article-text-muted);
    margin: 0 0 1rem;
}

.article-more-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article-more-posts-list li {
    margin-bottom: 0.65rem;
}

.article-more-posts-list a {
    font-family: var(--body-font);
    font-size: 1rem;
    line-height: 1.45;
    color: var(--heading-color);
    text-decoration: none;
}

.article-more-posts-list a:hover {
    text-decoration: underline;
}

.article-header {
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .article-header {
        margin-bottom: 2.5rem;
    }
}

.article-header .article-title,
.article-page .service-content > h4.title {
    font-family: var(--heading-font);
    font-size: 1.625rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--heading-color);
    text-transform: none;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .article-header .article-title,
    .article-page .service-content > h4.title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1.25rem;
    }
}

@media (min-width: 992px) {
    .article-header .article-title,
    .article-page .service-content > h4.title {
        font-size: 2.375rem;
    }
}

.article-dek,
.article-page .lead {
    font-family: var(--body-font);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--article-text-muted);
    margin-bottom: 1.75rem;
}

@media (min-width: 768px) {
    .article-dek,
    .article-page .lead {
        font-size: 1.25rem;
        line-height: 1.55;
    }
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-family: var(--body-font);
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--article-text-muted);
    margin-bottom: 1.5rem;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.article-meta i {
    font-size: 0.8125rem;
    opacity: 0.75;
}

.article-featured-image {
    margin-bottom: 2rem;
}

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

/* Project / service metadata strip */
.article-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.5rem;
    padding: 1rem 0 1.5rem;
    margin-bottom: 1.5rem;
    border-top: 1px solid var(--article-border);
    border-bottom: 1px solid var(--article-border);
}

@media (min-width: 576px) {
    .article-meta-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.article-meta-grid h6 {
    font-family: var(--body-font);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--article-text-muted);
    margin-bottom: 0.25rem;
}

.article-meta-grid p {
    font-family: var(--body-font);
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--heading-color);
    margin: 0;
}

/* Medium-style prose body */
.article-prose {
    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 > :last-child {
    margin-bottom: 0;
}

.article-prose p {
    margin: 0 0 1.35em;
}

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

.article-prose h1 {
    font-size: 1.5rem;
}

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

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

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

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

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

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

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

.article-prose strong,
.article-prose b {
    font-weight: 700;
}

.article-prose em,
.article-prose i {
    font-style: italic;
}

.article-prose a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(41, 41, 41, 0.45);
    text-underline-offset: 0.15em;
    transition: text-decoration-color 0.15s ease;
}

.article-prose a:hover {
    text-decoration-color: var(--heading-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 li::marker {
    color: var(--article-text-muted);
}

.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;
}

.article-prose blockquote p {
    margin-bottom: 0.75em;
}

.article-prose blockquote p:last-child {
    margin-bottom: 0;
}

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

/* Surrounding page sections toned down for reading flow */
.article-page .intro-wrapper h3 {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .article-page .intro-wrapper h3 {
        font-size: 1.5rem;
    }
}

.article-page .intro-wrapper p {
    font-family: var(--body-font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--article-text-muted);
    margin-bottom: 1.25rem;
}

.article-page .service-content > h3,
.article-page .service-content .check-list + h3 {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .article-page .service-content > h3 {
        font-size: 1.375rem;
    }
}

.article-page .check-list.style-two li {
    font-family: var(--body-font);
    font-size: 0.9375rem;
    line-height: 1.55;
}
