/* jobs-widget.css */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200");

:root {
    --jw-base-color: #212121;
    --jw-brand-color: #1DFFAE;
    --jw-invert-color: #E4E8F0;
    --jw-light-grey-1: #F5F6F7;
    --jw-light-grey-2: #DEE3ED;
    --jw-heading-color: #000;
    --jw-white: #fff;
    --jw-green: #1DFFAE;
    --jw-black: #0f0f0e;
    --jw-text-color: #6E7191;
}

.jw-jobs-widget,
.jw-jobs-widget * {
    box-sizing: border-box;
}

.jw-jobs-widget {
    display: block;
    font-family: 'DM Sans', sans-serif;
    max-width: 800px;
    margin: 25px 0px 25px;
    background-color: var(--jw-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: var(--jw-base-color);
    padding: 0 16px;
}

.jw-offers-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    border-radius: 6px;
    padding: 4.8rem 1.6rem;
    letter-spacing: -0.01em;
}

.jw-offers-from {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    font-size: 2.4rem;
    line-height: 1.3;
    font-weight: 300;
    margin-bottom: 2.4rem;
    text-align: center;
}

.jw-offers-from img {
    max-width: 140px;
    height: auto;
    margin-left: 1.6rem;
}

.jw-offer-item {
    background-color: var(--jw-white);
    border-radius: 0.6rem;
    box-shadow: 0 8px 50px -12px rgba(55, 66, 98, 0.08);
    padding: 1.6rem 2.4rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.jw-offer-item:not(:last-of-type) {
    margin-bottom: 1.2rem;
}

.jw-offer-item:hover {
    background-color: rgba(228, 232, 240, 0.5);
    box-shadow: 0 12px 60px -16px rgba(55, 66, 98, 0.12);
}

.jw-item {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: 2.4rem;
    text-decoration: none; /* Brak podkreślenia */
    color: inherit;
}

/* Zaktualizowane style dla kontenera logo */
.jw-company-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px; /* Stała szerokość */
    height: 50px; /* Stała wysokość */
    border-radius: 8px; /* Zaokrąglone rogi */
    background-color: #FFFFFF; /* Białe tło */
    padding: 9px 4px; /* Stały padding */
    margin-right: 9px; /* Odstęp po prawej */
    box-sizing: border-box;
    overflow: hidden; /* Ukryj nadmiar obrazka */
}

.jw-company-logo {
    max-width: 32px; /* 50px - (9px * 2) = 32px */
    max-height: 32px;
    object-fit: contain; /* Zachowaj proporcje obrazka */
    padding: 0; /* Stały padding w kontenerze */
}

.jw-item-row {
    flex: 1 1 auto;
}

.jw-primary-line,
.jw-secondary-line {
    display: flex;
    justify-content: space-between;
}

.jw-primary-line {
    color: var(--jw-base-color);
    font-size: 16px;
    font-weight: 500;
    line-height: 2.3rem;
    text-decoration: none;
    flex-direction: row; /* Zmiana na flex-row aby salary było na tej samej linii */
    margin-bottom: 0.9rem;
}

.jw-title {
    flex-grow: 1; /* Dodaje przestrzeń dla tytułu */
}

.jw-salary {
    color: #00cc83;
    margin-left: auto; /* Przesuwa na prawą stronę */
    text-transform: uppercase;
}

.jw-flex-right {
    display: flex;
    align-items: center;
}

.jw-secondary-line {
    font-size: 13px;
    color: #979EAA;
}

.jw-company-info {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

.jw-company-name,
.jw-company-address {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 4px;
}

.jw-material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 18px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    margin-right: 4px;
}

.jw-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jw-tag {
    border-radius: 40px;
    color: #979EAA;
    padding: 0 10px;
    height: 23px;
    font-weight: 400;
    font-size: 13px;
    line-height: 21px;
    display: inline-block;
    border: 1px solid rgba(179, 184, 193, 0.25);
    margin-left: 0.4rem;
    margin-bottom: 0.4rem;
}

.jw-widget-more-offers {
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 25px; /* Dodanie paddingu 25px poniżej przycisku */
}

.jw-widget-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1DFFAE;
    color: #0f0f0e;
    text-decoration: none; /* Bez podkreślenia */
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 0 auto; /* Wycentruj przycisk */
}

.jw-widget-button:hover {
    background-color: #00cc83;
    transform: translateY(-2px);
}

/* Responsywność */
@media (max-width: 600px) {
    .jw-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .jw-company-logo-container {
        margin-bottom: 10px;
        width: 38px; /* 50px * 0.76 ≈38px */
        height: 38px;
        padding: 7px 3px; /* 9px *0.76≈7px, 4px *0.76≈3px */
        margin-right: 0;
    }

    .jw-company-logo {
        max-width: 22px; /* 32px * 0.76≈22px */
        max-height: 22px;
    }

    .jw-item-row {
        width: 100%;
    }

    .jw-primary-line {
        flex-direction: column;
        align-items: flex-start;
    }

    .jw-title {
        font-size: 16px;
        margin-bottom: 5px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .jw-flex-right {
        align-self: flex-start;
        margin-top: 5px;
    }

    .jw-salary {
        font-size: 14px;
    }

    .jw-secondary-line {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 10px;
    }

    .jw-company-info {
        margin-bottom: 5px;
    }

    .jw-company-name {
        display: flex;
        align-items: center;
        margin-right: 20px; /* Zwiększenie marginesu między nazwą firmy a miejscem pracy */
    }

    .jw-tags {
        margin-top: 5px;
    }

    .jw-tag {
        font-size: 12px;
        margin-right: 5px;
        margin-bottom: 5px;
    }

    .jw-offers-from {
        font-size: 2rem;
        flex-direction: column;
    }

    .jw-offers-from img {
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Resetuje tylko style związane z tekstem, ale zachowuje układ */
.jw-jobs-widget a {
    text-decoration: none !important; /* Usuń podkreślenie */
    color: inherit; /* Zachowaj kolor tekstu */
    cursor: pointer; /* Przywróć kursor */
}

/* Poprawki dla przycisku "Zobacz więcej ofert pracy" */
.jw-jobs-widget .jw-widget-more-offers {
    text-align: center;
    margin-top: 2rem;
    padding-bottom: 25px; /* Dodanie paddingu 25px poniżej przycisku */
}

.jw-jobs-widget .jw-widget-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1DFFAE;
    color: #0f0f0e;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 0 auto; /* Wycentruj przycisk */
}

.jw-jobs-widget .jw-widget-button:hover {
    background-color: #00cc83;
    transform: translateY(-2px);
}
