:root {
    --wjsp-primary: #4a91ce;
    --wjsp-primary-dark: #142a52;
    --wjsp-primary-soft: rgba(74, 145, 206, 0.12);
    --wjsp-primary-soft-2: rgba(20, 42, 82, 0.07);
    --wjsp-text: #142a52;
    --wjsp-muted: #667085;
    --wjsp-border: #d9e5f2;
    --wjsp-border-strong: rgba(74, 145, 206, 0.35);
    --wjsp-bg: #f6f9fd;
    --wjsp-white: #ffffff;
    --wjsp-radius-sm: 12px;
    --wjsp-radius: 18px;
    --wjsp-radius-lg: 26px;
    --wjsp-shadow: 0 18px 45px rgba(20, 42, 82, 0.10);
    --wjsp-shadow-hover: 0 24px 60px rgba(20, 42, 82, 0.16);
}

.wjsp-button-wrapper,
.wjsp-form-wrap,
.wjsp-directory,
.wjsp-single-profile,
.wjsp-card,
.wjsp-profile-form,
.wjsp-search-form {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--wjsp-text);
    box-sizing: border-box;
}

.wjsp-button-wrapper *,
.wjsp-form-wrap *,
.wjsp-directory *,
.wjsp-single-profile *,
.wjsp-card *,
.wjsp-profile-form *,
.wjsp-search-form * {
    box-sizing: border-box;
}

.wjsp-open-form,
.wjsp-submit,
.wjsp-search-form button,
.wjsp-view-profile,
.wjsp-resume-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    background: linear-gradient(135deg, var(--wjsp-primary) 0%, var(--wjsp-primary-dark) 100%);
    color: #ffffff !important;
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    text-decoration: none !important;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 28px rgba(74, 145, 206, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    appearance: none;
}

.wjsp-open-form:hover,
.wjsp-submit:hover,
.wjsp-search-form button:hover,
.wjsp-view-profile:hover,
.wjsp-resume-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(20, 42, 82, 0.24);
    filter: saturate(1.08);
}

.wjsp-open-form:focus,
.wjsp-submit:focus,
.wjsp-search-form button:focus,
.wjsp-view-profile:focus,
.wjsp-resume-button:focus,
.wjsp-input:focus,
.wjsp-profile-form select:focus,
.wjsp-search-form input:focus,
.wjsp-search-form select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(74, 145, 206, 0.18), 0 12px 28px rgba(74, 145, 206, 0.18);
    border-color: var(--wjsp-primary);
}

.wjsp-hidden-form {
    margin-top: 22px;
}

.wjsp-form-wrap {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    border: 1px solid var(--wjsp-border);
    border-radius: var(--wjsp-radius-lg);
    padding: 30px;
    box-shadow: var(--wjsp-shadow);
    max-width: 1020px;
    width: 100%;
}

.wjsp-form-wrap::before,
.wjsp-single-profile::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--wjsp-primary), var(--wjsp-primary-dark));
}

.wjsp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.wjsp-profile-form label,
.wjsp-search-form label {
    display: block;
    margin-bottom: 0;
}

.wjsp-profile-form label span,
.wjsp-search-form label span {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--wjsp-primary-dark);
    font-size: 13px;
    letter-spacing: 0.01em;
}

.wjsp-input,
.wjsp-profile-form select,
.wjsp-search-form input,
.wjsp-search-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--wjsp-border);
    border-radius: 14px;
    padding: 13px 15px;
    background: #ffffff;
    color: var(--wjsp-text);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.45;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wjsp-input::placeholder,
.wjsp-search-form input::placeholder {
    color: #98a6b8;
}

textarea.wjsp-input {
    min-height: 120px;
    resize: vertical;
}

input[type="file"].wjsp-input {
    padding: 11px 14px;
    background: var(--wjsp-primary-soft-2);
    border-style: dashed;
    cursor: pointer;
}

input[type="file"].wjsp-input::file-selector-button {
    border: 0;
    border-radius: 999px;
    background: var(--wjsp-primary-dark);
    color: #ffffff;
    padding: 9px 15px;
    margin-right: 12px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    cursor: pointer;
}

.wjsp-full {
    display: block;
    margin-top: 18px;
}

.wjsp-submit {
    margin-top: 22px;
    min-width: 180px;
}

.wjsp-alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.wjsp-alert ul {
    margin: 8px 0 0 18px;
}

.wjsp-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.wjsp-error {
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    color: #9b1c1c;
}

.wjsp-directory {
    width: 100%;
}

.wjsp-search-form {
    display: grid;
    grid-template-columns: 1.25fr 0.9fr 0.9fr auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 28px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(74, 145, 206, 0.10) 0%, rgba(20, 42, 82, 0.05) 100%);
    border: 1px solid var(--wjsp-border);
    border-radius: var(--wjsp-radius-lg);
    box-shadow: 0 14px 38px rgba(20, 42, 82, 0.08);
}

.wjsp-search-form button {
    min-width: 120px;
}

.wjsp-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.wjsp-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--wjsp-border);
    border-radius: var(--wjsp-radius-lg);
    background: var(--wjsp-white);
    box-shadow: var(--wjsp-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.wjsp-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(74, 145, 206, 0.08), rgba(255, 255, 255, 0) 42%);
}

.wjsp-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--wjsp-shadow-hover);
    border-color: var(--wjsp-border-strong);
}

.wjsp-card-photo {
    height: 350px;
    background: linear-gradient(135deg, rgba(74, 145, 206, 0.18), rgba(20, 42, 82, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wjsp-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
    height: 100% !important;
    object-position: top;
}

.wjsp-card:hover .wjsp-card-photo img {
    transform: scale(1.04);
}

.wjsp-card-photo span {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--wjsp-primary), var(--wjsp-primary-dark));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(20, 42, 82, 0.22);
}

.wjsp-card-body {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.wjsp-card h3 {
    margin: 0 0 7px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--wjsp-primary-dark);
}

.wjsp-card h3 a {
    color: var(--wjsp-primary-dark);
    text-decoration: none;
}

.wjsp-card h3 a:hover {
    color: var(--wjsp-primary);
}

.wjsp-card p {
    margin: 8px 0;
    color: var(--wjsp-muted);
    font-size: 14px;
    line-height: 1.55;
}

.wjsp-job-title {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: 2px !important;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--wjsp-primary-soft);
    font-weight: 800;
    color: var(--wjsp-primary-dark) !important;
    font-size: 13px !important;
}

.wjsp-skills {
    min-height: 42px;
    color: #4d5b6c !important;
}

.wjsp-view-profile {
    width: 100%;
    margin-top: 10px;
}

.wjsp-no-results {
    padding: 24px;
    border: 1px dashed var(--wjsp-border-strong);
    border-radius: var(--wjsp-radius);
    background: var(--wjsp-bg);
    color: var(--wjsp-muted);
    text-align: center;
    font-weight: 600;
}

.wjsp-single-profile {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--wjsp-border);
    border-radius: var(--wjsp-radius-lg);
    padding: 32px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
    box-shadow: var(--wjsp-shadow);
}

.wjsp-single-header {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--wjsp-border);
}

.wjsp-single-header img {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 16px 34px rgba(20, 42, 82, 0.16);
}

.wjsp-single-header h2 {
    margin: 0 0 8px;
    color: var(--wjsp-primary-dark);
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.1;
    font-weight: 800;
}

.wjsp-single-header p {
    display: inline-flex;
    margin: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--wjsp-primary-soft);
    color: var(--wjsp-primary-dark);
    font-weight: 800;
}

.wjsp-single-profile h3 {
    margin: 24px 0 10px;
    color: var(--wjsp-primary-dark);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 800;
}

.wjsp-single-profile p {
    color: #42526b;
    font-size: 15px;
    line-height: 1.75;
}

.wjsp-details-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.wjsp-details-list > div {
    padding: 15px;
    border: 1px solid var(--wjsp-border);
    border-radius: 16px;
    background: #ffffff;
    color: #42526b;
    box-shadow: 0 10px 24px rgba(20, 42, 82, 0.05);
}

.wjsp-details-list strong {
    display: block;
    margin-bottom: 5px;
    color: var(--wjsp-primary-dark);
    font-weight: 800;
}

.wjsp-contact-box {
    background: linear-gradient(135deg, rgba(74, 145, 206, 0.12), rgba(20, 42, 82, 0.07));
    border: 1px solid var(--wjsp-border);
    border-radius: var(--wjsp-radius);
    padding: 20px;
    margin: 24px 0;
}

.wjsp-contact-box h3 {
    margin-top: 0;
}

.wjsp-contact-box a {
    color: var(--wjsp-primary-dark);
    font-weight: 700;
}

.wjsp-pagination {
    margin-top: 28px;
}

.wjsp-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wjsp-pagination a,
.wjsp-pagination span {
    display: flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--wjsp-border);
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--wjsp-primary-dark);
    background: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

.wjsp-pagination .current,
.wjsp-pagination a:hover {
    background: var(--wjsp-primary-dark);
    color: #ffffff;
    border-color: var(--wjsp-primary-dark);
}

@media (max-width: 1024px) {
    .wjsp-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wjsp-search-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .wjsp-grid,
    .wjsp-card-grid,
    .wjsp-search-form,
    .wjsp-details-list {
        grid-template-columns: 1fr;
    }

    .wjsp-form-wrap,
    .wjsp-single-profile {
        padding: 24px;
        border-radius: 22px;
    }

    .wjsp-single-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .wjsp-open-form,
    .wjsp-submit,
    .wjsp-search-form button,
    .wjsp-view-profile,
    .wjsp-resume-button {
        width: 100%;
    }
}

/* Clean no-sidebar single profile page */
.wjsp-template-page {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
    padding: 56px 20px 70px;
    color: var(--wjsp-text);
}

.wjsp-template-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.wjsp-template-heading {
    margin: 0 0 26px;
    text-align: left;
}

.wjsp-template-heading h1 {
    display: none;
}

.wjsp-template-heading h1 {
    margin: 12px 0 0;
    color: var(--wjsp-primary-dark);
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.wjsp-back-link {
    display: inline-flex;
    align-items: center;
    color: var(--wjsp-primary-dark) !important;
    background: rgba(74, 145, 206, 0.12);
    border: 1px solid rgba(74, 145, 206, 0.25);
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
}

.wjsp-back-link:hover {
    background: var(--wjsp-primary);
    color: #ffffff !important;
}

.wjsp-single-avatar-fallback {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--wjsp-primary), var(--wjsp-primary-dark));
    color: #ffffff;
    font-size: 42px;
    font-weight: 800;
    border: 4px solid #ffffff;
    box-shadow: 0 16px 34px rgba(20, 42, 82, 0.16);
}

/* Fallback for themes that still force their own sidebar/blog layout on custom post type singles. */
body.single-wjsp_profile #pacz-sidebar,
body.single-wjsp_profile .pacz-sidebar,
body.single-wjsp_profile aside.sidebar,
body.single-wjsp_profile .sidebar,
body.single-wjsp_profile .widget-area,
body.single-wjsp_profile .post-meta,
body.single-wjsp_profile .entry-meta,
body.single-wjsp_profile .single-social-section,
body.single-wjsp_profile .comments-area,
body.single-wjsp_profile .navigation.post-navigation,
body.single-wjsp_profile .post-navigation,
body.single-wjsp_profile .pacz-post-prev-next,
body.single-wjsp_profile .prev-next-posts {
    display: none !important;
}

body.single-wjsp_profile .wjsp-template-page .wjsp-single-profile {
    max-width: 100%;
}

@media (max-width: 767px) {
    .wjsp-template-page {
        padding: 34px 14px 50px;
    }

    .wjsp-template-heading h1 {
        font-size: 30px;
    }

    .wjsp-single-avatar-fallback {
        width: 92px;
        height: 92px;
        border-radius: 22px;
        font-size: 34px;
    }
}
