/**
 * Occasio GmbH - Job-Karten Styles
 * Optisch ansprechende Job-Anzeigen mit Hover-Effekten
 */

/* Job-Karten Container */
.job-cards-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Einzelne Job-Karte */
.job-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #2d8c5e;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #2d8c5e30;
}

.job-card:hover::before {
    opacity: 1;
}

/* Job-Header: Titel + Badge */
.job-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.job-card__title {
    color: #2d8c5e;
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1.3;
    flex: 1;
}

/* Vertragstyp Badge */
.job-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-badge--fulltime {
    background: #e8f5e9;
    color: #2d8c5e;
}

.job-badge--parttime {
    background: #e3f2fd;
    color: #1976d2;
}

.job-badge--internship {
    background: #fff3e0;
    color: #f57c00;
}

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

.job-badge--contract {
    background: #fce4ec;
    color: #c2185b;
}

/* Job-Meta-Informationen (Firma, Ort, Gehalt) */
.job-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.job-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 0.95em;
}

.job-meta__icon {
    width: 16px;
    height: 16px;
    fill: #2d8c5e;
    flex-shrink: 0;
}

.job-meta__company {
    font-weight: 600;
    color: #333;
}

.job-meta__salary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2d8c5e;
    font-weight: 600;
    background: #f0f9f4;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.9em;
}

/* Job-Beschreibung (gekürzt) */
.job-card__description {
    color: #555;
    line-height: 1.7;
    margin: 0 0 20px 0;
    font-size: 0.95em;
}

/* Details-Element (Expandable) */
.job-card__details {
    margin-top: 16px;
}

.job-card__details summary {
    cursor: pointer;
    color: #2d8c5e;
    font-weight: 600;
    padding: 12px 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.job-card__details summary:hover {
    color: #1e6b47;
}

.job-card__details summary::marker {
    display: none;
}

.job-card__details summary::before {
    content: '▸';
    font-size: 0.9em;
    transition: transform 0.2s ease;
    display: inline-block;
}

.job-card__details[open] summary::before {
    transform: rotate(90deg);
}

.job-card__details-content {
    margin-top: 16px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Abschnitte innerhalb der Details */
.job-detail__section {
    margin-bottom: 24px;
}

.job-detail__section:last-of-type {
    margin-bottom: 0;
}

.job-detail__title {
    color: #2d8c5e;
    margin: 0 0 12px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.job-detail__text {
    color: #555;
    line-height: 1.8;
    margin: 0;
    white-space: pre-line;
}

/* Kontakt-Box */
.job-detail__contact {
    background: #f8faf9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 3px solid #2d8c5e;
}

/* CTA-Button */
.job-card__cta {
    margin-top: 24px;
    text-align: center;
}

.job-card__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    background: linear-gradient(135deg, #2d8c5e 0%, #25804f 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(45, 140, 94, 0.3);
}

.job-card__button:hover {
    background: linear-gradient(135deg, #25804f 0%, #1e6b47 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 140, 94, 0.4);
}

.job-card__button:active {
    transform: translateY(0);
}

.job-card__button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Empty State */
.job-empty {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.job-empty__icon {
    width: 64px;
    height: 64px;
    fill: #2d8c5e;
    margin-bottom: 20px;
    opacity: 0.6;
}

.job-empty__title {
    color: #333;
    font-size: 1.3em;
    margin: 0 0 12px 0;
}

.job-empty__text {
    color: #666;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

/* Fehler-State */
.job-error {
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.job-error__icon {
    width: 48px;
    height: 48px;
    fill: #c62828;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .job-card {
        padding: 20px;
        margin-bottom: 16px;
    }

    .job-card__header {
        flex-direction: column;
        gap: 12px;
    }

    .job-card__title {
        font-size: 1.3em;
    }

    .job-card__meta {
        flex-direction: column;
        gap: 10px;
    }

    .job-card__button {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

/* Fade-In Animation für neue Karten */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-card {
    animation: slideInUp 0.5s ease forwards;
}

.job-card:nth-child(1) { animation-delay: 0s; }
.job-card:nth-child(2) { animation-delay: 0.1s; }
.job-card:nth-child(3) { animation-delay: 0.2s; }
.job-card:nth-child(4) { animation-delay: 0.3s; }
.job-card:nth-child(5) { animation-delay: 0.4s; }

/* Tag-System für Skills/Schlagwörter (optional) */
.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.job-tag {
    background: #f0f0f0;
    color: #555;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* Job-Datum (optional) */
.job-card__date {
    font-size: 0.85em;
    color: #888;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
