﻿/* =========================================================
   Nama / Khadem – Job Offer (RTL) — Premium Glass UI
   Fixed Version
   ========================================================= */

/* Page scope */
.joboffer-page,
.joboffer-page * {
    box-sizing: border-box;
}



/* Main */
.joboffer-wrap {
    max-width: 1100px;
    margin: auto;
    padding: 24px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Headings */
.joboffer-h1 {
    text-align: center;
    font-size: 30px;
    font-weight: 900;
    margin: 6px 0 26px;
    color: rgba(11,18,32,.92);
    letter-spacing: -.2px;
    position: relative;
}

    .joboffer-h1::after {
        content: "";
        display: block;
        width: 86px;
        height: 4px;
        border-radius: 999px;
        margin: 10px auto 0;
        background: #8d70d9;
    }

.joboffer-h2 {
    text-align: center;
    margin: 24px 0 10px;
    font-weight: 900;
    font-size: 26px;
    color: rgba(11,18,32,.88);
}

.joboffer-desc {
    text-align: center;
    margin: 0 auto 18px;
    max-width: 820px;
    font-size: 15.8px;
    line-height: 2;
    color: rgba(11,18,32,.7);
}

/* Empty */
.joboffer-empty {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255,255,255,.62);
    border: 1px dashed rgba(15,23,42,.18);
    color: rgba(11,18,32,.70);
    text-align: center;
    box-shadow: 0 10px 28px rgba(15,23,42,.08);
}

/* Cards */
.joboffer-cards {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 16px;
    margin-top: 14px;
}

.joboffer-card {
    position: relative;
    border-radius: 24px;
    padding: 16px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(15,23,42,.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    transition: .18s ease;
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
}

    .joboffer-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 88px;
        pointer-events: none;
        background: radial-gradient(520px 140px at 20% 0%, rgba(15,23,42,.05), transparent 60%);
    }

    .joboffer-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 26px 70px rgba(15,23,42,.12);
    }

.joboffer-card-title {
    font-size: 16.2px;
    font-weight: 950;
    color: rgba(11,18,32,.92);
    margin-bottom: 8px;
    line-height: 1.7;
}

.joboffer-card-desc {
    margin: 0;
    font-size: 14.2px;
    font-weight: 800;
    color: rgba(11,18,32,.62);
    line-height: 2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Bottom */
.joboffer-card-bottom {
    position: relative;
    margin-top: 14px;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .joboffer-card-bottom::before {
        content: "";
        position: absolute;
        inset: 0 6px auto 6px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(15,23,42,.14), transparent);
    }

/* Type */
.joboffer-card-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #522474;
    color: #fff;
    font-weight: 900;
    font-size: 12.8px;
    white-space: nowrap;
    box-shadow: 0 18px 45px rgba(109,59,242,.24);
}

/* Button */
.joboffer-card-btn {
    margin-right: auto;
    border: 0;
    background: rgba(11,18,32,.06);
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 13px;
    color: rgba(11,18,32,.82);
    cursor: pointer;
    transition: .16s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;

}

    .joboffer-card-btn:hover{
 
        background: #522474;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 18px 45px rgba(109,59,242,.20);
    }
   

/* Modal */
.joboffer-modal {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.12);
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 30px 90px rgba(15,23,42,.18);
}

    .joboffer-modal .modal-header {
        border-bottom: 1px solid rgba(15,23,42,.10);
    }

    .joboffer-modal .modal-footer {
        border-top: 1px solid rgba(15,23,42,.10);
    }

.joboffer-modal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.joboffer-modal-type {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f3efff;
    border: 1px solid #d9ccff;
    color: #5b34cc;
    font-weight: 900;
    font-size: 12px;
}

.joboffer-modal-summary {
    font-weight: 800;
    font-size: 13px;
    color: rgba(11,18,32,.62);
}

.joboffer-modal-desc {
    font-size: 14.7px;
    line-height: 2;
    color: rgba(11,18,32,.88);
}

/* Form */
.joboffer-formbox {
    margin-top: 18px;
    border-radius: 28px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 28px rgba(15,23,42,.08);
    padding: 16px;
}

.joboffer-formgrid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px 14px;
}

.joboffer-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 900;
    color: rgba(11,18,32,.78);
    font-size: 14px;
}

.joboffer-req {
    color: #dc2626;
}

.joboffer-ctrl {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 28px rgba(15,23,42,.05);
    padding: 12px 14px;
    font-weight: 800;
    color: rgba(11,18,32,.86);
    outline: none;
    transition: .18s ease;
}

    .joboffer-ctrl:focus {
        border-color: #6d3bf2;
        box-shadow: 0 18px 40px rgba(109,59,242,.12);
    }

.joboffer-full {
    grid-column: 1 / -1;
}

/* Validation */
.field-validation-error,
.validation-message,
.text-danger,
span[data-valmsg-for] {
    display: block;
    margin-top: 6px;
    color: #dc2626 !important;
    font-size: 13px;
    font-weight: 800;
}

.input-validation-error,
.joboffer-ctrl.input-validation-error {
    border-color: #dc2626 !important;
    background: #fff5f5;
    box-shadow: 0 0 0 4px rgba(220,38,38,.08);
}

.validation-summary-errors {
    border-radius: 18px;
    padding: 14px 16px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #b91c1c;
    font-weight: 800;
    margin-bottom: 16px;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-right: 18px;
    }

/* Submit */
.joboffer-submit {
    text-align: center;
    margin-top: 14px;
}

.joboffer-submit-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 26px;
    color: #fff;
    font-weight: 900;
    background: #522474;
    box-shadow: 0 22px 60px rgba(109,59,242,.26);
    cursor: pointer;
    transition: .18s ease;
}

    .joboffer-submit-btn:hover {
        transform: translateY(-1px);
        filter: brightness(1.05);
        box-shadow: 0 30px 78px rgba(109,59,242,.32);
    }

/* Trust */
.joboffer-trust {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(15,23,42,.10);
}

.joboffer-trust-right {
    font-weight: 900;
    color: rgba(11,18,32,.78);
}

.joboffer-trust-left {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.joboffer-trust-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.78);
    box-shadow: 0 10px 28px rgba(15,23,42,.08);
    font-weight: 900;
    font-size: 13px;
    color: rgba(11,18,32,.88);
    text-decoration: none;
    transition: .16s ease;
}

    .joboffer-trust-btn:hover {
        transform: translateY(-1px);
        background: #6d3bf2;
        color: #fff;
    }

/* File Picker */
.filepick {
    position: relative;
}

.filepick__input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.filepick__ui {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.90);
    box-shadow: 0 14px 34px rgba(15,23,42,.08);
    border: 1px solid rgba(15,23,42,.10);
    transition: .18s ease;
}

    .filepick__ui:hover {
        transform: translateY(-1px);
        box-shadow: 0 22px 54px rgba(15,23,42,.12);
    }

.filepick__right {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filepick__title {
    font-weight: 950;
    color: rgba(11,18,32,.90);
    font-size: 14px;
}

.filepick__hint {
    font-weight: 800;
    color: rgba(11,18,32,.58);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filepick__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-weight: 950;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 12px 30px rgba(0,0,0,.14);
}

.filepick__note {
    display: block;
    margin-top: 8px;
    color: rgba(11,18,32,.52);
    font-weight: 800;
    font-size: 12.5px;
}

/* Responsive */
@media (max-width: 992px) {
    .joboffer-cards {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 768px) {
    .joboffer-wrap {
        padding: 18px;
    }

    .joboffer-h1 {
        font-size: 28px;
    }

    .joboffer-h2 {
        font-size: 22px;
    }

    .joboffer-formgrid {
        grid-template-columns: 1fr;
    }

    .joboffer-cards {
        grid-template-columns: 1fr;
    }

    .joboffer-trust {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================
   FIXES FOR CURRENT RAZOR PAGE
   ========================================= */

/* validation */
.field-error {
    display: block;
    margin-top: 6px;
    color: #dc2626 !important;
    font-size: 13px;
    font-weight: 800;
}

.val-summary {
    width: 100%;
    grid-column: 1 / -1;
}

    .val-summary ul {
        margin: 0;
        padding-right: 18px;
    }

.validation-summary-errors {
    border-radius: 18px;
    padding: 14px 16px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #b91c1c;
    font-weight: 800;
    margin-bottom: 16px;
}

/* invalid input */
.input-validation-error,
.joboffer-ctrl.input-validation-error {
    border-color: #dc2626 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 4px rgba(220,38,38,.08);
}

/* captcha */
.captcha-row {
    width: 100%;
}

.captcha-container {
    display: flex;
    align-items: stretch;
    gap: 14px;
    flex-wrap: wrap;
}

.captcha-image-box {
    position: relative;
    min-width: 160px;
    height: 54px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 28px rgba(15,23,42,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 52px 8px 8px;
}

.captcha-image {
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.captcha-refresh {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 0;
    background: #522474;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: .18s ease;
    box-shadow: 0 10px 24px rgba(109,59,242,.24);
}

    .captcha-refresh:hover {
        transform: translateY(-50%) scale(1.04);
        box-shadow: 0 18px 40px rgba(109,59,242,.30);
    }

.captcha-container .joboffer-ctrl {
    flex: 1;
    min-width: 220px;
}



    .job-inline-close:hover {
        background: #6d3bf2;
        color: #fff;
        transform: scale(1.05);
    }

/* Meta */
.job-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15,23,42,.08);
    flex-shrink: 0;
}

.job-inline-type {
    padding: 6px 10px;
    border-radius: 999px;
    background: #f3efff;
    border: 1px solid #d9ccff;
    color: #5b34cc;
    font-weight: 900;
    font-size: 12.5px;
}

.job-inline-summary {
    font-weight: 800;
    font-size: 13px;
    color: rgba(11,18,32,.62);
    line-height: 1.9;
}

/* Overlay پشت مودال */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    z-index: 999;
    display: none;
}

/* مودال جمع‌وجور و مینیمال */
.job-inline-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%; /* کوچکتر از قبل */
    max-width: 600px;
    max-height: 70vh; /* ارتفاع کمتر و جمع‌وجور */
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

/* هدر مودال */
.job-inline-head {
    padding: 12px 16px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.job-inline-title {
    font-size: 1rem;
    font-weight: 600;
}

.job-inline-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    transition: 0.2s;
}

    .job-inline-close:hover {
        color: #6d3bf2;
        transform: scale(1.1);
    }

/* بدنه مودال */
.job-inline-body {
    padding: 16px;
    font-size: 15px;
    line-height: 1.8;
    color: #0b1220;
    overflow-y: auto; /* فعال کردن اسکرول برای متن طولانی */
    max-height: calc(70vh - 50px); /* کم کردن هدر */
    scroll-behavior: smooth;
}

    .job-inline-body p {
        margin-bottom: 12px;
    }

/* نمایش مودال */
.job-inline-modal.show,
.modal-overlay.show {
    display: flex;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .job-inline-modal {
        width: 90%;
        max-width: none;
        max-height: 80vh;
    }

    .job-inline-head {
        padding: 10px 12px;
    }

    .job-inline-body {
        padding: 12px;
        max-height: calc(80vh - 40px);
    }
}

