/*
 * Dateipfad: assets/css/bi-funktionen.css
 * Funktions- & Anlass-Seiten (funktionen.php, includes/funktionen/sec_overview.php & sec_detail.php).
 * Baut auf den Bausteinen der Anleitung auf (assets/css/bi-anleitung.css: gd-section, gd-topic-card, gd-demo-panel …).
 * Mobile first.
 */

.fp-page { --fp-gold: #b45309; }

/* =========================================================================
   SCHILDER: GRATIS / PREMIUM / BALD
   ========================================================================= */
.fp-plan {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.4;
}
.fp-plan.is-gratis  { color: #047857; background: rgba(16, 185, 129, 0.1);  border-color: rgba(16, 185, 129, 0.28); }
.fp-plan.is-premium { color: #92400e; background: rgba(245, 158, 11, 0.13); border-color: rgba(245, 158, 11, 0.4); }
.fp-plan.is-bald    { color: #6d28d9; background: rgba(139, 92, 246, 0.1);  border-color: rgba(139, 92, 246, 0.3); }
.fp-plan.is-aus     { color: #64748b; background: rgba(100, 116, 139, 0.1); border-color: rgba(100, 116, 139, 0.25); }
.fp-plan.is-lg { font-size: 0.78rem; padding: 5px 12px; }

/* =========================================================================
   ÜBERSICHT /funktionen
   ========================================================================= */
.fp-cat-nav {
    max-width: 1160px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 auto 34px;
    padding: 0 5%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.fp-cat-nav a {
    --gd-accent: var(--primary-color, #2771c8);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 30px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-main, #0f172a);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.fp-cat-nav a i { color: var(--gd-accent); }
.fp-cat-nav a:hover { border-color: var(--gd-accent); transform: translateY(-1px); }
.fp-cat-nav a em { font-style: normal; color: var(--text-muted, #64748b); font-weight: 700; }

.fp-cat-head {
    --gd-accent: var(--primary-color, #2771c8);
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
}
.fp-cat-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    background: var(--gd-accent);
    background: linear-gradient(135deg, var(--gd-accent), color-mix(in srgb, var(--gd-accent) 62%, #0f172a));
}
.fp-cat-head h2 {
    margin: 0;
    font-size: clamp(1.25rem, 3.6vw, 1.6rem);
    font-weight: 900;
    letter-spacing: -0.3px;
    line-height: 1.2;
    color: var(--text-main, #0f172a);
}
.fp-cat-head p { margin: 3px 0 0; font-size: 0.92rem; color: var(--text-muted, #64748b); line-height: 1.5; }
.fp-cat-section { margin-bottom: 52px; }

.fp-card .gd-topic-top { gap: 8px; }
.fp-card .gd-topic-title { margin: 2px 0 0; }
.fp-card .gd-topic-teaser { margin: 0; }
.fp-card-kicker {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gd-accent);
}

.fp-plan-note {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 22px;
    border-radius: 22px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}
.fp-plan-note > i {
    font-size: 1.3rem;
    color: #f59e0b;
    margin-top: 3px;
}
.fp-plan-note h2 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 900; color: var(--text-main, #0f172a); }
.fp-plan-note p { margin: 0 0 10px; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted, #64748b); }
.fp-plan-note .fp-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fp-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* =========================================================================
   DETAILSEITE
   ========================================================================= */
.fp-head .gd-topic-head-text > .fp-head-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.fp-head .fp-head-badges .gd-badge { margin: 0; }
.fp-head .gd-head-chips a.gd-chip { text-decoration: none; }
.fp-head .gd-head-chips a.gd-chip:hover { border-color: var(--primary-color, #2771c8); color: var(--primary-color, #2771c8); }
.fp-head .gd-head-chips a.gd-chip.is-live:hover { color: #047857; border-color: #10b981; }

.fp-layout {
    max-width: 1240px;
    margin: 0 auto 56px;
    padding: 0 5%;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr);
}
.fp-layout.no-demo { max-width: 900px; }
.fp-top, .fp-main, .fp-demo-col { min-width: 0; }
.fp-demo-col { scroll-margin-top: 80px; }

/* Vorteile */
.fp-benefits {
    list-style: none;
    margin: 0;
    padding: 18px 20px;
    border-radius: 22px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}
.fp-benefits li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-main, #0f172a);
}
.fp-benefits li i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.66rem;
    color: #ffffff;
    background: #10b981;
    margin-top: 1px;
}

/* Haupttext */
.fp-body {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--text-muted, #475569);
}
.fp-body .fp-sub, .fp-block-title {
    font-size: clamp(1.15rem, 3vw, 1.35rem);
    font-weight: 900;
    letter-spacing: -0.2px;
    line-height: 1.3;
    color: var(--text-main, #0f172a);
    margin: 28px 0 10px;
}
.fp-body > .fp-sub:first-child { margin-top: 0; }
.fp-body ul { padding-left: 22px; }
.fp-body li { margin-bottom: 6px; }
.fp-block { margin-top: 34px; }
.fp-block-title { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.fp-block-title i { color: var(--gd-accent, var(--primary-color, #2771c8)); font-size: 1rem; }

/* Übersicht Gratis & Premium */
.fp-scope {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-card, #ffffff);
}
.fp-scope table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.fp-scope th, .fp-scope td { padding: 11px 14px; text-align: left; vertical-align: middle; }
.fp-scope thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    background: var(--bg-body, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}
.fp-scope thead th.is-premium { color: #b45309; }
.fp-scope tbody tr + tr td { border-top: 1px solid var(--border-color, #e2e8f0); }
.fp-scope td:first-child { font-weight: 700; color: var(--text-main, #0f172a); }
.fp-scope td.fp-val { white-space: nowrap; font-weight: 800; width: 1%; }
.fp-val.is-on, .fp-val.is-num, .fp-val.is-unlimited { color: #047857; }
.fp-val.is-off { color: var(--text-muted, #94a3b8); font-weight: 700; }
.fp-val.is-soon { color: #6d28d9; }
.fp-val i { margin-right: 5px; }
.fp-scope-foot {
    padding: 11px 14px;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    border-top: 1px solid var(--border-color, #e2e8f0);
    background: var(--bg-body, #f8fafc);
    line-height: 1.5;
}
.fp-scope-foot a { color: var(--primary-color, #2771c8); font-weight: 800; }

/* Fragen (Karten aus dem FAQ-Tool, gleiche Ansicht wie in der Anleitung) */
.fp-faq { display: flex; flex-direction: column; gap: 10px; }
.fp-faq-cards { max-width: none; gap: 10px; }
.fp-faq-more {
    margin: 12px 2px 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--text-muted, #64748b);
    overflow-wrap: anywhere;
}
.fp-faq-more a { color: var(--primary-color, #2771c8); font-weight: 700; }
.fp-feedback { margin-top: 22px; }

/* Übung: Umschalter Gast / Host */
.fp-view-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg-body, #f1f5f9);
    border: 1px solid var(--border-color, #e2e8f0);
}
.fp-view-tab {
    border: none;
    background: transparent;
    border-radius: 10px;
    padding: 9px 10px;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.fp-view-tab[aria-selected="true"] {
    background: var(--bg-card, #ffffff);
    color: var(--text-main, #0f172a);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.fp-view-tab[aria-selected="true"] i { color: var(--gd-accent, var(--primary-color, #2771c8)); }
.fp-view-tab:focus-visible { outline: 2px solid var(--primary-color, #2771c8); outline-offset: 2px; }
.fp-demo-foot-link { color: var(--primary-color, #2771c8); font-weight: 800; text-decoration: none; white-space: nowrap; }
.fp-demo-foot-link:hover { text-decoration: underline; }
.fp-demo-soon {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #6d28d9;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    padding: 8px 10px;
}
.gd-demo-panel [hidden] { display: none !important; }

/* Anlässe & verwandte Seiten */
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-chip-link {
    --gd-accent: var(--primary-color, #2771c8);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 30px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-main, #0f172a);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.fp-chip-link i { color: var(--gd-accent); }
.fp-chip-link:hover { border-color: var(--gd-accent); transform: translateY(-1px); }

/* Beispiel-Einladungen (Anlass) */
.fp-sc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}
.fp-sc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fp-sc-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08); }
.fp-sc-thumb {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
}
.fp-sc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.fp-sc-text strong { font-size: 0.98rem; font-weight: 900; color: var(--text-main, #0f172a); }
.fp-sc-text span { font-size: 0.82rem; color: var(--text-muted, #64748b); line-height: 1.4; }
.fp-sc-go { font-size: 0.78rem; font-weight: 800; color: var(--primary-color, #2771c8); white-space: nowrap; }

/* =========================================================================
   GRÖSSERE BILDSCHIRME
   ========================================================================= */
@media (min-width: 640px) {
    .fp-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
    .fp-layout.has-demo {
        grid-template-columns: minmax(0, 1fr) 440px;
        grid-template-rows: auto 1fr;
        gap: 22px 34px;
        align-items: start;
    }
    .fp-layout.has-demo .fp-top  { grid-column: 1; grid-row: 1; }
    .fp-layout.has-demo .fp-main { grid-column: 1; grid-row: 2; }
    .fp-layout.has-demo .fp-demo-col { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
    .fp-demo-col .gd-demo-panel:not(.is-full) { position: sticky; top: 88px; }
    .fp-demo-col .gd-demo-panel:not(.is-full) .gd-device {
        height: calc(100vh - 300px);
        max-height: 780px;
        min-height: 500px;
    }
    #fpDemoFull { display: none; }
    .fp-sc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fp-sc-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
    .fp-head { flex-direction: column; gap: 14px; padding-top: 16px; }
    .fp-head .gd-topic-head-icon { width: 54px; height: 54px; font-size: 1.35rem; border-radius: 17px; }
    .fp-benefits { padding: 16px; }
    .fp-scope th, .fp-scope td { padding: 10px 11px; }
    .fp-scope table { font-size: 0.84rem; }
    .fp-cat-nav { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .fp-cat-nav::-webkit-scrollbar { display: none; }
    .fp-cat-nav a { flex-shrink: 0; }
    .fp-plan-note { flex-direction: column; gap: 8px; padding: 18px; }
}
@media (max-width: 420px) {
    .fp-view-tab { font-size: 0.8rem; padding: 9px 6px; }
}
@media print {
    .fp-demo-col, .fp-cat-nav { display: none !important; }
}

/* Sehr schmale Handys: Werte in «Gratis & Premium» dürfen umbrechen (sonst wird z. B. «12 Termine» abgeschnitten) */
@media (max-width: 480px) {
    .fp-scope th, .fp-scope td { padding: 9px 8px; }
    .fp-scope td.fp-val { white-space: normal; width: auto; }
    .fp-scope td.fp-val i { display: none; } /* Farbe und Text zeigen den Stand */
}
