/* article.css: blog posts + glossary terms (layout: content) — part of the per-template CSS split (md-shared/article/blog/glossary). */

/* ==========================================================================
 * Content Stylesheet — for Markdown-rendered blog posts and pages.
 *
 * Matches the visual appearance of the production blog posts by using
 * the same Timebutler design tokens (Poppins font, brand colors, spacing).
 * Designed to style standard HTML elements (h1-h6, p, ul, ol, img, table,
 * blockquote, code, hr) without requiring framework-specific CSS classes.
 *
 * All values are extracted from the legacy kit-10 design tokens and the
 * production blog post content area styles.
 * ========================================================================== */


/* ==========================================================================
 * Breadcrumb trail (Home › Section › Title)
 *
 * Spans the content width (max 1280px, centered by .site-main) but its own
 * items are left-aligned. Chevron separators are drawn with CSS so no extra
 * markup or image requests are needed.
 * ========================================================================== */
.breadcrumbs {
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    padding: 28px 20px 0;
}

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #6b7280;
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs__item+.breadcrumbs__item::before {
    content: "\203A";
    margin: 0 8px;
    color: #b5bcc9;
}

.breadcrumbs__item a {
    color: #406CC1;
    text-decoration: none;
}

.breadcrumbs__item a:hover {
    color: #293FCC;
    text-decoration: underline;
}

.breadcrumbs__current {
    color: #6b7280;
}


/* ==========================================================================
 * Two-Column Layout
 *
 * Desktop: article (70%) + sidebar (30%), matching the production blog post
 * template proportions. Max width 1280px, centered.
 * Tablet/mobile: single column, sidebar stacks above article content.
 * ========================================================================== */
.content-layout {
    display: flex;
    flex-direction: column;
    max-width: 1280px;
    margin: 0 auto;
    padding: 50px 20px;
    gap: 50px;
    align-items: stretch;
    /* Poppins body text — same as the legacy kit-10 defaults */
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5em;
    color: #0F1115;
}


/* ==========================================================================
 * Sidebar
 *
 * Right-side column (30% width on desktop) containing the "In this article"
 * table of contents and the "Share" widget. Sticky on desktop so it stays
 * visible while scrolling. On tablet/mobile it stacks above the article.
 * ========================================================================== */
.content-hero-wrapper {
    align-items: stretch;
    display: flex;
    flex-direction: row;
    gap: 32px;
}

/* ==========================================================================
 * Hero / Featured Image
 *
 * Full-width banner image at the top of the article, matching the rounded
 * style used by the production blog posts (16px border-radius).
 * ========================================================================== */
.content-hero-wrapper .content-hero-image {
    background-size: cover;
    border-radius: 16px;
    flex: 1;
}

.content-hero-wrapper .content-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 377px;
}



/* ==========================================================================
 * Article Metadata
 *
 * Author, date, and category badges displayed above the content body.
 * Matches the blog post template's breadcrumb/metadata styling.
 * ========================================================================== */
.content-hero-wrapper .content-hero-meta .content-meta {
    background-color: #EAECFA;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    font-size: 14px;
    color: #0F1115;
    padding: 20px;
}

.content-hero-wrapper .content-hero-meta .content-meta .linkedin-logo {
    color: white;
}

.content-hero-wrapper .content-hero-meta .content-meta .linkedin-logo svg {
    fill: #406CC1;
}

.content-hero-wrapper .content-hero-meta .content-meta h4.meta-author {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    margin: 23px 0 5px 0;
}

.content-hero-wrapper .content-hero-meta .content-meta .meta-author-avatar-wrapper {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.content-hero-wrapper .content-hero-meta .content-meta .meta-author-avatar-wrapper img {
    border: 3px solid white;
    border-radius: 500px;
    height: 90px;
    object-fit: cover;
    width: 90px;
}

.article-wrapper {
    display: flex;
    flex-direction: row;
    gap: 32px;
}


/* ==========================================================================
 * Article Container
 *
 * Main content column — takes 70% width on desktop.
 * On tablet/mobile it becomes full-width.
 * ========================================================================== */
.article-wrapper .content-article {
    flex: 1;
    min-width: 0;
}

/* ==========================================================================
 * Sidebar
 *
 * Right-side column (30% width on desktop) containing the "In this article"
 * table of contents and the "Share" widget. Sticky on desktop so it stays
 * visible while scrolling. On tablet/mobile it stacks above the article.
 * ========================================================================== */
.article-wrapper .content-sidebar {
    flex-shrink: 0;
    /* Sticky positioning — offset matches the header height + padding.
       sticky_offset: 120px matches the production ToC configuration. */
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    width: 377px;
}

.content-article .meta-date {
    display: flex;
    margin-bottom: 32px;
}

/* ==========================================================================
 * Typography — Headings
 *
 * H1–H4 sizes and weights match the legacy kit-10 typographic scale:
 *   H1: 36px / 400 weight (page title)
 *   H2: 24px / 600 weight (section headings)
 *   H3: 20px / 500 weight (subsection headings)
 *   H4: 24px / 600 weight / primary blue color
 * ========================================================================== */
.content-article h1 {
    font-size: 36px;
    font-weight: 400;
    line-height: 1.3em;
    color: #0F1115;
    margin: 0 0 24px;
}

.content-article h2 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3em;
    color: #0F1115;
    margin: 48px 0 16px;
}

.content-article h3 {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3em;
    color: #0F1115;
    margin: 36px 0 12px;
}

.content-article h4 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3em;
    /* H4 uses the primary brand blue per the brand kit */
    color: #0E2F7E;
    margin: 32px 0 12px;
}

/* First heading immediately after hero shouldn't have excessive top margin */
.content-article h2:first-child,
.content-article h3:first-child {
    margin-top: 0;
}


/* ==========================================================================
 * Typography — Body Text
 *
 * Paragraph and list spacing matches the production blog post content area
 * (production blog post content area): p/ul margin-bottom 26px, li 24px.
 * ========================================================================== */
.content-article p {
    margin: 0 0 26px;
}

.content-article ul,
.content-article ol {
    margin: 0 0 26px;
    padding-left: 24px;
}

.content-article li {
    margin-bottom: 24px;
}

.content-article li:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
 * Links
 *
 * Link colors match the legacy kit-10 link color (#406CC1 → hover #293FCC).
 * Heading links have no underline (matching the production blog post custom CSS).
 * ========================================================================== */
.content-article a {
    color: #406CC1;
    text-decoration: underline;
}

.content-article a:hover {
    color: #0E2F7E;
}

.content-article h2 a,
.content-article h3 a {
    text-decoration: none;
}

.content-article h2 a:hover,
.content-article h3 a:hover {
    text-decoration: underline;
}


/* ==========================================================================
 * Images
 *
 * Inline content images get the same treatment as the production blog posts:
 * full width, 16px border-radius, thin blue border.
 * ========================================================================== */
.content-article img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid #293FCC;
    display: block;
}


/* ==========================================================================
 * Blockquotes
 *
 * Styled as a branded callout with left border in primary blue and a light
 * background. No direct production-design equivalent, but uses brand colors.
 * ========================================================================== */
.content-article blockquote {
    margin: 32px 0;
    padding: 20px 24px;
    border-left: 4px solid #0E2F7E;
    background-color: #EDF3F8;
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.content-article blockquote p {
    margin-bottom: 0;
}

.content-article blockquote p+p {
    margin-top: 16px;
}


/* ==========================================================================
 * Code Blocks
 *
 * Inline code gets a subtle background; fenced code blocks get a dark
 * container. Using brand-adjacent neutral colors.
 * ========================================================================== */
.content-article code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    background-color: #EAECFA;
    padding: 2px 6px;
    border-radius: 4px;
}

.content-article pre {
    margin: 24px 0;
    padding: 20px;
    background-color: #1e1e2e;
    color: #cdd6f4;
    border-radius: 12px;
    overflow-x: auto;
    line-height: 1.6;
}

/* Code inside pre blocks resets the inline-code background */
.content-article pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: 14px;
}


/* ==========================================================================
 * Tables
 *
 * Clean table styling matching the overall brand. Alternating row colors
 * use the same light blue/white palette as the brand accent colors.
 * ========================================================================== */
.content-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 16px;
}

.content-article th,
.content-article td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #DEE8F2;
}

.content-article th {
    font-weight: 600;
    background-color: #0E2F7E;
    color: #FFFFFF;
}

/* Subtle alternating row background for readability */
.content-article tr:nth-child(even) {
    background-color: #F8FAFF;
}


/* ==========================================================================
 * Horizontal Rules
 *
 * Simple divider using the secondary border color from the brand kit.
 * ========================================================================== */
.content-article hr {
    border: none;
    border-top: 1px solid #DEE8F2;
    margin: 48px 0;
}


/* ==========================================================================
 * CTA Section
 *
 * Call-to-action block at the bottom of articles. Matches the production
 * blog post CTA styling (dark blue background, white text, rounded button).
 * ========================================================================== */
.content-cta {
    margin: 48px 0 0;
    padding: 32px;
    background-color: #0E2F7E;
    border-radius: 16px;
    text-align: center;
    color: #FFFFFF;
}

.content-cta h2 {
    color: #FFFFFF;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px;
}

.content-cta p {
    color: #FFFFFF;
    margin: 0 0 20px;
    opacity: 0.9;
}

.content-cta .cta-button {
    display: inline-block;
    background-color: #FFFFFF;
    color: #0E2F7E;
    font-family: "Poppins", Sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1em;
    padding: 12px 32px;
    border-radius: 100px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.content-cta .cta-button:hover {
    background-color: #EAECFA;
    color: #0E2F7E;
}


/* ==========================================================================
 * Table of Contents — "In this article"
 *
 * White card with rounded corners matching the production ToC card.
 * Contains an auto-generated list of H2 section links with scroll spy.
 * ========================================================================== */
.content-toc {
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
}

/* ToC heading — uses Poppins (matching the "Segment" font visual weight
   from the production design, which is similar at 20px/500). */
h3.content-toc__title {
    font-family: "Poppins", Sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    color: #000000;
    margin: 0 0 15px;
}

/* ToC navigation list — clean bullet-free list with consistent spacing */
.content-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-toc__item {
    margin-bottom: 0;
    /* Reset the article li spacing — ToC items are compact */
    padding: 0;
}

/* ToC link — standard text styling with subtle hover/active states */
a.content-toc__link {
    display: block;
    padding: 6px 0;
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5em;
    color: #0F1115;
    text-decoration: none;
    transition: color 0.15s;
}

a.content-toc__link:hover {
    color: #293FCC;
}

/* Active state — applied by the scroll spy JavaScript when the
   corresponding section is visible in the viewport. */
a.content-toc__link--active {
    color: #293FCC;
    font-weight: 500;
}


/* ==========================================================================
 * Share Widget — "Share with your community!"
 *
 * Dark blue card with white icon buttons for Facebook, X, and LinkedIn.
 * Appears twice: in the sidebar (compact) and after the article content.
 * Matches the production blog post share section styling.
 * ========================================================================== */
/* Default layout: row with text left, icons right — matches production.
   The sidebar variant overrides to column when space is tight. */
.content-share {
    background-color: #0E2F7E;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Share heading — white text on dark blue background.
   Uses !important on color to override the legacy kit-10 h4 styles
   which set h4 { color: #0E2F7E } (invisible on the dark blue bg). */
h4.content-share__title {
    font-family: "Poppins", Sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5em;
    color: #FFFFFF;
    margin: 0;
}

/* Share button row — inline flex, right-aligned alongside the title */
.content-share__buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Individual share button — fixed 40x40 square with rounded corners,
   matching the production share buttons exactly. */
a.content-share__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #FFFFFF;
    color: #0E2F7E;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.content-share__btn svg {
    width: 20px;
    height: 20px;
}

/* Hover state — subtle color shift matching production share button hover */
.content-share__btn:hover {
    background-color: #DEE8F2;
    color: #0E2F7E;
}

/* Sidebar share variant — stacks vertically since the sidebar is narrow */
.content-share--sidebar {
    flex-direction: column;
    align-items: flex-start;
}

/* Bottom share bar (inside article) — single row: title left, buttons right.
   Matches the production layout exactly. */
.content-article>.content-share {
    margin: 48px 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}


/* ==========================================================================
 * Related articles ("Related Articles" / "Ähnliche Artikel")
 *
 * Full-width section below the article body. Reuses the shared .blog-grid +
 * .blog-card component (defined in md-shared.css) so the cards match the blog
 * index exactly; only the section wrapper and heading are defined here.
 * ========================================================================== */
.related-articles {
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 20px 64px;
}

.related-articles__title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #1b2a4a;
    margin: 0 0 24px;
}


/* ==========================================================================
 * Responsive Adjustments
 *
 * Follows the same breakpoints as production (1024px tablet, 767px mobile).
 * Typography scales down to match the kit-10 responsive overrides.
 * ========================================================================== */