/* =========================================================
   BD JOBS – Karriere-spezifische Styles
   Abhängigkeit: core-components.css (bd-core-components) muss vorher laden.

   Hier stehen AUSSCHLIESSLICH Klassen, die nur auf
   Karriere-Single/Archive/Tax-Seiten gerendert werden.
   ========================================================= */

/* Bewerbungsformular: an den Seiteninhalt angepasste Formularvariante. */
.bd-job-application-page .bd-form--application {
    --bd-form-bg: var(--bd-color-white);
    background: var(--bd-form-bg);
    padding-block: var(--bd-space-4) var(--bd-space-5);
}

.bd-form--application .bd-form__intro {
    max-width: none;
    margin-inline: 0;
    margin-bottom: var(--bd-space-4);
    text-align: left;
}

.bd-form--application .bd-form__headline {
    max-width: none;
    font-size: var(--bd-fs-h2);
}

.bd-form--application .bd-form__lead {
    max-width: none;
    margin-inline: 0;
    font-size: var(--text-body);
    line-height: var(--leading-base);
}

.bd-form--application .bd-form__form {
    padding: 0;
    border: 0;
    box-shadow: none;
    transform: none;
}

.bd-form--application .md-form > .md-heading:first-child {
    margin: 0;
}

.bd-form--application .md-heading :is(h2, h3, h4) {
    max-width: none;
}

/* Die lange Herkunftsfrage bleibt auch bei schmalen Viewports lesbar. */
.bd-form--application .md-field:has(select[name="zusatz"]) {
    grid-column: span 12;
}

.bd-form--application .md-field:has(select[name="zusatz"]) .md-label {
    position: static;
    display: block;
    margin-bottom: var(--space-sm);
    padding: 0;
    background: transparent;
    color: var(--bd-color-body);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-base);
    pointer-events: auto;
}

.bd-form--application .md-field:has(select[name="zusatz"]) .md-label::before {
    display: none;
}

.bd-form--application .md-field .md-control select.wpcf7-form-control[name="zusatz"] {
    color: var(--bd-color-body);
}


/* =========================================================
   HERO BADGES (Single Job)
   ========================================================= */

body.single-karriere .bd-job-content h1,
body.single-karriere .bd-job-content h2,
body.single-karriere .bd-job-content h3,
body.single-karriere .bd-job-content .bd-h1,
body.single-karriere .bd-job-content .bd-h2,
body.single-karriere .bd-job-content .bd-h3,
body.single-karriere .bd-related-card h3,
body.single-karriere .bd-related-card .bd-h4 {
    -webkit-hyphens: none;
    hyphens: none;
    overflow-wrap: normal;
    word-break: normal;
}


@media (max-width: 640px) {


    body.bd-job-application .footer__social-bar {
        display: none;
    }
}

.bd-job-badges {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.bd-job-badge,
.bd-job-badge:link,
.bd-job-badge:visited {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 32px;
    line-height: 1;
    padding: 8px 16px;
    background: var(--bd-color-primary);
    backdrop-filter: blur(6px);
    color: var(--bd-color-white);
    border-radius: var(--bd-radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    text-decoration: none;
}

.bd-job-badge--kununu {
    background: var(--bd-color-white);
    color: var(--bd-color-darker);
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.bd-job-badge i { line-height: 1; }
.bd-job-badge--kununu i { color: #ffc107; }


/* =========================================================
   SECTION-SPACING (P0-4: bisher fehlte CSS für die Block-Sections)
   bd-job-* sind Marker-Klassen aus den ACF-Blocks und Templates.
   ========================================================= */

.bd-job-content > .bd-content-section,
.bd-job-content > .bd-job-intro,
.bd-job-content > .bd-job-tasks,
.bd-job-content > .bd-job-profile,
.bd-job-content > .bd-job-benefits,
.bd-job-content > .bd-job-faq,
.bd-job-content > .bd-job-section-misc,
.bd-job-content > .bd-job-about,
.bd-job-content > .bd-job-related,
.bd-job-content > .bd-job-opening,
.bd-job-content > section {
    margin-block: var(--bd-space-4) var(--bd-space-5);
}

.bd-job-content > section:first-child { margin-top: 0; }
.bd-job-content > section:last-child { margin-bottom: 0; }

.bd-job-content-lead {
    max-width: 62ch;
    margin: 0;
    color: var(--bd-color-darker);
    font-size: clamp(1.1rem, 1.2vw, 1.28rem);
    font-weight: 600;
    line-height: 1.55;
}

.bd-job-opening {
    position: relative;
    overflow: hidden;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--bd-color-border);
    border-left: 4px solid var(--bd-color-primary);
    border-radius: var(--bd-radius-l);
    background: linear-gradient(135deg, var(--bd-color-white) 0%, var(--bd-color-secondary) 100%);
}

.bd-job-opening::after {
    position: absolute;
    top: -4rem;
    right: -4rem;
    width: 11rem;
    height: 11rem;
    border: 1px solid color-mix(in srgb, var(--bd-color-primary) 15%, transparent);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.bd-job-opening > .bd-job-intro,
.bd-job-content > .bd-job-opening {
    margin-top: 0;
}

.bd-job-opening > .bd-job-intro {
    margin-bottom: 0;
}

.bd-job-opening > .bd-job-intro + .bd-job-intro {
    margin-top: var(--bd-space-3);
    padding-top: var(--bd-space-3);
    border-top: 1px solid var(--bd-color-border);
}

.bd-job-opening--archive h2 {
    margin: 0 0 0.75rem;
}

.bd-job-opening--archive .bd-job-content-lead {
    margin-bottom: 0.85rem;
}

.bd-job-opening--archive .bd-section-content > p:last-child,
.bd-job-opening--single .bd-job-intro:last-child p:last-child {
    margin-bottom: 0;
}

.bd-job-opening--single .bd-job-intro:not(.bd-job-intro--lead) {
    color: var(--bd-color-body);
    font-size: 1rem;
    line-height: 1.7;
}

@media (max-width: 640px) {
    .bd-job-opening {
        padding: 1.35rem;
        border-radius: var(--bd-radius-m);
    }

    .bd-job-content-lead {
        font-size: 1.08rem;
    }
}

/* About-Block am Ende der Single-Job */
.bd-job-about {
    background: var(--bd-color-secondary);
    border-radius: var(--bd-radius-l);
    padding: clamp(1.25rem, 4vw, 2.5rem);
    overflow-wrap: anywhere;
    hyphens: auto;
    margin-top: var(--bd-space-5);
}

.bd-job-about-content {
    max-width: var(--bd-container-narrow);
    margin-inline: auto;
}

.bd-job-about-content > .brlbs-cmpnt-container,
.bd-job-about-content > .BorlabsCookie,
.bd-job-about-content > iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1.5rem 0;
    overflow: hidden;
    border-radius: var(--bd-radius-l);
    min-width: 100%;
    max-width: 100%;
}

.bd-job-about-content > .brlbs-cmpnt-container iframe,
.bd-job-about-content > .BorlabsCookie iframe,
.bd-job-about-content > iframe {
    width: 100%;
    height: 100%;
    border: 0;
    min-width: 100%;
    max-width: 100%;
    min-height: 100%;
    max-height: 100%;
}

/* "Section misc": Resttext zwischen den ACF-Blöcken */
.bd-job-section-misc {
    font-size: var(--bd-fs-content);
    line-height: 1.7;
    color: var(--bd-color-body);
}


/* =========================================================
   SIDEBAR: ACTION WIDGET
   ========================================================= */

.bd-action-meta,
.bd-action-secondary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    width: 100%;
    line-height: 1.3;
}

.bd-action-meta {
    margin-top: 1rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.bd-action-secondary {
    color: var(--bd-color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.bd-action-secondary:hover {
    color: var(--bd-color-hover);
    text-decoration: underline;
}

.bd-action-meta i,
.bd-action-secondary i {
    width: 24px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    text-align: center;
}

.bd-widget .bd-action-divider {
    margin: 1rem 0;
    border-top: 1px solid var(--bd-color-border);
    opacity: 0.6;
}


/* =========================================================
   SIDEBAR: FACTS WIDGET
   ========================================================= */

.bd-facts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.bd-fact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.bd-fact-icon {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.15em;
    color: var(--bd-color-primary);
}

.bd-fact-content {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.bd-fact-highlight {
    font-weight: 700;
    font-size: 1rem;
    color: var(--bd-color-darker);
    margin-bottom: 0.2rem;
}

.bd-fact-sub {
    font-size: 0.85rem;
    color: var(--color-muted);
}


/* =========================================================
   JOB CORE (Aufgaben + Profil)
   ========================================================= */

.bd-job-core-item {
    background: var(--bd-color-white);
    border: 1px solid var(--bd-color-border);
    border-radius: var(--bd-radius-l);
    padding: 2.75rem;
    transition: all 0.25s ease;
}

.bd-job-core-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--bd-shadow-card-hover);
    border-color: transparent;
}

.bd-job-core-item .bd-section-title {
    font-size: 1.3rem;
    margin-bottom: 1.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bd-color-border);
    position: relative;
}

.bd-job-core-item .bd-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 64px;
    height: 3px;
    background: var(--bd-color-primary);
}

.bd-job-details-styled ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bd-job-details-styled li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.85rem;
    font-size: 1.125rem;
    line-height: 1.55;
    color: var(--bd-color-darker);
}

.bd-job-details-styled li::before {
    content: "\f00c";
    font-family: "Font Awesome 7 Pro", "Font Awesome 6 Pro", "Font Awesome 5 Pro", sans-serif;
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.35em;
    color: var(--bd-color-primary);
    font-size: 1.05rem;
}

.bd-job-core-item[data-job-section="ihr-profil"] li::before {
    content: "\f058";
    color: var(--bd-color-primary-65);
}

@media (max-width: 768px) {
    .bd-job-core-item { padding: 2rem; }
}

body.single-karriere .bd-layout-main,
body.tax-bd_job_category .bd-layout-main,
body.post-type-archive-karriere .bd-layout-main {
    align-items: start;
}

@media (max-width: 1179px) {
    body.single-karriere .bd-layout-main,
    body.tax-bd_job_category .bd-layout-main,
    body.post-type-archive-karriere .bd-layout-main {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 1180px) {
    body.single-karriere .bd-layout-main,
    body.tax-bd_job_category .bd-layout-main,
    body.post-type-archive-karriere .bd-layout-main {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    }
}

body.single-karriere .bd-job-details-styled {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--bd-space-4);
}

@media (min-width: 1024px) {
    body.single-karriere .bd-job-details-styled {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

body.single-karriere .bd-job-details-styled > [class*="bd-col"] {
    grid-column: auto;
    min-width: 0;
}


/* =========================================================
   BENEFITS
   ========================================================= */

.bd-benefits-section {
    padding: 2.4rem 0;
    background: linear-gradient(
        180deg,
        var(--bd-color-secondary) 0%,
        var(--bd-color-white) 100%
    );
}

.bd-benefits-section .bd-job-section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.bd-benefits-grid {
    row-gap: 4rem;
    align-items: start;
}

.bd-benefit-card {
    min-width: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.bd-benefit-inner {
    position: relative;
    min-width: 0;
    width: 100%;
    max-width: 460px;
    padding-left: 5rem;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.bd-benefit-inner::before {
    content: "";
    position: absolute;
    left: 1.6rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bd-color-primary-15);
}

.bd-benefit-header {
    display: flex;
    align-items: center;
    min-height: 56px;
    margin-bottom: 0.45rem;
}

.bd-benefit-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bd-color-primary);
    color: var(--bd-color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: var(--bd-shadow-elevated);
}

.bd-benefit-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
    padding: 0;
}

.bd-benefit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    line-height: 1.55;
}

.bd-benefit-list li {
    margin-bottom: 0.35rem;
    font-size: 1.125rem;
    line-height: 1.55;
    color: var(--bd-color-body);
}

@media (max-width: 768px) {
    .bd-benefits-section { padding: 4rem 1.5rem; }
    .bd-benefits-section .bd-job-section-title { font-size: 1.55rem; margin-bottom: 2.5rem; }
    .bd-benefit-inner { max-width: 100%; padding-left: 4rem; }
    .bd-benefit-inner::before { left: 1.3rem; }
    .bd-benefit-header { min-height: 48px; }
    .bd-benefit-icon { width: 48px; height: 48px; font-size: 1.2rem; }
    .bd-benefit-title { font-size: 1.15rem; }
}


/* =========================================================
   JOB DIVERSITY – Footer Disclaimer
   ========================================================= */

.bd-job-diversity {
    margin: 2rem 0;
    padding: 2rem 0 0;
}

.bd-job-diversity .bd-container {
    max-width: var(--bd-container-narrow);
}

.bd-job-diversity p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--color-muted);
    text-align: center;
}


/* =========================================================
   RELATED JOBS
   ========================================================= */

.bd-job-related {
    margin-top: 7rem;
    padding-top: 4rem;
    border-top: 1px solid var(--bd-color-border);
}

.bd-job-related .bd-headline-group { margin-bottom: 3rem; }

.bd-headline-sub {
    margin-top: 0.5rem;
    text-align: center;
}

.bd-headline-sub p { margin: 0; }

.bd-related-card {
    display: flex;
    flex-direction: column;
    background: var(--bd-color-white);
    border: 1px solid var(--bd-color-border);
    border-radius: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease;
}

.bd-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--bd-shadow-strong);
}

.bd-related-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    overflow: hidden;
}

.bd-related-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    transition: transform .4s ease;
}

.bd-related-card:hover .bd-related-img { transform: scale(1.04); }

.bd-related-content {
    padding: 1.5rem 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.bd-related-content .bd-h4 {
    margin-bottom: 1rem;
    line-height: 1.25;
}

.bd-teaser-link {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--bd-color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.bd-teaser-link i {
    font-size: 0.85rem;
    transition: transform .2s ease;
}

.bd-related-card:hover .bd-teaser-link i { transform: translateX(4px); }

@media (max-width: 640px) {
    .bd-job-related { margin-top: 5rem; padding-top: 3rem; }
    .bd-related-content { padding: 1.25rem 1.25rem 1.5rem; }
}


/* =========================================================
   ARCHIVE / LANDINGPAGE (KARRIERE)
   ========================================================= */

body.post-type-archive-karriere .bd-benefit-list li,
body.tax-bd_job_category .bd-benefit-list li,
body.single-karriere .bd-benefit-list li {
    font-weight: 400;
}

/* Job List Items (Aktuelle Stellenangebote) */
.bd-job-list-item {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem 2rem;
    border: 1px solid var(--bd-color-border);
    border-radius: var(--bd-radius-m);
    background: var(--bd-color-white);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (min-width: 768px) {
    .bd-job-list-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.bd-job-list-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--bd-shadow-card);
    border-color: var(--bd-color-primary);
}

.bd-job-list-title {
    margin: 0 0 0.4rem 0;
    font-size: 1.25rem;
    color: var(--bd-color-primary);
    line-height: 1.3;
}

.bd-job-list-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.bd-job-list-item .btn {
    border-radius: var(--bd-radius-pill);
    padding: 0.5em 1.5em;
}


/* Process Steps (Ihr Weg zu uns) */
.bd-process-step {
    border: 1px solid var(--bd-color-border);
    border-radius: var(--bd-radius-m);
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--bd-color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bd-process-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bd-color-primary);
    color: var(--bd-color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-weight: 700;
    font-size: 1.4rem;
    box-shadow: var(--bd-shadow-elevated);
    border: none;
}

.bd-process-step p {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.5;
}


/* =========================================================
   AUSBILDUNGSBETRIEB (Azubi-Taxonomy)
   ========================================================= */

.bd-training-image img {
    width: 100%;
    height: auto;
    border-radius: var(--bd-radius-s);
    display: block;
}

.bd-award-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bd-color-secondary);
    color: var(--bd-color-primary);
    font-size: 30px;
}

@media (max-width: 900px) {
    .bd-content-section .bd-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
