/* ============================================================
   job-details.css - Job Details Page Styles
   Version: 1.0
   ============================================================ */
* { font-family: 'Tajawal', sans-serif; margin: 0; padding: 0; box-sizing: border-box; }
body { background: #f1f5f9; color: #414042; }

/* ─── Back Bar ────────────────────────────────────────────── */
.back-bar {
    background: white;
    border-bottom: 1px solid #eef2f7;
    padding: 10px 0;
    position: sticky;
    top: 57px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.back-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    color: #414042;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s;
}
.btn-back:hover { border-color: #00aeef; color: #00aeef; text-decoration: none; }
.btn-back i { color: #00aeef; }
.breadcrumb-trail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #94a3b8;
    flex: 1;
    overflow: hidden;
}
.breadcrumb-trail a { color: #00aeef; text-decoration: none; white-space: nowrap; }
.breadcrumb-trail a:hover { text-decoration: underline; }
.breadcrumb-trail .sep { color: #cbd5e1; }
.breadcrumb-trail span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.share-btns-bar { display: flex; align-items: center; gap: 6px; }
.share-btn-sm {
    width: 34px; height: 34px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
}
.share-btn-sm:hover { transform: translateY(-2px); }
.share-wa  { background: #25d366; }
.share-fb  { background: #1877f2; }
.share-tw  { background: #000; }
.share-li  { background: #0a66c2; }
.share-cp  { background: #64748b; }
.share-pr  { background: #ef4444; }

/* ─── Page Layout ─────────────────────────────────────────── */
.jd-wrapper {
    max-width: 1200px;
    margin: 24px auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

/* ─── Job Hero Card ───────────────────────────────────────── */
.jd-hero {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eef2f7;
    margin-bottom: 20px;
}
.jd-hero-top {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.jd-company-logo {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid #eef2f7;
    flex-shrink: 0;
    background: linear-gradient(135deg, #00aeef, #009bd5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    font-weight: 800;
}
.jd-company-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.jd-hero-info { flex: 1; }
.jd-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 8px;
}
.jd-company-name {
    font-size: 1rem;
    font-weight: 700;
    color: #00aeef;
    margin-bottom: 12px;
    text-decoration: none;
}
.jd-company-name:hover { text-decoration: underline; }
.jd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.jd-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #64748b;
}
.jd-tag i { color: #00aeef; font-size: 0.8rem; }
.jd-tag.featured { background: rgba(245,158,11,0.12); color: #d97706; }
.jd-tag.featured i { color: #d97706; }

/* Hero Stats Row */
.jd-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.jd-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #64748b;
}
.jd-stat-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(0,174,239,0.08);
    color: #00aeef;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.jd-stat .stat-label { font-size: 0.75rem; color: #94a3b8; }
.jd-stat .stat-val { font-size: 0.88rem; font-weight: 600; color: #414042; }

/* ─── Main Content Sections ───────────────────────────────── */
.jd-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eef2f7;
    margin-bottom: 20px;
}
.jd-section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 10px;
}
.jd-section-title i { color: #00aeef; }
.jd-content {
    font-size: 0.92rem;
    line-height: 1.9;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-word;
}
.jd-content ul, .jd-content ol { padding-right: 20px; }
[dir="ltr"] .jd-content ul, [dir="ltr"] .jd-content ol { padding-right: 0; padding-left: 20px; }
.jd-content li { margin-bottom: 6px; }

/* Skills */
.skills-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.skill-tag {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(0,174,239,0.08);
    color: #00aeef;
    border: 1px solid rgba(0,174,239,0.2);
}
.skill-tag.required {
    background: rgba(16,185,129,0.08);
    color: #10b981;
    border-color: rgba(16,185,129,0.2);
}

/* How to Apply */
.how-to-apply-box {
    background: linear-gradient(135deg, rgba(0,174,239,0.05) 0%, rgba(0,174,239,0.02) 100%);
    border: 1.5px solid rgba(0,174,239,0.2);
    border-radius: 14px;
    padding: 20px;
}
.how-to-apply-box .apply-note {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ─── Sidebar ─────────────────────────────────────────────── */
.jd-sidebar > * { margin-bottom: 20px; }

/* Apply Card */
.sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eef2f7;
}
.sidebar-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #414042;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-card-title i { color: #00aeef; }

/* Countdown timer */
.countdown-wrapper { margin-bottom: 18px; }
.countdown-label { font-size: 0.78rem; color: #94a3b8; margin-bottom: 6px; text-align: center; }
.countdown-boxes {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.cdown-box {
    text-align: center;
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 10px;
    flex: 1;
    border: 1px solid #eef2f7;
}
.cdown-num { font-size: 1.4rem; font-weight: 800; color: #1e293b; line-height: 1; }
.cdown-lbl { font-size: 0.65rem; color: #94a3b8; margin-top: 3px; }
.cdown-box.urgent .cdown-num { color: #ef4444; }
.cdown-box.warning .cdown-num { color: #f7941e; }

/* Progress bar for deadline */
.deadline-progress {
    margin-bottom: 18px;
}
.deadline-progress-bar-wrap {
    background: #f1f5f9;
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 4px;
}
.deadline-progress-bar {
    height: 100%;
    border-radius: 10px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.5s ease;
}
.deadline-progress-bar.warning { background: linear-gradient(90deg, #f7941e, #fbbf24); }
.deadline-progress-bar.urgent  { background: linear-gradient(90deg, #ef4444, #f87171); }
.deadline-progress-hint { font-size: 0.75rem; color: #94a3b8; display: flex; justify-content: space-between; }

/* Apply & Save Buttons */
.btn-apply-main {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00aeef, #009bd5);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    margin-bottom: 10px;
}
.btn-apply-main:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,174,239,0.4); color: white; text-decoration: none; }
.btn-apply-main:disabled, .btn-apply-main.applied {
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: default;
    transform: none; box-shadow: none;
}
.btn-save-outline {
    width: 100%;
    padding: 11px;
    background: white;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}
.btn-save-outline:hover { border-color: #ef4444; color: #ef4444; background: #fff5f5; }
.btn-save-outline.saved { border-color: #ef4444; color: #ef4444; background: #fff5f5; }
.btn-save-outline.saved i { color: #ef4444; }
.login-prompt {
    background: rgba(0,174,239,0.06);
    border: 1px solid rgba(0,174,239,0.15);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 10px;
}
.login-prompt p { font-size: 0.85rem; color: #64748b; margin-bottom: 12px; }
.login-prompt .btn-login {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #00aeef;
    color: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s;
}
.login-prompt .btn-login:hover { background: #009bd5; text-decoration: none; }
.already-applied {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    margin-bottom: 10px;
}
.already-applied i { color: #10b981; font-size: 1.3rem; margin-bottom: 6px; display: block; }
.already-applied p { font-size: 0.85rem; color: #059669; font-weight: 600; margin: 0; }
.already-applied .status-badge {
    margin-top: 8px;
    font-size: 0.78rem;
    color: #64748b;
}

/* Job Details (key info) */
.jd-detail-list { list-style: none; }
.jd-detail-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.88rem;
}
.jd-detail-list li:last-child { border-bottom: none; }
.jd-detail-list .dl-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(0,174,239,0.08);
    color: #00aeef;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}
.jd-detail-list .dl-label { font-size: 0.75rem; color: #94a3b8; }
.jd-detail-list .dl-val { font-weight: 600; color: #414042; }

/* Social Share in Sidebar */
.share-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.share-box {
    flex: 1;
    min-width: 40px;
    height: 38px;
    border-radius: 10px;
    border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: white;
    transition: all 0.25s;
    text-decoration: none;
}
.share-box:hover { transform: translateY(-2px); filter: brightness(1.1); text-decoration: none; }

/* Similar Jobs */
.similar-job-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
    transition: all 0.2s;
}
.similar-job-item:last-child { border-bottom: none; }
.similar-job-item:hover { text-decoration: none; }
.similar-job-item:hover .sim-title { color: #00aeef; }
.sim-logo {
    width: 36px; height: 36px;
    border-radius: 8px;
    object-fit: cover;
    background: linear-gradient(135deg, #00aeef, #009bd5);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 0.8rem; font-weight: 700;
    flex-shrink: 0;
    border: 1px solid #eef2f7;
}
.sim-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.sim-info {}
.sim-title { font-size: 0.85rem; font-weight: 700; color: #414042; transition: color 0.2s; }
.sim-meta  { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }

/* Company Card */
.company-card-inner { text-align: center; }
.company-logo-big {
    width: 72px; height: 72px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #00aeef, #009bd5);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.6rem; font-weight: 800;
    margin: 0 auto 12px;
    border: 2px solid #eef2f7;
}
.company-logo-big img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.company-name-big { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.company-industry { font-size: 0.82rem; color: #94a3b8; margin-bottom: 14px; }
.company-stats-mini { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.cs-mini {
    text-align: center; background: #f8fafc;
    border-radius: 10px; padding: 8px 12px; flex: 1;
}
.cs-mini .cs-num { font-size: 1rem; font-weight: 800; color: #00aeef; }
.cs-mini .cs-lbl { font-size: 0.7rem; color: #94a3b8; }
.company-links .btn-company {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 9px 16px;
    border: 1.5px solid #e2e8f0; border-radius: 10px;
    color: #64748b; font-size: 0.85rem; font-weight: 600;
    text-decoration: none; transition: all 0.3s;
}
.company-links .btn-company:hover { border-color: #00aeef; color: #00aeef; text-decoration: none; }

/* ─── Application Modal ───────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
    background: white;
    border-radius: 20px;
    width: 95%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.35s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(20px); } to { opacity: 1; transform: none; } }
.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #00aeef, #009bd5);
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 800; margin: 0; }
.modal-close-btn {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}
.modal-close-btn:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }
.modal-body { padding: 24px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 0.88rem; font-weight: 600; color: #414042; margin-bottom: 6px; }
.form-field textarea, .form-field input[type="file"] {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    color: #414042;
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
}
.form-field textarea:focus, .form-field input:focus { border-color: #00aeef; }
.form-hint { font-size: 0.78rem; color: #94a3b8; margin-top: 5px; }
.btn-submit-app {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00aeef, #009bd5);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-submit-app:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,174,239,0.4); }
.btn-submit-app:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ─── Scroll To Top ───────────────────────────────────────── */
.scroll-to-top {
    position: fixed;
    bottom: 90px; right: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #f7941e;
    color: white; border: none;
    cursor: pointer;
    display: none;
    align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(247,148,30,0.4);
    transition: all 0.3s;
    z-index: 999;
}
[dir="rtl"] .scroll-to-top { right: auto; left: 24px; }
.scroll-to-top.visible { display: flex; }
.scroll-to-top:hover { background: #e8830a; transform: translateY(-3px); }
@media (max-width: 991px) { .scroll-to-top { bottom: 80px; } }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .jd-wrapper { grid-template-columns: 1fr; }
    .jd-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
    .jd-sidebar > * { margin-bottom: 0; }
}
@media (max-width: 600px) {
    .jd-sidebar { grid-template-columns: 1fr; }
    .jd-hero-top { flex-direction: column; }
    .jd-title { font-size: 1.25rem; }
    .back-bar-inner { flex-wrap: wrap; }
    .breadcrumb-trail { display: none; }
    .share-btns-bar { margin-top: 4px; }
    .jd-wrapper { padding: 0 12px 40px; margin-top: 16px; }
}
