/* ==========================================================================
   RNG Group – Crelate Jobs
   Styled to match the existing Open Positions page visual language.
   ========================================================================== */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
    --rng-navy:       #1a2b5e;
    --rng-blue:       #0057a8;
    --rng-blue-dark:  #003f80;
    --rng-badge-bg:   #E7C9F1;      /* matches .jobs-wrapper .job-meta span */
    --rng-badge-text: #0f172a;
    --rng-text:       #0f172a;
    --rng-text-muted:  rgba(15, 23, 42, 0.8);
    --rng-card-border:rgba(255, 255, 255, 1);
    --rng-card-bg:    rgba(255, 255, 255, 0.3);
    --rng-transition: 0.15s ease;
}

/* ── Screen-reader only ────────────────────────────────────────────────── */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* ── Filters bar ───────────────────────────────────────────────────────── */
.rng-jobs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.25em;
}

.rng-jobs-filters__search {
    flex: 1 1 240px;
}
@media (max-width: 767px) {
    .rng-jobs-filters__search { flex: 1 1 100%; }
}

.rng-jobs-filters__selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 2 1 320px;
}
@media (max-width: 767px) {
    .rng-jobs-filters__selects { flex: 1 1 100%; }
}

.rng-filter-input {
    width: 100%;
    font-size: 15px;
    font-family: inherit;
    color: var(--rng-text);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 0;
    outline: none;
    transition: border-color var(--rng-transition), box-shadow var(--rng-transition);
    -webkit-appearance: none;
    appearance: none;
        padding:17px 14px 14px;
}

.rng-filter-select {
    width: 100%;
  padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--rng-text);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 0;
    outline: none;
    transition: border-color var(--rng-transition), box-shadow var(--rng-transition);
    -webkit-appearance: none;
    appearance: none;
}

.rng-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230f172a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
    flex: 1 1 160px;
}

@media (max-width: 767px) {
    .rng-filter-select { flex: 1 1 100%; }
}

.rng-filter-input:focus,
.rng-filter-select:focus {
    border-color: var(--rng-badge-bg);
    box-shadow: 0 0 0 2px rgba(231, 201, 241, 0.4);
}

/* ── Meta / count line ─────────────────────────────────────────────────── */
.rng-jobs-meta {
    font-size: 16px;
    color: var(--rng-text-muted);
    margin-bottom: 16px;
}

#rng-job-count {
    font-weight: 600;
    color: var(--rng-text);
}

/* ── Job cards list ────────────────────────────────────────────────────── */
.rng-jobs-list {
    display: flex;
    flex-direction: column;
}

/* Loading state */
.rng-jobs-list.rng-loading {
    opacity: .5;
    pointer-events: none;
    transition: opacity .2s;
}

/* ── Single job card ───────────────────────────────────────────────────── */
.rng-job-card {
    border: 1px solid var(--rng-card-border) !important;
    margin-bottom: 1em !important;
    background: var(--rng-card-bg) !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: background var(--rng-transition);
}

.rng-job-card:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

/* Whole card is a single link */
a.rng-job-card__link {
    display: flex;
    flex-wrap: wrap;
    text-decoration: none;
    color: inherit;
    padding: 1.5em;
    width: 100%;
    box-sizing: border-box;
}

a.rng-job-card__link:hover {
    text-decoration: none;
    color: inherit;
}

/* Card header: title left, badges right */
.rng-job-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.rng-job-card__title {
    margin: 0 0 10px;
    padding-right: 8px;
       font-size: 1.4em!important;
    font-weight: 700!important;
    text-transform: capitalize;
    color: var(--rng-text);
    line-height: 1.3;
    flex: 1 1 auto;
}

.rng-job-card__badges {
    display: flex;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: flex-start;
}

.rng-job-card__excerpt {
    margin: 0;
    font-size: clamp(1.1875rem, 1.142rem + 0.151cqi, 1.3125rem);
    color: var(--rng-text-muted);
    line-height: 1.55;
    width: 100%;
}

/* ── Badge pills ───────────────────────────────────────────────────────── */
/* All badges use the same lavender — matches existing .job-meta span style */
.rng-badge,
.rng-badge--loc,
.rng-badge--pay,
.rng-badge--type {
    display: inline-block;
    background-color: #E7C9F1 !important;
    color: #0f172a !important;
    padding: 4px 6px;
    margin-left: 3px;
    margin-right: 0;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0 !important;
    white-space: nowrap;
    line-height: 1.4;
}

/* ── No results ────────────────────────────────────────────────────────── */
.rng-no-results {
    padding: 32px;
    text-align: center;
    color: var(--rng-text-muted);
    font-size: 16px;
}

.rng-no-results a,
.rng-reset-filters {
    color: var(--rng-blue);
    cursor: pointer;
    text-decoration: underline;
    background: none;
    border: none;
    font-size: inherit;
    padding: 0;
}

/* ── Error ─────────────────────────────────────────────────────────────── */
.rng-error {
    padding: 16px 20px;
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    border-radius: 0;
    color: #721c24;
}

/* ── Debug output ──────────────────────────────────────────────────────── */
.rng-debug {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 24px;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow: auto;
}

.rng-debug h3 { color: #9cdcfe; margin-top: 16px; }
.rng-debug pre { margin: 0; white-space: pre-wrap; word-break: break-all; }

/* ── Job detail page ───────────────────────────────────────────────────── */
/* No extra wrapper padding — detail sits inside the theme's .entry-content */
.rng-job-detail {
    max-width: 860px;
}

.rng-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 600;
    color: var(--rng-blue);
    text-decoration: none;
    margin-bottom: 28px;
}

.rng-back-link:hover {
    color: var(--rng-blue-dark);
    text-decoration: underline;
}

.rng-job-detail__header {
    margin-bottom: 24px;
}

.rng-job-detail__title {
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 700;
    color: var(--rng-navy);
    margin: 0 0 12px;
    line-height: 1.2;
}

.rng-job-detail__badges {
    display: flex;
    flex-wrap: wrap;
}

/* Slightly larger badges on the detail page */
.rng-job-detail__badges .rng-badge {
    font-size: 15px;
    padding: 5px 10px;
}

.rng-job-detail__body {
    font-size: 20px;
    line-height: 1.5;
    color: var(--rng-text);
    margin-bottom: 10px;
}

.rng-job-detail__body h1,
.rng-job-detail__body h2,
.rng-job-detail__body h3 {
    color: var(--rng-navy);
    margin-top: 28px;
    margin-bottom: 10px;
}

.rng-job-detail__body ul,
.rng-job-detail__body ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.rng-job-detail__body li { margin-bottom: 6px; }
.rng-job-detail__body p  { margin-bottom: 14px; }
.rng-job-detail__body a  { color: var(--rng-blue); }

/* ── Apply button ──────────────────────────────────────────────────────── */
.rng-job-detail__apply {
    padding-top: 32px;
    padding: 32px;
    background: #ffffff66;
    border: 1px solid white;
}

.rng-job-detail__apply h2 {
       margin-bottom: var(--hsp-m);
    margin-top: 0;
    font-size: var(--hfs-h3)!important; 
}

.rng-apply-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--rng-blue);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--rng-transition);
}

.rng-apply-btn:hover {
    background: var(--rng-blue-dark);
}


/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .rng-jobs-filters       { flex-direction: column; }
    .rng-jobs-filters__selects { flex-direction: column; }

    .rng-job-card__header {
        flex-direction: column;
        gap: 6px;
    }

    .rng-job-card__badges { flex-shrink: unset; }

    a.rng-job-card__link { padding: 1em; }
}
