/* ============================================================
   Themengebiet-Landingpage + Seminar-Grid
   Tokens lokal als CSS-Custom-Properties unter .themengebiet,
   damit nichts mit dem globalen Theme-CSS kollidiert.
   ============================================================ */

/* Inter Variable Font, gescoped auf das Theme-Verzeichnis.
   Eine .woff2-Datei deckt alle relevanten Weights (400-800) ab. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/Inter-Variable.woff2') format('woff2');
}

.themengebiet {
    /* --tg-* sind Aliase auf die globalen :root-Tokens aus style.css.
       Konsolidiert, damit Theme nur eine Token-Quelle hat. */
    --tg-c-primary:      var(--color-primary);
    --tg-c-primary-dark: hsl(27 82% 45%);
    --tg-c-cta:          var(--color-cta);
    --tg-c-cta-dark:     var(--color-cta-dark);
    --tg-c-text:         var(--color-foreground);
    --tg-c-text-muted:   hsl(220 15% 32%);
    --tg-c-text-meta:    var(--color-muted-foreground);
    --tg-c-border:       var(--color-border);
    --tg-c-bg-cream:     var(--color-bg-cream);
    --tg-c-bg-card:      #ffffff;
    --tg-c-bg-soft:      var(--color-bg-soft);
    --tg-c-shadow:       hsl(220 20% 20% / 0.06);
    --tg-c-shadow-hover: hsl(220 20% 20% / 0.12);
    --tg-radius:         10px;
    --tg-radius-lg:      var(--radius-lg, 14px);
    --tg-gap:            24px;
    --tg-font:           'Inter', Arial, sans-serif;

    font-family: var(--tg-font);
    color: var(--tg-c-text);
    background: #ffffff;
    padding: 0;
    /* Aus dem Theme-Wrapper .innerwrap (1200px) ausbrechen, damit der
       Background full-width zur Viewport-Kante reicht.
       width: 100vw + margin-left = calc(50% - 50vw) zentriert ein
       Element auf voller Viewport-Breite, egal wie schmal der Parent ist. */
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
    box-sizing: border-box;
}

/* Theme/Plugin-Element „Merken" (participant-access) auf Themengebiet-
   Pages ausblenden: macht inhaltlich keinen Sinn für eine Kategorie-
   Übersicht, und der Click-Handler im Plugin reagiert dort ohnehin
   nicht. Mit weggenommen ist auch die störende dünne Border-Top-Linie
   zwischen Hero und Filter-Bar weg. */
.themengebiet .participant-bookmark-wrapper {
    display: none !important;
}

/* ---------- Hero ---------- */
.themengebiet-hero {
    background: var(--tg-c-bg-cream);
    padding: 56px 24px 64px;
}
.themengebiet-hero--with-image {
    position: relative;
    overflow: hidden;
    color: #fff;
}
.themengebiet-hero--with-image .themengebiet-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.themengebiet-hero--with-image .themengebiet-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.themengebiet-hero--with-image::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 100%);
}
.themengebiet-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    gap: 48px;
    align-items: center;
}
.themengebiet-hero__copy {
    min-width: 0;
}
.themengebiet-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(233, 125, 37, 0.1);
    color: #d16915;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.16px;
    text-transform: none;
    margin: 0 0 16px;
    font-family: Arial, sans-serif;
}
.themengebiet-hero__eyebrow svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}
.themengebiet-hero--with-image .themengebiet-hero__eyebrow {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    backdrop-filter: blur(4px);
}
.themengebiet-hero__title {
    font-size: 56px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: 0.16px;
    margin: 0;
    color: #20242c;
    font-family: Arial, sans-serif;
    hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.themengebiet-hero--with-image .themengebiet-hero__title {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.themengebiet-hero__highlight {
    background-image: linear-gradient(90deg, #ea832e 0%, #e25812 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.themengebiet-hero--with-image .themengebiet-hero__highlight {
    background-image: none;
    -webkit-text-fill-color: #ffc998;
    color: #ffc998;
}
.themengebiet-hero__teaser {
    font-size: 18px;
    line-height: 1.55;
    color: var(--tg-c-text-muted);
    margin-top: 24px;
    max-width: 720px;
}
.themengebiet-hero__teaser p {
    margin: 0 0 12px;
}
.themengebiet-hero__teaser p:last-child {
    margin-bottom: 0;
}
.themengebiet-hero__teaser a {
    color: var(--tg-c-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Sigel-Slot (rechts im Hero) ---------- */
.themengebiet-hero__badges {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px;
    align-items: stretch;
    justify-content: flex-end;
    flex-shrink: 0;
    min-width: 280px;
}
.themengebiet-hero__badge {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
    transition: transform 0.18s ease;
}
.themengebiet-hero__badge:hover {
    transform: translateY(-2px);
}
.themengebiet-hero__badge img {
    display: block;
    height: 240px;
    width: auto;
    object-fit: contain;
}

/* ---------- Content-Wrapper unterhalb Hero ---------- */
.themengebiet > .themengebiet-filter,
.themengebiet > .themengebiet-grid-header,
.themengebiet > .seminar-grid,
.themengebiet > .themengebiet-empty {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ---------- Filter-Bar (Kategorie-Chips) ---------- */
.themengebiet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 24px;
    padding-bottom: 20px;
    margin-bottom: 8px;
}
.themengebiet-filter__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--tg-c-border);
    background: #fff;
    color: var(--tg-c-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.2;
}
.themengebiet-filter__chip:hover {
    background: #fff;
    border-color: #c9c2b5;
    box-shadow: 0 2px 8px var(--tg-c-shadow);
}
.themengebiet-filter__chip.is-active {
    background: var(--tg-c-primary);
    border-color: var(--tg-c-primary);
    color: #fff;
}
.themengebiet-filter__count {
    color: var(--tg-c-text-meta);
    font-weight: 500;
    font-size: 12px;
}
.themengebiet-filter__chip.is-active .themengebiet-filter__count {
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- Grid-Header ---------- */
.themengebiet-grid-header {
    padding-top: 4px;
    padding-bottom: 16px;
}
.themengebiet-count {
    font-size: 14px;
    color: var(--tg-c-text-meta);
    letter-spacing: 0.2px;
}

/* ---------- Grid ---------- */
.seminar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--tg-gap);
    padding-bottom: 64px;
}

/* ---------- Sektion „Vertiefen & Zertifizieren" ---------- */
.themengebiet-lehrgaenge {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}
.themengebiet-section-header {
    margin: 0 0 28px;
    max-width: 720px;
    /* Theme-CSS setzt auf <header>-Elementen einen border-bottom +
       vertikales Padding; das hier explizit zurücksetzen, sonst zieht
       die Linie nur halblang unter dem Sektion-Header durch. */
    border: 0 !important;
    padding: 0 !important;
    background: transparent;
}
.themengebiet-hero {
    /* Hero-Element ist ebenfalls <header>; das globale Theme-CSS
       setzt dort border-bottom: 1px solid #ddd. Wir wollen den
       Cream-zu-Weiß-Wechsel als Trenner, keine harte Linie. */
    border: 0 !important;
}
.themengebiet-section-eyebrow {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: transparent;
    border: 1.5px solid var(--tg-c-primary);
    color: var(--tg-c-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin: 0 0 16px;
}
.themengebiet-section-title {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 8px;
    color: var(--tg-c-text);
}
.themengebiet-section-subtitle {
    font-size: 16px;
    line-height: 1.5;
    color: var(--tg-c-text-muted);
    margin: 0;
}
.themengebiet-subsection-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--tg-c-text-muted);
    letter-spacing: 0.02em;
    margin: 28px 0 16px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.18em;
}
.themengebiet-subsection-title:first-of-type {
    margin-top: 8px;
}
.seminar-grid--lehrgaenge {
    padding-bottom: 0;
    margin-bottom: 16px;
}

/* Hochschul-Lehrgänge: immer eine Card pro Reihe, volle Breite.
   Lockert das Design auf und gibt jedem Lehrgang visuelles Gewicht. */
.seminar-grid--lehrgaenge-wb {
    grid-template-columns: 1fr;
    gap: 16px;
}

/* ---------- Type-Pills + Auszeichnungs-Pills ---------- */
.seminar-card__type-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.seminar-card__type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
}
.seminar-card__type--kurs {
    background: #fde6d3;
    color: var(--tg-c-primary);
}
.seminar-card__type--lehrgang {
    background: transparent;
    color: var(--tg-c-text);
    border: 1.5px solid var(--tg-c-text);
}
.seminar-card__type-icon {
    flex-shrink: 0;
}
.seminar-card__cert {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e0f0d8;
    color: #4a7d2a;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
}
.seminar-card__cert--strong {
    background: #d4f0c8;
    color: #2f6a16;
}

/* ---------- NEU-Badge als Corner-Variante (oben rechts auf der Card) ---------- */
.seminar-card__badge-corner {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tg-c-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ---------- Card ---------- */
.seminar-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--tg-c-bg-card);
    border: 1px solid var(--tg-c-border);
    border-radius: var(--tg-radius-lg);
    overflow: hidden;
    /* Theme-CSS setzt für article/Listenelemente ein globales padding;
       hier explizit auf 0 zwingen, damit Card-Border-Innenkante an
       die Inhalte (vor allem den Footer-Strip) reicht. */
    padding: 0 !important;
    margin: 0 !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 2px 8px var(--tg-c-shadow);
}
.seminar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px var(--tg-c-shadow-hover);
    border-color: #d6cfbf;
}
.seminar-card__link {
    position: absolute;
    inset: 0;
    z-index: 1;
    text-indent: -9999px;
    overflow: hidden;
}

/* Card-Media (optional, nur wenn Featured Image vorhanden) */
.seminar-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--tg-c-bg-soft);
    overflow: hidden;
}
.seminar-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.seminar-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--tg-c-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.seminar-card__badge--ai {
    background: linear-gradient(135deg, #6e3bd6 0%, var(--tg-c-primary) 100%);
}

/* Card-Body */
.seminar-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 18px;
    gap: 12px;
}
.seminar-card__top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.seminar-card__eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--tg-c-primary);
}
.seminar-card__badge-inline {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tg-c-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
    flex-shrink: 0;
}
.seminar-card__title {
    margin: 0;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--tg-c-text);
    letter-spacing: -0.3px;
}
.seminar-card__teaser {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--tg-c-text-muted);
}

/* Meta-Liste */
.seminar-card__meta {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.seminar-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--tg-c-text-meta);
}
.seminar-card__meta-item::before {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    content: '';
    opacity: 0.7;
}
.seminar-card__meta-item[data-icon="termin"]::before {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a4f56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
}
.seminar-card__meta-item[data-icon="dauer"]::before {
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a4f56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Trainer */
.seminar-card__trainer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--tg-c-text-meta);
    margin-top: 8px;
    padding-bottom: 18px;
}
.seminar-card__avatars {
    display: inline-flex;
}
.seminar-card__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    margin-left: -10px;
    background: var(--tg-c-bg-soft);
    box-shadow: 0 1px 2px var(--tg-c-shadow);
}
.seminar-card__avatar:first-child {
    margin-left: 0;
}
.seminar-card__trainer-names strong,
.seminar-card__trainer-names b {
    color: var(--tg-c-text);
}

/* Footer (helles Grau, full-width, am unteren Rand) */
.seminar-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 16px 24px;
    background: #f5f6f7;
    gap: 12px;
}
.seminar-card__price {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.35;
}
.seminar-card__price-line {
    font-size: 14px;
    color: var(--tg-c-text);
}
.seminar-card__price-label {
    font-size: 14px;
    color: var(--tg-c-text);
    font-weight: 400;
}
.seminar-card__price-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--tg-c-text);
}
.seminar-card__price-vat {
    font-size: 14px;
    color: var(--tg-c-text);
    font-weight: 400;
}
.seminar-card__cta {
    position: relative;
    z-index: 0;
    align-self: center;
    padding: 10px 18px;
    background: var(--tg-c-cta);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--tg-radius);
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
    /* Stretched-Link-Pattern: der gesamte Card-<a> liegt darüber
       (.seminar-card__link mit z-index: 1). Damit Klicks auf den
       optisch klickbaren CTA-Button trotzdem zur Detail-Seite gehen,
       lassen wir die Maus-Events durchfallen. */
    pointer-events: none;
}
.seminar-card:hover .seminar-card__cta {
    background: var(--tg-c-cta-dark);
}

/* Empty State */
.themengebiet-empty {
    padding: 48px;
    text-align: center;
    color: var(--tg-c-text-meta);
    background: var(--tg-c-bg-soft);
    border-radius: var(--tg-radius-lg);
    font-size: 16px;
    margin-bottom: 48px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .themengebiet-hero {
        padding: 40px 20px 48px;
    }
    .themengebiet-hero__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .themengebiet-hero__badges {
        justify-content: flex-start;
    }
    .themengebiet-hero__badge img {
        height: 180px;
    }
    .themengebiet-hero__title {
        font-size: 42px;
    }
}
@media (max-width: 640px) {
    .themengebiet-hero__title {
        font-size: 32px;
    }
    .themengebiet-hero__teaser {
        font-size: 16px;
    }
    .themengebiet-hero__badge img {
        height: 150px;
        max-width: 110px;
    }
    .seminar-grid {
        grid-template-columns: 1fr;
    }
    .seminar-card__footer {
        flex-direction: column;
        align-items: stretch;
    }
    .seminar-card__cta {
        text-align: center;
    }
}
