/* ================================================================
 * BDL Content-UI v3 — fiveandfriends 2026-10-08
 * Scope: NUR direkte Kinder von #content, keine Shortcut-Inhalte.
 *
 * Lessons v1: #content h2 matcht alles -> Startseite zerschossen.
 * Lessons v2: .frame-type-text h2 matcht auch INNERHALB von Shortcuts.
 *             Startseite hat Hero + News-Teaser als
 *             #content > .frame-type-shortcut > .frame-type-text,
 *             dadurch wurden Hero-Link blau unterstrichen und
 *             News-Teaser-Headlines gross+BDL-blau.
 * v3: Child-Combinator (>) nur noch direkte CEs. Shortcuts behalten
 *     ihre eingebetteten CEs mit Original-Styling.
 * ================================================================ */

/* ---- Headlines-Hierarchie: NUR direkte Kinder von #content ---- */
#content > .frame-type-text h1,
#content > .frame-type-textpic h1,
#content > .frame-type-textmedia h1,
#content > .frame-type-header h1 {
    font-family: var(--f-sans);
    font-size: var(--fs-xxl);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    color: var(--c-blue);
    margin: 0 0 var(--sp-6) 0;
    letter-spacing: -0.025em;
    word-spacing: normal !important;
    text-transform: none !important;
    font-kerning: normal;
    font-feature-settings: "kern" 1, "liga" 1;
}

#content > .frame-type-text h2,
#content > .frame-type-textpic h2,
#content > .frame-type-textmedia h2,
#content > .frame-type-header h2 {
    font-family: var(--f-sans);
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    color: var(--c-blue);
    margin: var(--sp-8) 0 var(--sp-4) 0;
    letter-spacing: -0.02em;
    word-spacing: normal !important;
    text-transform: none !important;
    font-kerning: normal;
    font-feature-settings: "kern" 1, "liga" 1;
}

#content > .frame-type-text h3,
#content > .frame-type-textpic h3,
#content > .frame-type-textmedia h3,
#content > .frame-type-header h3 {
    font-family: var(--f-sans);
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    color: var(--c-ink-soft);
    margin: var(--sp-6) 0 var(--sp-3) 0;
    word-spacing: normal !important;
    text-transform: none !important;
}

#content > .frame-type-text h4,
#content > .frame-type-textpic h4,
#content > .frame-type-textmedia h4,
#content > .frame-type-header h4 {
    font-family: var(--f-sans);
    font-size: var(--fs-md);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    color: var(--c-ink-soft);
    margin: var(--sp-5) 0 var(--sp-2) 0;
    word-spacing: normal !important;
    text-transform: none !important;
}

/* Erste Headline innerhalb jeder harmonisierten Content-Frame ohne
 * Oberabstand — egal wie tief verschachtelt (textpic hat
 * .frame > div > .ce-textpic > div > h2, kein <header>-Wrapper).
 * Trifft nur h1-h4 die first-child auf JEDER Zwischenebene sind —
 * also die "oben in der Box" stehende Headline. Headlines nach einem
 * p oder nach einem h1 (anderes h-Level davor) behalten ihren Abstand. */
#content > :is(.frame-type-text, .frame-type-textpic, .frame-type-textmedia, .frame-type-header) :is(h1, h2, h3, h4):first-child {
    margin-top: 0;
}

/* ---- Body-Text: NUR in direkten Content-CEs ---- */
#content > .frame-type-text p,
#content > .frame-type-textpic p,
#content > .frame-type-textmedia p {
    font-size: var(--fs-base);
    line-height: var(--lh-relaxed);
    color: var(--c-ink);
    margin: 0 0 var(--sp-4) 0;
}

/* ---- Links: NUR in direkten Content-CEs ---- */
#content > .frame-type-text a:not(.btn):not([class*="button"]),
#content > .frame-type-textpic a:not(.btn):not([class*="button"]),
#content > .frame-type-textmedia a:not(.btn):not([class*="button"]) {
    color: var(--c-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    transition: color var(--dur-base) var(--ease);
}

#content > .frame-type-text a:not(.btn):not([class*="button"]):hover,
#content > .frame-type-textpic a:not(.btn):not([class*="button"]):hover,
#content > .frame-type-textmedia a:not(.btn):not([class*="button"]):hover {
    color: var(--c-blue-dark);
    text-decoration-thickness: 2px;
}

/* ---- Generische Buttons: NUR in direkten Content-CEs ---- */
#content > .frame-type-text .btn,
#content > .frame-type-textpic .btn,
#content > .frame-type-textmedia .btn,
#content > .frame-type-text a[class*="button"],
#content > .frame-type-textpic a[class*="button"],
#content > .frame-type-textmedia a[class*="button"] {
    display: inline-block;
    padding: var(--sp-3) var(--sp-6);
    background: var(--c-blue);
    color: #ffffff !important;
    border: 0;
    border-radius: var(--radius-md);
    font-family: var(--f-sans);
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    text-decoration: none !important;
    cursor: pointer;
    transition: background var(--dur-base) var(--ease);
}

#content > .frame-type-text .btn:hover,
#content > .frame-type-textpic .btn:hover,
#content > .frame-type-textmedia .btn:hover,
#content > .frame-type-text a[class*="button"]:hover,
#content > .frame-type-textpic a[class*="button"]:hover,
#content > .frame-type-textmedia a[class*="button"]:hover {
    background: var(--c-blue-dark);
    color: #ffffff !important;
}

/* Shortcut-eingebettete CEs (Hero-Slider, News-Teaser, etc.) sind
 * damit automatisch ausgenommen — sie liegen in
 * #content > .frame-type-shortcut > .frame-type-text, nicht direkt
 * unter #content. Original-Styling bleibt dort erhalten. */

/* ---- Legacy-Content-Buttons .btn-light-blue flach ---- */
/* Werden auf vielen Content-Seiten als Kurz-CTAs genutzt
 * ("Zu unseren Positionen", "Zum BDL-Newsroom" etc.).
 * Vorher: Hintergrund-Pfeil-Icon + hellblauer Hintergrund + Verlauf.
 * Jetzt: Flach BDL-Blau, weisser Text, weisser Chevron rechts.
 * Scope absichtlich NICHT auf #content > frame-type-* beschraenkt:
 * Legacy-Buttons kommen auch in Shortcuts/Hero vor und sollen
 * ueberall gleich aussehen. */
a.btn-light-blue,
a.btn-dark-blue {
    display: inline-block;
    background-color: var(--c-blue) !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5-5 5' stroke='%23ffffff' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 8px 12px !important;
    color: #ffffff !important;
    font-family: var(--f-sans);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    text-decoration: none !important;
    text-shadow: none !important;
    padding: 10px 36px 10px 14px !important;
    border: 0 !important;
    border-radius: var(--radius-md) !important;
    transition: background-color var(--dur-base) var(--ease);
}

a.btn-light-blue:hover,
a.btn-dark-blue:hover {
    background-color: var(--c-blue-dark) !important;
    color: #ffffff !important;
}
