/* ── [top_jobs] Shortcode Styles ──────────────────────────────────────────── */

:root {
    --jc-primary:       #2563eb;
    --jc-primary-dark:  #1d4ed8;
    --jc-primary-light: #eff6ff;
    --jc-success:       #10b981;
    --jc-warning:       #f59e0b;
    --jc-danger:        #ef4444;
    --jc-text:          #111827;
    --jc-muted:         #6b7280;
    --jc-border:        #e5e7eb;
    --jc-bg:            #f9fafb;
    --jc-white:         #ffffff;
    --jc-radius:        12px;
    --jc-radius-sm:     8px;
    --jc-shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --jc-shadow-hover:  0 4px 12px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
}

/* ── Wrapper ───────────────────────────────────────────────────────────────── */
.jc-top-jobs {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.jc-top-jobs__title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--jc-text);
    text-align: center;
    margin: 0 0 28px;
    letter-spacing: -.02em;
}

/* ── Grid ──────────────────────────────────────────────────────────────────── */
.jc-top-jobs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */
.jc-job-card {
    position: relative;
    background: var(--jc-white);
    border: 1px solid var(--jc-border);
    border-radius: var(--jc-radius);
    box-shadow: var(--jc-shadow);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.jc-job-card:hover {
    box-shadow: var(--jc-shadow-hover);
    transform: translateY(-2px);
    border-color: #c7d2fe;
}

/* Featured accent */
.jc-job-card--featured {
    border-color: var(--jc-primary);
    border-left-width: 3px;
}
.jc-job-card--featured::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37,99,235,.04) 0%, transparent 60%);
    pointer-events: none;
    border-radius: inherit;
}

/* ── Featured badge ─────────────────────────────────────────────────────────── */
.jc-job-card__featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    top: 14px;
    right: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    box-shadow: 0 1px 4px rgba(245,158,11,.35);
}
.jc-job-card__featured-badge::before {
    content: '★';
}

/* ── Card body ──────────────────────────────────────────────────────────────── */
.jc-job-card__body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px 14px;
    flex: 1;
}

/* ── Logo ───────────────────────────────────────────────────────────────────── */
.jc-job-card__logo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: var(--jc-radius-sm);
    border: 1px solid var(--jc-border);
    overflow: hidden;
    background: var(--jc-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.jc-job-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* ── Info ───────────────────────────────────────────────────────────────────── */
.jc-job-card__info {
    flex: 1;
    min-width: 0;
}
.jc-job-card__title {
    font-size: .97rem;
    font-weight: 700;
    margin: 0 0 3px;
    line-height: 1.35;
    /* leave room for featured badge */
    padding-right: 72px;
}
.jc-job-card--featured .jc-job-card__title {
    padding-right: 88px;
}
.jc-job-card__title a {
    color: var(--jc-text);
    text-decoration: none;
    transition: color .15s;
}
.jc-job-card__title a:hover {
    color: var(--jc-primary);
}
.jc-job-card__company {
    font-size: .82rem;
    color: var(--jc-muted);
    margin: 0 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Meta badges ─────────────────────────────────────────────────────────────── */
.jc-job-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.jc-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .73rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.4;
}
.jc-badge--type {
    background: var(--jc-primary-light);
    color: var(--jc-primary-dark);
    font-weight: 600;
}
.jc-badge--category {
    background: #f0fdf4;
    color: #166534;
}
.jc-badge--location {
    background: #faf5ff;
    color: #6d28d9;
}
.jc-badge--salary {
    background: #fffbeb;
    color: #92400e;
}
.jc-badge svg {
    flex-shrink: 0;
    opacity: .8;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.jc-job-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--jc-border);
    background: var(--jc-bg);
    gap: 10px;
}
.jc-job-card__date {
    font-size: .75rem;
    color: var(--jc-muted);
    white-space: nowrap;
}

/* ── Apply button ────────────────────────────────────────────────────────────── */
.jc-job-card__apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--jc-primary);
    color: #fff !important;
    text-decoration: none !important;
    font-size: .78rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 7px;
    white-space: nowrap;
    transition: background .15s, transform .1s;
    box-shadow: 0 1px 3px rgba(37,99,235,.3);
}
.jc-job-card__apply-btn:hover {
    background: var(--jc-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(37,99,235,.35);
}

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.jc-top-jobs-empty {
    text-align: center;
    color: var(--jc-muted);
    padding: 40px 0;
    font-size: .95rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .jc-top-jobs__grid {
        grid-template-columns: 1fr;
    }
    .jc-job-card__body {
        padding: 16px 16px 10px;
    }
    .jc-job-card__footer {
        padding: 10px 16px 14px;
    }
    .jc-job-card__title {
        font-size: .92rem;
        padding-right: 0;
    }
    .jc-job-card--featured .jc-job-card__title {
        padding-right: 0;
    }
    .jc-job-card__featured-badge {
        position: static;
        margin-bottom: 8px;
        align-self: flex-start;
    }
}

/* ── Sharing buttons (job-detail) ────────────────────────────────────────────── */
.jcand-detail-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 0 8px;
    border-top: 1px solid var(--jc-border, #e5e7eb);
    margin-top: 24px;
}
.jcand-share-label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
    margin-right: 2px;
}
.jcand-share-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.jcand-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .77rem;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 7px;
    text-decoration: none !important;
    transition: opacity .15s, transform .12s;
    color: #fff !important;
}
.jcand-share-btn:hover {
    opacity: .88;
    transform: translateY(-1px);
}
.jcand-share-wa  { background: #25d366; }
.jcand-share-fb  { background: #1877f2; }
.jcand-share-tw  { background: #000; }
.jcand-share-li  { background: #0a66c2; }
.jcand-share-copy { background: #374151; }
.jcand-share-btn svg { flex-shrink: 0; }

@media (max-width: 480px) {
    .jcand-share-btn span { display: none; }
    .jcand-share-btn { padding: 8px 10px; border-radius: 8px; }
}
