/* ================== BASE STYLES ================== */

:root {
    --orange: #F7941D;
    --blue: #0055A1;
    --bg-light: #f5f5f7;
    --text-main: #111111;
    --radius-card: 30px;
    --shadow-soft: 0 22px 45px rgba(15, 15, 15, 0.10);
    --shadow-strong: 0 28px 60px rgba(15, 15, 15, 0.18);
    --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--text-main);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

/* ================== GLOBAL HEADER ================== */

.main-header,
.site-header {
    position: absolute;           /* nicht mehr fixed – liegt direkt über dem Hero */
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: transparent;      /* kein Weiß mehr */
    background-color: transparent !important;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: flex;
    align-items: center;
    padding: 0 32px;
    z-index: 9999;
}

/* Startseite (index) */
.main-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.main-header-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

/* Bewerbungsseite (bewerbung.html) */
.site-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.site-header-logo,
.site-header img.header-logo {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.site-header-title {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
}

/* ================== HERO SECTION ================== */

.hero {
    margin-top: 0;          /* kein Abstand mehr nach oben */
    position: relative;
    height: 100vh;
    min-height: 520px;
    max-height: none;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 28%;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.55), rgba(0,0,0,0.2));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    margin-left: 8%;
    max-width: 600px;
    color: #ffffff;
}

.hero-content h1 {
    font-size: clamp(2.4rem, 3.5vw, 3.6rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: 0.01em;
    margin-bottom: 18px;
}

.highlight-orange { color: var(--orange); }
.highlight-blue   { color: var(--blue); }

.hero-content p {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 520px;
    margin-bottom: 26px;
    opacity: 0.95;
}

/* ================== JOB SECTION ================== */

.section {
    padding: 96px 6% 120px;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    margin-bottom: 56px;
}

.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    max-width: 1120px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    .job-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }
}

.job-card {
    position: relative;
    text-align: left;
    background: rgba(255, 255, 255, 0.78);
    border-radius: var(--radius-card);
    padding: 26px 24px 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition:
        transform 0.2s ease-out,
        box-shadow 0.2s ease-out,
        border-color 0.2s ease-out,
        background 0.2s ease-out;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(247, 148, 29, 0.45);
    background: rgba(255, 255, 255, 0.92);
}

.job-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.job-location-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff6eb, #ffe8cf);
    color: #b45a00;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.job-card ul {
    margin: 0 0 20px;
    padding-left: 1.1rem;
    color: #3f3f3f;
    font-size: 0.95rem;
}

.job-card ul li {
    margin-bottom: 4px;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 22px;
    background: var(--orange);
    color: #ffffff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    box-shadow: 0 10px 22px rgba(247, 148, 29, 0.45);
    transition:
        transform 0.16s ease-out,
        box-shadow 0.16s ease-out,
        background 0.16s ease-out;
    cursor: pointer;
}

.job-card .btn-card {
    margin-left: 0;
    margin-right: 0;
}

.btn-card:hover {
    background: #ff9e2c;
    box-shadow: 0 14px 30px rgba(247, 148, 29, 0.6);
    transform: translateY(-2px);
    animation: btnPulse 0.5s ease-out;
}

@keyframes btnPulse {
    0% {
        transform: translateY(-2px) scale(1);
        box-shadow: 0 14px 30px rgba(247, 148, 29, 0.6);
    }
    50% {
        transform: translateY(-3px) scale(1.03);
        box-shadow: 0 18px 40px rgba(247, 148, 29, 0.8);
    }
    100% {
        transform: translateY(-2px) scale(1);
        box-shadow: 0 14px 30px rgba(247, 148, 29, 0.6);
    }
}

/* Hero CTA Button (Startseite) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    background: var(--orange);
    color: #ffffff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: none;
    box-shadow: 0 10px 22px rgba(247, 148, 29, 0.45);
    cursor: pointer;
    transition:
        transform 0.16s ease-out,
        box-shadow 0.16s ease-out,
        background 0.16s ease-out;
}

.btn-primary:hover {
    background: #ff9e2c;
    box-shadow: 0 14px 30px rgba(247, 148, 29, 0.6);
    transform: translateY(-2px);
}

/* Speziell im Hero etwas Abstand nach oben */
.hero .btn-primary {
    margin-top: 8px;
}

/* ================== FOOTER ================== */

.footer {
    background: #111111;
    color: #ffffff;
    padding: 22px 6%;
    font-size: 0.9rem;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.85;
}

.footer a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ================== RESPONSIVE ================== */

@media (max-width: 768px) {
    .hero {
        height: 70vh;
        min-height: 460px;
        align-items: flex-end;
    }

    .hero-content {
        margin-left: 6%;
        margin-right: 6%;
        margin-bottom: 40px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .section {
        padding: 72px 5% 96px;
    }
}

/* ================== MODAL / LIGHTBOX ================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    position: relative;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 24px;
    padding: 22px 22px 18px;
    max-width: 480px;
    width: calc(100% - 32px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.modal-label {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 14px 0 6px;
}

.modal-select {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid #d0d0d0;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.modal-submit.btn-primary {
    width: 100%;
    justify-content: center;
}

/* ================== JOB DETAIL PAGE (bewerbung.html) ================== */

.job-detail-page {
    min-height: 100vh;
    padding: 160px 6% 160px;
    background: radial-gradient(circle at top left, #fef8f2 0, #f5f5f7 42%, #f0f2f7 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.job-detail-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 32px;
    padding: 40px 52px 36px;
    box-shadow: var(--shadow-strong);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    position: relative;
    overflow: hidden;
}

.job-detail-container::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
    opacity: 0.9;
}

.job-detail-container > * {
    position: relative;
    z-index: 1;
}

.job-detail-hero {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
}

.job-detail-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f5f5f7;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #8e8e93;
    margin-bottom: 10px;
}

.job-detail-hero h1 {
    font-size: 2.4rem;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--text-main);
    letter-spacing: 0.01em;
}

.job-detail-meta {
    font-size: 0.95rem;
    color: #6b6b6b;
    margin-bottom: 10px;
}

.job-detail-meta span + span::before {
    content: "•";
    margin: 0 6px;
    color: #c0c0c0;
}

/* Dynamischer Beschreibungstext aus jobs.js */
#job-description {
    font-size: 1.02rem;
    line-height: 1.7;
    color: #222;
}

#job-description p {
    margin-bottom: 0.9rem;
}

#job-description h2,
#job-description h3 {
    margin-top: 28px;
    margin-bottom: 8px;
    font-size: 1.18rem;
    font-weight: 800;
}

#job-description ul {
    padding-left: 1.4rem;
    margin: 0.2rem 0 1.3rem;
}

#job-description ul li {
    margin-bottom: 6px;
    color: #444;
}

/* Einzelne Sektionen innerhalb der Stellenbeschreibung */
.job-detail-section {
    margin-bottom: 20px;
}

/* Bewerbungsbereich unter der Stellenbeschreibung */
.job-detail-apply {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ececec;
}

.job-detail-apply h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.job-detail-apply p {
    font-size: 0.97rem;
    color: #4b4b4b;
    margin-bottom: 18px;
}

.apply-form label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    font-size: 0.95rem;
}

.apply-form input,
.apply-form textarea,
.apply-form select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #d3d3d3;
    font-size: 1rem;
    margin-bottom: 18px;
    background: #fafafa;
    transition: border-color 0.16s ease-out, box-shadow 0.16s ease-out, background-color 0.16s ease-out;
}

.apply-form input:focus,
.apply-form textarea:focus,
.apply-form select:focus {
    outline: none;
    border-color: var(--orange);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.18);
}

.apply-form textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--orange);
    color: #ffffff;
    font-weight: 700;
    border-radius: 999px;
    border: none;
    box-shadow: 0 10px 22px rgba(247,148,29,0.45);
    cursor: pointer;
    transition: 0.2s ease-out;
}

.btn-apply:hover {
    background: #ff9e2c;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(247,148,29,0.55);
}

/* Back Link */
.back-link {
    display: inline-flex;
    margin-top: 24px;
    font-size: 0.95rem;
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

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

/* Responsive */
@media (max-width: 768px) {
    .job-detail-container {
        padding: 28px 22px 26px;
        border-radius: 24px;
        box-shadow: var(--shadow-soft);
    }
    .job-detail-hero h1 {
        font-size: 1.9rem;
    }
    .job-detail-page {
        padding: 96px 4% 120px;
    }

    .job-detail-hero h1 {
        font-size: 2rem;
    }
}

/* ==== FIX: HEADER TRANSPARENT & KEIN WEISSER RAND OBEN ==== */

/* Header wirklich komplett transparent machen – egal was vorher definiert ist */
header,
.main-header,
.site-header {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Sicherstellen, dass nichts nach unten geschoben wird */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Falls irgendwo Padding/Margin für den Inhalt gesetzt wurde, oben alles rausnehmen */
main,
.page-wrapper,
.content-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Logo im Hero oben links platzieren */
.hero-logo-wrapper {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 50;
}

.hero-logo-wrapper img {
    width: 220px;
    height: auto;
    display: block;
}

/* Zusätzlicher Fix: Hero wirklich bis ganz nach oben ziehen */
.hero {
    margin-top: 0 !important;      /* Hero beginnt direkt oben, Logo wird nicht abgeschnitten */
}

/* Falls irgendwo noch ein zusätzlicher Wrapper über dem Hero sitzt */
.hero-wrapper,
.hero-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}