/* ================================================
   IFIS – Article CSS
   Lädt nach base.css
================================================ */


/* ------------------------------------------------
   Artikel-Container
------------------------------------------------ */

.article {
    padding-bottom: 3rem;
    padding-top: 0;
}


/* ------------------------------------------------
   Hero Image
   Spiegel-Style: above the fold, nicht dominant
------------------------------------------------ */

.hero {
    height: clamp(180px, 30vw, 340px);
    overflow: hidden;

    margin-top: 0.1rem;
    margin-bottom: 0.1rem;

    width: 100%;
    position: relative;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hero-label {
    position: absolute;
    bottom: 8px;
    right: 10px;

    font-size: 0.65rem;
    background: none;
    color: #fff;

    padding: 2px 6px;
    border-radius: 3px;
}

/* ------------------------------------------------
   Article Header (Editorial)
------------------------------------------------ */

.article-header {
    padding: 1.8rem 0 1rem;   /* ← kein seitliches padding, erbt vom .article */
    margin: 0;
}

.article-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.article-title {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    line-height: 1.25;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.article-subline {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0rem;
    margin-top: 0rem;
    opacity: 0.65;
    letter-spacing: 0.02em;
}

.article-intro {
    margin-top: 0.5rem;
    margin-bottom: 0.1rem; 
    font-size: 1rem;
    line-height: 1.45;
    color: var(--text-primary);
    max-width: none;
}

.article-intro > * + * {
    margin-top: 0.5rem;
}

.article-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0rem;
}


/* ------------------------------------------------
   Share Links
------------------------------------------------ */

.article-share {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    margin: 0.6rem 0 1rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.article-share.bottom {
    margin-top: 2.5rem;
}

.article-share a {
    text-decoration: none;
    color: inherit;
    opacity: 0.8;
}

.article-share a:hover {
    opacity: 1;
    text-decoration: underline;
}



/* ------------------------------------------------
   Inhalt
------------------------------------------------ */

.article h2 {
    font-size: 1.2rem;
    margin: 2.5rem 0 1rem;
}

.article h3 {
    font-size: 1rem;
    margin: 1.8rem 0 0.6rem;
}

.article p {
    line-height: 1.6;
    margin-bottom: 0.9rem;
}

.article p:first-of-type {
    margin-top: 0.5rem;
}

.article ul {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.article-author {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 4rem;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.article p + h2 {
    margin-top: 3rem;
}

/* ------------------------------------------------
   Blockquotes
------------------------------------------------ */

.article blockquote {
    margin: 1.2rem 0;
    padding-left: 1rem;
    border-left: 3px solid #ccc;
    color: #444;
    font-style: italic;
}

.article blockquote.highlight {
    border-left: 4px solid #000;
    font-weight: 600;
    font-size: 1.05rem;
    margin: 1.5rem 0;
}

.article blockquote.final {
    margin-top: 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.5;
    color: #222;
    font-style: normal;
}

/* ------------------------------------------------
   Related Articles
------------------------------------------------ */

.related-articles {
    margin-top: 5rem;
    padding-top: 2rem;

    border-top: 1px solid #ddd;
}

.related-articles h2 {
    margin-bottom: 1.5rem;
}

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

.related-articles li {
    margin-bottom: 0.75rem;
}

.related-articles a {
    text-decoration: none;
}

/* ------------------------------------------------
   CTA
------------------------------------------------ */

.article-cta {
    margin-top: 3rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border-subtle);
    max-width: 520px;
}

.article-cta p {
    font-size: 0.95rem;
    color: #444;
    margin: 0;
}

.article-cta a {
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #ccc;
}

.article-cta a:hover {
    border-bottom: 1px solid #000;
}


/* ------------------------------------------------
   CHECKLIST
------------------------------------------------ */

.checklist {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.checklist li {
    margin-bottom: 0.5rem;
}

.checklist label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
}

.checklist input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 16px;
    height: 16px;
    accent-color: var(--text-primary);
    transform: scale(1);
}

/* ------------------------------------------------
   Responsive


@media (max-width: 600px) {

    .hero {
        margin-left: -1rem;
        margin-right: -1rem;
        margin-bottom: 1rem;
        margin-top: 0.2rem;
        width: calc(100% + 2rem);
        height: 42vh;
    }

    .site-header-inner {
        margin-left: -0.9rem;
    }


    .article-header {
        padding: 1.2rem 0 0.8rem;
    }

    .article-header h1,
    .article-title {
        font-size: 1.4rem;
    }

}
------------------------------------------------ */

/* ================================================
   LIGHTBOX / ARTIKELBILDER
================================================ */

/* Markdown-Bilder innerhalb der Textbreite halten */

.article-content img {
    max-width: 100%;
    height: auto;
}

/* Wird erst durch das Lightbox-Skript aktiviert */

.ifis-lightbox-trigger {
    cursor: zoom-in;
}

.ifis-lightbox-trigger:focus-visible {
    outline: 2px solid var(--text-main);
    outline-offset: 4px;
}

/* Das Bildlabel soll Bildklicks durchlassen */

.hero-label {
    pointer-events: none;
}

/* Dialog liegt außerhalb des normalen Seitenlayouts */

.ifis-lightbox {
    position: fixed;
    inset: 0;

    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;

    margin: 0;
    padding: 0;
    border: 0;

    background: transparent;
    color: #fff;
}

.ifis-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.92);
}

.ifis-lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        calc(68px + env(safe-area-inset-top, 0px))
        max(16px, env(safe-area-inset-right, 0px))
        max(24px, env(safe-area-inset-bottom, 0px))
        max(16px, env(safe-area-inset-left, 0px));
}

.ifis-lightbox-image {
    display: block;

    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
}

.ifis-lightbox-close {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));

    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;

    background: transparent;
    color: transparent;

    font-size: 0;

    cursor: pointer;
}

.ifis-lightbox-close::before,
.ifis-lightbox-close::after {
    content: "";
    position: absolute;

    top: 50%;
    left: 50%;

    width: 18px;
    height: 1.5px;

    background: #fff;
    border-radius: 1px;
}

.ifis-lightbox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.ifis-lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@media (hover: hover) {
    .ifis-lightbox-close:hover {
        background: rgba(255, 255, 255, 0.10);
    }
}

.ifis-lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

html.ifis-lightbox-open,
html.ifis-lightbox-open body {
    overflow: hidden;
}

/* ================================================
   RESONANZ / HILFREICH
================================================ */

.ifis-resonance {
    margin: 1rem 0 0;
    color: var(--text-muted);
}

/* Signatur folgt mit Abstand; ohne sichtbaren Button bleibt ihr Layout erhalten. */
.ifis-resonance:not([hidden]) + .article-author {
    padding-top: 1.5rem !important;
}

.ifis-resonance[hidden] {
    display: none !important;
}

.ifis-resonance-button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
    touch-action: manipulation;
}

.ifis-resonance-button:hover,
.ifis-resonance-button[aria-pressed="true"] {
    color: var(--text-main);
}

.ifis-resonance-button[aria-disabled="true"] {
    cursor: default;
}

.ifis-resonance-button:focus-visible {
    outline: 2px solid var(--text-main);
    outline-offset: 3px;
}

.ifis-resonance-heart {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ifis-resonance-button[aria-pressed="true"] .ifis-resonance-heart {
    fill: currentColor;
}

.ifis-resonance-count {
    font-variant-numeric: tabular-nums;
}

/* Success is announced without adding visible text; errors remain readable. */
.ifis-resonance-status:not(.is-visible) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.ifis-resonance-status.is-visible {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ================================================
   QUELLEN UND WEITERFÜHRENDE FORSCHUNG
================================================ */

.article-sources {
    margin: 32px 0 22px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.article-sources-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 16px 0;

    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;

    cursor: pointer;
    list-style: none;
}

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

.article-sources-toggle {
    position: relative;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
}

.article-sources-toggle::before,
.article-sources-toggle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;

    width: 12px;
    height: 1px;

    background: currentColor;

    transform: translate(-50%, -50%);
}

.article-sources-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    transition: transform 0.18s ease;
}

.article-sources[open] .article-sources-toggle::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.article-sources-list {
    padding: 4px 0 24px;
}

.article-source {
    margin: 0;
    padding: 18px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.article-source-reference {
    line-height: 1.55;
}

.article-source-reference strong {
    display: block;
    font-size: 0.9rem;
}

.article-source-title {
    display: block;
    margin-top: 2px;

    font-size: 0.9rem;
    font-style: italic;
}

.article-source-journal {
    display: block;
    margin-top: 2px;

    font-size: 0.85rem;
    opacity: 0.65;
}

.article-source-description {
    margin: 8px 0 0;

    font-size: 0.85rem;
    line-height: 1.55;
    opacity: 0.78;
}

.article-source-link {
    display: inline-block;
    margin-top: 8px;

    font-size: 0.82rem;
    text-decoration: none;
}

.article-source-link:hover {
    text-decoration: underline;
}