/**
 * Job Detail Page Styles
 *
 * 2-column layout with slider left (50%), info right (50%)
 * Typography: Behind The Nineties Medium 30px (headlines), Roboto Medium 18px (body)
 */

/* ========================================================================
   JOB DETAIL PAGE
   ======================================================================== */

.job-detail-page {
    padding: 60px 0;
}

/* Main Container (2-Column Layout) */
.job-detail-container {
    display: flex;
    gap: 60px;
    max-width: 1640px;
    margin: 0 auto;
    padding: 0 40px;
    margin-bottom: 60px;
}

/* ========================================================================
   LEFT COLUMN: Image Slider OR Fixed Gallery
   ======================================================================== */

.job-detail__left {
    flex: 0 0 calc(50% - 30px);
    max-width: calc(50% - 30px);
}

/* Job Fixed Gallery - Vertical Layout (674x1631px - 7 images) */
.job-fixed-gallery {
    position: relative;
    width: 100%;
    margin: 0;
}

/* Desktop: Absolute positioned gallery */
.job-fixed-gallery__desktop {
    position: relative;
    width: 100%;
    aspect-ratio: 674 / 1631;
    display: block;
}

/* Mobile: Swiper Slider (hidden on desktop) */
.job-fixed-gallery__mobile {
    display: none;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 674 / 1631) {
    .job-fixed-gallery__desktop::before {
        content: '';
        display: block;
        padding-top: 242.13%; /* (1631/674) * 100 */
    }

    .job-fixed-gallery__desktop > * {
        position: absolute;
    }
}

.job-fixed-gallery__desktop figure {
    position: absolute;
    margin: 0;
}

.job-fixed-gallery__desktop figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

/* Image positions - based on SVG layout (674x1631px) - DESKTOP ONLY */
/* Bild 1: Top full-width (674x306 @ 0,0) */
.job-fixed-gallery__desktop > :nth-child(1) {
    left: 0%;
    top: 0%;
    right: 0%;
    bottom: 81.24%;
}

/* Bild 2: Left column, middle-top (398x430.613 @ 0,319.938) */
.job-fixed-gallery__desktop > :nth-child(2) {
    left: 0%;
    top: 19.61%;
    right: 40.95%;
    bottom: 53.98%;
}

/* Bild 3: Right column, top (260x245 @ 414,320) */
.job-fixed-gallery__desktop > :nth-child(3) {
    left: 61.42%;
    top: 19.62%;
    right: 0%;
    bottom: 65.35%;
}

/* Bild 4: Right column, middle (260x170 @ 414,581) */
.job-fixed-gallery__desktop > :nth-child(4) {
    left: 61.42%;
    top: 35.62%;
    right: 0%;
    bottom: 53.95%;
}

/* Bild 5: Left column, middle-bottom (260x404 @ 0,765) */
.job-fixed-gallery__desktop > :nth-child(5) {
    left: 0%;
    top: 46.90%;
    right: 61.42%;
    bottom: 28.32%;
}

/* Bild 6: Bottom full-width (674x448 @ 0,1183) */
.job-fixed-gallery__desktop > :nth-child(6) {
    left: 0%;
    top: 72.54%;
    right: 0%;
    bottom: 0%;
}

/* Bild 7: Right column, middle-bottom (398x404 @ 276,765) */
.job-fixed-gallery__desktop > :nth-child(7) {
    left: 40.95%;
    top: 46.90%;
    right: 0%;
    bottom: 28.32%;
}

.job-detail__slider {
    width: 100%;
    height: 630px;
    margin-bottom: 30px;
    overflow: hidden;
}

.job-detail__slider img,
.job-detail__featured-image img {
    width: 100%;
    height: 630px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* ========================================================================
   RIGHT COLUMN: Job Information
   ======================================================================== */

.job-detail__right {
    flex: 0 0 calc(50% - 30px);
    max-width: calc(50% - 30px);
}

.job-info-section {
    margin-bottom: 30px;
}

.job-info-section:last-child {
    margin-bottom: 0;
}

.job-info__date {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
}

.job-info__excerpt {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.6;
    color: #000;
    margin-bottom: 20px;
}

.job-info__title {
    font-family: 'behind_the_nineties', sans-serif;
    font-weight: 500;
    font-size: 50px;
    line-height: 1.2;
    color: #282828;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.job-info__content {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    color: #282828;
    margin-bottom: 30px;
}

.job-info__content p {
    margin-bottom: 15px;
}

.job-info__content p:last-child {
    margin-bottom: 0;
}

.job-info__content h2,
.job-info__content h3 {
    font-family: 'behind_the_nineties', sans-serif;
    font-weight: 500;
    font-size: 30px;
    line-height: 1.2;
    color: #282828;
    margin-top: 30px;
    margin-bottom: 15px;
}

.job-info__content h3 {
    font-size: 24px;
}

.job-info__content ul,
.job-info__content ol {
    margin-bottom: 15px;
    padding-left: 0;
    list-style: none;
}

.job-info__content li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 12px;
}

/* Strich (-) als Listenpunkt gemäß Designvorlage */
.job-info__content li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: #282828;
}

.job-info__content strong {
    font-family: 'Roboto', sans-serif;
    font-size: 22px;
    font-weight: 900;
    text-transform: uppercase;
    display: block;
    margin-top: 20px;
    margin-bottom: 10px;
}

.job-apply-button {
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 2.5rem;
}

/* ========================================================================
   JOB FEATURES (Full Width Row Below Columns)
   ======================================================================== */

.job-features-container {
    margin: 30px 0;
}

.job-features {
    background-color: transparent;
    padding: 0;
}

.job-features__title {
    display: none;
}

.job-features__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.job-features__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.job-features__icon {
    width: 82px;
    height: 82px;
    flex-shrink: 0;
    position: relative;
}

.job-features__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.job-features__icon svg {
    display: none;
}

.job-features__text {
    font-family: 'behind_the_nineties', sans-serif;
    font-size: 30px;
    font-weight: 500;
    color: inherit;
    text-align: left;
}

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

@media (max-width: 1024px) {
    .job-detail-container {
        gap: 40px;
        padding: 0 30px;
    }

    .job-info__title {
        font-size: 32px;
    }

    .job-info__content {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .job-detail-page {
        padding: 0;
    }

    .job-detail-container {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }

    .job-detail__left {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .job-detail__right {
        flex: 1 1 auto;
        max-width: 100%;
    }

    /* Slider-Höhe auf Mobile dynamisch */
    .job-detail__slider {
        height: auto;
    }

    .job-detail__slider img,
    .job-detail__featured-image img {
        height: auto;
    }

    /* Job Fixed Gallery - Mobile: Swiper Slider */
    .job-fixed-gallery__desktop {
        display: none !important;
    }

    .job-fixed-gallery__mobile {
        display: block !important;
    }

    .job-fixed-gallery__mobile .swiper-slide img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border-radius: 4px;
    }

    .job-info__title {
        font-size: 28px;
    }

    .job-info__content {
        font-size: 16px;
    }

    .job-info__content h2 {
        font-size: 24px;
    }

    .job-info__content h3 {
        font-size: 20px;
    }

    .job-features-container {
        margin: 20px 0;
    }

    .job-features {
        padding: 0;
    }

    .job-features__title {
        font-size: 24px;
    }

    .job-features__list {
        gap: 20px;
    }

    .job-features__item {
        max-width: 120px;
    }

    .job-features__icon {
        width: 50px;
        height: 50px;
    }

    .job-features__text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .job-detail-page {
        padding: 0;
    }

    .job-info__title {
        font-size: 24px;
    }

    .job-info__content {
        font-size: 15px;
    }

    .job-apply-button {
        width: 100%;
        text-align: center;
    }

    .job-features__list {
        gap: 15px;
    }
}

/* Back Link */
.back-link {
    margin-top: 40px;
    margin-bottom: 40px;
}

.back-link .post-permalink {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #282828;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link .post-permalink:hover {
    color: #d4a047;
}

.back-link .arrow {
    border: solid #282828;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    transition: border-color 0.2s ease;
}

.back-link .arrow.left {
    transform: rotate(135deg);
}

.back-link .post-permalink:hover .arrow {
    border-color: #d4a047;
}

/* ========================================================================
   RELATED JOBS SECTION (Weitere offene Stellen Slider)
   ======================================================================== */

.related-jobs-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.related-jobs-section__title {
    font-family: 'behind_the_nineties', sans-serif;
    font-weight: 500;
    font-size: 50px;
    line-height: 1.2;
    color: #282828;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 40px;
}

/* Related Jobs Slider */
.related-jobs-slider {
    max-width: 1364px;
    margin: 0 auto;
    padding: 0 80px;
    position: relative;
}

.related-jobs-slider .swiper {
    overflow: hidden;
}

.related-jobs-slider .swiper-slide {
    text-align: left;
}

.related-job-card {
    background: #fff;
    overflow: hidden;
}

.related-job-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.related-job-card__image {
    width: 100%;
    aspect-ratio: 536 / 356;
    overflow: hidden;
}

.related-job-card__thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-job-card__link:hover .related-job-card__thumbnail {
    transform: scale(1.05);
}

.related-job-card__content {
    padding: 20px 0;
    text-align: left;
}

/* Beschreibungstext: "Wir suchen Dich... Eintritt in unserer Filiale..." */
.related-job-card__description {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: #434141;
    margin: 0 0 15px 0;
}

.related-job-card__description strong {
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
}

/* Jobtitel */
.related-job-card__title {
    font-family: 'behind_the_nineties', sans-serif;
    font-weight: 500;
    font-size: 28px;
    line-height: 1.2;
    color: #282828;
    text-transform: uppercase;
    margin: 0 0 5px 0;
}

/* Alte Location (Fallback) */
.related-job-card__location {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin: 0;
}

/* Pfeile im SVG-Style - außerhalb des Sliders, auf Bildhöhe */
.related-jobs-slider .swiper-button-prev,
.related-jobs-slider .swiper-button-next {
    position: absolute !important;
    width: 42px !important;
    height: 81px !important;
    background: none !important;
    border-radius: 0 !important;
    color: transparent !important;
    /* Position: Mitte der Bilder */
    top: 180px !important;
    transform: none !important;
    margin-top: 0 !important;
    z-index: 10 !important;
}

.related-jobs-slider .swiper-button-prev::after,
.related-jobs-slider .swiper-button-next::after {
    content: '' !important;
    display: block !important;
    width: 42px !important;
    height: 81px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    font-size: 0 !important;
    font-family: inherit !important;
}

/* Linker Pfeil - im Padding-Bereich links */
.related-jobs-slider .swiper-button-prev {
    left: 15px !important;
}

.related-jobs-slider .swiper-button-prev::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='81' viewBox='0 0 42.044 81.055'%3E%3Cpath d='M3.01,40.5,41.977,79.35c.155.154-.086.645-.537,1.1s-.943.689-1.1.535L.558,41.316h0v0l-.536-.534c-.055-.055-.046-.159-.01-.28-.036-.12-.045-.225.01-.279L40.342.018c.155-.154.646.086,1.1.536s.692.94.537,1.093Z' fill='%23282828' fill-rule='evenodd'/%3E%3C/svg%3E") !important;
}

/* Rechter Pfeil - im Padding-Bereich rechts */
.related-jobs-slider .swiper-button-next {
    right: 15px !important;
}

.related-jobs-slider .swiper-button-next::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='42' height='81' viewBox='0 0 42.044 81.055'%3E%3Cpath d='M39.034,40.5,0.067,79.35c-.155.154.086.645.537,1.1s.943.689,1.1.535L41.486,41.316h0v0l.536-.534c.055-.055.046-.159.01-.28.036-.12.045-.225-.01-.279L1.702.018c-.155-.154-.646.086-1.1.536s-.692.94-.537,1.093Z' fill='%23282828' fill-rule='evenodd'/%3E%3C/svg%3E") !important;
}

@media (max-width: 768px) {
    .related-jobs-section {
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .related-jobs-section__title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .related-jobs-slider {
        padding: 0 20px;
    }

    .related-job-card__title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .related-jobs-section__title {
        font-size: 26px;
        margin-bottom: 25px;
    }

    .related-job-card__title {
        font-size: 18px;
    }
}
