ul, li{
    color: white;
}

/* Slider Section - Below Navbar */
.slider-section {
    margin-top: 80px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: var(--tertiary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.sticky-slideshow {
    position: relative;
    left: 0;
    width: 100%;
    height: 160px;
    margin: 0;
    background-image: url(../src/imgs/career/Slideshow.webp);
    background-size: auto 160px;
    background-repeat: repeat-x;
    background-position: 0 center;
    animation: slideBackgroundSticky 100s linear infinite;
    /* z-index: 100; */
    overflow: hidden;
}


@keyframes slideBackgroundSticky {
    from {
        background-position: 0 center;
    }
    to {
        background-position: -4060.16px center;
    }
}

@keyframes slideBackgroundStickyMobile {
    from {
        background-position: 0 center;
    }
    to {
        background-position: -2537.6px center;
    }
}

.main {
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)),
                      url("../src/imgs/bg/1.webp");
    background-position: 0 center;
    min-height: 40vh;
    max-height: 40vh;
    display: flex;
    background-size: cover;
    align-items: center;
    justify-content: center;
    color: white;
}

@media (max-width: 1100px) {
    .main {
        min-height: auto;
        max-height: none;
        height: auto;
        /* padding: 20px 0; */
    }
}
body{
    background: var(--tertiary-color);
}

@keyframes slideBackground {
    from {
        background-position: 0 center;
    }
    to {
        background-position: -20302px center;
    }
}

.main-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1500px;
    gap: 15rem;
    height: 100%;
    max-height: 40vh;
}

@media (max-width: 1100px) {
    .main-content {
        height: auto;
        max-height: none;
        min-height: 0;
        gap: 2rem;
    }
}

.main-content-left{
    flex: 2;
    display: flex;
    flex-direction: column;
    /* gap: 20px; */
    text-align: left;
    justify-content: center;
}

/* Using global h1 styles with text alignment override */
.main-content-left h1 {
    text-align: left;
}

.main-content-left p {
    font-size: 1.1em;
    color: var(--secondary-color);
    text-align: left;
}

.hero-left-buttons {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.main-content-right {
    flex: 1.5;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-top: 25rem;
}

.main-content-right img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    filter: drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 20px var(--primary-color));
}

.content-section {
    background: var(--tertiary-color);
    padding: 0px 25px;
    position: relative;
    z-index: 1;
}

.overlap-jobcard {
    max-width: 1500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    gap: 40px 20px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    /* background-color: var(--secondary-color); */
    /* border-radius: 10px; */
    padding: 3rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: height 0.3s ease;
    overflow-x: hidden;
    overflow-y: visible;
}

/* Einzelne Karte */
.jobcard {
    background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(231, 121, 25, 0.1);
    overflow: hidden;
    width: 32%; /* Feste Breite für Desktop, passt sich Mobile automatisch an */
    display: flex;
    flex-direction: column;
    padding: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
    position: relative;
    border: 2px solid transparent;
}

/* Subtle glow effect on card */
.jobcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(145deg, var(--primary-color), transparent, var(--primary-color));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.jobcard:hover::before {
    opacity: 0.6;
}

.jobcard:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(231, 121, 25, 0.3), 0 15px 35px rgba(0,0,0,0.5);
    border-color: var(--primary-color);
}

/* Bild oben mit overlay gradient */
.jobcard img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 220px;
    overflow: visible;
    transition: transform 0.4s ease;
    position: relative;
}

.jobcard:hover img {
    transform: scale(1.05);
}

/* Oranges Label mit Gradient und Schatten */
.jobcard-label {
    background: linear-gradient(135deg, #ff8c1a 0%, var(--primary-color) 50%, #d86610 100%);
    color: var(--secondary-color);
    text-align: center;
    padding: 14px 0;
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(231, 121, 25, 0.4);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

/* Animated shine effect on label */
.jobcard-label::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.jobcard:hover .jobcard-label::after {
    left: 150%;
}

.jobcard:hover .jobcard-label {
    box-shadow: 0 6px 20px rgba(231, 121, 25, 0.6);
}

/* Beschreibung mit besserem Background */
.jobcard-description {
    padding: 20px 25px 20px 25px;
    text-align: center;
    z-index: 2;
    background: linear-gradient(180deg, #1f1f1f 0%, #1a1a1a 100%);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Subtle inner glow */
.jobcard-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    opacity: 0.3;
}

.intro-text{
    height: 250px;
    line-height: 1.7;
    font-size: 0.98em;
}

.jobcard-description h3 {
    margin: 10px 0 5px;
    color: var(--primary-color);
}

.jobcard-description p {
    margin: 0;
    font-size: 0.98em;
    color: rgba(255, 255, 255, 0.9);
    align-content: center;
    font-weight: 300;
}

.jobcard-description ul {
    list-style: disc; /* Punkte */
    padding-left: 20px; /* Abstand von links für Punkte */
    margin: 10px 0;    /* optional */
}

/* Hide full-text on desktop in cards */
.full-text {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Hide desktop grid layouts inside cards */
.jobcard .job-details-grid {
    display: none !important;
}

/* Job Detail View - Replaces entire container */
.job-detail-view {
    width: 100%;
    position: relative;
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    background: radial-gradient(circle at 50% 0%, #2a2a2a 50%, #1a1a1a 105%);
    border-radius: 10px;
    border: 3px solid transparent;
    padding: 25px;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.job-detail-view.pop-in {
    opacity: 1;
    transform: scale(1) translateY(0);
    border-color: var(--primary-color);
}

.job-detail-view.fade-out {
    opacity: 0;
    transform: scale(0.9) translateY(30px);
    border-color: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.6, 1);
}

/* Job Detail Header Grid */
.job-detail-header {
    display: grid;
    grid-template-columns: 250px 1fr auto;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--primary-color);
    margin: 0 0 40px 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
    margin: 25px;
}

.job-detail-view.pop-in .job-detail-header {
    opacity: 1;
    transform: translateY(0);
}

.job-detail-header-image {
    width: 250px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.job-detail-header-image:hover {
    transform: scale(1.02);
}

/* Job Detail Title */
.job-detail-title {
    text-align: left;
    color: var(--secondary-color);
    font-size: 2.5em;
    margin: 0;
}

/* Close button for detail view */
.close-detail-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 35px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    flex-shrink: 0;
    align-self: flex-start !important;
}

.close-detail-btn:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    /* transform: rotate(90deg); */
}

/* Job Detail Grid Container - Default 3 columns */
.job-detail-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s;
}

.job-detail-view.pop-in .job-detail-grid-container {
    opacity: 1;
    transform: translateY(0);
}

/* 2 column variant for Cards 1, 2, and 3 */
.job-detail-grid-2col {
    grid-template-columns: repeat(2, 1fr);
}

/* Centered single column for Card 3 bottom section */
.job-detail-grid-centered {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Individual job detail boxes */
.job-detail-box {
    /* background: var(--tertiary-color); */
    padding: 25px;
    border-radius: 10px;
    /* border: 2px solid var(--primary-color); */
    /* box-shadow: 0 4px 15px rgba(0,0,0,0.1); */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/*
.job-detail-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
} */

.job-detail-box h3 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.job-detail-box p {
    color: var(--secondary-color);
    text-align: left;
    line-height: 1.8;
    margin: 0;
}

.job-detail-box ul {
    color: var(--secondary-color);
    text-align: left;
    line-height: 2;
    padding-left: 20px;
    margin: 0;
}

.job-detail-box ul li {
    margin-bottom: 8px;
}

.job-detail-box ul li::before {
    content: "•";
    margin: 5px;
}

/* Video box spans 2 columns */
.video-box {
    grid-column: span 2;
}

/* Apply section at bottom */
.job-detail-apply-section {
    text-align: center;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}

.job-detail-view.pop-in .job-detail-apply-section {
    opacity: 1;
    transform: translateY(0);
}

/* Card fade out animation */
.jobcard.fade-out {
    opacity: 0;
    transform: scale(0.95) translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.6, 1);
}

/* Container transitioning state */
.overlap-jobcard.transitioning {
    overflow: hidden;
}

.expand-btn {
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    min-height: 50px;
    max-height: 50px;
    font-weight: bold;
    color: var(--secondary-color);
    background: #ffffff22;;
    font-size: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.8px;
    margin-top: 15px;
}


.expand-btn:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(231, 121, 25, 0.4);
    border-color: var(--primary-color);
}

/* Make description relative */
.jobcard-description {
    position: relative;
}

@media (max-width: 1600px) {
    .main-content{
        padding: 0 2.5rem;
        gap: 1rem;
    }
}

@media (max-width: 1300px){
    .jobcard img{
        padding: unset !important;
    }
    .intro-text{
        height: 310px;
    }


}

@media (max-width: 1100px) {

    /* Disable card click expansion on mobile */
    .jobcard {
        cursor: default;
    }

    .jobcard:hover {
        transform: scale(1);
    }

    /* Hide job detail views on mobile */
    .job-detail-view {
        display: none !important;
    }

    /* Mobile header adjustments */
    .job-detail-header {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .job-detail-header-image {
        width: 100%;
        height: auto;
        margin: 0 auto;
    }

    .job-detail-title {
        text-align: center;
        font-size: 1.8em;
    }

    .close-detail-btn {
        position: absolute;
        top: 15px;
        right: 15px;

    }

    /* Show full-text expansion on mobile */
    .jobcard-description.expanded .full-text {
        max-height: 3000px;
        margin-top: 30px;
        text-align: left;
    }

    .main {
        align-items: flex-start;
        height: auto;
    }

    .main-content {
        flex-wrap: wrap;          /* Spalten können umbrechen */
        justify-content: flex-start; /* Optional: Text links ausrichten */
        margin: 40px;
        padding: unset;
        /* align-self: center; */
    }

    .main-content-left,
    .main-content-right {
        flex: 1 1 100%;
        min-width: 0;
        text-align: center;
        align-items: center;
        justify-content: flex-start;
        /* padding: 50px 0; */
    }

    .main-content-right {
        margin-top: 20px;         /* Abstand zum Text */
        justify-content: center;
        display: none;
    }

    .main-content-right img {
        max-width: 50vw;
    }

    .main-content-left h1 {
        text-align: center; /* Override for mobile */
    }

    .main-content-left p {
        text-align: center;
    }

    .content-section {
        padding: 0;
    }

    .overlap-jobcard {
        /* background: #fff; */
        border-radius: 0;
        box-shadow: none;
        padding: 25px;
        max-width: 100%;
        width: 100vw;
        position: relative;
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .jobcard img:nth-child(1), .jobcard img:nth-child(2) {
        padding-bottom: unset !important;
        padding-top: unset !important;
    }

    .jobcard {
        width: 100%;   /* volle Breite innerhalb des Containers */
        max-width: 350px; /* optional, damit sie nicht zu breit werden */
    }

    .intro-text {
        height: auto;
    }

    .slider-section {
        margin-top: 80px;
    }

    .sticky-slideshow {
        margin: 0 auto;
        border-radius: 0;
        width: 100vw;
        position: relative;
        border: unset;
        background-size: auto 100px;
        animation: slideBackgroundStickyMobile 100s linear infinite;
        height: 100px;
    }

    .sticky-slideshow::before {
        display: none;
    }
}