/*
 * Jobs Listing Page — Premium UI
 * Internshala-inspired design for BetterJobs
 * Mobile-first, SEO-friendly, accessible
 */

/* ── Page shell ────────────────────────────── */
.bj-jobs-page {
    background: #f1f5f9;
    min-height: calc(100vh - 70px);
}

/* ── Page header ───────────────────────────── */
.bj-jobs-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #1d4ed8 100%);
    padding: 28px 0 24px;
    position: relative;
    overflow: hidden;
}
.bj-jobs-header::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.bj-jobs-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.bj-jobs-header__breadcrumb {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.bj-jobs-header__breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}
.bj-jobs-header__breadcrumb a:hover { color: #fff; text-decoration: underline; }
.bj-jobs-header__breadcrumb span { color: rgba(255,255,255,0.45); }
.bj-jobs-header h1 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.2;
}
.bj-jobs-header p {
    font-size: 0.92rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
}
.bj-jobs-header__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.bj-jobs-header__stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    padding: 4px 12px;
}
.bj-jobs-header__stat strong { color: #fff; }

/* ── Main layout ───────────────────────────── */
.bj-jobs-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

/* ── Mobile filter controls ─────────────────── */
.bj-mobile-topbar {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.bj-mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: border-color 0.2s;
}
.bj-mobile-filter-btn:hover { border-color: #2563eb; color: #2563eb; }
.bj-mobile-filter-btn svg { width: 16px; height: 16px; }
.bj-mobile-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    background: #2563eb;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ── Filter sidebar ─────────────────────────── */
.bj-filter-sidebar {
    width: 268px;
    flex-shrink: 0;
    position: sticky;
    top: 76px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.bj-filter-sidebar::-webkit-scrollbar { width: 4px; }
.bj-filter-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.bj-filter-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.bj-filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px 13px;
    border-bottom: 1px solid #f1f5f9;
}
.bj-filter-panel__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}
.bj-filter-panel__title svg { width: 16px; height: 16px; color: #2563eb; }
.bj-filter-clear-all {
    font-size: 0.75rem;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.bj-filter-clear-all:hover { opacity: 1; text-decoration: underline; }

/* Search inside sidebar */
.bj-filter-search {
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}
.bj-filter-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.83rem;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.2s;
    box-sizing: border-box;
}
.bj-filter-search input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.bj-filter-search__icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 15px;
    height: 15px;
    pointer-events: none;
}

/* Collapsible filter groups */
.bj-filter-group {
    border-bottom: 1px solid #f1f5f9;
}
.bj-filter-group:last-of-type { border-bottom: none; }

.bj-filter-group__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    transition: background 0.15s;
}
.bj-filter-group__toggle:hover { background: #fafbfc; }
.bj-filter-group__chevron {
    width: 14px; height: 14px;
    color: #94a3b8;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.bj-filter-group__toggle[aria-expanded="true"] .bj-filter-group__chevron {
    transform: rotate(180deg);
}

.bj-filter-group__body {
    padding: 0 16px 12px;
}
.bj-filter-group__body[hidden] { display: none; }

.bj-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 2px;
    cursor: pointer;
}
.bj-filter-option input[type="checkbox"],
.bj-filter-option input[type="radio"] {
    width: 15px; height: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    accent-color: #2563eb;
    flex-shrink: 0;
}
.bj-filter-option label {
    flex: 1;
    font-size: 0.82rem;
    color: #334155;
    cursor: pointer;
    line-height: 1.4;
}
.bj-filter-option .bj-filter-count {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 400;
}

.bj-filter-apply-btn {
    display: block;
    width: calc(100% - 32px);
    margin: 12px 16px 16px;
    padding: 10px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s, transform 0.15s;
}
.bj-filter-apply-btn:hover { background: #1d4ed8; transform: translateY(-1px); }

/* ── Job listings area ──────────────────────── */
.bj-job-listing {
    flex: 1;
    min-width: 0;
}

.bj-listing-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}
.bj-listing-count {
    font-size: 0.92rem;
    color: #334155;
    font-weight: 500;
}
.bj-listing-count strong { color: #0f172a; font-weight: 700; font-size: 1rem; }

.bj-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
}
.bj-sort-wrap label { font-weight: 500; }
.bj-sort-wrap select {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.82rem;
    color: #334155;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}
.bj-sort-wrap select:focus { outline: none; border-color: #2563eb; }

/* Active filter chips */
.bj-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}
.bj-active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
}
.bj-active-filter-chip button {
    background: none;
    border: none;
    cursor: pointer;
    color: #2563eb;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.bj-active-filter-chip button:hover { opacity: 1; }

/* ── Job cards ──────────────────────────────── */
.bj-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bj-job-card-wrap {
    background: #fff;
    border: 1px solid #e8edf2;
    border-left: 3px solid transparent;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.18s ease;
    animation: bjCardIn 0.35s ease both;
}
.bj-job-card-wrap:hover {
    box-shadow: 0 6px 22px rgba(37,99,235,0.09), 0 2px 6px rgba(0,0,0,0.05);
    border-left-color: #2563eb;
    transform: translateY(-2px);
}

/* Stagger animation for cards */
@keyframes bjCardIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bj-jobs-list > .bj-job-card-wrap:nth-child(1)  { animation-delay: 0.04s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(2)  { animation-delay: 0.08s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(3)  { animation-delay: 0.12s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(4)  { animation-delay: 0.16s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(5)  { animation-delay: 0.20s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(6)  { animation-delay: 0.24s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(7)  { animation-delay: 0.28s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(8)  { animation-delay: 0.30s; }
.bj-jobs-list > .bj-job-card-wrap:nth-child(n+9) { animation-delay: 0.32s; }

/* Company logo */
.bj-card-logo {
    width: 58px; height: 58px;
    border-radius: 10px;
    border: 1px solid #e8edf2;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.bj-card-logo img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 5px;
}
.bj-card-logo-text {
    width: 58px; height: 58px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* Card content */
.bj-card-content { flex: 1; min-width: 0; }

.bj-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 7px;
}
.bj-card-title-block { flex: 1; min-width: 0; }

.bj-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.3;
    display: block;
    margin-bottom: 3px;
    transition: color 0.18s;
    white-space: normal;
    word-break: break-word;
}
.bj-job-card-wrap:hover .bj-card-title { color: #2563eb; }

.bj-card-title-company {
    color: #2563eb;
    font-weight: 800;
}
.bj-card-title-hiring {
    color: #64748b;
    font-weight: 500;
    font-size: 0.9em;
}

.bj-card-company-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.83rem;
    color: #475569;
}
.bj-card-company-row a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.bj-card-company-row a:hover { color: #2563eb; }

/* Verified badge */
.bj-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 20px;
    padding: 1px 7px;
    line-height: 1.4;
}
.bj-verified svg { width: 10px; height: 10px; }

/* Urgency badge */
.bj-urgent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 20px;
    padding: 2px 8px;
    animation: bjPulse 2s infinite;
}
@keyframes bjPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.7; }
}

/* Card action area (Apply button) */
.bj-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    flex-shrink: 0;
}
.bj-btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 17px;
    background: #2563eb;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
    white-space: nowrap;
    line-height: 1.3;
}
.bj-btn-apply:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
    color: #fff !important;
}
.bj-btn-apply svg { width: 13px; height: 13px; }

.bj-btn-save {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 6px 11px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s;
    white-space: nowrap;
}
.bj-btn-save svg { width: 13px; height: 13px; }
.bj-btn-save:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

/* Work type / status badges row */
.bj-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 9px;
}
.bj-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.71rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    line-height: 1.5;
}
.bj-pill-blue   { background: #eff6ff; color: #2563eb; }
.bj-pill-green  { background: #f0fdf4; color: #16a34a; }
.bj-pill-orange { background: #fff7ed; color: #ea580c; }
.bj-pill-purple { background: #f5f3ff; color: #7c3aed; }
.bj-pill-gray   { background: #f1f5f9; color: #475569; }
.bj-pill-teal   { background: #f0fdfa; color: #0f766e; }

/* Meta details row: location, salary, experience */
.bj-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-bottom: 9px;
    font-size: 0.82rem;
    color: #475569;
    align-items: center;
}
.bj-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.bj-card-meta-item svg {
    width: 13px; height: 13px;
    flex-shrink: 0;
}
.bj-card-meta-item.bj-salary {
    color: #15803d;
    font-weight: 600;
}
.bj-card-meta-sep {
    color: #cbd5e1;
    font-size: 0.75rem;
}

/* Description preview */
.bj-card-desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card footer */
.bj-card-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.bj-card-footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

/* Mobile apply button — hidden on desktop, shown on mobile */
.bj-btn-apply-mobile { display: none; }
.bj-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.bj-skill-tag {
    display: inline-block;
    font-size: 0.71rem;
    padding: 2px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    line-height: 1.5;
}
.bj-card-posted {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}
.bj-card-posted svg { width: 11px; height: 11px; }

/* ── Pagination ─────────────────────────────── */
.bj-pagination-wrap {
    margin-top: 24px;
}
.bj-pagination-wrap .page-numbers {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.bj-pagination-wrap ul.page-numbers {
    display: flex;
}
.bj-pagination-wrap .page-numbers li {
    display: inline-flex;
}
.bj-pagination-wrap .page-numbers a,
.bj-pagination-wrap .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px; height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    background: #fff;
    transition: all 0.15s;
}
.bj-pagination-wrap .page-numbers a:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}
.bj-pagination-wrap .page-numbers span.current {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 700;
}
.bj-pagination-wrap .page-numbers .dots {
    border: none; background: none; color: #94a3b8;
}

/* ── Skeleton loading ───────────────────────── */
.bj-jobs-list.is-loading { opacity: 0.5; pointer-events: none; }
.bj-card-skeleton {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.bj-skeleton-logo {
    width: 58px; height: 58px;
    border-radius: 10px;
    flex-shrink: 0;
}
.bj-skeleton-content { flex: 1; }
.bj-skeleton-block {
    background: linear-gradient(90deg, #f1f5f9 25%, #e8edf2 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bjSkel 1.4s ease-in-out infinite;
    border-radius: 5px;
    margin-bottom: 8px;
}
@keyframes bjSkel {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Empty state ────────────────────────────── */
.bj-empty-state {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 56px 32px;
    text-align: center;
}
.bj-empty-state__icon {
    width: 56px; height: 56px;
    color: #cbd5e1;
    margin: 0 auto 14px;
    display: block;
}
.bj-empty-state h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}
.bj-empty-state p {
    font-size: 0.86rem;
    color: #64748b;
}

/* ── Mobile filter drawer ───────────────────── */
.bj-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 900;
    backdrop-filter: blur(2px);
}
.bj-filter-overlay.is-active { display: block; }
.bj-filter-drawer {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(300px, 85vw);
    background: #fff;
    z-index: 901;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.bj-filter-drawer.is-active { transform: translateX(0); }
.bj-filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.bj-filter-drawer-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
.bj-filter-drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
}
.bj-filter-drawer-close:hover { background: #f1f5f9; color: #0f172a; }
.bj-filter-drawer-close svg { width: 20px; height: 20px; }

/* ── Responsive ─────────────────────────────── */

/* ── Tablet 769–1024px ──────────────────────── */
@media (max-width: 1024px) {
    .bj-filter-sidebar { width: 236px; }
}

/* ── Mobile ≤768px ──────────────────────────── */
@media (max-width: 768px) {

    /* ── Page header ── */
    .bj-jobs-header { padding: 18px 0 15px; }
    .bj-jobs-header h1 { font-size: clamp(1.05rem, 4vw, 1.35rem); }
    .bj-jobs-header p { font-size: 0.83rem; }
    .bj-jobs-header__meta { margin-top: 10px; gap: 8px; }
    .bj-jobs-header__stat { font-size: 0.78rem; padding: 3px 11px; }

    /* ── Layout: single column, no horizontal padding (cards handle own padding) ── */
    .bj-jobs-layout {
        padding: 0 0 40px;
        flex-direction: column;
        gap: 0;
    }
    .bj-filter-sidebar { display: none; }
    .bj-job-listing { padding: 0 12px; }

    /* ── Mobile topbar: sticky filter + sort bar ── */
    .bj-mobile-topbar {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 9px 12px;
        background: #f1f5f9;
        border-bottom: 1px solid #e2e8f0;
        position: sticky;
        top: 0;
        z-index: 80;
        flex-wrap: nowrap;
        margin: 0 -12px;
        width: calc(100% + 24px);
    }
    .bj-mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 14px;
        background: #fff;
        border: 1.5px solid #e2e8f0;
        border-radius: 8px;
        font-size: 0.81rem;
        font-weight: 600;
        color: #1e293b;
        cursor: pointer;
        flex-shrink: 0;
        transition: border-color 0.15s, color 0.15s;
    }
    .bj-mobile-filter-btn:hover { border-color: #2563eb; color: #2563eb; }
    #bj-sort-mobile {
        flex: 1;
        min-width: 0;
        border: 1.5px solid #e2e8f0;
        border-radius: 8px;
        padding: 8px 10px;
        font-size: 0.81rem;
        background: #fff;
        color: #334155;
        appearance: auto;
    }

    /* ── Listing topbar (count + desktop sort) ── */
    .bj-listing-topbar {
        padding-top: 12px;
        margin-bottom: 10px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .bj-listing-count { font-size: 0.86rem; }
    .bj-sort-wrap { display: none; } /* sort is in the sticky topbar on mobile */

    /* ── Active filter chips: horizontally scrollable ── */
    .bj-active-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin-bottom: 10px;
    }
    .bj-active-filters::-webkit-scrollbar { display: none; }
    .bj-active-filter-chip { white-space: nowrap; flex-shrink: 0; }

    /* ── Job cards ── */
    .bj-jobs-list { gap: 9px; }

    .bj-job-card-wrap {
        /* FIXED: keep horizontal layout — logo left, content right */
        flex-direction: row;
        gap: 11px;
        padding: 14px 14px 12px;
        border-radius: 10px;
        /* Remove hover lift on touch devices */
        transform: none !important;
    }
    .bj-job-card-wrap:hover { transform: none; }

    /* Logo: slightly smaller on mobile */
    .bj-card-logo,
    .bj-card-logo-text {
        width: 48px;
        height: 48px;
        border-radius: 9px;
        flex-shrink: 0;
        align-self: flex-start;
    }
    .bj-card-logo-text { font-size: 1.1rem; }

    /* Card header: title block takes full width, actions button hidden */
    .bj-card-header {
        flex-direction: column;
        gap: 3px;
        margin-bottom: 6px;
        align-items: flex-start;
    }
    .bj-card-title-block { width: 100%; }

    /* Desktop apply button — hidden on mobile (replaced by .bj-btn-apply-mobile) */
    .bj-card-actions { display: none !important; }

    /* Title: 2-line clamp */
    .bj-card-title {
        font-size: 0.92rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 2px;
    }
    .bj-card-company-row { font-size: 0.77rem; gap: 4px; }

    /* Badges: horizontally scrollable, no wrapping */
    .bj-card-badges {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 4px;
        margin-bottom: 7px;
        padding-bottom: 1px;
    }
    .bj-card-badges::-webkit-scrollbar { display: none; }
    .bj-pill { white-space: nowrap; flex-shrink: 0; }

    /* Meta row: compact, no separator dots */
    .bj-card-meta {
        gap: 5px 10px;
        font-size: 0.78rem;
        margin-bottom: 7px;
    }
    .bj-card-meta-sep { display: none; }
    .bj-card-meta-item { flex-shrink: 0; }

    /* Description: tighter */
    .bj-card-desc {
        font-size: 0.78rem;
        margin-bottom: 9px;
        -webkit-line-clamp: 2;
    }

    /* Footer top row: skills + posted date */
    .bj-card-footer-top {
        flex-wrap: wrap;
        gap: 6px 8px;
        align-items: center;
    }
    .bj-card-skills { gap: 4px; }
    .bj-skill-tag { font-size: 0.68rem; padding: 1px 7px; }
    .bj-card-posted { font-size: 0.72rem; }

    /* Mobile apply button: full-width, prominent */
    .bj-btn-apply-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 10px 16px;
        background: #2563eb;
        color: #fff !important;
        border-radius: 8px;
        font-size: 0.84rem;
        font-weight: 700;
        text-decoration: none !important;
        border: none;
        cursor: pointer;
        transition: background 0.18s;
        -webkit-tap-highlight-color: transparent;
    }
    .bj-btn-apply-mobile:active { background: #1d4ed8; }

    /* Pagination */
    .bj-pagination-wrap { margin-top: 20px; }
    .bj-pagination-wrap .page-numbers a,
    .bj-pagination-wrap .page-numbers span {
        min-width: 40px;
        height: 40px;
        font-size: 0.86rem;
    }
}

/* ── Small mobile ≤480px ────────────────────── */
@media (max-width: 480px) {

    /* Header: compact */
    .bj-jobs-header { padding: 14px 0 13px; }
    .bj-jobs-header h1 { font-size: 1.05rem; }
    .bj-jobs-header__meta { margin-top: 7px; }
    .bj-jobs-header__stat { font-size: 0.74rem; padding: 2px 9px; }

    /* Layout */
    .bj-job-listing { padding: 0 10px; }

    /* Cards: tighter */
    .bj-jobs-list { gap: 8px; }
    .bj-job-card-wrap {
        padding: 11px 12px 10px;
        gap: 9px;
        border-radius: 9px;
    }
    .bj-card-logo,
    .bj-card-logo-text {
        width: 42px;
        height: 42px;
        border-radius: 8px;
        font-size: 0.95rem;
    }
    .bj-card-title {
        font-size: 0.87rem;
        -webkit-line-clamp: 2;
    }
    /* On very narrow screens, hide "is hiring for" connector text to save space */
    .bj-card-title-hiring {
        display: inline;
        font-size: 0.82em;
    }
    .bj-card-company-row { font-size: 0.74rem; }
    .bj-card-meta { font-size: 0.75rem; gap: 4px 8px; }
    .bj-card-desc { font-size: 0.76rem; }

    .bj-mobile-topbar { padding: 8px 10px; }
    .bj-mobile-filter-btn { padding: 7px 12px; font-size: 0.78rem; }

    /* Pagination: larger tap targets */
    .bj-pagination-wrap .page-numbers a,
    .bj-pagination-wrap .page-numbers span {
        min-width: 44px;
        height: 44px;
    }

    /* Active filter chips */
    .bj-active-filter-chip { font-size: 0.74rem; padding: 3px 8px; }
}

/* ── Accessibility ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .bj-job-card-wrap,
    .bj-btn-apply,
    .bj-btn-apply-mobile,
    .bj-btn-save {
        animation: none !important;
        transition: none !important;
    }
}

/* ── Amazon Sponsored Products — listing page ── */
.bj-listing-amz {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e9f2;
}
.bj-listing-amz-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    margin-bottom: 14px;
}
.bj-listing-amz-label::before,
.bj-listing-amz-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.bj-listing-amz-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.bj-listing-amz-card {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}
.bj-listing-amz-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.bj-listing-amz-img {
    background: #f8f9fb;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    text-decoration: none;
    padding: 12px;
}
.bj-listing-amz-img:hover { opacity: 0.9; }
.bj-listing-amz-img img {
    max-height: 116px;
    max-width: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.bj-listing-amz-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.bj-listing-amz-badge {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    font-size: 0.63rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    width: fit-content;
    line-height: 1.5;
}
.bj-listing-amz-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    transition: color 0.15s;
}
.bj-listing-amz-name:hover { color: #c45500; text-decoration: underline; }
.bj-listing-amz-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.bj-listing-amz-mrp {
    font-size: 0.70rem;
    color: #94a3b8;
    text-decoration: line-through;
}
.bj-listing-amz-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.bj-listing-amz-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 9px 10px;
    background: #FF9900;
    color: #0f172a !important;
    font-size: 0.73rem;
    font-weight: 800;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.15s;
    text-align: center;
}
.bj-listing-amz-btn:hover { background: #e68900; color: #0f172a !important; }

/* Responsive */
@media (max-width: 900px) {
    .bj-listing-amz-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
    .bj-listing-amz-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .bj-listing-amz-img  { height: 110px; padding: 8px; }
    .bj-listing-amz-img img { max-height: 94px; }
    .bj-listing-amz-name { font-size: 0.72rem; }
    .bj-listing-amz-price { font-size: 0.95rem; }
    .bj-listing-amz-btn  { font-size: 0.68rem; padding: 7px 8px; }
}
