/* ==========================================================================
   Job Profile Sites — public directory
   Standalone stylesheet (does not depend on admin.css / auth.css).
   Accent matches the application's indigo (#4f46e5).
   ========================================================================== */

:root {
    --jsp-accent: #4f46e5;
    --jsp-accent-dark: #4338ca;
    --jsp-accent-soft: #eef2ff;
    --jsp-ink: #1e293b;
    --jsp-muted: #64748b;
    --jsp-faint: #94a3b8;
    --jsp-border: #e2e8f0;
    --jsp-bg: #f6f8fc;
    --jsp-card: #ffffff;
    --jsp-radius: 16px;
    --jsp-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .05);
    --jsp-shadow-hover: 0 10px 30px rgba(79, 70, 229, .16);
}

* { box-sizing: border-box; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--jsp-bg);
    color: var(--jsp-ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.jsp-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- Hero --- */
.jsp-hero {
    position: relative;
    background:
        radial-gradient(1000px 400px at 15% -10%, rgba(255, 255, 255, .18), transparent 60%),
        linear-gradient(135deg, #4f46e5 0%, #6d28d9 55%, #7c3aed 100%);
    color: #fff;
    padding: 28px 20px 48px;
    overflow: hidden;
}
.jsp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: .5;
    pointer-events: none;
}
.jsp-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
    text-align: center;
}
.jsp-crumb { text-align: left; margin-bottom: 14px; }
.jsp-crumb a {
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    transition: background .2s;
}
.jsp-crumb a:hover { background: rgba(255, 255, 255, .22); }

.jsp-hero-icon {
    width: 66px; height: 66px;
    margin: 6px auto 16px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(6px);
}
.jsp-hero h1 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -.02em;
}
.jsp-hero p {
    max-width: 680px;
    margin: 0 auto 24px;
    font-size: clamp(14px, 1.6vw, 16px);
    color: rgba(255, 255, 255, .9);
}

/* --------------------------------------------------------------- Search --- */
.jsp-search {
    position: relative;
    max-width: 640px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 999px;
    padding: 6px 6px 6px 46px;
    box-shadow: 0 18px 40px rgba(30, 27, 75, .28);
}
.jsp-search-icon {
    position: absolute;
    left: 18px;
    color: var(--jsp-faint);
    font-size: 15px;
}
.jsp-search input[type="text"] {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    font-size: 15px;
    padding: 12px 6px;
    background: transparent;
    color: var(--jsp-ink);
    font-family: inherit;
}
.jsp-search-btn {
    border: 0;
    cursor: pointer;
    background: var(--jsp-accent);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 11px 24px;
    border-radius: 999px;
    font-family: inherit;
    transition: background .2s, transform .15s;
}
.jsp-search-btn:hover { background: var(--jsp-accent-dark); }
.jsp-search-clear {
    position: absolute;
    right: 118px;
    color: var(--jsp-faint);
    text-decoration: none;
    font-size: 13px;
    padding: 6px;
}
.jsp-search-clear:hover { color: var(--jsp-ink); }

.jsp-hero-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, .88);
}
.jsp-hero-meta i { margin-right: 6px; }

/* ----------------------------------------------------------------- Body --- */
.jsp-main {
    flex: 1;
    width: 100%;
    max-width: 1160px;
    margin: -28px auto 0;
    padding: 0 20px 48px;
    position: relative;
    z-index: 2;
}

.jsp-toolbar {
    background: var(--jsp-card);
    border: 1px solid var(--jsp-border);
    border-radius: var(--jsp-radius);
    box-shadow: var(--jsp-shadow);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.jsp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.jsp-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: all .18s;
}
.jsp-chip:hover { background: var(--jsp-accent-soft); color: var(--jsp-accent-dark); }
.jsp-chip.is-active {
    background: var(--jsp-accent);
    color: #fff;
    border-color: var(--jsp-accent);
}
.jsp-chip-count {
    background: rgba(15, 23, 42, .08);
    border-radius: 999px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 700;
}
.jsp-chip.is-active .jsp-chip-count { background: rgba(255, 255, 255, .25); }

.jsp-sort {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--jsp-muted);
    font-size: 13px;
}
.jsp-sort select {
    font-family: inherit;
    font-size: 13px;
    padding: 8px 12px;
    border: 1px solid var(--jsp-border);
    border-radius: 10px;
    background: #fff;
    color: var(--jsp-ink);
    cursor: pointer;
    outline: none;
}
.jsp-sort select:focus { border-color: var(--jsp-accent); }

.jsp-subchips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.jsp-subchip {
    padding: 6px 13px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--jsp-border);
    color: var(--jsp-muted);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 500;
    transition: all .18s;
}
.jsp-subchip:hover { border-color: var(--jsp-accent); color: var(--jsp-accent-dark); }
.jsp-subchip.is-active { background: var(--jsp-accent-soft); border-color: var(--jsp-accent); color: var(--jsp-accent-dark); }

.jsp-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--jsp-ink);
    margin: 30px 0 16px;
}
.jsp-section-title i { color: var(--jsp-accent); }
.jsp-count-pill {
    background: var(--jsp-accent-soft);
    color: var(--jsp-accent-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
}
.jsp-featured { padding-top: 4px; }

/* ---------------------------------------------------------------- Grid --- */
.jsp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* ---------------------------------------------------------------- Card --- */
.jsc-card {
    position: relative;
    background: var(--jsp-card);
    border: 1px solid var(--jsp-border);
    border-radius: var(--jsp-radius);
    box-shadow: var(--jsp-shadow);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.jsc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--jsp-shadow-hover);
    border-color: #c7d2fe;
}
.jsc-card.jsc-featured { border-color: #fcd34d; }

.jsc-ribbon {
    position: absolute;
    top: 14px;
    right: -6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px 0 0 999px;
    box-shadow: 0 4px 10px rgba(217, 119, 6, .35);
}
.jsc-ribbon i { font-size: 9px; }

.jsc-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.jsc-logo {
    flex: 0 0 52px;
    width: 52px; height: 52px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--jsp-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
.jsc-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.jsc-logo-fallback { color: var(--jsp-accent); font-size: 22px; display: flex; }
.jsc-card-title { min-width: 0; }
.jsc-card-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--jsp-ink);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.jsc-site-name {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--jsp-faint);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.jsc-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.jsc-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--jsp-accent-dark);
    background: var(--jsp-accent-soft);
    padding: 3px 10px;
    border-radius: 999px;
}
.jsc-badge i { font-size: 10px; opacity: .85; }
.jsc-badge-sub { color: #0369a1; background: #e0f2fe; }

.jsc-desc {
    margin: 0;
    font-size: 13.5px;
    color: var(--jsp-muted);
    line-height: 1.62;
    flex: 1;
    overflow-wrap: anywhere;
}

.jsc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.jsc-tag {
    font-size: 11px;
    color: var(--jsp-muted);
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px 8px;
}

.jsc-visit {
    margin-top: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 11px;
    background: var(--jsp-accent);
    color: #fff;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: background .18s, transform .12s;
}
.jsc-visit:hover { background: var(--jsp-accent-dark); transform: translateY(-1px); }
.jsc-visit i { font-size: 12px; }
.jsc-visit.is-disabled {
    background: #f1f5f9;
    color: var(--jsp-faint);
    cursor: not-allowed;
}

/* ------------------------------------------------------------- Empty ----- */
.jsp-empty {
    background: var(--jsp-card);
    border: 1px dashed var(--jsp-border);
    border-radius: var(--jsp-radius);
    text-align: center;
    padding: 64px 24px;
    color: var(--jsp-muted);
}
.jsp-empty i { font-size: 46px; color: #cbd5e1; margin-bottom: 14px; display: block; }
.jsp-empty h3 { margin: 0 0 8px; color: var(--jsp-ink); font-size: 18px; }
.jsp-empty p { margin: 0 auto 18px; max-width: 440px; font-size: 14px; }
.jsp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--jsp-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    padding: 10px 20px;
    border-radius: 10px;
}
.jsp-btn:hover { background: var(--jsp-accent-dark); }

/* -------------------------------------------------------- Pagination ----- */
.jsp-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.jsp-page {
    min-width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--jsp-border);
    color: var(--jsp-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: all .18s;
}
.jsp-page:hover { border-color: var(--jsp-accent); color: var(--jsp-accent-dark); }
.jsp-page.is-active { background: var(--jsp-accent); border-color: var(--jsp-accent); color: #fff; }

/* ------------------------------------------------------------- Footer --- */
.jsp-footer {
    text-align: center;
    padding: 24px 20px 34px;
    color: var(--jsp-faint);
    font-size: 12.5px;
}
.jsp-footer a {
    color: var(--jsp-accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 6px;
}
.jsp-footer a:hover { text-decoration: underline; }

/* ------------------------------------------------------------ Focus ----- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(79, 70, 229, .45);
    outline-offset: 2px;
    border-radius: 8px;
}

/* -------------------------------------------------------- Responsive ---- */
@media (max-width: 992px) {
    .jsp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .jsp-hero { padding: 20px 16px 44px; }
    .jsp-grid { grid-template-columns: 1fr; }
    .jsp-toolbar { flex-direction: column; align-items: stretch; }
    .jsp-sort { justify-content: space-between; }
    .jsp-search { flex-wrap: wrap; padding: 8px 8px 8px 42px; border-radius: 18px; }
    .jsp-search input[type="text"] { width: 100%; }
    .jsp-search-btn { width: 100%; }
    .jsp-search-clear { right: 14px; top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    .jsc-card:hover { transform: none; }
}
