/* ==========================================================================
   Single Vacancy / Job Detail – Redesign
   Theme: #293262 (dark blue), #00a285 (teal), #fff
   ========================================================================== */

/* ── Pull page flush against sticky nav ── */
body.single-vacancy .container {
    margin-top: 0;
    padding-top: 0;
}

.job-detail {
    margin: 0;
    padding: 0;
}

/* ── Navigation Buttons ── */
.job-detail__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 70rem;
    margin: 0 auto;
    padding: 1.25rem 1rem;
}

.job-detail__nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #293262;
    background: rgba(41, 50, 98, 0.06);
    border: 1px solid rgba(41, 50, 98, 0.15);
    border-radius: 6px;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.job-detail__nav-btn:hover {
    background: #293262;
    color: #fff;
    border-color: #293262;
    transform: translateX(-2px);
}

.job-detail__nav-btn--cat {
    background: rgba(0, 162, 133, 0.08);
    border-color: rgba(0, 162, 133, 0.25);
    color: #00a285;
}

.job-detail__nav-btn--cat:hover {
    background: #00a285;
    color: #fff;
    border-color: #00a285;
}

.job-detail__nav-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* ── Hero Banner ── */
.job-detail__hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    background-color: #293262;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.job-detail__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(41, 50, 98, 0.92) 0%,
        rgba(41, 50, 98, 0.6) 50%,
        rgba(41, 50, 98, 0.25) 100%
    );
}

.job-detail__hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 70rem;
    margin: 0 auto;
    padding: 1.25rem 1rem 1.5rem;
    color: #fff;
}

.job-detail__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #00a285;
    background: rgba(0, 162, 133, 0.15);
    border: 1px solid rgba(0, 162, 133, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(8px);
}

.job-detail__title {
    font-size: clamp(1.5rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #fff;
}

.job-detail__meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.job-detail__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.job-detail__meta-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* ── Body: Content + Sidebar ── */
.job-detail__body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 70rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

@media screen and (min-width: 64em) {
    .job-detail__body {
        grid-template-columns: 1fr 320px;
        gap: 2.5rem;
        padding: 2.5rem 1rem 4rem;
    }
}

/* ── Content Card (glassmorphism) ── */
.job-detail__card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(41, 50, 98, 0.08);
    border-radius: 12px;
    padding: 2rem 2rem 2.5rem;
    box-shadow: 0 4px 24px rgba(41, 50, 98, 0.06);
}

.job-detail__entry h2,
.job-detail__entry h3,
.job-detail__entry h4 {
    color: #293262;
    margin-top: 1.75rem;
}

.job-detail__entry h2:first-child,
.job-detail__entry h3:first-child,
.job-detail__entry h4:first-child {
    margin-top: 0;
}

.job-detail__entry p {
    color: #333;
    margin-bottom: 1rem;
}

.job-detail__entry ul,
.job-detail__entry ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.job-detail__entry li {
    margin-bottom: 0.35rem;
    color: #444;
}

.job-detail__entry li::marker {
    color: inherit;
}

.job-detail__entry a {
    color: #293262;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.job-detail__entry a:hover {
    border-bottom-color: #293262;
}

.job-detail__entry strong {
    color: #293262;
}

/* ── Sidebar ── */
.job-detail__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── CTA Card ── */
.job-detail__cta-card {
    background: linear-gradient(135deg, #293262 0%, #1e2650 100%);
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    color: #fff;
    text-align: center;
}

.job-detail__cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}

.job-detail__cta-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.job-detail__cta-btn {
    display: inline-block;
    background: #00a285;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.7rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.25s ease, transform 0.25s ease;
}

.job-detail__cta-btn:hover {
    background: #00b894;
    color: #fff;
    transform: translateY(-2px);
}

/* ── Contact Card ── */
.job-detail__contact-card {
    background: rgba(41, 50, 98, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(41, 50, 98, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.job-detail__contact-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #293262;
    margin: 0 0 0.75rem;
}

.job-detail__contact-card .widget {
    margin: 0;
    padding: 0;
}

.job-detail__contact-card .sub-header {
    display: none; /* Title already provided */
}

.job-detail__contact-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.job-detail__contact-card .widget_sp_image-description {
    font-size: 0.875rem;
    color: #444;
}

.job-detail__contact-card .widget_sp_image-description a {
    color: #00a285;
    text-decoration: none;
}

.job-detail__contact-card .widget_sp_image-description a:hover {
    text-decoration: underline;
}

/* Hide the "Unsere Jobs" sidebar widget in the contact card */
.job-detail__contact-card .widget_text {
    display: none;
}

/* ── Extra Widget (below contact card) ── */
.job-detail__extra-widget {
    background: #293262;
    border-radius: 12px;
    padding: 1.25rem 1.5rem 1.5rem;
    margin-top: 1rem;
    color: #fff;
}
.job-detail__widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.85rem;
}
.job-detail__extra-widget .widget {
    margin: 0;
    padding: 0;
}
/* Style vacancy links inside the widget */
.job-detail__extra-widget .vacancy-entry {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.job-detail__extra-widget .vacancy-entry:last-child {
    border-bottom: none;
}
.job-detail__extra-widget .vacancy-entry a {
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    display: block;
    transition: color 0.2s;
}
.job-detail__extra-widget .vacancy-entry a:hover {
    color: #00a285;
}
/* Hide the wrapping container title from the shortcode (we use the widget title instead) */
.job-detail__extra-widget .featured-vacancies-title {
    display: none;
}
.job-detail__extra-widget-cta {
    display: block;
    margin-top: 1rem;
    text-align: center;
    padding: 0.5rem 1rem;
    border: 1.5px solid #00a285;
    border-radius: 6px;
    color: #00a285;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.2s, color 0.2s;
}
.job-detail__extra-widget-cta:hover {
    background: #00a285;
    color: #fff;
}

/* ── Action Bar (Print + Share) ── */
.job-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-width: 70rem;
    margin: 0 auto;
    padding: 0 1rem 2.5rem;
}

.job-detail__action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(41, 50, 98, 0.15);
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    background: rgba(41, 50, 98, 0.05);
    color: #293262;
    font-family: inherit;
    line-height: 1.4;
}

.job-detail__action-btn:hover {
    background: #293262;
    color: #fff;
    border-color: #293262;
}

.job-detail__action-btn--whatsapp {
    background: rgba(37, 211, 102, 0.08);
    border-color: rgba(37, 211, 102, 0.3);
    color: #128c7e;
}

.job-detail__action-btn--whatsapp:hover {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

.job-detail__action-btn svg {
    flex-shrink: 0;
}

/* ── Responsive ── */
@media screen and (min-width: 40em) {
    .job-detail__hero-content {
        padding: 1.5rem 2rem 2rem;
    }
    .job-detail__card {
        padding: 2.5rem 3rem 3rem;
    }
}

@media screen and (min-width: 64em) {
    .job-detail__hero-content {
        padding: 2rem 2rem 2.5rem;
    }
}

/* ==========================================================================
   PRINT-ONLY: Header & Footer (hidden on screen)
   ========================================================================== */
.print-header,
.print-footer {
    position: absolute;
    left: -9999px;
    visibility: hidden;
}

/* ==========================================================================
   @media print – Custom Print Template
   ========================================================================== */
@media print {

    /* ── Reset page – tight margins for max content space ── */
    @page {
        size: A4 portrait;
        margin: 10mm 12mm 12mm 12mm;
    }

    /* ── Hide everything from the WordPress theme chrome ── */
    body.single-vacancy .sticky-header,
    body.single-vacancy .top-bar,
    body.single-vacancy .off-canvas,
    body.single-vacancy .off-canvas-wrap,
    body.single-vacancy header.header,
    body.single-vacancy nav,
    body.single-vacancy .title-bar,
    body.single-vacancy footer,
    body.single-vacancy .footer,
    body.single-vacancy .footer-container,
    body.single-vacancy #cookie-notice,
    body.single-vacancy #print-button {
        display: none !important;
    }

    /* ── Hide non-content sections ── */
    .job-detail__hero,
    .job-detail__nav,
    .job-detail__sidebar,
    .job-detail__actions {
        display: none !important;
    }

    /* ── Reset layout ── */
    body, html {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        font-size: 9pt !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .job-detail {
        margin: 0;
        padding: 0;
    }

    body.single-vacancy .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .job-detail__body {
        display: block !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* ── Show Print Header ── */
    .print-header {
        position: static !important;
        left: auto !important;
        visibility: visible !important;
        display: block !important;
        margin-bottom: 1.5rem;
        padding: 0.5rem 0;
        border-top: 2px solid #293262;
        border-bottom: 2px solid #293262;
        page-break-after: avoid;
    }

    .print-header__cat {
        display: inline-block;
        font-size: 7pt;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: #00a285;
        border: 1px solid #00a285;
        padding: 1px 6px;
        border-radius: 2px;
        margin-bottom: 3px;
    }

    .print-header__title {
        font-size: 16pt;
        font-weight: 800;
        color: #293262;
        margin: 2px 0 2px;
        line-height: 1.2;
    }

    .print-header__city {
        font-size: 9pt;
        color: #555;
    }

    /* ── Content Card: flatten for print ── */
    .job-detail__card {
        background: none !important;
        backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .job-detail__entry h2,
    .job-detail__entry h3,
    .job-detail__entry h4 {
        color: #293262 !important;
        font-size: 11pt;
        margin-top: 1.1rem;
        margin-bottom: 0.35rem;
        page-break-after: avoid;
    }

    .job-detail__entry h2:first-child,
    .job-detail__entry h3:first-child {
        margin-top: 0.4rem;
    }

    .job-detail__entry p {
        font-size: 9pt;
        line-height: 1.6;
        color: #222 !important;
        margin-bottom: 0.6rem;
        orphans: 3;
        widows: 3;
    }

    .job-detail__entry li {
        font-size: 9pt;
        line-height: 1.55;
        color: #222 !important;
        margin-bottom: 0.2rem;
    }

    .job-detail__entry ul,
    .job-detail__entry ol {
        margin-top: 0.25rem;
        margin-bottom: 0.75rem;
        padding-left: 1.2rem;
    }

    .job-detail__entry a {
        color: #00a285 !important;
        text-decoration: none !important;
    }

    /* ── Show Print Footer ── */
    .print-footer {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        visibility: visible !important;
        display: block !important;
        padding: 0;
        margin: 0;
    }

    .print-footer__line {
        margin-bottom: 0.4rem;
    }

    .print-footer__content {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        font-size: 7.5pt;
        color: #555;
        line-height: 1.5;
    }

    .print-footer__left {
        flex: 1;
    }

    .print-footer__qr {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-left: 1rem;
    }

    .print-footer__qr-img {
        width: 100px !important;
        height: 100px !important;
        display: block !important;
    }

    .print-footer__qr-label {
        font-size: 6.5pt;
        color: #777;
        margin-top: 2px;
    }

    /* ── Page break hints ── */
    .job-detail__entry h2,
    .job-detail__entry h3 {
        page-break-after: avoid;
    }

    .job-detail__entry ul,
    .job-detail__entry ol {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}
