:root {
    --cxs-primary: #E8341C;   /* Adjust to match brand color */
    --cxs-primary-dark: #c42a15;
    --cxs-text: #1a1a2e;
    --cxs-muted: #6b7280;
    --cxs-border: #e5e7eb;
    --cxs-bg: #f9fafb;
    --cxs-white: #ffffff;
    --cxs-radius: 10px;
    --cxs-shadow: 0 2px 12px rgba(0,0,0,.08);
    --cxs-shadow-hover: 0 6px 24px rgba(0,0,0,.14);
    --cxs-font: inherit;
}

.cxs-jobs-wrapper {
    overflow-x: hidden;
}

/* ----- Filter bar ----- */

.cxs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 32px;
    margin-top: 24px;
    padding: 20px;
    background: var(--cxs-white);
    border: 1px solid var(--cxs-border);
    border-radius: var(--cxs-radius);
    box-shadow: var(--cxs-shadow);
}

.cxs-filter-bar__search {
    width: 220px;
}

.cxs-filter-bar__search input {
    height: 44px;
    padding: 0 14px !important;
    border: 1.5px solid var(--cxs-border) !important;
}

.cxs-filter-bar__dropdowns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex: 2 1 auto;
}

.cxs-filter-bar__reset {
    display: none;
    align-items: center;
    gap: 5px;
    font-family: var(--cxs-font);
    font-size: .875rem;
    font-weight: 600;
    color: var(--cxs-muted);
    background: transparent;
    border: none;
    padding: 6px 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: color .2s;
}

.cxs-filter-bar__reset.is-visible {
    display: inline-flex;
}

.cxs-filter-bar__reset span {
    font-size: 1.1em;
    line-height: 1;
}

.cxs-filter-bar__reset:hover {
    color: var(--cxs-primary);
}

.cxs-filter-bar__count {
    font-size: .875rem;
    color: var(--cxs-muted);
    white-space: nowrap;
    margin-left: auto;
}

.cxs-input,
.cxs-select {
    font-family: var(--cxs-font);
    font-size: .9375rem;
    color: var(--cxs-text);
    background: var(--cxs-bg);
    border: 1.5px solid var(--cxs-border);
    border-radius: 6px;
    padding: 9px 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.cxs-select {
    min-width: 150px;
    width: auto;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 11px 7px;
}

.cxs-select::-ms-expand {
    display: none;
}

.cxs-input:focus,
.cxs-select:focus,
.cxs-textarea:focus {
    border-color: var(--cxs-primary) !important;
    box-shadow: 0 0 0 3px rgba(232,52,28,.15);
}

/* ----- Jobs grid ----- */

.cxs-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ----- Job card -----*/

.cxs-job-card {
    background: var(--cxs-white);
    border: 1px solid var(--cxs-border);
    border-radius: var(--cxs-radius);
    box-shadow: var(--cxs-shadow);
    transition: box-shadow .25s, transform .25s;
    overflow: hidden;
}

.cxs-job-card:hover {
    box-shadow: var(--cxs-shadow-hover);
    transform: translateY(-3px);
}

.cxs-job-card__inner {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.cxs-job-card__sector {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--cxs-primary);
    background: rgba(232,52,28,.08);
    padding: 3px 10px;
    border-radius: 20px;
    width: fit-content;
}

.cxs-job-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

.cxs-job-card__title a {
    color: var(--cxs-text);
    text-decoration: none;
    transition: color .2s;
}

.cxs-job-card__title a:hover {
    color: var(--cxs-primary);
}

.cxs-job-card__meta {
    list-style: none !important;
    margin: 0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: .875rem;
    color: var(--cxs-muted);
}

.cxs-job-card__excerpt {
    font-size: .9rem;
    color: var(--cxs-muted);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

/* ----- Buttons ----- */

.cxs-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--cxs-font);
    font-size: .9375rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
    border: 2px solid transparent;
    width: fit-content;
    margin-top: auto;
}

.cxs-btn--primary {
    background: var(--cxs-primary);
    color: var(--cxs-white);
    border-color: var(--cxs-primary);
}

.cxs-btn--primary:hover {
    background: var(--cxs-primary-dark);
    border-color: var(--cxs-primary-dark);
    color: var(--cxs-white);
    transform: translateY(-1px);
}

.cxs-btn--outline {
    background: transparent;
    color: var(--cxs-primary);
    border-color: var(--cxs-primary);
}

.cxs-btn--outline:hover {
    background: var(--cxs-primary);
    color: var(--cxs-white);
    transform: translateY(-1px);
}

.cxs-btn--large {
    font-size: 1.0625rem;
    padding: 14px 28px;
}

.cxs-btn.is-loading {
    cursor: wait;
    opacity: .85;
}

.cxs-btn__spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: cxs-spin .7s linear infinite;
}

@keyframes cxs-spin {
    to { transform: rotate(360deg); }
}

/* ----- Job detail ----- */

.cxs-job-detail {
    max-width: 780px;
}

.cxs-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    color: var(--cxs-muted);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color .2s;
}

.cxs-back-link:hover { color: var(--cxs-primary); }

.cxs-job-detail__header {
    margin-bottom: 36px;
}

.cxs-job-detail__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    margin: 12px 0 16px;
    line-height: 1.2;
    color: var(--cxs-text);
}

.cxs-job-detail__sub-title {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--cxs-text);
}

.cxs-job-detail__meta {
    list-style: none !important;
    margin: 0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: .9375rem;
    color: var(--cxs-muted);
}

.cxs-job-detail__intro {
    font-size: 1.0625rem;
    line-height: 1.65;
    font-weight: 500;
    color: var(--cxs-text);
    border-left: 4px solid var(--cxs-primary);
    padding-left: 20px;
    margin-bottom: 28px;
}

.cxs-job-detail__apply-cta {
    margin-bottom: 28px;
}

.cxs-job-detail__description {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--cxs-text);
    margin-bottom: 20px;
}

.cxs-job-detail__description h2,
.cxs-job-detail__description h3 {
    margin-top: 28px;
    margin-bottom: 12px;
}

.cxs-job-detail__description ul,
.cxs-job-detail__description ol {
    padding-left: 20px;
}

.cxs-job-detail__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--cxs-border);
}

/* ----- Apply form ----- */

.cxs-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.cxs-apply-form-wrapper {
    flex: 1 1 100%;
    width: 100%;
    margin-bottom: 48px;
}

.cxs-apply-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.cxs-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cxs-form-field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cxs-form-field label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--cxs-text);
}

.cxs-form-field--motivation {
    margin-top: 16px;
    flex: auto;
}

.cxs-apply-form .cxs-input {
    padding: 12px 16px;
}

textarea.cxs-input {
    resize: vertical;
    min-height: 100px;
    font-family: var(--cxs-font);
}

.cxs-apply-form textarea.cxs-input {
    background: var(--cxs-white);
}

.cxs-apply-form > button[type="submit"] {
    margin-top: 8px;
}

.cxs-upload {
    position: relative;
    border: 1.5px dashed var(--cxs-border);
    border-radius: var(--cxs-radius);
    background: var(--cxs-bg);
    padding: 22px 16px;
    text-align: center;
    transition: border-color .2s, background .2s;
}

.cxs-upload:hover,
.cxs-upload.is-dragover {
    border-color: var(--cxs-primary);
    background: rgba(232,52,28,.04);
}

.cxs-upload.has-file {
    border: 1.5px solid var(--cxs-border);
    padding: 52px 16px;
}

.cxs-upload__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cxs-upload__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.cxs-upload.has-file .cxs-upload__placeholder {
    display: none;
}

.cxs-upload__text {
    font-size: .875rem;
    color: var(--cxs-text);
}

.cxs-upload__text strong {
    color: var(--cxs-primary);
    font-weight: 600;
}

.cxs-upload__hint {
    font-size: .8125rem;
    color: var(--cxs-muted);
}

.cxs-upload__file {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: .9rem;
    color: var(--cxs-text);
    pointer-events: none;
}

.cxs-upload.has-file .cxs-upload__file {
    display: flex;
}

.cxs-upload__file-icon {
    font-size: 1.1rem;
}

.cxs-upload__file-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cxs-upload__remove {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: var(--cxs-white);
    color: var(--cxs-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--cxs-shadow);
    transition: color .2s, background .2s;
    pointer-events: auto;
}

.cxs-upload__remove:hover {
    color: var(--cxs-primary);
}

.cxs-form-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--cxs-muted);
    cursor: pointer;
}

.cxs-form-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
}

.cxs-form-consent a {
    color: var(--cxs-primary);
    text-decoration: underline;
}

.cxs-apply-feedback {
    display: none;
    font-size: .9rem;
    padding: 10px 14px;
    border-radius: 6px;
}

.cxs-apply-feedback.is-success,
.cxs-apply-feedback.is-error {
    display: block;
}

.cxs-apply-feedback.is-success {
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #86efac;
}

.cxs-apply-feedback.is-error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fca5a5;
}

/* ----- States ----- */

.cxs-error {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--cxs-radius);
    padding: 14px 18px;
}

.cxs-no-results {
    text-align: center;
    color: var(--cxs-muted);
    font-size: 1rem;
    padding: 60px 0;
    grid-column: 1 / -1;
}

.cxs-job-card.cxs--loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: cxs-shimmer 1.3s infinite;
}

@keyframes cxs-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ----- Responsive ----- */

@media (max-width: 640px) {
    .cxs-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .cxs-filter-bar__count { margin-left: 0; }
    .cxs-jobs-grid { grid-template-columns: 1fr; }
    .cxs-job-detail__footer { flex-direction: column; }
    .cxs-btn { width: 100%; justify-content: center; }
}
