/* Public Brisa Jobs board (/jobs/). No JS required. Classes use the jb- prefix
   so they don't collide with Bootstrap, style.css or site.css. */

.jb-header,
.jb-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2328;
}

.jb-page *,
.jb-page *::before,
.jb-page *::after {
    box-sizing: border-box;
}

.jb-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.jb-page a {
    color: #2563eb;
}

.jb-page a:hover {
    color: #1d4ed8;
}

/* Header */

.jb-header {
    background: #fff;
    border-bottom: 1px solid #dbeafe;
}

.jb-header .jb-container {
    display: flex;
    align-items: center;
    min-height: 64px;
}

.jb-header-logo {
    display: inline-flex;
    align-items: center;
}

.jb-header-logo img {
    height: 40px;
    width: auto;
}

/* Hero */

.jb-hero {
    padding: 28px 0 20px;
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
}

.jb-hero-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: #1f2328;
}

.jb-hero-subtitle {
    margin: 6px 0 0;
    font-size: 16px;
    color: #475467;
}

.jb-body {
    padding-top: 20px;
    padding-bottom: 8px;
    font-size: 15px;
    line-height: 1.5;
}

/* Filters */

.jb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.jb-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 160px;
    min-width: 0;
}

.jb-field-keyword {
    flex: 2 1 240px;
}

.jb-field label {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
}

.jb-field input,
.jb-field select {
    width: 100%;
    padding: 8px 10px;
    font: inherit;
    color: inherit;
    border: 1px solid #c4c9d0;
    border-radius: 6px;
    background: #fff;
}

.jb-field input:focus,
.jb-field select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
    border-color: #3b82f6;
}

.jb-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.jb-button {
    display: inline-block;
    padding: 9px 18px;
    font: inherit;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
    background: #2563eb;
    border: 0;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
}

.jb-page a.jb-button,
.jb-page a.jb-button:hover {
    color: #fff;
}

.jb-button:hover,
.jb-button:focus-visible {
    background: #1d4ed8;
}

.jb-count {
    margin: 0 0 12px;
    font-weight: 600;
}

.jb-empty {
    padding: 32px 16px;
    text-align: center;
}

.jb-empty p {
    margin: 0 0 8px;
}

/* Layout: list on the left, detail on the right */

.jb-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 16px;
    align-items: start;
}

.jb-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jb-page a.jb-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
}

.jb-page a.jb-card:hover {
    color: inherit;
    border-color: #3b82f6;
}

.jb-page a.jb-card.is-selected {
    background: #eff6ff;
    border-color: #3b82f6;
    box-shadow: inset 4px 0 0 #3b82f6;
}

.jb-card-title {
    font-weight: 600;
    color: #2563eb;
}

.jb-card-company {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
    font-size: 14px;
}

.jb-card-logo,
.jb-detail-logo {
    flex: 0 0 auto;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.jb-card-logo {
    width: 40px;
    height: 40px;
}

.jb-card-location {
    font-size: 14px;
}

.jb-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.jb-tag {
    padding: 2px 8px;
    font-size: 13px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 4px;
}

.jb-card-posted,
.jb-detail-posted {
    font-size: 13px;
    color: #59636e;
}

.jb-pagination {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

/* Detail: sticky with its own scroll, so list and detail scroll separately */

.jb-detail {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 8px;
}

.jb-back {
    display: none;
    margin-bottom: 12px;
}

.jb-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.jb-detail-logo {
    width: 56px;
    height: 56px;
}

.jb-detail-heading {
    min-width: 0;
}

.jb-detail-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.jb-detail-company {
    margin: 4px 0 0;
}

.jb-detail-meta {
    margin: 12px 0 8px;
}

.jb-detail-meta div {
    display: flex;
    gap: 8px;
}

.jb-detail-meta dt {
    font-weight: 600;
}

.jb-detail-meta dd {
    margin: 0;
}

.jb-detail-posted {
    margin: 0 0 12px;
}

.jb-description {
    margin-top: 16px;
    overflow-wrap: anywhere;
}

/* Mobile: list only, or detail only with ?job= */

@media (max-width: 767.98px) {
    .jb-hero-title {
        font-size: 24px;
    }

    .jb-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .jb-detail {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
        border: 0;
    }

    .jb-page:not(.has-selection) .jb-detail {
        display: none;
    }

    .jb-page.has-selection .jb-hero,
    .jb-page.has-selection .jb-filters,
    .jb-page.has-selection .jb-count,
    .jb-page.has-selection .jb-list {
        display: none;
    }

    .jb-page.has-selection .jb-back {
        display: inline-block;
    }
}
