.jobbox-ads {
    padding: 1em;
    margin: 0 0 2.4em 0;
    border: none;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.jobbox-ads__sponsor {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1em;
}

.jobbox-ads__badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #1d4ed8;
    background: #e0e7ff;
    border-radius: 999px;
}

.jobbox-ads__provider {
    font-size: 13px;
    color: #1f2a44;
}

.jobbox-ads__provider-link {
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.jobbox-ads__provider-link:hover,
.jobbox-ads__provider-link:focus {
    text-decoration: underline;
}

.jobbox-ads__list {
    display: flex;
    padding: 0;
    margin: 0;
    gap: 1.6em;
    flex-wrap: wrap;
}

.jobbox-ads--sly {
    position: relative;

    & .jobbox-ads__slider {
        position: relative;
    }

    & .jobbox-ads__slider-viewport {
        position: relative;
        padding: 0 0.6em;
        margin: 0 -0.6em;
    }

    & .jobbox-ads__slider-controls {
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        transform: translateY(-50%);
        pointer-events: none;
        z-index: 5;

        @media (max-width: 599px) {
            top: 45%;
        }
    }

    & .jobbox-ads__nav {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 30px;
        height: 30px;
        margin: 0 -16px;
        border-radius: 50%;
        background: rgba(15, 23, 42, 0.8);
        color: #ffffff;
        font-size: 1em;
        cursor: pointer;
        pointer-events: all;
        transition: opacity 0.2s ease, transform 0.2s ease;

        &::before {
            font-family: 'FontAwesome';
        }

        &.jobbox-ads__nav--prev::before,
        &.prev::before {
            content: '\f053';
        }

        &.jobbox-ads__nav--next::before,
        &.next::before {
            content: '\f054';
        }

        &:hover,
        &:focus {
            opacity: 0.9;
            transform: scale(1.05);
        }

        &.disabled,
        &.is-disabled,
        &:disabled,
        &[aria-disabled='true'] {
            opacity: 0.3;
            cursor: default;
            transform: none;
            pointer-events: none;
        }
    }

    & .jobbox-ads__slider-frame {
        position: relative;
        overflow: hidden;
        padding: 0;
        margin: 0;
    }

    & .jobbox-ads__scrollbar {
        position: relative;
        display: block;
        width: 100%;
        height: 6px;
        margin: 16px 0 0;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.12);
        pointer-events: all;
    }

    & .jobbox-ads__scrollbar-handle {
        position: absolute;
        top: 0;
        left: 0;
        min-width: 48px;
        height: 100%;
        border-radius: inherit;
        background: rgba(15, 23, 42, 0.45);
    }

    & .jobbox-ads__scrollbar-mousearea {
        position: absolute;
        inset: -8px 0;
    }

    & .jobbox-ads__list {
        display: flex;
        flex-wrap: nowrap;
        padding: 0;
        margin: 0;
        gap: 0;
    }

    & .jobbox-ads__card {
        flex: 0 0 auto;
        width: min(300px, 70vw);
        margin: 0 0.6em;
        padding: 0;
        
        &:first-child {
            margin-left: 0;

            & .jobbox-ads__meta {
                flex-direction: column;
                gap: 10px;

                > span {
                    width: auto;
                }
            }
        }

        &:last-child {
            margin-right: 0;
        }
    }
}



.jobbox-ads__list--loading {
    display: block;
}

.jobbox-ads__card {
    display: flex;
    width: calc((100% - 1.6em) / 2);
    padding: 0;
    margin: 0;
    list-style: none;
    box-sizing: border-box;
    flex-shrink: 0;

    &.jobbox-ads__card--loading{
        display: flex;
        width: 100%;
        min-height: 250px;
        align-items: center;
        justify-content: center;
    }

    &.count_1{
        width: 100%;
        flex-grow: 1;

        & .jobbox-ads__meta {
            flex-direction: row;
            flex-wrap: wrap;
            gap: 1em;
            font-size: 14px;

            > span{
                width: calc((100% - 1em) / 2);
            }
        }
    }
}

.jobbox-ads__card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1.6em;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.jobbox-ads__card-body {
    display: flex;
    flex-direction: column;
    gap: 1em;
    flex-grow: 1;
}

.jobbox-ads__card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jobbox-ads__card-title {
    height: 4.35em;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    color: #111827;
    overflow: hidden;
    text-align: justify;
	text-justify: inter-ideograph;
}

.jobbox-ads__meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jobbox-ads__meta-item {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #475467;
    line-height: 1.5;
}

.jobbox-ads__meta-label {
    min-width: 65px;
    margin-top: 1px;
    font-weight: 600;
    color: #1f2937;
    font-size: 12px;
}

.jobbox-ads__meta-value {
    flex: 1 1 auto;
    font-weight: 500;
    color: #1f2937;
    word-break: break-word;
}

.jobbox-ads__snippet {
    display: block;
    font-size: 14px;
    color: #1f2937;
    line-height: 1.6;
    margin: 0;
}

.jobbox-ads__button {
    margin-top: 1.6em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}

.jobbox-ads__card-link:hover .jobbox-ads__button,
.jobbox-ads__card-link:focus .jobbox-ads__button {
    background: #1d4ed8;
    transform: translateX(2px);
}

.jobbox-ads__card--loading,
.jobbox-ads__card--empty,
.jobbox-ads__card--message {
    padding: 28px;
    border-radius: 16px;
    border: 1px dashed #cbd5f5;
    background: #f8fafc;
    color: #475467;
    font-size: 14px;
    text-align: center;
}

@media screen and (max-width: 800px) {
    .jobbox-ads__card {
        display: flex;
        width: 100%;

        &,
        &.count_1{
            & .jobbox-ads__meta {
                flex-direction: column;
                gap: 0.5em;
                font-size: 12px;

                > span{
                    width: 100%;
                }

                & .jobbox-ads__meta-item{
                    font-size: 12px;
                }
            }
        }
    }
}
