/* ============================================
   Careers — بحث + فلترين (Job Type, Location) + grid بعمودين
   ============================================ */

.careers-filters {
    display: grid;
    grid-template-columns: minmax(0, 450fr) minmax(0, 375fr) minmax(0, 375fr);
    gap: 16px;
    align-items: end;
    margin-bottom: 24px;
}

.careers-search {
    display: flex;
    background: var(--white);
    align-items: center;
    gap: 8px;
    height: 45px;
    padding-inline: 12px;
    border: 1px solid var(--n200);
    border-radius: 8px;
    color: #1F2A37;
    grid-column: 1;
}

.careers-search:focus-within {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(38, 216, 68, 0.2);
}

.careers-search input::-webkit-search-cancel-button {
    cursor: pointer;
}

.careers-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 24px;
    background: transparent;
    color: var(--text-black);
}

.careers-filter-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.careers-filter-field label {
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #111927;
}

.careers-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 45px;
    padding-block: 0;
    padding-inline: 12px 48px;
    border: 1px solid var(--n200);
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
    line-height: 24px;
    color: var(--n500);
    background-color: var(--white);
    /* سهم arrow-down 24px — بيتعكس مكانه في RTL */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9' stroke='%23041607' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 24px 24px;
    background-position: right 16px center;
    width: 100%;
    cursor: pointer;
}

html[dir="rtl"] .careers-select {
    background-position: left 16px center;
}

.careers-select.is-filled {
    color: var(--text-black);
}

.careers-select option {
    color: var(--text-black);
}

.careers-select:focus {
    outline: none;
    border-color: var(--primary-500);
}

.careers-search input::placeholder {
    color: var(--n500);
    opacity: 1;
}

/* الكروت → الفوتر ≈100px */
.careers-listing {
    padding-bottom: 100px;
}

/* ── جريد الوظائف — 606px لكل كارت بالظبط (2×606 + 20 gap = 1232) ── */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.job-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 23px; /* البوردر جوه الكارت → ارتفاع 216 */
    border: 1px solid var(--n200);
    border-radius: 16px;
    transition: box-shadow .2s, transform .2s;
}

.job-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* title+pills (12) ← → description (16) ← → button (20 من gap الكارت) */
.job-card__body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

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

.job-card__title {
    font-size: 20px;
    font-weight: 400;
    line-height: 28px;
    color: var(--text-black);
}

/* ── الـ 3 pills بنفس الستايل بالظبط (Department / Location / Job Type) ── */
.job-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.job-card__pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px; /* ارتفاع 26px شامل البوردر */
    border: 1px solid var(--n200);
    border-radius: 8px;
    font-size: 12px;
    line-height: 18px;
    color: var(--text-black);
    width: fit-content;
}

.job-card__pill img,
.job-card__pill svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--n700);
}

.job-card__desc {
    font-size: 16px;
    color: var(--n500);
    line-height: 26px;
}

/* ── زرار Apply Now — outline أخضر، hover خفيف بخلفية primary-50 ── */
.job-card__apply {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 149px;
    height: 40px;
    padding: 10px 20px;
    border: 1px solid var(--primary-600);
    border-radius: 12px;
    background: var(--white);
    color: var(--primary-700);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    box-sizing: border-box;
    transition: background-color .2s ease;
}

.job-card__apply:hover {
    background: var(--primary-50);
}

.job-card__apply-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

html[dir="rtl"] .job-card__apply-arrow {
    transform: scaleX(-1);
}

/* ── تفاصيل الوظيفة ── */
.job-meta-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--n600);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--n200);
}

/* Responsive */
@media (max-width: 900px) {
    .careers-filters {
        grid-template-columns: minmax(0, 1fr);
    }
    .careers-search {
        grid-column: 1;
    }
    .jobs-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .careers-listing {
        padding-bottom: 64px;
    }
}

/* ── تفاصيل الوظيفة + فورم التقديم ── */
.job-details__heading {
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 20px;
    line-height: 30px;
}

.job-details__text {
    white-space: pre-line;
    color: var(--n600);
    overflow-wrap: anywhere;
}

.contact-form-wrap {
    min-width: 0;
    padding: 32px 24px;
    border: 1px solid var(--n200);
    border-radius: 24px;
    background: var(--white);
}

.job-apply__title {
    margin-bottom: 24px;
    font-size: 20px;
    line-height: 30px;
}

.job-apply {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-apply .form-field input {
    min-width: 0;
    width: 100%;
}

.job-apply__submit {
    width: 100%;
    margin-top: 8px;
}

/* حقل رفع الملف: زرار + اسم الملف */
.file-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 6px;
    padding-inline-end: 12px;
    border: 1px solid #E8EAED;
    border-radius: 12px;
    background: var(--white);
}

.file-input:focus-within {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(38, 216, 68, 0.2);
}

.file-input__native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.form-field .file-input__button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 14px;
    font-weight: 500;
    line-height: 21px;
    cursor: pointer;
    transition: background-color .2s;
}

.form-field .file-input__button:hover {
    background: var(--primary-100);
}

.file-input__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    color: var(--n500);
}

@media (max-width: 767px) {
    .contact-form-wrap {
        padding: 24px 16px;
    }
}
