.khhub-job-section {
    padding: 70px 0 20px;
    background: #f5f7fb;
    float: left;
    width: 100%;
}

.khhub-language-select {
    float: right;
    position: relative;
    top:24px;
}

.khhub-language-select summary {
    list-style: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #3b82f6;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.khhub-language-select summary::-webkit-details-marker {
    display: none;
}

.khhub-language-select__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 156px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
    padding: 6px;
    display: none;
    z-index: 40;
}

.khhub-language-select[open] .khhub-language-select__menu {
    display: block;
}

.khhub-language-select__menu a {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 6px;
}

.khhub-language-select__menu a:hover,
.khhub-language-select__menu a.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}

.kh-header-auth-link {
    color: inherit;
}

.soc-log a.kh-google-log {
    background: #db4437;
}

@media (max-width: 1024px) {

    .khhub-language-select summary {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 767px) {
  

    .khhub-language-select summary {
        width: 38px;
        height: 38px;
        border-radius: 6px;
    }

    .khhub-language-select__menu {
        min-width: 138px;
        right: -8px;
    }
}

.khhub-job-section .container {
    width: 92%;
    max-width: 1224px;
    margin: 0 auto;
}

/* Section header: theme uses a huge absolute .section-subtitle as watermark — reset for jobs block */
.khhub-job-section .section-title {
    position: relative;
    z-index: 0;
    isolation: isolate;
    overflow: visible;
}

.khhub-job-section .section-subtitle {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    max-width: 42rem;
    margin: 0 auto 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    opacity: 1;
    z-index: 1;
    color: #64748b;
}

.khhub-job-section .section-subtitle:before {
    display: none;
}

.khhub-job-section .section-title h2 {
    position: relative;
    z-index: 2;
    float: none;
    width: auto;
    margin-top: 0;
}

.khhub-job-section .section-separator {
    float: none;
    width: 100%;
    clear: both;
}

.khhub-job-section .section-title p {
    float: none;
    width: auto;
    clear: both;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

/* Landing jobs: forum-style thread list + infinite scroll */
.khhub-job-scroll-host.khhub-job-forum-board {
    float: left;
    width: 100%;
    max-height: min(72vh, 680px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #eef1f5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    margin-bottom: 24px;
    position: relative;
    scroll-behavior: smooth;
}

.khhub-job-scroll-host__inner {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    background: #eef1f5;
}

.khhub-job-forum-row {
    border-bottom: 1px solid #d8dde4;
    background: #f9fafb;
}

.khhub-job-forum-row:nth-child(even) {
    background: #ffffff;
}

.khhub-job-forum-row:last-of-type {
    border-bottom: none;
}

.khhub-job-forum-row__link {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 16px;
    padding: 14px 18px;
    color: inherit;
    transition: background-color 0.12s ease;
    min-width: 0;
}

.khhub-job-forum-row:hover .khhub-job-forum-row__link,
.khhub-job-forum-row:focus-within .khhub-job-forum-row__link {
    background: rgba(59, 130, 246, 0.06);
}

.khhub-job-forum-avatar {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
    align-self: center;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.khhub-job-forum-avatar:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.khhub-job-forum-avatar__glyph {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    text-transform: uppercase;
}

.khhub-job-forum-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 8px;
}

.khhub-job-forum-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.khhub-job-forum-badge {
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid transparent;
}

a.khhub-job-forum-badge {
    text-decoration: none;
    cursor: pointer;
}

a.khhub-job-forum-badge:hover {
    filter: brightness(0.97);
}

.khhub-job-forum-row--even .khhub-job-forum-badge:not(.khhub-job-forum-badge--ward) {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.khhub-job-forum-row--odd .khhub-job-forum-badge:not(.khhub-job-forum-badge--ward) {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}

/* Solid ward chip: white label on ward color (inline hex when available). */
.khhub-job-forum-badge--ward {
    color: #fff;
    background-color: #334155;
    border-color: #334155;
    text-transform: none;
    font-weight: 600;
    font-size: 12px;
}

.khhub-job-forum-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
}

.khhub-job-forum-title__a {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.khhub-job-forum-row--even .khhub-job-forum-title__a {
    color: #c2410c;
}

.khhub-job-forum-row--odd .khhub-job-forum-title__a {
    color: #1d4ed8;
}

.khhub-job-forum-row:hover .khhub-job-forum-title__a,
.khhub-job-forum-row:focus-within .khhub-job-forum-title__a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.khhub-job-forum-excerpt {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}

.khhub-job-forum-side {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex-shrink: 0;
}

.khhub-job-forum-stats {
    flex: 0 0 92px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    text-align: right;
    border-left: 1px solid #e2e8f0;
    padding-left: 16px;
    align-self: stretch;
}

.khhub-job-forum-stats__label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.khhub-job-forum-stats__value {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.khhub-job-forum-activity {
    flex: 0 0 118px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
    border-left: 1px solid #e2e8f0;
    padding-left: 16px;
    align-self: stretch;
}

.khhub-job-forum-activity__time {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.khhub-job-forum-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid #d8dde4;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
}

/* Author `display:flex` wins over UA `[hidden]` alone — force hide when toggled via hidden attribute */
.khhub-job-forum-loading[hidden] {
    display: none !important;
}

.khhub-job-forum-board--loading .khhub-job-forum-loading {
    border-top-color: #bfdbfe;
}

.khhub-job-forum-loading--end {
    color: #64748b;
    font-weight: 500;
}

.khhub-job-forum-loading__text {
    font-weight: 600;
}

.khhub-job-forum-loading__spinner {
    width: 22px;
    height: 22px;
    border: 2px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: khhub-jobs-spin 0.7s linear infinite;
}

@keyframes khhub-jobs-spin {
    to {
        transform: rotate(360deg);
    }
}

.khhub-job-forum-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .khhub-job-scroll-host.khhub-job-forum-board {
        max-height: min(70vh, 760px);
    }

    .khhub-job-forum-title {
        font-size: 17px;
    }

    .khhub-job-forum-row__link {
        padding: 16px 22px;
        gap: 20px;
    }

    .khhub-job-forum-stats {
        flex-basis: 104px;
    }

    .khhub-job-forum-activity {
        flex-basis: 132px;
    }
}

@media (max-width: 767px) {
    .khhub-job-scroll-host.khhub-job-forum-board {
        max-height: min(68vh, 560px);
        border-radius: 8px;
    }

    .khhub-job-forum-row__link {
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 12px;
    }

    .khhub-job-forum-avatar {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .khhub-job-forum-avatar__glyph {
        font-size: 15px;
    }

    .khhub-job-forum-main {
        flex: 1 1 calc(100% - 52px);
        min-width: 0;
        padding-right: 0;
    }

    .khhub-job-forum-side {
        flex: 1 1 100%;
        width: calc(100% - 52px);
        margin-left: 52px;
        margin-top: 4px;
        padding-top: 10px;
        border-top: 1px dashed #cbd5e1;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }

    .khhub-job-forum-stats {
        flex: 0 0 auto;
        border-left: none;
        padding-left: 0;
        align-items: flex-start;
        text-align: left;
    }

    .khhub-job-forum-activity {
        flex: 0 0 auto;
        border-left: none;
        padding-left: 0;
        align-items: flex-end;
        text-align: right;
    }

    .khhub-job-forum-stats__label {
        font-size: 12px;
    }

    .khhub-job-forum-stats__value {
        font-size: 16px;
    }

    .khhub-job-forum-activity__time {
        font-size: 12px;
        white-space: normal;
    }
}

.khhub-job-section__cta {
    margin-top: 24px;
    padding: 20px 16px;
    border-radius: 12px;
}

.khhub-job-section__cta .btn {
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.25);
}

@media (max-width: 767px) {
    .khhub-job-section {
        padding-top: 20px;
    }
}

/* Mobile-friendly: allow readable scaling and comfortable social tap targets on landing */
body.khhub-theme {
    -webkit-text-size-adjust: 100%;
}

body.khhub-theme .footer-social a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
