/* ========================================================
   Job Portal — Islamic illuminated-manuscript theme
   ======================================================== */

@keyframes jpDrawArch {
    to { stroke-dashoffset: 0; }
}
@keyframes jpRise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes jpCardIn {
    to { opacity: 1; transform: translateY(0); }
}

:root {
    --jp-ink:        #1C2B2A;
    --jp-dome:       #0B3D2E;
    --jp-dome-deep:  #072921;
    --jp-parchment:  #F4ECD8;
    --jp-parchment-2:#EADFC2;
    --jp-card:       #FBF6E9;
    --jp-gold:       #C9A227;
    --jp-gold-bright:#E4C158;
    --jp-maroon:     #7A1F2B;
    --jp-line:       rgba(11,61,46,0.16);
    --jp-shadow:     0 20px 50px -20px rgba(7,41,33,0.35);
}

.jp-page {
    background: var(--jp-parchment);
    color: var(--jp-ink);
    overflow: hidden;
    position: relative;
}

/* ---- khatam lattice texture ---- */
.jp-lattice-bg {
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cpath d='M50,30 L46.79,42.24 L35.86,35.86 L42.24,46.79 L30,50 L42.24,53.21 L35.86,64.14 L46.79,57.76 L50,70 L53.21,57.76 L64.14,64.14 L57.76,53.21 L70,50 L57.76,46.79 L64.14,35.86 L53.21,42.24 Z' fill='none' stroke='%23C9A227' stroke-width='0.6' opacity='0.35'/%3E%3C/svg%3E");
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
}

/* ===================== ARCH HERO ===================== */
.jp-hero {
    position: relative;
    background: var(--jp-dome);
    color: #ffffff;
    padding: 0 24px;
    overflow: hidden;
}
.jp-hero .jp-lattice-bg { opacity: 0.5; }
.jp-hero::before {
    content: "";
    position: absolute;
    top: -10%; left: 50%;
    width: 900px; height: 900px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(228,193,88,0.16) 0%, rgba(228,193,88,0) 62%);
    pointer-events: none;
}

.jp-arch-wrap {
    position: relative; z-index: 2;
    max-width: 760px; margin: 0 auto;
    text-align: center;
    padding: 64px 0 0;
}
.jp-arch-frame {
    position: relative;
    margin: 0 auto;
    width: min(560px, 92%);
    padding: 56px 34px 40px;
}
.jp-arch-frame svg.jp-arch-outline {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    overflow: visible;
}
.jp-arch-path {
    fill: none;
    stroke: var(--jp-gold);
    stroke-width: 1.6;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: jpDrawArch 1.8s cubic-bezier(.65,0,.35,1) forwards .15s;
}
.jp-arch-path-inner {
    fill: none;
    stroke: rgba(228,193,88,0.45);
    stroke-width: 0.75;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: jpDrawArch 1.8s cubic-bezier(.65,0,.35,1) forwards .35s;
}

.jp-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: 'Cinzel', serif; font-size: 11.5px; letter-spacing: 0.22em;
    color: var(--jp-gold-bright); text-transform: uppercase;
    opacity: 0; animation: jpRise .7s ease forwards 1.5s;
}
.jp-eyebrow .jp-diamond {
    width: 6px; height: 6px; background: var(--jp-gold-bright);
    transform: rotate(45deg); display: inline-block;
}
.jp-title {
    font-family: 'Amiri', serif; font-weight: 700;
    font-size: clamp(40px, 6vw, 60px);
    line-height: 1.08; margin: 18px 0 6px;
    color: #ffffff !important;
    opacity: 0; animation: jpRise .8s ease forwards 1.7s;
}
.jp-title em { font-style: italic; color: #ffffff !important; }
.jp-arabic-line {
    font-family: 'Amiri', serif; font-size: 22px;
    color: rgba(228,193,88,0.85);
    margin: 2px 0 20px; letter-spacing: 0.02em;
    opacity: 0; animation: jpRise .8s ease forwards 1.85s;
}
.jp-hero-desc {
    font-size: 16.5px; line-height: 1.75;
    color: rgba(255,255,255,0.85);
    max-width: 460px; margin: 0 auto;
    opacity: 0; animation: jpRise .8s ease forwards 2s;
}

.jp-hero-bottom-fade {
    height: 64px;
    background: linear-gradient(to bottom, transparent, var(--jp-parchment));
    margin-top: 40px;
}

/* ===================== FEATURE STRIP ===================== */
.jp-feature-strip {
    max-width: 1180px; margin: -8px auto 0;
    padding: 0 24px 70px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
    position: relative; z-index: 1;
}
.jp-feature-card {
    background: var(--jp-card);
    border: 1px solid var(--jp-line);
    border-radius: 4px;
    padding: 26px 28px;
    display: flex; gap: 18px; align-items: flex-start;
    position: relative; overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease;
}
.jp-feature-card::before {
    content: ""; position: absolute; top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--jp-gold);
    transform: scaleY(0); transform-origin: top;
    transition: transform .4s ease;
}
.jp-feature-card:hover { transform: translateY(-4px); box-shadow: var(--jp-shadow); }
.jp-feature-card:hover::before { transform: scaleY(1); }
.jp-feature-icon {
    flex: none; width: 46px; height: 46px; border-radius: 50%;
    background: var(--jp-dome);
    display: flex; align-items: center; justify-content: center;
}
.jp-feature-icon svg { width: 20px; height: 20px; stroke: var(--jp-gold-bright); fill: none; }
.jp-feature-card h3 {
    font-family: 'Amiri', serif; font-size: 19px;
    margin: 0 0 6px; color: var(--jp-dome-deep);
}
.jp-feature-card p { margin: 0; font-size: 14px; color: #5c5646; line-height: 1.6; }

/* ===================== FILTER BAR ===================== */
.jp-filters-wrap {
    max-width: 1180px; margin: 0 auto;
    padding: 0 24px 30px;
    position: relative; z-index: 1;
}
.jp-filters-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 18px; flex-wrap: wrap; gap: 10px;
}
.jp-filters-head h2 {
    font-family: 'Amiri', serif; font-size: 26px;
    margin: 0; color: var(--jp-dome-deep);
    display: flex; align-items: center; gap: 12px;
}
.jp-filters-head h2 .jp-rule {
    width: 34px; height: 1px; background: var(--jp-gold);
}
.jp-result-count {
    font-size: 13.5px; color: #7a7461;
    font-family: 'Lora', serif;
}

.jp-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.jp-field { position: relative; }
.jp-field label {
    display: block;
    font-family: 'Cinzel', serif; font-size: 10.5px; letter-spacing: 0.16em;
    color: var(--jp-dome); margin-bottom: 8px; text-transform: uppercase;
}
.jp-field select {
    width: 100%; appearance: none; -webkit-appearance: none;
    background: var(--jp-card);
    border: 1px solid var(--jp-line);
    border-radius: 3px;
    padding: 14px 42px 14px 18px;
    font-family: 'Lora', serif; font-size: 15px; color: var(--jp-ink);
    cursor: pointer;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.jp-field select:focus {
    outline: none; border-color: var(--jp-gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.18);
}
.jp-field select:hover { border-color: var(--jp-gold); }
.jp-field .jp-chev {
    position: absolute; right: 16px; top: 41px;
    width: 9px; height: 9px;
    border-right: 1.6px solid var(--jp-dome);
    border-bottom: 1.6px solid var(--jp-dome);
    transform: rotate(45deg); pointer-events: none;
}

/* ===================== JOB CARDS ===================== */
.jp-jobs-wrap {
    max-width: 1180px; margin: 0 auto;
    padding: 8px 24px 90px;
    position: relative; z-index: 1;
}
.jp-job-list { display: flex; flex-direction: column; gap: 22px; }

.jp-job-card {
    background: var(--jp-card);
    border: 1px solid var(--jp-line);
    border-radius: 6px;
    padding: 32px 34px;
    position: relative;
    overflow: hidden;
    opacity: 0; transform: translateY(24px);
    animation: jpCardIn .7s cubic-bezier(.2,.7,.3,1) forwards;
    transition: box-shadow .4s ease, border-color .4s ease;
}
.jp-job-card:hover { box-shadow: var(--jp-shadow); border-color: rgba(201,162,39,0.5); }

/* corner ornaments */
.jp-corner {
    position: absolute; width: 34px; height: 34px;
    border: 1.4px solid var(--jp-gold); opacity: 0.55;
    transition: opacity .4s ease, width .4s ease, height .4s ease;
}
.jp-corner.jp-tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.jp-corner.jp-tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.jp-corner.jp-bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.jp-corner.jp-br { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.jp-job-card:hover .jp-corner { opacity: 1; width: 40px; height: 40px; }

.jp-job-top {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    margin-bottom: 16px;
}
.jp-job-title-block { display: flex; align-items: center; gap: 14px; }
.jp-job-star { flex: none; width: 38px; height: 38px; }
.jp-job-title-block h3 {
    font-family: 'Amiri', serif; font-weight: 700; font-size: 23px;
    margin: 0; color: var(--jp-dome-deep);
}
.jp-badge {
    font-family: 'Cinzel', serif; font-size: 10px; letter-spacing: 0.12em;
    padding: 7px 14px; border-radius: 999px; white-space: nowrap;
    text-transform: uppercase; flex: none;
}
.jp-badge--full-time  { background: rgba(11,61,46,0.1); color: var(--jp-dome); border: 1px solid rgba(11,61,46,0.25); }
.jp-badge--part-time  { background: rgba(122,31,43,0.08); color: var(--jp-maroon); border: 1px solid rgba(122,31,43,0.22); }
.jp-badge--contract   { background: rgba(201,162,39,0.1); color: #8B6914; border: 1px solid rgba(201,162,39,0.3); }
.jp-badge--internship { background: rgba(11,61,46,0.08); color: var(--jp-dome); border: 1px solid rgba(11,61,46,0.2); }
.jp-badge--volunteer  { background: rgba(122,31,43,0.06); color: var(--jp-maroon); border: 1px solid rgba(122,31,43,0.15); }

.jp-meta-row {
    display: flex; flex-wrap: wrap; gap: 10px 26px;
    margin: 0 0 18px; padding-bottom: 18px;
    border-bottom: 1px dashed var(--jp-line);
}
.jp-meta-item {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: #57523f;
}
.jp-meta-item svg { width: 15px; height: 15px; stroke: var(--jp-gold); fill: none; flex: none; }

.jp-job-desc {
    font-size: 15px; line-height: 1.75; color: #4a4636;
    margin: 0 0 24px;
    max-width: 640px;
}

.jp-job-req {
    padding: 14px 18px;
    background: rgba(11,61,46,0.04);
    border-left: 3px solid var(--jp-gold);
    border-radius: 0 4px 4px 0;
    margin: 0 0 20px;
}
.jp-job-req strong {
    display: block; font-family: 'Cinzel', serif; font-size: 11px;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--jp-dome); margin-bottom: 6px;
}
.jp-job-req p { margin: 0; font-size: 14px; color: #57523f; line-height: 1.65; }

.jp-job-bottom {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px;
}
.jp-contact-links { display: flex; flex-wrap: wrap; gap: 22px; }
.jp-contact-links a {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--jp-dome); text-decoration: none; font-size: 14.5px;
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, color .25s ease;
}
.jp-contact-links a svg { width: 15px; height: 15px; stroke: var(--jp-dome); fill: none; }
.jp-contact-links a:hover { color: var(--jp-maroon); border-color: var(--jp-maroon); }
.jp-contact-links a:hover svg { stroke: var(--jp-maroon); }

/* Apply button */
.jp-apply-btn {
    position: relative;
    font-family: 'Cinzel', serif; font-size: 12.5px; letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--jp-dome); color: var(--jp-parchment);
    border: none; border-radius: 999px;
    padding: 15px 30px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 10px;
    overflow: hidden;
    transition: background .3s ease, transform .2s ease, box-shadow .3s ease;
}
.jp-apply-btn svg { width: 14px; height: 14px; stroke: var(--jp-gold-bright); fill: none; transition: transform .3s ease; }
.jp-apply-btn::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(228,193,88,0.35) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform .6s ease;
}
.jp-apply-btn:hover { background: var(--jp-dome-deep); box-shadow: 0 10px 24px -8px rgba(11,61,46,0.55); transform: translateY(-2px); }
.jp-apply-btn:hover::before { transform: translateX(120%); }
.jp-apply-btn:hover svg { transform: translate(3px,-2px); }
.jp-apply-btn--full { width: 100%; justify-content: center; padding: 14px 22px; font-size: 13px; }

.jp-job-card__expires {
    margin-top: 14px; font-size: 12px; color: #8a7e6a;
    font-family: 'Lora', serif; font-style: italic;
}

/* Empty state */
.jp-empty {
    text-align: center; padding: 60px 24px;
    background: var(--jp-card);
    border: 1px solid var(--jp-line);
    border-radius: 6px;
    position: relative;
}
.jp-empty::before, .jp-empty::after {
    content: ""; position: absolute; width: 28px; height: 28px;
    border: 1.2px solid var(--jp-gold); opacity: 0.4;
}
.jp-empty::before { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.jp-empty::after  { bottom: 12px; right: 12px; border-left: none; border-top: none; }
.jp-empty svg { width: 48px; height: 48px; stroke: var(--jp-gold); fill: none; margin-bottom: 14px; opacity: 0.6; }
.jp-empty p { margin: 0; font-family: 'Amiri', serif; font-size: 17px; color: #7a7461; }

/* ===================== MODAL ===================== */
.jp-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: rgba(7,41,33,0.55); backdrop-filter: blur(6px);
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.jp-modal-overlay.show { opacity: 1; pointer-events: auto; }
.jp-modal {
    background: var(--jp-card);
    border: 1px solid var(--jp-line);
    border-radius: 12px;
    width: min(92vw, 560px);
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 60px rgba(7,41,33,0.35);
    transform: translateY(16px) scale(.97);
    transition: transform .35s cubic-bezier(.175,.885,.32,1.275);
    position: relative;
}
.jp-modal-overlay.show .jp-modal { transform: translateY(0) scale(1); }
.jp-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--jp-line);
}
.jp-modal__header h3 {
    margin: 0; font-family: 'Amiri', serif; font-size: 20px;
    color: var(--jp-dome-deep);
}
.jp-modal__header h3 svg { width: 18px; height: 18px; stroke: var(--jp-gold); fill: none; vertical-align: -3px; margin-right: 8px; }
.jp-modal__close {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--jp-line); background: var(--jp-parchment);
    color: var(--jp-ink); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s ease;
}
.jp-modal__close:hover { background: var(--jp-maroon); color: #fff; border-color: var(--jp-maroon); }

.jp-modal__body { padding: 24px 28px 28px; }
.jp-modal__job-info {
    background: rgba(11,61,46,0.06);
    border: 1px solid rgba(11,61,46,0.15);
    border-radius: 6px; padding: 12px 16px;
    font-size: 14px; font-weight: 600; color: var(--jp-dome);
    margin-bottom: 20px; font-family: 'Lora', serif;
}
.jp-modal__body label {
    display: block; font-family: 'Cinzel', serif; font-size: 10.5px;
    letter-spacing: 0.14em; color: var(--jp-dome);
    margin-bottom: 6px; text-transform: uppercase;
}
.jp-modal__body input,
.jp-modal__body textarea,
.jp-modal__body select {
    width: 100%; padding: 12px 14px;
    border: 1px solid var(--jp-line); border-radius: 4px;
    background: var(--jp-parchment);
    font-family: 'Lora', serif; font-size: 14.5px; color: var(--jp-ink);
    transition: border-color .25s ease, box-shadow .25s ease;
    margin-bottom: 14px;
}
.jp-modal__body input:focus,
.jp-modal__body textarea:focus,
.jp-modal__body select:focus {
    outline: none; border-color: var(--jp-gold);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}
.jp-modal__body textarea { resize: vertical; min-height: 90px; }
.jp-modal__body .jp-file-input {
    padding: 10px 14px;
    border: 1px dashed var(--jp-line);
    background: var(--jp-parchment);
    cursor: pointer;
}
.jp-modal__body .jp-file-input::-webkit-file-upload-button {
    font-family: 'Lora', serif; font-size: 13px;
    color: var(--jp-dome); background: var(--jp-parchment-2);
    border: 1px solid var(--jp-line); border-radius: 4px;
    padding: 6px 14px; margin-right: 12px; cursor: pointer;
    transition: background .2s;
}
.jp-modal__body .jp-file-input::-webkit-file-upload-button:hover {
    background: var(--jp-gold); color: #fff; border-color: var(--jp-gold);
}
.jp-file-hint {
    display: block; font-size: 12px; color: #8a7e6a;
    margin-top: -8px; margin-bottom: 14px;
    font-family: 'Lora', serif;
}
.jp-modal__body .jp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.jp-modal__hint {
    text-align: center; font-size: 12px; color: #8a7e6a;
    margin-top: 14px; margin-bottom: 0;
    font-family: 'Lora', serif;
}
.jp-modal__hint svg { width: 13px; height: 13px; stroke: var(--jp-gold); fill: none; vertical-align: -2px; margin-right: 4px; }

/* ===================== TOAST ===================== */
.jp-toast {
    position: fixed; top: 24px; right: 24px; z-index: 10000;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 20px; border-radius: 8px;
    font-family: 'Lora', serif; font-size: 14px; font-weight: 600;
    box-shadow: 0 8px 30px rgba(7,41,33,0.15);
    transform: translateX(120%);
    transition: transform .4s cubic-bezier(.175,.885,.32,1.275);
}
.jp-toast.show { transform: translateX(0); }
.jp-toast--success { background: var(--jp-card); border: 1px solid rgba(11,61,46,0.25); color: var(--jp-dome); }
.jp-toast--error   { background: #fdf2f2; border: 1px solid rgba(122,31,43,0.25); color: var(--jp-maroon); }
.jp-toast button {
    background: none; border: none; color: inherit;
    cursor: pointer; padding: 0 0 0 8px; opacity: 0.6;
}
.jp-toast button:hover { opacity: 1; }
.jp-toast svg { width: 18px; height: 18px; fill: none; flex: none; }
.jp-toast--success svg { stroke: var(--jp-dome); }
.jp-toast--error svg   { stroke: var(--jp-maroon); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 860px) {
    .jp-feature-strip { grid-template-columns: 1fr; }
    .jp-filters { grid-template-columns: 1fr; }
    .jp-job-top { flex-direction: column; }
    .jp-job-bottom { flex-direction: column; align-items: stretch; }
    .jp-apply-btn { justify-content: center; }
}
@media (max-width: 520px) {
    .jp-hero { padding: 0 16px; }
    .jp-arch-frame { padding: 44px 16px 30px; }
    .jp-job-card { padding: 22px 20px; }
    .jp-modal__body .jp-field-row { grid-template-columns: 1fr; }
    .jp-filters-head { flex-direction: column; }
}

/* OTP hint */
.jp-otp-hint {
    font-size: 12px;
    line-height: 1.5;
    color: var(--jp-ink-soft, #5a6b68);
    margin: -4px 0 12px;
    display: block;
}

/* Public OTP integration */
.jp-modal__body .public-otp {
    background: rgba(11,61,46,0.04);
    border: 1px solid var(--jp-line);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.jp-modal__body .public-otp__title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 12px;
    color: var(--jp-dome);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.jp-modal__body .public-otp__status {
    font-size: 12px;
    line-height: 1.5;
    color: #5a6b68;
    margin: 0 0 10px;
}
.jp-modal__body .public-otp__row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.jp-modal__body .public-otp__row input {
    flex: 1;
    background: var(--jp-parchment);
    border: 1px solid var(--jp-line);
    border-radius: 4px;
    padding: 10px 12px;
    font-family: 'Amiri', serif;
    font-size: 14px;
    color: var(--jp-ink);
    outline: none;
    transition: border-color .25s, box-shadow .25s;
}
.jp-modal__body .public-otp__row input:focus {
    border-color: var(--jp-dome);
    box-shadow: 0 0 0 3px rgba(11,61,46,0.12);
}
.jp-modal__body .public-otp__actions {
    display: flex;
    gap: 6px;
}
.jp-modal__body .public-otp__btn {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 11px;
    padding: 10px 14px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--jp-dome);
    background: var(--jp-dome);
    color: var(--jp-parchment);
    white-space: nowrap;
    transition: box-shadow .2s;
}
.jp-modal__body .public-otp__btn:last-child {
    background: transparent;
    color: var(--jp-dome);
}
.jp-modal__body .public-otp__btn:hover {
    box-shadow: 0 6px 14px -6px rgba(11,61,46,0.4);
}
.jp-modal__body .public-otp.is-verified {
    border-color: var(--jp-dome);
    background: rgba(11,61,46,0.06);
}
.jp-modal__body .public-otp.is-verified .public-otp__status {
    color: var(--jp-dome);
}
