/* Fachwissen-Bereich (/fachwissen/) – ergänzt page.css für Artikel- und
   Übersichtsseiten. Wird von scripts/build_fachwissen.py generierten
   Seiten eingebunden. */

/* ---------- Hero ---------- */
.fw-hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: 7rem 0 3.5rem;
}

.fw-hero-inner {
    width: 100%;
}

.fw-hero-inner h1 {
    line-height: 1.25;
}

.fw-draft-banner {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 9999px;
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fw-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.fw-breadcrumb a {
    color: #cbd5e1;
}

.fw-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem 1rem;
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 9999px;
    background: rgba(168, 85, 247, 0.12);
    color: #d8b4fe;
    font-size: 0.8rem;
    font-weight: 600;
}

.fw-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.fw-meta i {
    margin-right: 0.35rem;
    color: #a855f7;
}

/* ---------- Layout: Artikel + Seitenleiste ---------- */
.fw-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
}

.fw-article {
    min-width: 0;
    overflow-wrap: break-word;
}

@media (min-width: 1024px) {
    .fw-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        align-items: start;
    }
}

/* ---------- Kurzantwort ---------- */
.fw-summary {
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-left: 4px solid #a855f7;
    border-radius: 0.75rem;
    background: rgba(168, 85, 247, 0.08);
}

.fw-summary-label {
    margin-bottom: 0.5rem;
    color: #d8b4fe;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fw-summary p:last-child {
    color: #e2e8f0;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ---------- Titelbild ---------- */
.fw-figure {
    margin: 0 0 2rem;
}

.fw-figure img {
    width: 100%;
    height: auto;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.75rem;
}

/* ---------- Inhaltsverzeichnis ---------- */
.fw-toc {
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
}

.fw-toc-mobile {
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .fw-toc-mobile {
        display: none;
    }
}

.fw-toc-title {
    margin-bottom: 0.75rem;
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fw-toc ol {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}

.fw-toc li {
    margin-bottom: 0.35rem;
}

.fw-toc a {
    color: #94a3b8;
    text-decoration: none;
}

.fw-toc a:hover,
.fw-toc a:focus-visible {
    color: #d8b4fe;
}

/* ---------- Fließtext ---------- */
.fw-prose {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.75;
}

.fw-prose > * {
    margin-bottom: 1.25rem;
}

.fw-prose h2 {
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    color: #f1f5f9;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    scroll-margin-top: 6rem;
}

.fw-prose h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #e2e8f0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    scroll-margin-top: 6rem;
}

.fw-prose a {
    color: #c084fc;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fw-prose a:hover,
.fw-prose a:focus-visible {
    color: #d8b4fe;
}

.fw-prose strong {
    color: #f1f5f9;
}

/* page.css setzt li strong auf weiß – im Prosa-Kontext ebenfalls hell,
   aber nicht rein weiß für konsistenten Kontrast */
.fw-prose li strong {
    color: #f1f5f9;
}

.fw-prose code {
    padding: 0.1rem 0.4rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.35rem;
    background: rgba(15, 23, 42, 0.9);
    color: #fbbf24;
    font-size: 0.88em;
}

.fw-prose ul,
.fw-prose ol {
    padding-left: 1.5rem;
}

.fw-prose ul {
    list-style: disc;
}

.fw-prose ol {
    list-style: decimal;
}

.fw-prose li {
    margin-bottom: 0.5rem;
}

.fw-prose li::marker {
    color: #a855f7;
}

/* ---------- Tabellen ---------- */
.fw-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.75rem;
}

.fw-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.fw-table-wrap th,
.fw-table-wrap td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    text-align: left;
    vertical-align: top;
}

.fw-table-wrap thead th {
    background: rgba(168, 85, 247, 0.12);
    color: #e9d5ff;
    font-weight: 600;
    white-space: nowrap;
}

.fw-table-wrap tbody th {
    color: #e2e8f0;
    font-weight: 600;
}

.fw-table-wrap tbody tr:last-child th,
.fw-table-wrap tbody tr:last-child td {
    border-bottom: 0;
}

/* ---------- Callouts ---------- */
.fw-callout {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-left-width: 4px;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
}

.fw-callout-hinweis {
    border-left-color: #38bdf8;
}

.fw-callout-hinweis .fw-callout-title {
    color: #7dd3fc;
}

.fw-callout-achtung {
    border-left-color: #fbbf24;
}

.fw-callout-achtung .fw-callout-title {
    color: #fcd34d;
}

.fw-callout-praxis {
    border-left-color: #34d399;
}

.fw-callout-praxis .fw-callout-title {
    color: #6ee7b7;
}

.fw-callout-title {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fw-callout-title i {
    margin-right: 0.4rem;
}

.fw-callout p:last-child,
.fw-callout ul:last-child,
.fw-callout ol:last-child {
    margin-bottom: 0;
}

/* ---------- FAQ ---------- */
.fw-faq-item {
    margin-bottom: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
}

.fw-faq-item summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    color: #e2e8f0;
    font-weight: 600;
    list-style: none;
}

.fw-faq-item summary::-webkit-details-marker {
    display: none;
}

.fw-faq-item summary::before {
    content: "\f078";
    margin-right: 0.75rem;
    font-family: "Font Awesome 6 Free";
    font-size: 0.75rem;
    font-weight: 900;
    color: #a855f7;
    transition: transform 0.2s ease;
}

.fw-faq-item[open] summary::before {
    display: inline-block;
    transform: rotate(180deg);
}

.fw-faq-answer {
    padding: 0 1.25rem 1.25rem 2.6rem;
    color: #94a3b8;
    font-size: 0.95rem;
}

/* ---------- Quellen ---------- */
.fw-sources {
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.fw-sources li {
    margin-bottom: 0.5rem;
}

.fw-src-date {
    color: #64748b;
    font-size: 0.85rem;
}

.fw-versions {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ---------- Autor ---------- */
.fw-author {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-top: 3rem;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
}

.fw-author-avatar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a855f7, #7e22ce);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.fw-author-name {
    color: #f1f5f9;
    font-weight: 700;
}

.fw-author-role {
    margin-bottom: 0.5rem;
    color: #a855f7;
    font-size: 0.85rem;
}

.fw-author-bio {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ---------- Seitenleiste ---------- */
.fw-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .fw-sidebar {
        display: block;
        position: sticky;
        top: 6rem;
    }
}

.fw-side-card {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
}

.fw-product-links {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.fw-product-links li {
    margin-bottom: 0.6rem;
}

.fw-product-links a {
    color: #cbd5e1;
    text-decoration: none;
}

.fw-product-links a:hover,
.fw-product-links a:focus-visible {
    color: #d8b4fe;
}

.fw-product-links i {
    margin-right: 0.4rem;
    font-size: 0.7rem;
    color: #a855f7;
}

.fw-side-cta p:not(.fw-toc-title) {
    color: #94a3b8;
    font-size: 0.9rem;
}

.fw-side-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: #c084fc;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.fw-side-link:hover,
.fw-side-link:focus-visible {
    color: #d8b4fe;
}

/* ---------- Kachelraster (Übersichten, verwandte Artikel) ---------- */
.fw-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .fw-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.fw-tile {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    transition: all 0.3s ease;
}

.fw-tile:hover,
.fw-tile:focus-within {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.3);
}

.fw-tile-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.fw-tile-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.fw-tile-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.fw-tile-cat {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: #a855f7;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fw-tile-cat i {
    margin-right: 0.3rem;
}

.fw-tile-title {
    margin-bottom: 0.5rem;
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}

.fw-tile-text {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.fw-tile-draft {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.15rem 0.6rem;
    border: 1px solid rgba(251, 191, 36, 0.5);
    border-radius: 9999px;
    color: #fbbf24;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---------- Kategorie-Chips (Übersicht) ---------- */
.fw-cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.fw-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.6);
    color: #cbd5e1;
    font-size: 0.9rem;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.fw-cat-chip:hover,
.fw-cat-chip:focus-visible {
    border-color: rgba(168, 85, 247, 0.6);
    color: #e9d5ff;
}

.fw-cat-chip i {
    color: #a855f7;
}

.fw-list-h2 {
    margin: 2.5rem 0 1.25rem;
    color: #f1f5f9;
    font-size: 1.4rem;
    font-weight: 700;
}

.fw-list-h2:first-child {
    margin-top: 0;
}

/* ---------- CTA ---------- */
.fw-cta {
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

/* ---------- Fokus ---------- */
.fw-tile-link:focus-visible,
.fw-cat-chip:focus-visible,
.fw-faq-item summary:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* ---------- Autorenprofil (/autoren/) ---------- */
.fw-grad {
    background: linear-gradient(135deg, #e9d5ff 0%, #c084fc 50%, #7e22ce 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.fw-profile-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.fw-profile-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    transition: all 0.3s ease;
}

.fw-profile-tile:hover,
.fw-profile-tile:focus-within,
.fw-profile-bio:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.3);
}

.fw-profile-tile-author {
    grid-column: span 2;
    flex-direction: row;
    gap: 1.5rem;
    text-align: left;
}

.fw-profile-tile .fw-author-role,
.fw-profile-tile-org,
.fw-profile-tile-label {
    color: #f1f5f9;
}

.fw-profile-tile-avatar {
    flex: 0 0 auto;
    margin-bottom: 1rem;
}

.fw-profile-tile-author .fw-profile-tile-avatar {
    margin-bottom: 0;
}

.fw-profile-tile-name {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.fw-profile-tile-org {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
}

.fw-profile-tile-value {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.fw-profile-tile-label {
    margin: 0.5rem 0 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.fw-profile-bio {
    margin-bottom: 2.5rem;
    padding: 1.5rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.fw-profile-bio .fw-list-h2 {
    margin-top: 0;
}

@media (max-width: 1023px) {
    .fw-profile-tiles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .fw-profile-tiles {
        grid-template-columns: 1fr;
    }
    .fw-profile-tile-author {
        grid-column: auto;
    }
}

.fw-profile-exp {
    display: block;
    padding: 1.25rem 1.5rem;
    color: inherit;
    text-decoration: none;
}

.fw-profile-exp .fw-tile-title {
    margin: 0;
}

@media (min-width: 1024px) {
    .fw-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}
