/* ============================================
   JOB DETAIL PAGE - PREMIUM UI/UX
   Navy (#0f1f3d) + Gold (#f0a500) + White
   Mobile-first responsive design
   ============================================ */

/* Pulse animation for urgency badge */
@keyframes jd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes jd-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* ---- Layout ---- */
.jd-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 24px 20px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
}

.jd-main {
    min-width: 0;
}

.jd-sidebar {
    position: sticky;
    top: 20px;
}

/* ---- Header ---- */
.jd-header {
    background: var(--white, #fff);
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    border: 1px solid var(--gray-100, #f3f4f6);
}

.jd-urgency-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--error, #dc3545);
    color: var(--white, #fff);
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 14px;
    animation: jd-pulse 2s ease-in-out infinite, jd-pulse-ring 2s ease-out infinite;
}

.jd-urgency-badge--vehicle {
    background: var(--info, #0dcaf0);
    animation: none;
}

.jd-title {
    font-size: 2rem;
    color: #0f1f3d;
    margin: 10px 0 14px 0;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.jd-company-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 18px;
}

.jd-company-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--gray-100, #f3f4f6);
}

.jd-company-name {
    color: #0f1f3d;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.05rem;
}

.jd-company-name:hover {
    text-decoration: underline;
    color: #f0a500;
}

.jd-location {
    color: var(--gray-500, #6b7280);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.jd-location i {
    color: #f0a500;
    font-size: 1rem;
}

/* Badges Row */
.jd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.jd-badge {
    padding: 7px 16px;
    border-radius: 24px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.jd-badge-type {
    background: #eef2ff;
    color: #3b4fad;
    border: 1px solid #c7d2fe;
}

.jd-badge-pay {
    background: #f0a500;
    color: #0f1f3d;
    font-weight: 700;
    font-size: 0.9rem;
}

.jd-badge-quick {
    background: #e0f7fa;
    color: #00838f;
    border: 1px solid #b2ebf2;
}

.jd-badge-positions {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* Driver Contract badges */
.badge-work-sourcing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    background: linear-gradient(135deg, #f0a500 0%, #f59e0b 100%);
    color: #0f1f3d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(247, 195, 46, 0.3);
}

.badge-work-sourcing--sub {
    background: #0f1f3d;
    color: #f0a500;
    box-shadow: 0 2px 8px rgba(26, 43, 74, 0.2);
}

/* Licence Badge (header) */
.jd-badge-licence {
    background: #0f1f3d;
    color: var(--white, #fff);
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    border: 2px solid #f0a500;
    box-shadow: 0 2px 8px rgba(26, 43, 74, 0.15);
}

.jd-badge-licence i {
    color: #f0a500;
}

.jd-licence-minimum {
    font-size: 0.82rem;
    color: var(--gray-500, #6b7280);
    margin-left: 10px;
    font-weight: 500;
}

/* ---- Key Details Grid ---- */
.jd-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.jd-detail-card {
    background: var(--white, #fff);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--gray-100, #f3f4f6);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}

.jd-detail-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.jd-detail-card .icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fef9e7 0%, #fef3c7 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8860b;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.jd-detail-card .content {
    min-width: 0;
    flex: 1;
}

.jd-detail-card .label {
    font-size: 0.7rem;
    color: var(--gray-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.jd-detail-card .value {
    font-size: 0.95rem;
    color: #0f1f3d;
    font-weight: 700;
    line-height: 1.3;
}

/* ---- Mobile Apply CTA (hidden on desktop) ---- */
.jd-mobile-apply {
    display: none;
}

/* ---- Content Sections ---- */
.jd-section {
    background: var(--white, #fff);
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    border: 1px solid var(--gray-100, #f3f4f6);
}

.jd-section h2 {
    font-size: 1.2rem;
    color: #0f1f3d;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100, #f3f4f6);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.jd-section h2 i {
    color: #f0a500;
    font-size: 1.1rem;
}

/* Description */
.jd-description {
    line-height: 1.85;
    color: var(--gray-600, #4b5563);
    font-size: 0.95rem;
}

.jd-description p {
    margin-bottom: 14px;
}

.jd-description p:last-child {
    margin-bottom: 0;
}

/* ---- Requirements ---- */
.jd-req-grid {
    display: grid;
    gap: 4px;
}

.jd-req-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
}

.jd-req-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.jd-req-item:first-child {
    padding-top: 0;
}

.jd-req-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #fef9e7 0%, #fef3c7 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b8860b;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.jd-req-content {
    flex: 1;
    min-width: 0;
}

.jd-req-label {
    font-size: 0.75rem;
    color: var(--gray-400, #9ca3af);
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.jd-req-value {
    font-weight: 700;
    color: #0f1f3d;
    font-size: 0.95rem;
}

.jd-req-group {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Tags — distinct colors per type */
.jd-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 600;
    margin: 0;
    transition: transform 0.15s;
}

.jd-tag:hover {
    transform: translateY(-1px);
}

/* Blue — endorsements */
.jd-tag-blue {
    background: #eef2ff;
    color: #3b4fad;
    border: 1px solid #c7d2fe;
}

/* Green — tickets/certifications */
.jd-tag-green {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Orange — general */
.jd-tag-orange {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

/* Purple */
.jd-tag-purple {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
}

/* Yellow/Amber — equipment */
.jd-tag-yellow {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Navy — skills */
.jd-tag-navy {
    background: #eef0f5;
    color: #0f1f3d;
    border: 1px solid #c9ceda;
}

/* Licence Box (in requirements) */
.jd-licence-box {
    background: #0f1f3d;
    color: var(--white, #fff);
    padding: 14px 24px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 1px;
    border: 2px solid #f0a500;
    box-shadow: 0 3px 10px rgba(26, 43, 74, 0.2);
}

.jd-licence-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
}

.jd-licence-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-600, #4b5563);
}

.jd-licence-check i {
    color: var(--success, #28a745);
}

/* ---- Benefits Grid ---- */
.jd-benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.jd-benefit-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.jd-benefit-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.jd-benefit-icon {
    width: 36px;
    height: 36px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.jd-benefit-text {
    font-weight: 600;
    color: #0f1f3d;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* ---- Equipment For Sale Section ---- */
.jd-equipment-section {
    background: linear-gradient(135deg, var(--gray-50, #f9fafb) 0%, var(--gray-200, #e5e7eb) 100%);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
}

.jd-equipment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.jd-equipment-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f1f3d;
}

.jd-equipment-badge {
    background: var(--info, #0dcaf0);
    color: var(--white, #fff);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.jd-arrangement-badge {
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.jd-arrangement-badge--sale {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
}

.jd-arrangement-badge--lease {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.jd-arrangement-badge--provided {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.jd-equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.jd-equip-item {
    background: var(--white, #fff);
    padding: 14px;
    border-radius: 10px;
}

.jd-equip-item .label {
    font-size: 0.72rem;
    color: var(--gray-400, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.jd-equip-item .value {
    font-weight: 600;
    color: #0f1f3d;
}

.jd-equipment-photos {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.jd-equipment-photos img {
    width: 180px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid var(--gray-200, #e5e7eb);
    transition: transform 0.15s, border-color 0.15s;
}

.jd-equipment-photos img:hover {
    transform: scale(1.03);
    border-color: #f0a500;
}

.jd-equip-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.jd-equip-feature {
    background: var(--white, #fff);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    border: 1px solid var(--gray-200, #e5e7eb);
}

.jd-equip-price {
    background: linear-gradient(135deg, #0f1f3d 0%, #1a3460 100%);
    color: var(--white, #fff);
    padding: 22px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.jd-equip-price .amount {
    font-size: 1.8rem;
    font-weight: 700;
}

.jd-equip-price .label {
    font-size: 0.8rem;
    opacity: 0.8;
}

.jd-equip-price-details {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85rem;
}

/* ---- Sidebar ---- */

/* Apply Card */
.jd-apply-card {
    background: var(--white, #fff);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid var(--gray-100, #f3f4f6);
    position: sticky;
    top: 20px;
}

.jd-apply-card h3 {
    font-size: 1.15rem;
    color: #0f1f3d;
    margin-bottom: 4px;
    font-weight: 700;
}

.jd-apply-card .jd-apply-note {
    font-size: 0.82rem;
    color: var(--gray-400, #9ca3af);
    margin-bottom: 18px;
}

.jd-apply-motivational {
    font-size: 0.8rem;
    color: var(--gray-400, #9ca3af);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #fffbeb;
    border-radius: 8px;
    border: 1px solid #fde68a;
    font-style: italic;
}

.jd-apply-motivational i {
    color: #f59e0b;
    margin-right: 4px;
}

.jd-apply-btn {
    display: block;
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.jd-apply-btn-primary {
    background: #0f1f3d;
    color: var(--white, #fff);
    box-shadow: 0 3px 10px rgba(26, 43, 74, 0.2);
}

.jd-apply-btn-primary:hover {
    background: var(--navy-light, #1a3460);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(15, 31, 61, 0.35);
}

.jd-apply-btn-quick {
    background: linear-gradient(135deg, #f0a500 0%, #f59e0b 100%);
    color: #0f1f3d;
    box-shadow: 0 3px 10px rgba(247, 195, 46, 0.3);
}

.jd-apply-btn-quick:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(247, 195, 46, 0.35);
}

.jd-apply-btn-signup {
    background: var(--gold, #f0a500);
    color: var(--navy, #0f1f3d);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(240,165,0,0.35);
}

.jd-apply-btn-signup:hover {
    background: var(--gold-dark, #c8880a);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(240,165,0,0.4);
}

.jd-apply-btn-outline {
    background: var(--white, #fff);
    color: #0f1f3d;
    border: 2px solid var(--gray-200, #e5e7eb);
}

.jd-apply-btn-outline:hover {
    background: var(--gray-50, #f9fafb);
    border-color: #0f1f3d;
}

.jd-apply-divider {
    color: var(--gray-400, #9ca3af);
    font-size: 0.82rem;
    margin: 14px 0;
}

.jd-resume-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--tint-info-bg, #e8f4f8);
    border-radius: 8px;
    border: 1px solid var(--tint-info-border, #b8e0f0);
    margin-bottom: 16px;
    font-size: 0.85rem;
}

.jd-resume-status.has-resume {
    background: var(--tint-green-bg, #d4edda);
    border-color: var(--tint-green-border, #c3e6cb);
    color: var(--tint-green-text, #155724);
}

.jd-save-job-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--white, #fff);
    color: var(--gray-500, #6b7280);
    border: 1px solid var(--gray-200, #e5e7eb);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 14px;
}

.jd-save-job-btn:hover {
    background: var(--gray-50, #f9fafb);
}

.jd-save-job-btn.saved {
    background: #fffbeb;
    border-color: #f0a500;
    color: #92400e;
}

.jd-requirements-note {
    background: var(--gray-50, #f9fafb);
    padding: 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    color: var(--gray-500, #6b7280);
    margin-top: 16px;
}

.jd-requirements-note strong {
    display: block;
    margin-bottom: 6px;
}

/* Company Card */
.jd-company-card {
    background: var(--white, #fff);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    border: 1px solid var(--gray-100, #f3f4f6);
}

.jd-company-card h3 {
    font-size: 1.05rem;
    color: #0f1f3d;
    margin-bottom: 16px;
    font-weight: 700;
}

.jd-company-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.jd-company-logo-lg {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--gray-100, #f3f4f6);
}

.jd-company-logo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #eef0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.4rem;
    flex-shrink: 0;
    border: 2px solid var(--gray-100, #f3f4f6);
}

.jd-company-info {
    flex: 1;
    min-width: 0;
}

.jd-company-name-lg {
    font-weight: 700;
    color: #0f1f3d;
    font-size: 1.05rem;
}

.jd-company-member-since {
    font-size: 0.78rem;
    color: var(--gray-400, #9ca3af);
    margin-top: 2px;
}

.jd-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.82rem;
    color: var(--gray-500, #6b7280);
    margin-top: 12px;
}

.jd-company-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.jd-verified-badge {
    background: #ecfdf5;
    color: #065f46;
    padding: 5px 12px;
    border-radius: 24px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid #a7f3d0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.jd-company-desc {
    font-size: 0.9rem;
    color: var(--gray-500, #6b7280);
    line-height: 1.6;
    margin-bottom: 14px;
}

.jd-company-location {
    font-size: 0.82rem;
    color: var(--gray-400, #9ca3af);
}

.jd-company-all-jobs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 10px 16px;
    background: #eef0f5;
    color: #0f1f3d;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    width: 100%;
    justify-content: center;
}

.jd-company-all-jobs:hover {
    background: #0f1f3d;
    color: var(--white, #fff);
}

/* Share Card */
.jd-share-card {
    background: var(--white, #fff);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    border: 1px solid var(--gray-100, #f3f4f6);
}

.jd-share-card h3 {
    font-size: 0.9rem;
    color: #0f1f3d;
    margin-bottom: 12px;
    font-weight: 600;
}

.jd-share-buttons {
    display: flex;
    gap: 8px;
}

.jd-share-btn {
    flex: 1;
    padding: 9px 6px;
    border-radius: 8px;
    font-size: 0.78rem;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.jd-share-btn--facebook {
    background: #1877f2;
    color: #fff;
    border: none;
}

.jd-share-btn--facebook:hover {
    background: #1565c0;
}

.jd-share-btn--twitter {
    background: #1da1f2;
    color: #fff;
    border: none;
}

.jd-share-btn--twitter:hover {
    background: #0d8ddb;
}

.jd-share-btn--linkedin {
    background: #0a66c2;
    color: #fff;
    border: none;
}

.jd-share-btn--linkedin:hover {
    background: #004182;
}

/* Job Stats */
.jd-job-stats {
    background: var(--gray-50, #f9fafb);
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 0.8rem;
    color: var(--gray-400, #9ca3af);
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid var(--gray-100, #f3f4f6);
}

.jd-job-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jd-job-stats span i {
    width: 16px;
    text-align: center;
    color: var(--gray-300, #d1d5db);
}

/* ---- Photo Modal ---- */
#photoModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

#photoModal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

#photoModal button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--white, #fff);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

/* ---- Similar Jobs ---- */
.jd-similar-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--gray-100, #f3f4f6);
}

.jd-similar-section h2 {
    font-size: 1.25rem;
    color: #0f1f3d;
    margin-bottom: 24px;
    font-weight: 700;
}

.jd-similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.jd-similar-card {
    background: var(--white, #fff);
    border-radius: 12px;
    padding: 22px;
    border: 1px solid var(--gray-100, #f3f4f6);
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.jd-similar-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #f0a500;
}

.jd-similar-title {
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 6px;
    font-size: 1rem;
}

.jd-similar-title a {
    color: inherit;
    text-decoration: none;
}

.jd-similar-title a:hover {
    color: #f0a500;
}

.jd-similar-company {
    font-size: 0.85rem;
    color: var(--gray-500, #6b7280);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.jd-similar-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.jd-similar-badge {
    background: #0f1f3d;
    color: #f0a500;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.jd-similar-badge--type {
    background: #eef2ff;
    color: #3b4fad;
}

.jd-similar-badge--pay {
    background: #fffbeb;
    color: #92400e;
}

.jd-similar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--gray-400, #9ca3af);
    padding-top: 10px;
    border-top: 1px solid var(--gray-100, #f3f4f6);
}

.jd-similar-meta i {
    margin-right: 4px;
    color: #f0a500;
}

.jd-similar-link {
    color: #0f1f3d;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.jd-similar-link:hover {
    color: #f0a500;
}

/* ---- Match Score Banner ---- */
.match-score-banner {
    background: linear-gradient(135deg, #eef2ff 0%, #e0f7fa 100%);
    border-radius: 14px;
    padding: 18px 24px;
    margin-bottom: 24px;
    border: 1px solid #c7d2fe;
}

.match-score-content {
    display: flex;
    gap: 16px;
    align-items: center;
}

.match-score-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f1f3d;
}

.match-score-info {
    flex: 1;
}

.match-score-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.match-detail {
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.match-detail-ok {
    background: #dcfce7;
    color: #166534;
}

.match-detail-partial {
    background: #fef3c7;
    color: #92400e;
}

.match-detail-missing {
    background: #fce7e7;
    color: #991b1b;
}

/* Equipment Photo Overflow */
.jd-equip-photo-more {
    width: 180px;
    height: 130px;
    background: #0f1f3d;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white, #fff);
    font-size: 0.9rem;
}

/* Equipment Description Box */
.jd-equip-description {
    background: var(--white, #fff);
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.jd-equip-description strong {
    display: block;
    margin-bottom: 8px;
    color: #0f1f3d;
}

.jd-equip-description p {
    margin: 0;
    color: var(--gray-600, #4b5563);
}

/* Equipment Price Notes */
.jd-equip-price-note {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-left: 8px;
}

.jd-equip-price-unit {
    font-size: 1rem;
}

/* Finance Quote Button */
.jd-equip-finance-btn {
    background: #f0a500;
    color: #0f1f3d;
    padding: 12px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s;
}

.jd-equip-finance-btn:hover {
    background: #d97706;
    color: #fff;
}

/* Vehicle Provision Price Variants */
.jd-equip-item--sale {
    background: linear-gradient(135deg, #dcfce7 0%, #a7f3d0 100%);
}

.jd-equip-item--sale .label,
.jd-equip-item--sale .value {
    color: #166534;
}

.jd-equip-item--sale .value {
    font-size: 1.1rem;
}

.jd-equip-item--lease {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}

.jd-equip-item--lease .label,
.jd-equip-item--lease .value {
    color: #00838f;
}

.jd-equip-item--lease .value {
    font-size: 1.1rem;
}

/* Vehicle Image */
.jd-vehicle-image-wrap {
    margin-top: 16px;
}

.jd-vehicle-image {
    max-width: 100%;
    border-radius: 10px;
    border: 2px solid var(--gray-200, #e5e7eb);
}

/* Applied Status */
.jd-applied-status {
    background: #dcfce7;
    color: #166534;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
    border: 1px solid #a7f3d0;
}

/* Quick Apply Result */
.jd-quick-apply-result {
    display: none;
    margin-bottom: 10px;
}

/* Apply Card Info Note */
.jd-apply-info {
    color: var(--gray-400, #9ca3af);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Login Link */
.jd-login-link {
    color: #0f1f3d;
    font-weight: 700;
}

.jd-login-link:hover {
    color: #f0a500;
}

/* Map Section */
.jd-map-section {
    margin-top: 32px;
}

.jd-map-section h3 {
    font-size: 1.1rem;
    color: #0f1f3d;
    margin-bottom: 16px;
    font-weight: 700;
}

.jd-map-section h3 i {
    color: #f0a500;
    margin-right: 4px;
}

/* JS Alert Feedback */
.jd-alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #a7f3d0;
}

.jd-alert-success a {
    color: #166534;
    font-weight: 700;
}

.jd-alert-error {
    background: #fce7e7;
    color: #991b1b;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #fca5a5;
}

/* Ad containers */
.ad-slot {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

/* ---- Responsive: Tablet ---- */
@media (max-width: 1024px) {
    .jd-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .jd-similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .jd-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
    .jd-container {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 20px;
    }

    .jd-sidebar {
        position: static;
    }

    .jd-apply-card {
        position: static;
    }

    .jd-header {
        padding: 24px 20px;
    }

    .jd-title {
        font-size: 1.5rem;
    }

    .jd-details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .jd-section {
        padding: 24px 20px;
    }

    .jd-similar-section {
        overflow: hidden;
    }

    .jd-similar-grid {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        padding-bottom: 12px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }

    .jd-similar-card {
        min-width: 260px;
        max-width: 85vw;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .jd-benefits-grid {
        grid-template-columns: 1fr;
    }

    .jd-mobile-apply {
        display: block;
        margin-bottom: 24px;
    }

    .jd-mobile-apply .jd-apply-btn {
        margin-bottom: 8px;
    }

    .jd-mobile-apply .jd-apply-motivational {
        text-align: center;
    }

    .jd-share-buttons {
        flex-wrap: wrap;
    }

    .jd-share-btn {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .jd-container {
        padding: 8px;
        gap: 16px;
    }

    .jd-header {
        padding: 20px 16px;
    }

    .jd-title {
        font-size: 1.35rem;
    }

    .jd-details-grid {
        grid-template-columns: 1fr;
    }

    .jd-detail-card {
        padding: 16px;
    }

    .jd-section {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .jd-apply-card {
        padding: 20px 16px;
    }

    .jd-equipment-photos img {
        width: 140px;
        height: 100px;
    }

    .jd-badge {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .jd-badge-licence {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .jd-company-row {
        gap: 8px 12px;
    }

    .jd-licence-checks {
        flex-direction: column;
        gap: 8px;
    }

    /* Touch targets */
    .jd-apply-btn {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .jd-save-job-btn {
        min-height: 48px;
    }

    .jd-share-btn {
        min-height: 48px;
    }

    .jd-tag {
        padding: 8px 14px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
    }
}

/* Icon-only share buttons — fixes overflow/wrapping on narrow sidebars */
.jd-share-buttons--icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.jd-share-btn--icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    color: #fff;
}
.jd-share-btn--icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-decoration: none;
}
.jd-share-btn--icon.jd-share-btn--linkedin   { background: #0a66c2; }
.jd-share-btn--icon.jd-share-btn--linkedin:hover  { background: #004182; color: #fff; }
.jd-share-btn--icon.jd-share-btn--facebook   { background: #1877f2; }
.jd-share-btn--icon.jd-share-btn--facebook:hover  { background: #0f5fd1; color: #fff; }
.jd-share-btn--icon.jd-share-btn--whatsapp   { background: #25d366; }
.jd-share-btn--icon.jd-share-btn--whatsapp:hover  { background: #1da851; color: #fff; }
.jd-share-btn--icon.jd-share-btn--email      { background: #6b7280; }
.jd-share-btn--icon.jd-share-btn--email:hover    { background: #4b5563; color: #fff; }
.jd-share-btn--icon.jd-share-btn--copy       { background: #1a2b4a; }
.jd-share-btn--icon.jd-share-btn--copy:hover     { background: #0f1f3d; color: #fff; }
.jd-share-btn--icon.jd-share-btn--copy.copied    { background: #10b981; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* ============================================================
   Match-score banner — mobile (added 2026-04-15)
   The banner was occupying ~133% of the viewport on iPhone widths
   when the tooltip CSS was missing and the help text rendered inline.
   Cap height + grid the detail pills 2-up to fit on a phone.
   ============================================================ */
@media (max-width: 768px) {
    .match-score-banner {
        max-height: 35vh;
        overflow-y: auto;
        padding: 12px 14px;
    }
    .match-score-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .match-score-number {
        font-size: 2rem;
        min-width: 0;
    }
    .match-score-details {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px 12px;
        justify-content: center;
    }
    .match-score-details .match-detail {
        justify-content: flex-start;
        font-size: 0.8rem;
    }
}
