/* ==========================================================================
   ifV Seminare — Frontend Styles
   ========================================================================== */

/* Autocomplete-Styles: siehe ifv-autocomplete.css (laedt auf jeder Seite,
   weil das Autocomplete-JS auf jeder Seite laeuft). */

/* ==========================================================================
   Main Styles
   ========================================================================== */

/* Ensure wide layout for ifV content (uses WP alignwide) */
.ifv-seminare-wrap,
.ifv-seminar-detail,
.ifv-themengruppen-wrap,
.ifv-suche-wrap {
    box-sizing: border-box;
}

:root {
    /* Marken-Toene an Theme-Tokens gekoppelt (theme.json = einzige Farbquelle).
       Fallbacks = aktuelle Redesign-Werte, falls das Theme die Presets nicht laedt. */
    --ifv-primary: var(--wp--preset--color--primary, #2E49C2);
    --ifv-primary-dark: var(--wp--preset--color--primary-dark, #22358E);
    --ifv-primary-light: #edecf7;
    --ifv-accent: var(--wp--preset--color--secondary, #81A5D6);
    --ifv-accent-hover: var(--wp--preset--color--primary-dark, #22358E);
    --ifv-coral: #e06060;
    --ifv-orange: #e0944a;
    --ifv-text: var(--wp--preset--color--contrast, #1d1d1d);
    --ifv-text-light: var(--wp--preset--color--text-medium, #494949);
    --ifv-border: var(--wp--preset--color--border, #e8e8e8);
    --ifv-bg: var(--wp--preset--color--light-bg, #F4F6F9);
    --ifv-white: #fff;
    --ifv-gruen: #28a745;
    --ifv-gelb: #ffc107;
    --ifv-rot: #dc3545;
    --ifv-grau: #999;
    --ifv-radius: 6px;
    --ifv-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Theme overrides — handled by ifV theme; kept minimal for plugin portability
   ========================================================================== */

/* Hero banner on the home page */
.ifv-hero-banner {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 280px;
    background: url('../img/header-bg.jpg') center center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.ifv-hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,63,102,0.7) 0%, rgba(91,181,162,0.5) 100%);
}

.ifv-hero-banner h2 {
    position: relative;
    color: var(--ifv-white);
    font-size: 2.4em;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    margin: 0;
    padding: 0 20px;
    letter-spacing: 0.02em;
}

/* Three colored action boxes */
.ifv-action-boxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 32px;
}

.ifv-action-box {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    text-align: center;
    color: var(--ifv-white);
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: filter 0.2s;
    line-height: 1.3;
}

.ifv-action-box:hover {
    filter: brightness(1.08);
    color: var(--ifv-white);
}

.ifv-action-box--elearning { background: var(--ifv-coral); }
.ifv-action-box--kommunal  { background: var(--ifv-accent); }
.ifv-action-box--jobcenter  { background: var(--ifv-orange); }

@media (max-width: 768px) {
    .ifv-hero-banner {
        height: 180px;
    }
    .ifv-hero-banner h2 {
        font-size: 1.5em;
    }
    .ifv-action-boxes {
        grid-template-columns: 1fr;
    }
    .ifv-action-box {
        padding: 20px;
        font-size: 1em;
    }
}

/* Error & info */
.ifv-error {
    color: var(--ifv-rot);
    padding: 12px 16px;
    background: #fde8e8;
    border-radius: var(--ifv-radius);
}

/* "Meinten Sie diese Seite?" unter der Katalog-Nullantwort */
.ifv-no-results-alt {
    margin: 1rem auto 0;
    padding: 1rem 1.25rem;
    background: var(--wp--preset--color--light-bg, #F4F6F9);
    border-radius: 10px;
    max-width: 480px;
    text-align: left;
}
.ifv-no-results-alt p { margin: 0 0 0.5rem; font-weight: 600; }
.ifv-no-results-alt ul { margin: 0; padding-left: 1.2rem; }
.ifv-no-results-alt a { color: var(--wp--preset--color--primary, #2E49C2); }

.ifv-no-results {
    text-align: center;
    color: var(--ifv-text-light);
    padding: 40px 0;
}

.ifv-no-results-titel {
    margin: 0;
    font-size: 1.15rem;
    color: var(--wp--preset--color--contrast, #1a1a1a);
}

.ifv-no-results-wege {
    margin: 1.5rem 0 0;
}

.ifv-no-results-hilfe {
    margin: 1rem 0 0;
    font-size: 0.95rem;
}

.ifv-no-results-hilfe a {
    color: var(--wp--preset--color--primary, #2E49C2);
    text-decoration: underline;
}

.ifv-results-info {
    color: var(--ifv-text-light);
    font-size: 0.9em;
    margin: 0;
}

.ifv-results-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
}

.ifv-pro-seite-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.ifv-pro-seite-label {
    color: var(--ifv-text-light);
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.ifv-pro-seite-select {
    padding: 4px 8px;
    border: 1px solid var(--ifv-border, #d2d6dc);
    border-radius: 4px;
    background: #fff;
    font-size: 0.9em;
    cursor: pointer;
}

.ifv-pro-seite-select:hover,
.ifv-pro-seite-select:focus {
    border-color: var(--ifv-primary);
}

/* Bottom-Bar (zweite Pro-Seite-Auswahl + Back-to-top) */
.ifv-results-bar--bottom {
    margin: 24px 0 0;
    justify-content: space-between;
    border-top: 1px solid var(--ifv-border, #e1e4e8);
    padding-top: 16px;
}

.ifv-back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--ifv-border, #c1c5cb);
    border-radius: 4px;
    color: var(--ifv-text, #333);
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.ifv-back-to-top:hover,
.ifv-back-to-top:focus {
    background: var(--ifv-primary);
    border-color: var(--ifv-primary);
    color: #fff;
}

/* Floating-Modus: Button schwebt vertikal mit, wenn gescrollt wurde UND
   die Original-Bottom-Bar noch nicht im Viewport ist. Der right-Wert wird
   per JS dynamisch gesetzt, damit der Button rechtsbündig zur Inhalts-Spalte
   bleibt — kein Sprung beim Wechsel fixed ↔ static. */
.ifv-back-to-top.is-floating {
    position: fixed;
    bottom: 24px;
    z-index: 100;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

/* Vor Scroll: unsichtbar, nicht klickbar (gilt nur, wenn JS aktiv ist und die
   Klasse setzt — ohne JS bleibt der Button an Originalposition sichtbar). */
.ifv-back-to-top.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
}

/* ==========================================================================
   Start layout: Themengruppen tiles + search sidebar
   ========================================================================== */
.ifv-start-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
}

.ifv-start-heading {
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ifv-text);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--ifv-border);
}

/* Themengruppen tiles — green buttons like existing site */
.ifv-tg-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ifv-tg-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px 12px;
    background: var(--ifv-accent);
    color: var(--ifv-white);
    border-radius: var(--ifv-radius);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.3;
    min-height: 60px;
    transition: background 0.2s;
}

.ifv-tg-tile:hover {
    background: var(--ifv-accent-hover);
    color: var(--ifv-white);
}

/* Search sidebar */
.ifv-start-sidebar {
    position: sticky;
    top: 32px;
    /* Eigener Kasten: Felder liegen damit garantiert IM Hintergrund
       (vorher kam der Hintergrund vom aeusseren Wrapper ohne Padding-Budget). */
    background: var(--wp--preset--color--light-bg, #F4F6F9);
    border: 1px solid var(--wp--preset--color--border, #e0e0e0);
    border-radius: 12px;
    padding: 20px;
}

.ifv-sidebar-search {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ifv-sidebar-field label {
    font-size: 0.8em;
    color: var(--ifv-text-light);
}

.ifv-sidebar-input,
.ifv-sidebar-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--ifv-border);
    border-radius: 4px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.ifv-sidebar-btn {
    width: 100%;
    padding: 12px;
    background: var(--ifv-accent);
    color: var(--ifv-white);
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ifv-sidebar-btn:hover {
    background: var(--ifv-accent-hover);
}

/* Seminarnummer — subtle label */
.ifv-kachel-seminarnr {
    display: block;
    flex: 1 1 100%;
    font-size: 0.75em;
    color: var(--ifv-text-light);
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.ifv-detail-seminarnr {
    display: block;
    font-size: 0.85em;
    color: var(--ifv-text-light);
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

/* Back link */
/* Breadcrumbs */
.ifv-breadcrumbs {
    margin-bottom: 12px;
    font-size: 0.88em;
    color: var(--ifv-text-light);
}
.ifv-breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}
.ifv-breadcrumbs-list li {
    display: flex;
    align-items: center;
    min-width: 0; /* lange Seminartitel duerfen schrumpfen statt ueberzulaufen */
}
.ifv-breadcrumbs-list li[aria-current="page"] {
    white-space: normal;
    overflow-wrap: anywhere;
}
.ifv-breadcrumbs-list li:not(:last-child)::after {
    content: "›";
    margin: 0 0.5em;
    color: var(--ifv-grau);
}
.ifv-breadcrumbs-list li a {
    color: var(--ifv-primary);
    text-decoration: none;
}
.ifv-breadcrumbs-list li a:hover {
    text-decoration: underline;
}
.ifv-breadcrumbs-list li[aria-current="page"] {
    color: var(--ifv-text);
    font-weight: 500;
}

.ifv-back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--ifv-accent);
    text-decoration: none;
    font-size: 0.95em;
}

.ifv-back-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Filter bar
   ========================================================================== */
.ifv-filter-bar {
    background: var(--ifv-bg);
    border: 1px solid var(--ifv-border);
    border-radius: var(--ifv-radius);
    padding: 16px;
    margin-bottom: 24px;
}

.ifv-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.ifv-filter-field {
    flex: 1 1 180px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ifv-filter-field label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--ifv-text-light);
}

.ifv-filter-field select,
.ifv-filter-field input[type="text"] {
    padding: 8px 10px;
    border: 1px solid var(--ifv-border);
    border-radius: 4px;
    font-size: 0.95em;
    background: var(--ifv-white);
}

.ifv-filter-submit {
    flex: 0 0 auto;
}

/* "Filtern"-Button in eigener Zeile unter den Filterfeldern. */
.ifv-filter-actions {
    margin-top: 12px;
}

/* Buttons */
.ifv-btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--ifv-primary);
    color: var(--ifv-white);
    border: none;
    border-radius: 4px;
    font-size: 0.95em;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.5;
}

.ifv-btn:hover {
    opacity: 0.9;
}

.ifv-btn--inhouse {
    background: #2e7d32;
}

/* ==========================================================================
   Seminar card grid
   ========================================================================== */
.ifv-seminare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ifv-seminar-kachel {
    background: var(--ifv-white);
    border: 1px solid var(--ifv-border);
    border-radius: var(--ifv-radius);
    padding: 20px;
    box-shadow: var(--ifv-shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.ifv-seminar-kachel:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ifv-kachel-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.ifv-kachel-titel {
    font-size: 1.1em;
    margin: 0;
    flex: 1 1 100%;
}

.ifv-kachel-titel a {
    color: var(--ifv-primary);
    text-decoration: none;
}

.ifv-kachel-titel a:hover {
    text-decoration: underline;
}

.ifv-kachel-beschreibung {
    font-size: 0.9em;
    color: var(--ifv-text-light);
    flex: 1;
    margin: 0 0 12px;
}

/* Tags */
.ifv-kachel-tags,
.ifv-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
}

/* Kachel: Tags kompakt halten, Spalte nicht aufweiten */
.ifv-kachel-tags {
    min-width: 0;
}

.ifv-tag {
    display: inline-block;
    background: var(--ifv-primary-light);
    color: var(--ifv-primary);
    font-size: 0.7em;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* "weitere"-Badge */
.ifv-tag--mehr {
    background: #e9ecef;
    color: #495057;
    cursor: default;
}

/* Tooltip */
.ifv-tag--tooltip {
    position: relative;
    cursor: default;
}

.ifv-tag--tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--ifv-primary-dark);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: normal;
    width: max-content;
    max-width: 240px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ifv-tag--tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--ifv-primary-dark);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}

.ifv-tag--tooltip:hover::after,
.ifv-tag--tooltip:hover::before {
    opacity: 1;
}

/* Detailseite: Abstand über Tags */
.ifv-detail-tags {
    margin-top: 1rem;
}

/* Detailseite: Tags dürfen größer sein */
.ifv-detail-tags .ifv-tag {
    font-size: 0.8em;
    padding: 3px 10px;
}

.ifv-tag--link {
    text-decoration: none;
}

.ifv-tag--link:hover {
    background: var(--ifv-primary);
    color: var(--ifv-white);
}

/* Card footer */
.ifv-kachel-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.85em;
    padding-top: 12px;
    border-top: 1px solid var(--ifv-border);
    margin-top: auto;
}

.ifv-kachel-termin {
    color: var(--ifv-text-light);
}

.ifv-kachel-preis {
    font-weight: 700;
    color: var(--ifv-primary);
}

/* Badges */
.ifv-badge {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ifv-badge--format {
    background: var(--ifv-primary-light);
    color: var(--ifv-primary);
}

.ifv-badge--praesenz   { background: var(--ifv-primary-light); color: var(--ifv-primary); }
.ifv-badge--online     { background: var(--ifv-primary-light); color: var(--ifv-primary); }
.ifv-badge--hybrid     { background: var(--ifv-primary-light); color: var(--ifv-primary); }
.ifv-badge--video-kurs { background: var(--ifv-primary-light); color: var(--ifv-primary); }

.ifv-badge--inhouse {
    background: transparent;
    color: var(--ifv-text-light);
    border: 1px solid var(--ifv-border);
    font-weight: 400;
    font-size: 0.7em;
    text-transform: none;
    letter-spacing: 0;
}

.ifv-badge--gesichert {
    background: #e8f5e9;
    color: #2e7d32;
    /* Zweiwortiger Text ("Durchfuehrung gesichert") darf im Pill nicht
       mittig umbrechen — lieber wandert das ganze Badge in die naechste
       Flexzeile (.ifv-df-header ist flex-wrap:wrap). */
    white-space: nowrap;
}

/* Ampel */
.ifv-ampel { font-size: 1.1em; line-height: 1; }
.ifv-ampel--gruen    { color: var(--ifv-gruen); }
.ifv-ampel--gelb     { color: var(--ifv-gelb); }
.ifv-ampel--rot      { color: var(--ifv-rot); }
.ifv-ampel--abgesagt { color: var(--ifv-grau); text-decoration: line-through; }

/* Ampel-Status mit sichtbarem Klartext-Label (statt nur Farbpunkt) */
.ifv-ampel-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 12px 4px 9px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}
.ifv-ampel-status .ifv-ampel {
    font-size: 1.5em;       /* deutlich größerer, erkennbarer Punkt */
}
/* Farbige Pille je Status — Punkt + Text + dezent getönter Hintergrund */
.ifv-ampel-status--gruen    { background: #e7f4e4; color: #1f7a1f; }
.ifv-ampel-status--gelb     { background: #fdf3df; color: #9a6a00; }
.ifv-ampel-status--rot      { background: #fcebe9; color: #b3261e; }
.ifv-ampel-status--abgesagt { background: #eceff1; color: #5a6570; }
.ifv-ampel-status--abgesagt .ifv-ampel-label { text-decoration: line-through; }

/* Nutri-Score als echte Dreiecks-Pyramide: 3 Segmente (Spitze C orange,
   Mitte B gelb, Basis A gruen) bilden zusammen die Dreiecks-Silhouette
   (clip-path-Scheiben desselben Dreiecks); aktive Stufe voll, Rest gedimmt. */
.ifv-nutri-score {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.ifv-ns {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 14px;
    font-size: 0.55em;
    font-weight: 700;
    color: var(--ifv-white);
    opacity: 0.28;
    line-height: 1;
}

.ifv-ns--c { /* Spitze */
    background: #ee8100;
    clip-path: polygon(50% 0, 66.7% 100%, 33.3% 100%);
    align-items: flex-end;
    padding-bottom: 1px;
}
.ifv-ns--b { /* Mitte */
    background: #fecb02;
    color: #333;
    clip-path: polygon(33.3% 0, 66.7% 0, 83.3% 100%, 16.7% 100%);
}
.ifv-ns--a { /* Basis */
    background: #038141;
    clip-path: polygon(16.7% 0, 83.3% 0, 100% 100%, 0 100%);
}

.ifv-ns--active {
    opacity: 1;
    position: relative;
    z-index: 1;
    transform: scale(1.10); /* aktive Stufe dezent vergroessert */
    font-size: 0.58em;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.ifv-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.ifv-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--ifv-border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--ifv-text);
    font-size: 0.9em;
}

.ifv-page:hover {
    background: var(--ifv-primary-light);
}

.ifv-page--current {
    background: var(--ifv-primary);
    color: var(--ifv-white);
    border-color: var(--ifv-primary);
}

/* ==========================================================================
   Seminar detail
   ========================================================================== */
.ifv-seminar-detail {
    max-width: 1000px;
}

.ifv-detail-titel {
    font-size: 1.8em;
    margin: 0 0 16px;
    color: var(--ifv-primary);
}

/* Kopfbereich: Info links, Trailer/Bild rechts */
.ifv-detail-header {
    display: grid;
    grid-template-columns: 1fr minmax(375px, 500px);
    gap: 28px;
    align-items: start;
    margin-bottom: 24px;
}

.ifv-detail-header-info {
    min-width: 0; /* erlaubt Umbruch langer Titel im Grid */
}

/* Trailer im Kopf rendert kompakt (volle Spaltenbreite, 16:9) */
.ifv-detail-header-media .ifv-video-embed {
    margin-bottom: 0;
}

/* Einspaltig auf schmaleren Viewports — Trailer rückt unter den Titelblock */
@media (max-width: 880px) {
    .ifv-detail-header {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .ifv-detail-header-media {
        max-width: 600px;
    }
}

.ifv-detail-bild {
    max-width: 100%;
    height: auto;
    border-radius: var(--ifv-radius);
    margin-bottom: 20px;
}

.ifv-detail-beschreibung {
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Zielgruppe-Callout */
.ifv-detail-zielgruppe {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #eef3f9;
    border-left: 4px solid var(--ifv-primary);
    border-radius: var(--ifv-radius);
    padding: 14px 18px;
    margin-bottom: 24px;
}
.ifv-detail-zielgruppe-icon {
    flex-shrink: 0;
    color: var(--ifv-primary);
    margin-top: 2px;
}
.ifv-detail-zielgruppe-label {
    display: block;
    font-weight: 700;
    color: var(--ifv-primary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.ifv-detail-zielgruppe-text p {
    margin: 0;
    line-height: 1.55;
}

/* Scroll-Button zu Terminen */
.ifv-btn-termine-scroll {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 20px;
    padding: 10px 22px;
    background: var(--wp--preset--color--primary, #2E49C2);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(34,53,142,0.30);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.ifv-btn-termine-scroll:hover {
    background: var(--wp--preset--color--primary-dark, #22358E);
    box-shadow: 0 5px 16px rgba(34,53,142,0.40);
    transform: translateY(-1px);
    color: #fff;
}


.ifv-detail-section {
    margin-bottom: 24px;
}

.ifv-detail-section h2 {
    font-size: 1.3em;
    margin: 0 0 12px;
    color: var(--ifv-primary);
}

.ifv-detail-inhouse {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: var(--ifv-radius);
    padding: 16px 20px;
    margin-bottom: 24px;
}

.ifv-video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 16px;
    border-radius: var(--ifv-radius);
}

.ifv-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Durchführungen (accordion)
   ========================================================================== */
.ifv-durchfuehrungen {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ifv-df-item {
    border: 1px solid var(--ifv-border);
    border-radius: var(--ifv-radius);
    overflow: hidden;
}

.ifv-df-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--ifv-bg);
    cursor: pointer;
    user-select: none;
}

.ifv-df-header:hover {
    background: var(--ifv-primary-light);
}

.ifv-df-datum {
    font-weight: 600;
}

.ifv-df-ort {
    color: var(--ifv-text-light);
}

.ifv-df-preis {
    font-weight: 700;
    color: var(--ifv-primary);
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

/* USt-Hinweis unter der Terminliste */
.ifv-ust-hinweis {
    margin: 12px 0 0;
    font-size: 0.85em;
    color: var(--ifv-text-light, #666);
    font-style: italic;
}

.ifv-accordion-icon {
    /* Ist ein <button> (Tastaturbedienbarkeit) — Browser-Chrome zuruecksetzen. */
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--ifv-primary);
    color: #fff;
    transition: transform 0.2s, background 0.2s;
}

.ifv-df-header:hover .ifv-accordion-icon {
    background: var(--ifv-primary-dark, #22358E);
}

.ifv-df-item.ifv-accordion--open .ifv-accordion-icon {
    transform: rotate(180deg);
}

.ifv-df-body {
    padding: 16px;
}

.ifv-df-anmeldeschluss {
    font-size: 0.9em;
    color: var(--ifv-text-light);
    margin: 0 0 12px;
}

/* Segmente table */
.ifv-segmente-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.ifv-segmente-table th,
.ifv-segmente-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--ifv-border);
}

.ifv-segmente-table th {
    background: var(--ifv-bg);
    font-weight: 600;
    font-size: 0.85em;
    color: var(--ifv-text-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ==========================================================================
   Themengruppen
   ========================================================================== */
.ifv-themengruppen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.ifv-tg-card {
    background: var(--ifv-white);
    border: 1px solid var(--ifv-border);
    border-radius: var(--ifv-radius);
    padding: 20px;
    box-shadow: var(--ifv-shadow);
}

.ifv-tg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ifv-tg-name {
    margin: 0;
    font-size: 1.1em;
    flex: 1;
}

.ifv-tg-count {
    font-size: 0.85em;
    color: var(--ifv-text-light);
}

.ifv-tg-beschreibung {
    font-size: 0.9em;
    color: var(--ifv-text-light);
    margin: 8px 0;
}

.ifv-tg-ansprechpartner {
    font-size: 0.85em;
    color: var(--ifv-text-light);
    margin: 4px 0;
}

.ifv-tg-themen-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ifv-tg-themen-list a {
    color: var(--ifv-primary);
    text-decoration: none;
    font-size: 0.95em;
}

.ifv-tg-themen-list a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Search form
   ========================================================================== */
.ifv-suche-wrap {
    margin-bottom: 24px;
}

.ifv-suche-form {
    background: var(--ifv-bg);
    border: 1px solid var(--ifv-border);
    border-radius: var(--ifv-radius);
    padding: 20px;
}

.ifv-suche-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.ifv-suche-field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ifv-suche-field label {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--ifv-text-light);
}

.ifv-suche-field input,
.ifv-suche-field select {
    padding: 8px 10px;
    border: 1px solid var(--ifv-border);
    border-radius: 4px;
    font-size: 0.95em;
}

.ifv-suche-submit {
    flex: 0 0 auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .ifv-start-layout {
        grid-template-columns: 1fr;
    }

    .ifv-tg-tiles {
        grid-template-columns: 1fr 1fr;
    }

    .ifv-seminare-grid,
    .ifv-themengruppen-grid {
        grid-template-columns: 1fr;
    }

    .ifv-filter-row,
    .ifv-suche-row {
        flex-direction: column;
    }

    .ifv-filter-field,
    .ifv-suche-field {
        flex-basis: 100%;
    }

    .ifv-df-header {
        font-size: 0.9em;
    }

    .ifv-segmente-table {
        font-size: 0.8em;
    }

    .ifv-segmente-table th,
    .ifv-segmente-table td {
        padding: 6px;
    }
}

/* ── Terminanfrage / Interesse-Formular (Seminare ohne buchbaren Termin) ── */
.ifv-terminanfrage { max-width: 640px; }
.ifv-terminanfrage .ifv-ta-form { margin-top: 1rem; }
.ifv-terminanfrage .ifv-ta-field { margin: 0 0 1rem; }
/* Datenschutz-Zeile: Checkbox fix links, mehrzeiliger Text mit Haengeeinzug
   (vorher display:block-Label -> Text brach unter die Checkbox). */
.ifv-terminanfrage .ifv-ta-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
}
.ifv-terminanfrage .ifv-ta-consent input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 3px;
}
.ifv-terminanfrage label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.ifv-terminanfrage .ifv-ta-req { color: #c0392b; }
.ifv-terminanfrage .ifv-ta-opt { color: #777; font-weight: 400; font-size: 0.9em; }
.ifv-terminanfrage input[type="text"],
.ifv-terminanfrage input[type="email"],
.ifv-terminanfrage textarea {
    width: 100%; padding: 0.7rem 0.85rem; border: 1px solid #c7ccd4;
    border-radius: 8px; font: inherit; box-sizing: border-box; background: #fff;
}
.ifv-terminanfrage input:focus, .ifv-terminanfrage textarea:focus {
    /* Token statt der alten Blaustufe #1b3a6b — Rest von vor der
       Token-Migration (Phase 4). Gleiches Fokus-Muster wie kontakt.css
       und anmeldung.css. */
    outline: none;
    border-color: var(--wp--preset--color--primary, #2E49C2);
    box-shadow: 0 0 0 3px rgba(46, 73, 194, 0.15);
}
.ifv-terminanfrage textarea { resize: vertical; min-height: 110px; }
.ifv-terminanfrage .ifv-ta-consent { display: block; margin: 0 0 1.1rem; font-size: 0.95rem; }
.ifv-terminanfrage .ifv-ta-consent label { display: flex; align-items: flex-start; gap: 0.55rem; font-weight: 400; }
.ifv-terminanfrage .ifv-ta-consent input { margin-top: 0.25rem; flex: 0 0 auto; }
.ifv-terminanfrage .ifv-ta-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ifv-terminanfrage .ifv-ta-invalid input, .ifv-terminanfrage .ifv-ta-invalid textarea { border-color: #c0392b; }
.ifv-terminanfrage .ifv-ta-error { display: block; color: #c0392b; font-size: 0.85rem; margin-top: 0.3rem; }
.ifv-terminanfrage .ifv-ta-feedback:empty { display: none; }
.ifv-terminanfrage .ifv-ta-feedback { padding: 0.85rem 1rem; border-radius: 8px; margin-bottom: 1.1rem; font-weight: 500; }
.ifv-terminanfrage .ifv-ta-feedback.ifv-ta-ok { background: #e7f6ec; color: #1e7a3d; border: 1px solid #b6e0c4; }
.ifv-terminanfrage .ifv-ta-feedback.ifv-ta-err { background: #fdecea; color: #c0392b; border: 1px solid #f3c0bb; }
.ifv-terminanfrage .ifv-ta-btn:disabled { opacity: 0.6; cursor: default; }

/* Hinweiszeile bei Mehrfach-Themengruppen-Vorauswahl (Themenbereichs-Landing-Pages) */
.ifv-multi-hint {
    background: var(--wp--preset--color--light-bg, #F4F6F9);
    border-left: 4px solid var(--wp--preset--color--primary, #2E49C2);
    border-radius: 4px;
    padding: 0.6rem 1rem;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}
.ifv-multi-hint a { white-space: nowrap; }

/* Kachel: Kein-Termin-Hinweis mit Link zur Interessentenliste (Anja-Feedback) */
.ifv-kachel-termin--interesse {
    color: var(--wp--preset--color--primary, #2E49C2);
    font-weight: 600;
    text-decoration: none;
}
.ifv-kachel-termin--interesse:hover { text-decoration: underline; }

/* Detailseite: Themen/Kategorien dezent unten als Aufklapper (Anja-Feedback) */
.ifv-detail-themen-akkordeon {
    margin-top: 2rem;
    border-top: 1px solid var(--wp--preset--color--border, #e0e0e0);
    padding-top: 0.75rem;
}
.ifv-detail-themen-akkordeon > summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--wp--preset--color--text-medium, #687080);
}
.ifv-detail-themen-akkordeon[open] > summary { margin-bottom: 0.75rem; }

/* Visuell versteckte Beschriftung (Screenreader), z. B. im Akkordeon-Button.
   Eigene Regel, damit wir nicht auf .screen-reader-text aus dem Core-Stylesheet
   angewiesen sind. */
.ifv-accordion-icon-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Sichtbarer Fokus auf dem Akkordeon-Button (Tastatur-Navigation) */
.ifv-accordion-icon:focus-visible {
    outline: 3px solid var(--wp--preset--color--primary-dark, #22358E);
    outline-offset: 2px;
}

/* Ampel-Status in der Katalog-Kachel: Punkt + Klartext (WCAG 1.4.1 — Farbe
   allein darf keine Information tragen). Kompakter als die Pille der Detailseite. */
.ifv-kachel-ampel {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.ifv-kachel-ampel-text {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--wp--preset--color--text-medium, #687080);
}
.ifv-kachel-ampel--rot .ifv-kachel-ampel-text { color: #b3261e; }
.ifv-kachel-ampel--gelb .ifv-kachel-ampel-text { color: #8a5a00; }
.ifv-kachel-ampel--gruen .ifv-kachel-ampel-text { color: #1f7a1f; }
.ifv-kachel-ampel--abgesagt .ifv-kachel-ampel-text { text-decoration: line-through; }

/* Hinweis neben dem "ausgebucht"-Badge: fuehrt zum Interessentenlisten-Formular
   weiter unten auf derselben Seite. Wird nur ausgegeben, wenn das Formular auch
   gerendert wird (kein anderer Termin buchbar). */
.ifv-df-warteliste {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary, #2E49C2);
    text-decoration: none;
    white-space: nowrap;
}
.ifv-df-warteliste:hover { text-decoration: underline; }
