/* ================================
   IFIS – Base CSS
   Struktur vor Stil
   Konsolidierte Fassung
================================ */


/* ================================================
   1. RESET
================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
}


/* ================================================
   2. DESIGN TOKENS / VARIABLEN
================================================ */

:root {
    --layout-max: 720px;
    --layout-padding: clamp(16px, 3vw, 28px);
    --header-height: 72px;

    --bg: #ffffff;
    --bg-soft: #fafafa;

    --text-main: #2b2b2b;
    --text-secondary: #3a3a3a;
    --text-muted: #6a6a6a;
    --text-heading: #2a2a2a;
/*
    --border-subtle: rgba(0,0,0,0.08);*/
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1113;
        --bg-soft: #14171a;

        --text-main: #e6e6e6;
        --text-secondary: #cfcfcf;
        --text-muted: #9a9a9a;
        --text-heading: #f0f0f0;
/*
        --border-subtle: rgba(255,255,255,0.08); */
    }
}


/* ================================================
   3. TYPOGRAFIE / BASIS
================================================ */

html,
body {
    font-family: "Inter", system-ui, -apple-system,
                 BlinkMacSystemFont, "Segoe UI",
                 Roboto, Arial, sans-serif;

    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--text-main);
    background: var(--bg);
}

body {
    display: flex;
    flex-direction: column;
}


/* ================================================
   4. UTILITY-KLASSEN
================================================ */

.hidden {
    display: none;
}

.divider {
    margin: 0 0.25em;
    opacity: 0.4;
}

.hidden-submit {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.subtle {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    color: #bbb;
    margin: 3rem 0 1.2rem 0;
}


/* ================================================
   5. LINKS
================================================ */

a {
    color: var(--text-main);
    text-decoration: none;
}

a:visited {
    color: var(--text-main);
}

a:focus {
    outline: none;
}

.home-links a,
.text-links a {
    display: inline-block;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.home-links a:hover,
.text-links a:hover {
    border-bottom: 1px solid currentColor;
    opacity: 0.7;
}

main a[target="_blank"]::after {
    text-decoration-skip-ink: auto;
    content: "";
    display: inline-block;
    font-size: 0.72em;
    margin-left: 0.25em;
    opacity: 0;
    transform: translateY(-0.18em);
    transition: opacity 0.15s ease;
    text-decoration: none;
}

main a[target="_blank"]:hover::after {
    opacity: 0.6;
}

.ifis-text p a {
    text-decoration: none;
}

.ifis-text p a:hover {
    opacity: 0.7;
}

.hero-link {
    font-weight: 500;
}

.hero-link::after {
    content: " →";
    opacity: 0.7;
}


/* ================================================
   6. GRUNDLAYOUT
================================================ */

main {
    width: 100%;
    flex: 1;
    padding-top: var(--header-height);
}

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

.home-container {
    max-width: 980px;
    margin: 0 auto;

    padding-left: var(--layout-padding);
    padding-right: var(--layout-padding);
}


/* ================================================
   7. HEADER
================================================ */

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--header-height);
    background: var(--bg);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
}

.site-header-inner {
    max-width: var(--layout-max);

    margin: 0 auto;

    padding-left: var(--layout-padding);
    padding-right: var(--layout-padding);

    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-to-top {
    opacity: 0;
    font-size: 0.8rem;
    color: #999;
    transition: opacity .2s ease;
}

.back-to-top.visible {
    opacity: 1;
}

.site-logo {
    font-size: 13px;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    white-space: nowrap;
}

.site-logo:hover {
    color: var(--text-main);
}

.site-title {
    font-size: 18px;
    font-weight: 400;
    white-space: nowrap;
}

.ifis-home .site-title {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .site-header {
        background: linear-gradient(
            to bottom,
            #0f1113 0%,
            #0f1113 70%,
            #111417 100%
        );
    }
}


/* ================================================
   8. HOME
================================================ */

.ifis-home .container {
    padding-top: clamp(
        96px,
        14vw,
        calc(var(--header-height) + 120px)
    );
}

.ifis-home h1 {
    font-size: 34px;
    font-weight: 500;
    letter-spacing: -0.015em;
    margin-bottom: 64px;
    left: -4px;
}

.ifis-home .ifis-quotes {
    font-size: clamp(1.4rem, 2.8vw, 1.8rem);
    line-height: 1.6;
    margin-bottom: 96px;
}

.ifis-home .home-links {
    margin-top: 0;
    opacity: 0.75;
}

.home-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    margin-top: 4rem;
    opacity: 0.75;
}

.entry-link {
    font-size: 1rem;
    font-weight: 500;
}

.secondary-links {
    margin-top: 0.2rem;
}

.text-link {
    font-size: 0.85rem;
    color: var(--text-muted);
}


/* Einstieg Abschnitt */

.entry-intro {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #222;
}

.entry-core {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    color: #333;
}

.entry-transition {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 3rem;
}


/* Begriffe */

.entry-definition {
    margin-top: 1.5rem;
}

.entry-term {
    font-weight: 600;
    font-size: 1.05rem;
    color: #222;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-term::before {
    content: "+";
    font-weight: 400;
    color: #aaa;
}

.entry-description {
    margin-left: 1.25rem;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}


/* E-Mail-Signup (Home) */

#ifis-email-box {
    display: none !important;
}

.ifis-invite {
    max-width: 34rem;
    font-size: 15px;
    line-height: 1.75;
    opacity: 0.88;
}

.ifis-email {
    margin-top: 24px;
    max-width: 420px;
    margin-bottom: 80px;
}

.ifis-email input {
    width: 100%;
    font-size: 16px;
    font-family: inherit;
    color: var(--text-main);
    background: transparent;

    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.25);
    border-radius: 0;

    padding: 10px 2px;
    margin-bottom: 20px;

    transition: border-color 0.2s ease;
}


/* ================================================
   9. NEWSLETTER / E-MAIL-FORMULAR
================================================ */

.newsletter-page {
    padding-top: 48px;
    padding-bottom: 80px;
}

.newsletter-intro {
    max-width: 620px;
    margin-bottom: 2rem;
}

.newsletter-form {
    max-width: 620px;
    margin-top: 2rem;
}

.ifis-newsletter-form {
    display: flex;
    align-items: center;
    width: 100%;

    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.ifis-newsletter-form input[type="email"] {
    flex: 1;
    min-width: 0;

    padding: 10px 2px;

    border: 0;
    border-radius: 0;
    outline: none;

    background: transparent;
    color: var(--text-main);

    font-family: inherit;
    font-size: 16px;
}

.ifis-newsletter-form input[type="email"]::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.ifis-newsletter-form:focus-within {
    border-bottom-color: rgba(0, 0, 0, 0.5);
}

.ifis-newsletter-form button {
    flex: 0 0 auto;

    padding: 10px 2px 10px 24px;

    border: 0;
    background: transparent;

    color: var(--text-main);

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;

    cursor: pointer;
    white-space: nowrap;

    transition: opacity 0.15s ease;
}

.ifis-newsletter-form button:hover {
    opacity: 0.6;
}

.ifis-honeypot {
    position: absolute;
    left: -5000px;
}

@media (prefers-color-scheme: dark) {

    .ifis-newsletter-form {
        border-bottom-color: rgba(255, 255, 255, 0.25);
    }

    .ifis-newsletter-form:focus-within {
        border-bottom-color: rgba(255, 255, 255, 0.5);
    }

}

.newsletter-form .newsletter-rss {
    margin-top: 1.75rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {

    .newsletter-page {
        padding-top: 32px;
        padding-bottom: 64px;
    }

    .ifis-newsletter-form {
        display: block;
    }

    .ifis-newsletter-form input[type="email"] {
        display: block;
        width: 100%;
    }

    .ifis-newsletter-form button {
        display: block;
        padding: 12px 2px 10px;
    }

}


/* ================================================
   IFIS QUESTION FIELD
================================================ */

.ifis-email textarea {
    width: 100%;
    min-height: 180px;

    padding: 48px 42px;
    margin-bottom: 64px;

    background: rgba(255,255,255,0.28);

    border: 1px solid rgba(0,0,0,0.10);
    border-radius: 18px;

    color: var(--text-main);

    font-family: inherit;

    font-size: clamp(20px, 2.4vw, 34px);
    font-weight: 300;
    line-height: 1.22;
    letter-spacing: -0.02em;

    resize: vertical;

    transition:
        border-color 0.25s ease,
        background 0.25s ease;
}

.ifis-email textarea::placeholder {
    color: rgba(0,0,0,0.34);
}

.ifis-email textarea:focus {
    outline: none;

    background: rgba(255,255,255,0.45);

    border-color: rgba(0,0,0,0.16);
}


/* ================================================
   MOBILE
================================================ */

@media (max-width: 700px) {

    .ifis-invite {
        margin-top: 64px;
    }

    .ifis-email {
        max-width: 100%;
    }

    .ifis-email textarea {
        width: 100%;
        min-height: 240px;
        padding: 24px;
        margin-bottom: 48px;
        font-size: 18px;
        border-radius: 18px;
    }

    .ifis-email textarea::placeholder {
        font-size: 18px;
        line-height: 1.35;
    }

}

.ifis-email input::placeholder {
    color: var(--text-muted);
}

.ifis-email input:focus {
    outline: none;
    border-bottom-color: rgba(0,0,0,0.45);
}

#ifis-email-box {
    opacity: 0;
    transition: opacity 0.6s ease;
}

#ifis-email-box.hidden {
    display: none;
}

#ifis-email-box:not(.hidden) {
    opacity: 1;
}

.ifis-subscriber-box {
    margin: 1.6rem 0;
    padding: 1.1rem 1.25rem;
    background: #f5f6f7;
    border-left: 3px solid #bfc4c9;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #444;
    max-width: 520px;
}

.ifis-subscriber-box strong {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}


/* Zitate (Home) */

.ifis-quotes {
    position: relative;
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    line-height: 1.55;
    min-height: 6em;
}

.ifis-quote {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;

    opacity: 0;
    transform: translateY(6px);

    transition:
        opacity 1.6s ease,
        transform 1.6s ease;
}

.ifis-quote.active {
    opacity: 1;
    transform: translateY(0);
}


/* ================================================
   10. TEXTSEITEN / ARTIKEL-INHALT
================================================ */

.ifis-text h1,
.ifis-text h2 {
    font-size: 21px;
    font-weight: 400;
    letter-spacing: -0.01em;
    margin: 48px 0 24px;
    color: var(--text-heading);
}

.ifis-text h3 {
    font-size: 17px;
    font-weight: 500;
    margin: 32px 0 12px;
    scroll-margin-top: 105px;
}

.ifis-text p {
    font-size: 16px;
    line-height: 1.72;
    letter-spacing: 0.01em;
    margin: 0 0 1.4rem;
    color: var(--text-secondary);
}

.ifis-text .lead {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    color: var(--text-main);
}

.ifis-text ul {
    list-style: none;
    padding-left: 0;
    margin: 0.8em 0 1.4em;
}

.ifis-note {
    margin-top: 3rem;
    font-size: 14px;
    color: var(--text-muted);
}


/* Artikelautor – kompakter Artikelabschluss */

.article-author {
    padding-top: 3rem !important;
    margin-top: 0 !important;
    margin-bottom: 0;
    padding-bottom: 0;

    display: block;

    font-size: 1rem;
    color: var(--text-muted);

    letter-spacing: 0.02em;
    line-height: 1.8;
}


/* Inhalts-Blöcke */

.ifis-text .analysis-block {
    margin-top: 48px;
}

.ifis-text .analysis-strong {
    margin-top: 72px;
}

.ifis-text .price-block {
    margin-top: 72px;
}

.ifis-text .booking-block {
    margin-top: 64px;
}


/* Text-Navigation */

.ifis-text .text-end-navigation {
    margin-top: 4.5rem;
}

.text-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.text-links a {
    color: inherit;
    width: fit-content;
}


/* Definition (Details/Summary) */

.definition {
    margin: 0.2rem 0 1.6rem;
    border-left: 2px solid transparent;
    padding-left: 0rem;
}

.definition summary {
    list-style: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    padding-left: 1rem;
}

.definition summary::-webkit-details-marker {
    display: none;
}

.definition summary::before {
    content: "+";
    color: #bbb;
    font-size: 0.85rem;
    position: absolute;
    left: 0;
    top: 0.1rem;
}

.definition[open] summary::before {
    content: "–";
    color: #bbb;
    font-size: 0.85rem;
    transform: translateY(0.1rem);
}

.definition summary .short {
    display: block;
    font-weight: 400;
    font-size: 0.95rem;
    color: #666;
    margin-top: 0.2rem;
}

.definition[open] summary .short {
    display: none;
}

.definition .short {
    display: block;
    font-size: 0.95rem;
    color: #666;
    margin: 0.4rem 0 0.6rem;
}

.definition p {
    font-size: 0.92rem;
    line-height: 1.6;
}

.definition > p,
.definition > .term-note {
    margin-left: 1rem;
}

.definition:not([open]) p:not(.short) {
    display: none;
}


/* Focus-Block */

.focus-block {
    margin: 2.2rem 0 3rem 0;
    padding: 1.6rem 1.4rem;
    background: #f2f2f2;
    border-left: 3px solid #c8c8c8;
    max-width: 520px;
}

.focus-block h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.focus-block + p {
    margin-top: 1.8rem;
    color: #555;
}


/* Buttons */

.button-primary {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.2rem;

    border: 1px solid #000;
    background: #fff;
    color: #000;

    transition: all 0.15s ease;

    text-decoration: none;
    font-weight: 500;
}

.button-primary:hover {
    background: #000;
    color: #fff;
}

.next-step .button-primary {
    margin-top: 2.2rem;
    margin-bottom: 1.5rem;
}


/* CTA-Block */

.cta-block {
    margin-top: 2.5rem;
    padding: 0;
    background: none;
    border: none;
}

.cta-block p {
    margin-bottom: 12px;
}


/* Signup-Formular */

.signup-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1rem;
}

.signup-form input {
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 0.6rem 0 0.4rem;
    font-size: 1rem;
    background: transparent;
    outline: none;
}

.signup-form input::placeholder {
    color: #999;
}

.signup-form button {
    margin-top: 0.75rem;
    align-self: flex-start;
    padding: 0.5rem 0.9rem;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.signup-form button:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}


/* Term-Note */

.term-note {
    margin-top: 0.6rem;
    padding-left: 0.8rem;
    border-left: 2px solid #bbb;
    font-size: 0.92rem;
    color: #222;
}


/* ================================================
   11. ARTIKELÜBERSICHT
================================================ */


/* Kategorienavigation */

.article-nav {
    display: grid;
    grid-template-columns: repeat(2, max-content);

    color: inherit;

    column-gap: 2rem;
    row-gap: 0.25rem;

    margin: 0 0 4rem;
}

.article-nav a {
    white-space: nowrap;

    font-size: 0.85rem;
    line-height: 1.4;
}

.article-nav a:hover {
    opacity: 0.7;
}

.article-nav a.latest {
    color: var(--text-main);
    font-weight: 600;
}

.article-nav a.latest::after {
    content: " •";
    color: #999;
    font-weight: 400;
}


/* Sprungziel Kategorienavigation */

#categories {
    scroll-margin-top: calc(var(--header-height) + 24px);
}


/* Kategorie-Sektionen */

.article-category {
    scroll-margin-top: calc(var(--header-height) + 24px);
}

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

.article-category-header {
    margin-bottom: 56px;
}


/* Kategorieüberschrift */

.article-category-title {
    scroll-margin-top: 110px;

    margin-bottom: 4px;

    font-size: 14px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.12em;

    color: #777;
    opacity: 0.8;
}

.article-category-section h2 {
    scroll-margin-top: 110px;
}


/* Kategorie-Einleitung */

.article-category-intro {
    max-width: 720px;

    margin-top: 0;
    margin-bottom: 1rem;

    font-size: 18px;
    line-height: 1.6;

    opacity: 0.75;
}


/* Artikelraster */

.article-category-grid {
    display: grid;

    grid-template-columns: repeat(
        auto-fit,
        minmax(320px, 1fr)
    );

    gap: 40px;

    align-items: start;
}


/* Artikelkarte */

.article-card {
    align-self: start;
    margin-bottom: 5rem;
}


/* Artikelbild */

.article-card-image {
    width: 100%;
    display: block;

    aspect-ratio: 16 / 9;
    object-fit: cover;

    border-radius: 12px;

    margin-bottom: 1rem;
}


/* Artikel-Label
   Beispiel: LEISTUNG · ZUSTAND
*/

.article-card-label {
    font-size: 12px;

    opacity: 0.6;

    margin-bottom: 0.75rem;

    letter-spacing: 0.03em;
    text-transform: uppercase;
}


/* Artikeltitel */

.article-card-title {
    margin-top: 0;
    margin-bottom: 0.75rem;

    font-weight: 700;
    line-height: 1.25;
}


/* Artikel-Teaser */

.article-card-intro {
    max-width: 42rem;
    line-height: 1.6;
}


/* Hero-Abstand */

.hero {
    margin-bottom: 18px !important;
}


/* ================================================
   VIEW TOGGLE
   aktuell im Twig nicht verwendet
   bewusst erhalten
================================================ */

.view-toggle {
    justify-content: flex-start;

    margin-top: 1rem;
    margin-bottom: 4rem;
}

.view-toggle button {
    background: none;
    color: var(--text-color);

    border: none;

    cursor: pointer;

    font-size: 20px;

    opacity: 0.22;

    transition: opacity 0.2s ease;
}

.view-toggle button:hover {
    opacity: 0.75;
}


/* ================================================
   GRID VIEW
   aktuell im Twig nicht verwendet
   bewusst erhalten
================================================ */

#article-list.grid-view .article-category-grid {
    grid-template-columns: repeat(
        auto-fit,
        minmax(240px, 1fr)
    );

    gap: 32px;
}

@media (max-width: 700px) {

    #article-list.grid-view .article-category-grid {
        grid-template-columns: 1fr;
    }

}


/* ================================================
   12. MODELLE / GRAFIKEN
================================================ */

.model-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 12px;
}

.regulations-weg-wrapper {
    margin: 40px auto;
    padding: 20px 24px;
    background: #f7f7f7;
    border-radius: 6px;
    max-width: 640px;
}

.regulations-weg {
    position: relative;
    padding-left: 40px;
    max-width: 560px;
    margin: 70px auto;
}

.regulations-weg::before {
    content: "";
    position: absolute;
    left: 17px;
    top: 14px;
    bottom: 14px;
    width: 1px;
    background: #cfcfcf;
}

.regulations-weg .step {
    position: relative;
    margin: 16px 0;
    font-size: 18px;
    line-height: 1.7;
}

.regulations-weg .step::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 11px;
    width: 7px;
    height: 7px;
    background: #cfcfcf;
    border-radius: 50%;
}

.regulations-weg .step:nth-child(4)::before,
.regulations-weg .step:nth-child(5)::before,
.regulations-weg .step:nth-child(6)::before,
.regulations-weg .step:nth-child(7)::before {
    background: #a8a8a8;
}

.regulations-weg .start {
    opacity: 0.55;
    font-style: italic;
    margin-bottom: 22px;
}

.regulations-weg .transition {
    font-weight: 600;
    color: #444;
}

.regulations-weg .end {
    font-weight: 600;
    margin-top: 22px;
}

.regulations-weg .end::before {
    background: #666;
}

.regulations-weg .step a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
}

.regulations-weg .step a:hover {
    opacity: 0.65;
}

.regulations-copyright {
    font-size: 0.7rem;
    color: #9a9a9a;
    text-align: right;
    margin-top: 18px;
}


/* Modell: 5 Schritte */

.ifis-modell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    font-size: 0.95rem;
}

.modell-step {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafafa;
}

.modell-step.end {
    font-weight: 500;
}

.modell-arrow {
    opacity: 0.5;
}


/* Modell: Weg (vertikal) */

.ifis-weg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    font-size: 1rem;
}

.ifis-weg .arrow {
    opacity: 0.6;
}

.ifis-weg .overload {
    font-weight: 600;
}


/* Regulationsraum – interaktive Schritte */

.step {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.option {
    padding: 1rem;
    border: 1px solid #ccc;
    background: none;
    text-align: left;
    cursor: none;
}

.instruction {
    margin-top: 2rem;
}

.result-footer {
    margin-top: 3rem;
    opacity: 0.8;
}

.core {
    margin-top: 1rem;
    font-weight: bold;
}


/* ================================================
   13. STRIPE / ZAHLUNGEN
================================================ */

.stripe-container {
    margin: 48px 0 32px;
}

.stripe-buy-button {
    display: inline-block;
    margin: 0 auto;
}

.stripe-hinweis {
    font-size: 0.9rem;
    opacity: 0.65;
    margin-top: 18px;
}

.termin-hinweis {
    margin-top: 36px;
}


/* ================================================
   14. FOOTER / ARTIKELABSCHLUSS
================================================ */

.ifis-footer {
    margin-top: auto;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.ifis-footer .footer-inner {
    position: relative;

    max-width: var(--layout-max);
    margin: 0 auto;

    padding-left: calc(var(--layout-padding) - 2px);
    padding-right: var(--layout-padding);

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 0.6rem;
}

.ifis-footer a {
    display: inline;
    text-decoration: none;
    color: inherit;
    border-bottom: none;
    transition: color 0.15s ease;
}

.ifis-footer a:hover {
    color: var(--text-main);
    border-bottom: none;
}

@media (prefers-color-scheme: dark) {
    .ifis-footer {
        border-top: 1px solid var(--border-subtle);
    }
}

.footer-nav {
    display: flex;
    flex-direction: column;

    align-items: flex-start;
    gap: 0.5rem;
}

.footer-copyright {
    opacity: 0.7;
}


/* Verwandte Artikel */

.related-articles {
    margin-top: 2rem;
    margin-bottom: 0;

    padding-top: 1.8rem;

    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.related-articles ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-articles li + li {
    margin-top: 0.45rem;
}


/* Artikel-Footer */

.article-footer {
    margin-top: 1.8rem;
    padding-top: 0;
    font-size: 0.9rem;
}


/* ================================================
   15. DARK MODE / RESPONSIVE FARBEN
================================================ */

@media (prefers-color-scheme: dark) {

    .article-cta a {
        color: var(--text-secondary);
        border-bottom: 1px solid rgba(111,179,255,0.35);
    }

    .article-cta a:hover {
        color: #9ecbff;
        border-bottom: 1px solid rgba(158,203,255,0.7);
    }

    .article-cta p a {
        color: var(--text-secondary);
    }

    .infobox {
        background: #151a21;
        border: 1px solid #2a3440;

        border-radius: 12px;
        padding: 1.4rem 1.6rem;
        margin: 2rem 0;
    }

    .infobox strong {
        color: #ffffff;
    }

    .infobox p {
        color: #c7ced6;
    }

    .focus-block {
        background: var(--bg-elevated);
        border: 1px solid var(--border-strong);

        border-radius: 14px;
        padding: 1.4rem 1.6rem;
        margin: 2rem 0;

        position: relative;
    }

    .focus-block::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;

        background: var(--accent);
        opacity: 0.6;

        border-radius: 14px 0 0 14px;
    }

    .focus-block h3 {
        color: var(--text-heading);
        margin-top: 0;
    }

    .focus-block p {
        color: var(--text-secondary);
    }

    .related-articles {
        border-top-color: rgba(255, 255, 255, 0.12);
    }
}


/* ================================================
   16. RESPONSIVE / MOBILE GLOBAL
================================================ */

@media (max-width: 600px) {

    :root {
        --header-height: 45px;
    }

    .site-header-inner {
        padding-top: 8px;
        padding-bottom: 12px;
    }

    .site-logo {
        position: relative;
        top: 4px;
    }
}


/* ================================================
   17. ARTIKEL FOOTER OVERLAYS
   Kontakt + Artikel weitergeben
================================================ */


/* ================================================
   FOOTER BUTTONS
================================================ */

.article-footer .article-footer-action,
.article-footer .article-footer-share {
    appearance: none;
    -webkit-appearance: none;

    display: inline;
    margin: 0;
    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;

    font: inherit;
    line-height: inherit;
    color: inherit;

    cursor: pointer;
}

.article-footer .article-footer-action:hover,
.article-footer .article-footer-share:hover {
    opacity: 0.7;
}


/* ================================================
   OVERLAY
================================================ */

.article-contact-overlay,
.article-share-overlay {
    position: fixed !important;
    inset: 0 !important;

    z-index: 9999 !important;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, 0.42);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}


.article-contact-overlay[hidden],
.article-share-overlay[hidden] {
    display: none !important;
}


.article-contact-overlay.visible,
.article-share-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ================================================
   DIALOG
================================================ */

.article-contact-dialog,
.article-share-dialog {
    width: min(440px, 100%);
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    padding: 24px;

    background: var(--bg);
    color: var(--text-main);

    border-radius: 14px;

    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);

    transform: translateY(8px);

    transition: transform 0.18s ease;
}


.article-contact-overlay.visible .article-contact-dialog,
.article-share-overlay.visible .article-share-dialog {
    transform: translateY(0);
}


/* ================================================
   DIALOG HEADER
================================================ */

.article-contact-dialog-header,
.article-share-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}


.article-contact-dialog-title,
.article-share-dialog-title {
    margin-bottom: 6px;

    font-size: 1rem;
    font-weight: 500;
}


.article-share-dialog-article {
    max-width: 320px;

    font-size: 0.82rem;
    line-height: 1.45;

    color: var(--text-muted);
}


/* ================================================
   SCHLIESSEN
================================================ */

.article-contact-close,
.article-share-close {
    appearance: none;
    -webkit-appearance: none;

    flex: 0 0 auto;

    margin: -3px 0 0;
    padding: 0;

    width: 32px;
    height: 32px;

    border: 0;
    border-radius: 0;

    background: transparent;

    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;

    color: var(--text-muted);

    cursor: pointer;
}


.article-contact-close:hover,
.article-share-close:hover {
    color: var(--text-main);
}


/* ================================================
   OPTIONEN
================================================ */

.article-contact-options,
.article-share-options {
    display: flex;
    flex-direction: column;
}


.article-contact-options a,
.article-share-options a,
.article-share-options button {
    appearance: none;
    -webkit-appearance: none;

    display: block;

    width: 100%;

    margin: 0;
    padding: 14px 0;

    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 0;

    background: transparent;

    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.4;

    color: var(--text-main);

    text-align: left;
    text-decoration: none;

    cursor: pointer;
}


.article-contact-options a:last-child,
.article-share-options a:last-child,
.article-share-options button:last-child {
    border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}


.article-contact-options a:hover,
.article-share-options a:hover,
.article-share-options button:hover {
    opacity: 0.65;
}


/* ================================================
   HINTERGRUND SPERREN
================================================ */

body.share-overlay-open {
    overflow: hidden;
}


/* ================================================
   DARK MODE
================================================ */

@media (prefers-color-scheme: dark) {

    .article-contact-overlay,
    .article-share-overlay {
        background: rgba(0, 0, 0, 0.68);
    }


    .article-contact-dialog,
    .article-share-dialog {
        background: #14171a;
    }


    .article-contact-options a,
    .article-share-options a,
    .article-share-options button {
        border-top-color: rgba(255, 255, 255, 0.10);
    }


    .article-contact-options a:last-child,
    .article-share-options a:last-child,
    .article-share-options button:last-child {
        border-bottom-color: rgba(255, 255, 255, 0.10);
    }

}


/* ================================================
   MOBIL: BOTTOM SHEET
================================================ */

@media (max-width: 600px) {

    .article-contact-overlay,
    .article-share-overlay {
        align-items: flex-end;
        justify-content: center;

        padding: 0;
    }


    .article-contact-dialog,
    .article-share-dialog {
        width: 100%;

        max-height: 85vh;

        padding:
            22px
            max(20px, env(safe-area-inset-right))
            calc(22px + env(safe-area-inset-bottom))
            max(20px, env(safe-area-inset-left));

        border-radius: 18px 18px 0 0;

        transform: translateY(24px);
    }


    .article-contact-overlay.visible .article-contact-dialog,
    .article-share-overlay.visible .article-share-dialog {
        transform: translateY(0);
    }


    .article-contact-dialog-header,
    .article-share-dialog-header {
        margin-bottom: 18px;
    }


    .article-contact-dialog-title,
    .article-share-dialog-title {
        font-size: 1.05rem;
    }


    .article-share-dialog-article {
        max-width: 280px;

        font-size: 0.82rem;
    }


    .article-contact-options a,
    .article-share-options a,
    .article-share-options button {
        padding: 16px 0;

        font-size: 1rem;
    }

}

/* ================================================
   ARTIKEL ÜBERSICHT WIE GOOGLE NEWS
================================================ */

#article-list .article-category {
    margin-bottom: 3.5rem;
}

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

#article-list .article-category-title {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

#article-list .article-category-intro {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}

#article-list .article-category-grid {
    row-gap: 2.5rem;
}

#article-list .article-card {
    margin-bottom: 0;
}

#article-list .article-card-image {
    margin-bottom: 0.75rem;
}

#article-list .article-card-label {
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

#article-list .article-card-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.375rem, 2.2vw, 1.625rem);
    font-weight: 400;
    line-height: 1.3;
}

#article-list .article-card-intro {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
}


/* /artikel: Leerraum oberhalb der Kategorien reduzieren */
.article-header:has(+ #categories.article-nav) {
    padding: 1.5rem 0 0;
}

.article-header:has(+ #categories.article-nav) > .article-title,
.article-header:has(+ #categories.article-nav) > .article-intro {
    margin: 0;
}

/* Überschriften ausblenden */
.ifis-options-title,
#articleContactTitle,
#articleShareTitle,
#articleMoreTitle,
#articleShareDialog .article-share-dialog-article {
    display: none !important;
}

/* Leere Kopfzeilen entfernen */
.ifis-options-heading,
#articleContactDialog .article-contact-dialog-header,
#articleShareDialog .article-share-dialog-header,
#articleMoreDialog .article-contact-dialog-header {
    position: relative;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Schließen rechts oben */
.ifis-options-heading .ifis-options-close,
#articleContactClose,
#articleShareClose,
#articleMoreClose {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 44px;
    height: 44px;
    margin: 0 !important;
    padding: 0;
    z-index: 1;
}

/* Zurück-Pfeil ohne zusätzlichen Abstand */
.ifis-options-back {
    min-width: 44px;
    min-height: 44px;
    margin: 0 !important;
}

/* Platz für das Schließen-Symbol */
.ifis-options-items > :first-child,
#articleContactDialog .article-contact-options > :first-child,
#articleShareDialog .article-share-options > :first-child,
#articleMoreDialog .article-contact-options > :first-child {
    padding-right: 56px !important;
}

/* ================================================
   IFIS – KLARERE BILD-TEXT-HIERARCHIE
================================================ */

/* Labels bleiben im Frontmatter, werden aber nicht ausgegeben. */
.article-card-label,
.article-label {
    display: none;
}

/* Nach dem ausgeblendeten Kartenlabel folgt der Titel direkt dem Bild. */
.article-card-image {
    margin-bottom: 0.75rem;
}

/* Einheitliches Hero-Format in Artikelansicht: mobil und Desktop. */
article.article .hero {
    aspect-ratio: 16 / 9;
    height: auto;
}

@media (max-width: 600px) {

    /* Vorschaubilder auf /artikel über die gesamte Bildschirmbreite. */
    #article-list .article-card-image {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0;
    }

    /* Hero-Bild am Anfang eines Artikels ebenfalls bildschirmbreit. */
    article.article .hero {
        width: 100vw !important;
        max-width: 100vw;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        border-radius: 0;
    }

    article.article .hero,
    article.article .hero img,
    article.article .article-hero-image {
        border-radius: 0;
    }
}
