/* ============================================
   CODE-LEIN Blog Styles
   Nutzt das bestehende .section/.sec-Container-System aus standard.css.
   Eigene Klassen mit blog-/post-Prefix — keine Konflikte.
   ============================================ */


/* --------------------------------------------
   HUB — Hero (analog kontakt-hero / impressum-hero)
   -------------------------------------------- */
.section-blog-hero {
    height: 400px;
    position: relative;
    overflow-x: clip;
    margin-top: 60px;
    align-items: flex-start;
    padding-top: 60px;
}

.section-blog-hero::before,
.section-blog-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #226DFB42, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}
.section-blog-hero::before {
    width: 300px;
    height: 96%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}
.section-blog-hero::after {
    margin-top: 60px;
    width: 100%;
    height: 250px;
    left: 0;
    top: 0;
}

.blog-hero-dots {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image:
        radial-gradient(ellipse 300px 300px at 50% 50%, black 0%, transparent 70%),
        radial-gradient(ellipse 50% 175px at 50% 30%, black 0%, transparent 70%);
    mask-image:
        radial-gradient(ellipse 300px 300px at 50% 50%, black 0%, transparent 70%),
        radial-gradient(ellipse 50% 175px at 50% 30%, black 0%, transparent 70%);
    -webkit-mask-composite: source-over;
    mask-composite: add;
    pointer-events: none;
    z-index: 1;
}

.sec-blog-hero {
    text-align: center;
    position: relative;
    z-index: 2;
    gap: 20px;
}

/* Pille — identisch zu kontakt-pille / impressum-pille */
.blog-pille {
    background-color: var(--background-color-pille);
    border: 1px solid #001C51;
    border-radius: 100px;
    padding: 8px 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: fit-content;
}
.blog-pille-circel {
    width: 6px;
    height: 6px;
    border-radius: 100%;
    background-color: #226DFB;
}
.blog-pille-text {
    text-transform: uppercase;
    color: #226DFB;
    font-size: 16px;
}

.blog-hero-header {
    font-size: var(--font-size-hero);
    color: #FFFFFF;
    font-weight: 600;
    line-height: 125%;
}

.blog-hero-text {
    color: var(--font-color-text);
    font-size: var(--font-size-lg);
    max-width: 600px;
    line-height: 1.6;
}


/* --------------------------------------------
   HUB — Post-Cards-Grid (Servcard-Look)
   -------------------------------------------- */
.section-blog-grid {
    background-color: var(--highlite-color);
    padding: 60px 0 130px;
}
.sec-blog-grid {
    align-items: stretch;
}

/* Intro-Text auf dem Hub, unterhalb des Karten-Grids
   (Kontext für Leser + eigenes Keyword der Übersichtsseite) */
.blog-intro {
    max-width: 800px;
    margin: 56px auto 0;
    text-align: center;
}
.blog-intro p {
    color: var(--font-color-text);
    font-size: var(--font-size-base);
    line-height: 1.7;
}
.blog-intro p + p {
    margin-top: 1em;
}

.blog-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--font-color-text);
    font-size: var(--font-size-lg);
}

/* Card im Servcard-Look (analog .servcard auf Startseite) */
.blog-card {
    background: var(--highlite-color-light, #060B28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition-speed-fast, 0.3s) ease,
                border-color var(--transition-speed-fast, 0.3s) ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 109, 251, 0.4);
}

/* Raster-Pattern oben in der Card */
.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(178, 180, 187, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(178, 180, 187, 0.07) 1px, transparent 1px);
    background-size: 20px 20px;
    -webkit-mask-image: radial-gradient(ellipse 220px 140px at 50% 0%, black 0%, transparent 70%);
    mask-image: radial-gradient(ellipse 220px 140px at 50% 0%, black 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Blue Glow oben mitte */
.blog-card::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #226DFB18, transparent 70%);
    filter: blur(30px);
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

/* Featured-Image im Card (Servcard-Icon-Stil) */
.blog-card-imagewrap {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #FFFFFF0F;
    background: var(--background-color-card-icon);
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-bottom: 24px;
}
.blog-card-image {
    width: 100%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    display: block;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: var(--font-size-sm);
    color: var(--font-color-text);
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
}
.blog-card-category {
    display: inline-block;
    background-color: rgba(34, 109, 251, 0.16);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-card-title {
    color: var(--white);
    font-size: var(--font-size-lg);
    line-height: 135%;
    font-weight: 600;
    margin: 0 0 12px;
    position: relative;
    z-index: 1;
}
.blog-card-description {
    color: var(--font-color-text);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
    position: relative;
    z-index: 1;
}
.blog-card-readmore {
    color: var(--primary-color);
    font-weight: 500;
    font-size: var(--font-size-base);
    position: relative;
    z-index: 1;
    margin-top: auto;
}


/* --------------------------------------------
   DETAIL — Header (analog Hub-Hero)
   -------------------------------------------- */
.section-post-hero {
    min-height: 400px;
    position: relative;
    overflow-x: clip;
    margin-top: 60px;
    align-items: flex-start;
    padding: 60px 0 80px;
}
.section-post-hero::before,
.section-post-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, #226DFB42, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}
.section-post-hero::before {
    width: 300px;
    height: 96%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}
.section-post-hero::after {
    margin-top: 60px;
    width: 100%;
    height: 250px;
    left: 0;
    top: 0;
}

.post-hero-dots {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image:
        radial-gradient(ellipse 300px 300px at 50% 50%, black 0%, transparent 70%),
        radial-gradient(ellipse 50% 175px at 50% 30%, black 0%, transparent 70%);
    mask-image:
        radial-gradient(ellipse 300px 300px at 50% 50%, black 0%, transparent 70%),
        radial-gradient(ellipse 50% 175px at 50% 30%, black 0%, transparent 70%);
    -webkit-mask-composite: source-over;
    mask-composite: add;
    pointer-events: none;
    z-index: 1;
}

.sec-post-hero {
    text-align: center;
    position: relative;
    z-index: 2;
    gap: 20px;
}

.post-breadcrumb {
    font-size: var(--font-size-sm);
    color: #ffffff;
    opacity: 0.7;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}
.post-breadcrumb a {
    color: inherit;
    text-decoration: none;
}
.post-breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}
.post-breadcrumb-sep {
    opacity: 0.5;
}
.post-breadcrumb-current {
    /* Bricht bei langen Titeln um statt zu ellipsen; 100%-Deckel verhindert
       horizontales Scrollen auf schmalen Screens (50ch kann > Viewport sein) */
    max-width: 50ch;
    max-width: min(50ch, 100%);
    line-height: 1.5;
}

.post-headline {
    font-size: var(--font-size-hero);
    color: #FFFFFF;
    font-weight: 600;
    line-height: 1.18;
    margin: 0;
    max-width: 900px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    font-size: var(--font-size-base);
    color: #ffffff;
    opacity: 0.78;
}
.post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.post-meta-author {
    font-weight: 500;
    opacity: 1;
}
.post-meta-sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: #ffffff;
    opacity: 0.3;
}


/* --------------------------------------------
   DETAIL — Featured Image
   -------------------------------------------- */
.section-post-feature {
    background: linear-gradient(180deg, var(--highlite-color) 0%, var(--highlite-color) 60%, var(--white) 60%, var(--white) 100%);
    padding: 0;
}
.sec-post-feature {
    width: min(1100px, 90vw);
}
.post-feature-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.4);
    background-color: var(--highlite-color-light, #030822);
}


/* --------------------------------------------
   DETAIL — Article Body
   -------------------------------------------- */
.section-post-body {
    background-color: var(--white);
    padding: 80px 0 60px;
}
.sec-post-body {
    width: min(760px, 90vw);
    align-items: stretch;
}
.post-body {
    color: var(--font-color-dark);
    font-size: 18px;
    line-height: 1.75;
}
.post-body > * + * {
    margin-top: 1.4em;
}
.post-body h2 {
    font-size: var(--font-size-subheader);
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2em;
    color: var(--font-color-dark);
    scroll-margin-top: 100px;
}
.post-body h3 {
    font-size: var(--font-size-card-title);
    font-weight: 600;
    line-height: 1.35;
    margin-top: 1.8em;
    color: var(--font-color-dark);
}
.post-body h4 {
    font-size: 19px;
    font-weight: 600;
    margin-top: 1.6em;
}
.post-body p {
    color: var(--font-color-dark);
}
.post-body strong {
    font-weight: 600;
    color: var(--font-color-dark);
}
.post-body em {
    font-style: italic;
}
.post-body a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.post-body a:hover {
    text-decoration-thickness: 2px;
}
.post-body ul,
.post-body ol {
    padding-left: 24px;
}
.post-body ul li,
.post-body ol li {
    margin-top: 0.6em;
    color: var(--font-color-dark);
}
.post-body ul li::marker {
    color: var(--primary-color);
}
.post-body ol li::marker {
    color: var(--primary-color);
    font-weight: 600;
}
.post-body blockquote {
    border-left: 3px solid var(--primary-color);
    background-color: rgba(34, 109, 251, 0.05);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    color: var(--font-color-dark);
    font-style: italic;
}
.post-body blockquote p {
    margin: 0;
}
.post-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background-color: rgba(34, 109, 251, 0.08);
    color: var(--font-color-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}
.post-body pre {
    background-color: var(--highlite-color);
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}
.post-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}
.post-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}
.post-body th,
.post-body td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #E6E8EE;
}
.post-body th {
    background-color: rgba(34, 109, 251, 0.06);
    font-weight: 600;
}
.post-body hr {
    border: none;
    border-top: 1px solid #E6E8EE;
    margin: 2.4em 0;
}

/* TL;DR-Box „Das Wichtigste in Kürze" — extrahierbare Kernaussagen
   für Leser und generative KI (Answer-first-Struktur) */
.post-tldr {
    background-color: rgba(34, 109, 251, 0.05);
    border: 1px solid rgba(34, 109, 251, 0.18);
    border-radius: 12px;
    padding: 24px 28px;
}
.post-tldr-title {
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin: 0 0 12px;
}
.post-tldr ul {
    margin: 0;
    padding-left: 20px;
}
.post-tldr ul li {
    margin-top: 0.5em;
}
.post-tldr ul li:first-child {
    margin-top: 0;
}

/* Tabellen scrollen auf schmalen Screens in eigenem Container
   statt die Seite aufzudrücken */
.post-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.post-table-scroll table {
    min-width: 520px;
}


/* --------------------------------------------
   DETAIL — CTA Box
   -------------------------------------------- */
.section-post-cta {
    background-color: var(--white);
    padding: 40px 0 130px;
}
.sec-post-cta {
    width: min(760px, 90vw);
}
.post-cta-box {
    width: 100%;
    padding: 36px;
    background-color: var(--highlite-color);
    color: #ffffff;
    border-radius: 20px;
    box-sizing: border-box;
}
.post-cta-pille {
    display: inline-block;
    background-color: rgba(34, 109, 251, 0.2);
    color: var(--primary-color);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
}
.post-cta-title {
    font-size: var(--font-size-card-title);
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 12px;
}
.post-cta-text {
    font-size: var(--font-size-base);
    line-height: 1.6;
    opacity: 0.8;
    margin: 0 0 20px;
}
.post-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 14px 24px;
    border-radius: 10px;
    transition: transform var(--transition-speed-fast, 0.3s) ease,
                background-color var(--transition-speed-fast, 0.3s) ease;
}
.post-cta-button:hover {
    transform: translateY(-2px);
    background-color: #4d8aff;
}


/* --------------------------------------------
   Responsive — gleiche Breakpoints wie kontakt.css / index.css
   -------------------------------------------- */
@media (max-width: 1550px) {
    .blog-hero-header,
    .post-headline {
        font-size: var(--font-size-header-tablet);
    }
}

@media (max-width: 1300px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1100px) {
    .blog-hero-header,
    .post-headline {
        font-size: 36px;
    }
    .post-body h2 {
        font-size: var(--font-size-card-title);
    }
}

@media (max-width: 950px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .blog-card {
        padding: 28px;
    }
    .post-meta {
        gap: 12px;
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 600px) {
    /* Abstände + Dots-Mask analog .section-kontakt-hero / .kontakt-hero-dots */
    .section-blog-hero,
    .section-post-hero {
        height: auto;
        min-height: 0;
        padding: 40px 0 40px;
    }
    .blog-hero-dots,
    .post-hero-dots {
        -webkit-mask-image: radial-gradient(ellipse 200px 200px at 50% 50%, black 0%, transparent 70%);
        mask-image: radial-gradient(ellipse 200px 200px at 50% 50%, black 0%, transparent 70%);
    }
    .blog-hero-header,
    .post-headline {
        font-size: var(--font-size-header-handy);
    }
    .blog-hero-text {
        font-size: var(--font-size-text-handy);
    }
    .section-blog-grid {
        padding: 40px 0 80px;
    }
    .blog-card {
        padding: 24px;
    }
    .blog-card-title {
        font-size: var(--font-size-base);
    }
    .post-body {
        font-size: 17px;
    }
    .post-body h2 {
        font-size: 22px;
    }
    .post-body h3 {
        font-size: 19px;
    }
    .post-cta-box {
        padding: 28px 22px;
    }
}
