@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #9f473f;
    --background-color: #66b257;
    --dark-color: #2a2c25;
    --offwhite: #f7f7f7;
}

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

html, body {
    margin: 0 !important;
    padding: 0 !important;
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: var(--dark-color);
    font-size: 1em;
}

body.koenigsteiner-job-detail {
    margin: 0 !important;
    padding: 0 !important;
}

/* Logo Header */
.logo {
    position: fixed;
    width: 100%;
    height: 70px;
    padding: 10px;
    z-index: 100;
    background-color: var(--kjd-header-background);
    transition: all 0.3s ease;
}

.logo.scrolled {
    background-color: var(--kjd-header-background);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 5px;
}

.logoPic a {
    text-decoration: none;
}
.logo.scrolled .logoPic a img,
.logoPic a img {
    height: 50px;
    padding: 6px;
    transition: height 0.3s ease;
}



/* Job Template */
.jobTemplate {
    margin: 0;
}

/* Remove any WordPress admin bar spacing */
html {
    margin-top: 0 !important;
}

.jobtemplateFrame {
    background-color: var(--dark-color);
    min-height: 100vh;
}

.jobtemplateInnerFrame {
    background-color: var(--offwhite);
    opacity: 0.95;
    max-width: 1200px;
    margin: 0 auto;
}

/* Job Picture */
.jobTemplatePic {
    margin-bottom: 1rem;
}

.job-pic img {
    width: 100%;
    height: auto;
    display: block;
}

/* Job Sections */
.job-section {
    width: 90%;
    max-width: 800px;
    margin: 1.25rem auto;
    padding: 1rem 1.5rem;
}

.jobTemplateTitle {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.jobTemplateTitle h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--dark-color);
}

/* Job Location Section */
.jobTemplateLocation {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.jobTemplateLocation .location-text {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.location-icon {
    flex-shrink: 0;
    color: #666;
}

.job-location {
    display: inline-block;
}

.job-department {
    color: #888;
    font-size: 0.85rem;
}

/* Job Meta Section (Badges) */
.jobTemplateMeta {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.jobTemplateMeta .job-badges {
    margin-top: 0;
}

/* Job Content */
.job-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.job-section ul {
    /* Use custom bullets so wrapped lines align with the text start (hanging indent)
       This avoids inconsistent browser behavior of list-style-position. */
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.job-section li {
    position: relative;
    padding-left: 1.6rem; /* reserve space for the bullet */
    margin-bottom: 0.5rem;
}

.job-section li:before {
    content: '\2022';
    position: absolute;
    left: 0;
    top: 0.2rem;
    color: var(--dark-color);
    font-size: 1.05rem;
    line-height: 1;
}

/* Apply Section */
.jobTemplateApply {
    text-align: center;
    margin: 1.5rem auto;
}

.jobTemplateApply .btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.85rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.jobTemplateApply .btn:hover {
    background-color: #8a3c34;
    transform: scale(1.05);
}

/* Footer */
.jobTemplateFooter {
    background-color: var(--background-color);
    margin: 0;
    padding: 1.25rem 1rem;
    text-align: center;
    color: white;
}

/* Job Badges */
.job-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.job-badges .badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    background: #e8f4fd;
    color: #1a5f7a;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.job-badges .badge-remote {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Contact Card */
.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 0.75rem;
}

.contact-image {
    flex-shrink: 0;
}

.contact-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.contact-info {
    flex-grow: 1;
}

.contact-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.contact-info .contact-function {
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
}

.contact-info p {
    margin: 0.25rem 0;
    color: #666;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Document List */
.document-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.document-list li {
    margin: 0.5rem 0;
}

.document-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: #f8f9fa;
    border-radius: 6px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.document-list a:hover {
    background: #e9ecef;
}

.document-list a::before {
    content: "📄";
}

.jobTemplateFooter p {
    margin: 0.5rem 0;
}

.jobTemplateFooter a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.jobTemplateFooter a:hover {
    opacity: 0.8;
}

/* Video Section */
.job-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    margin: 0.75rem 0;
}

.job-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Tags / Badges */
.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0;
}

.job-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: #e8f4fd;
    color: #1a5f7a;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.job-tag.work-schedule {
    background: #e8f5e9;
    color: #2e7d32;
}

.job-tag.work-type {
    background: #fff3e0;
    color: #e65100;
}

.job-tag.remote {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Contact Person */
.contact-person {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    margin: 0.75rem 0;
}

.contact-person-image {
    flex-shrink: 0;
}

.contact-person-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.contact-person-info {
    flex-grow: 1;
}

.contact-person-info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
}

.contact-person-info p {
    margin: 0.25rem 0;
    color: #666;
}

.contact-person-info a {
    color: #0066cc;
    text-decoration: none;
}

.contact-person-info a:hover {
    text-decoration: underline;
}

.contact-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    color: #0077b5 !important;
}

/* Meta Grid */
.job-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.job-meta-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
}

.job-meta-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #333;
    font-size: 0.85rem;
}

.job-meta-item span {
    color: #666;
}

/* Documents */
.job-documents {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.75rem 0;
}

.job-document-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: #f8f9fa;
    border-radius: 6px;
    color: #333 !important;
    text-decoration: none;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.job-document-link:hover {
    background: #e9ecef;
    text-decoration: none;
}

.job-document-link svg {
    flex-shrink: 0;
}

/* Address */
.job-address {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.job-address p {
    margin: 0;
    color: #666;
}

/* Categories & Sectors */
.job-categories,
.job-sectors {
    margin: 0.35rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .jobTemplateTitle h1 {
        font-size: 1.75rem;
    }

    .jobTemplateTitle h3 {
        font-size: 1rem;
    }

    .job-section {
        width: 95%;
        padding: 0.75rem;
        margin: 1rem auto;
    }

    .job-section h2 {
        font-size: 1.35rem;
    }

    .jobTemplateApply .btn {
        padding: 0.65rem 1.75rem;
        font-size: 0.95rem;
    }

    .contact-person {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .job-meta-grid {
        grid-template-columns: 1fr;
    }

    .job-video-container {
        padding-bottom: 75%; /* Höheres Verhältnis auf Mobile */
    }
}
