/* Careers list + detail (layout modelled on bigbrainmagazine.com/careers.html, Big Brain Media colours) */

/* Banner: shared partials/page-banner (same as the other inner pages) */

/* Job type filter tabs (top of the vacancy list; they used to sit in the banner, which made it taller than the other pages') */
.career-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 30px; position: relative; z-index: 9; }
.career-filter button {
    border: 1px solid var(--theme, #6A47ED);
    background: #fff;
    color: var(--header, #17012C);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 12px 26px;
    border-radius: 30px;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.career-filter button:hover, .career-filter button.active { background: var(--theme, #6A47ED); border-color: var(--theme, #6A47ED); color: #fff; }

/* Same section spacing as the rest of the site (--sec-gap in dynamic.css) */
.career-section { padding: var(--sec-gap, 60px) 0; background: #fff; }
#apply { scroll-margin-top: 100px; }
.career-intro { max-width: 820px; margin: 20px auto 10px; text-align: center; }
.career-intro h2 { font-size: 24px; margin-bottom: 12px; }
.career-card, .career-detail, #careerApplyModal { line-height: 1.45; }

/* Vacancy card */
.career-card {
    background: #f5f3fd;
    border: 1px solid #e6e1fa;
    border-radius: 14px;
    margin-bottom: 30px;
    height: calc(100% - 30px);
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .25s;
}
.career-card:hover { box-shadow: 0 12px 30px rgba(23, 1, 44, .12); transform: translateY(-3px); }
.career-card-head { padding: 16px 18px 14px; border-bottom: 1px solid #e3ddf8; text-align: center; }
.career-card-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.career-card-title a { color: var(--header, #17012C); }
.career-card-title a:hover { color: var(--theme, #6A47ED); }
.career-card-body { display: flex; align-items: center; padding: 20px 22px 10px; flex: 1; }
.career-card-img {
    flex: 0 0 140px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 7px solid var(--theme, #6A47ED);
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
}
.career-card-img img { width: 100%; height: 100%; object-fit: cover; }
.career-card-img i { font-size: 50px; color: var(--theme, #6A47ED); }
.career-card-foot { text-align: right; padding: 4px 22px 20px; }

/* Job type badges - one colour per type */
.career-types { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.career-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #fff;
    background: var(--theme, #6A47ED);
    border-radius: 20px;
    padding: 4px 12px;
    line-height: 1.4;
    white-space: nowrap;
}
.career-type.t-fulltime   { background: #2e7d32; }
.career-type.t-parttime   { background: #1565c0; }
.career-type.t-freelance  { background: #8e24aa; }
.career-type.t-homebased  { background: #ef6c00; }
.career-type.t-internship { background: #00838f; }
.career-specs .career-types { justify-content: flex-start; }

.career-specs { width: 100%; font-size: 14px; line-height: 1.4; }
.career-specs td { padding: 3px 0; vertical-align: top; color: var(--text, #504E4E); }
.career-specs td:first-child { width: 110px; padding-right: 12px; white-space: nowrap; }
.career-specs td:last-child { font-weight: 700; color: var(--header, #17012C); }

.career-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--theme, #6A47ED);
    color: #fff !important;
    border: 0;
    border-radius: 30px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.career-btn:hover { background: var(--header, #17012C); }
.career-btn.lg { padding: 14px 34px; font-size: 15px; letter-spacing: .5px; text-transform: uppercase; }

.career-empty { text-align: center; padding: 40px 15px; font-size: 17px; }
.career-empty i { display: block; font-size: 40px; color: var(--theme, #6A47ED); margin-bottom: 12px; }

/* Detail page */
.career-detail-head {
    color: var(--theme, #6A47ED);
    font-size: 19px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 1px solid #e3ddf8;
    margin-bottom: 28px;
}
.career-detail-img { border-radius: 14px; overflow: hidden; background: #f5f3fd; }
.career-detail-img img { width: 100%; display: block; }
.career-detail-img.no-img { display: flex; align-items: center; justify-content: center; min-height: 300px; }
.career-detail-img.no-img i { font-size: 110px; color: var(--theme, #6A47ED); }
.career-detail .career-specs { font-size: 15px; margin-bottom: 22px; }
.career-detail .career-specs td { padding: 7px 0; border-bottom: 1px dashed #e3ddf8; }
.career-detail .career-specs td:first-child { width: 140px; }
.career-detail .career-specs tr:last-child td { border-bottom: 0; }
.career-detail .career-specs td.career-type-label { padding-top: 10px; }
.career-type-note { font-size: 13px; font-weight: 400; color: var(--text, #504E4E); line-height: 1.5; margin: 8px 0 4px; }
.career-desc-title { color: var(--theme, #6A47ED); font-size: 18px; font-weight: 700; margin: 0 0 8px; }
.career-desc { font-size: 15px; line-height: 1.7; }
.career-desc p { margin: 0 0 10px; }
.career-desc ul, .career-desc ol { padding-left: 20px; margin-bottom: 10px; }
.career-desc ul li { list-style: disc; }
.career-desc ol li { list-style: decimal; }
.career-similar { background: #f5f3fd; padding: var(--sec-gap, 60px) 0; }
/* Vacancy cards carry a 30px bottom margin: where they end the section ("similar jobs"), take it off the bottom space */
.career-similar { padding-bottom: calc(var(--sec-gap, 60px) - 30px); }
.career-similar h2 { font-size: 30px; margin-bottom: 30px; text-align: center; }
.career-similar .career-card { background: #fff; }

/* Apply popup */
#careerApplyModal .modal-content { border: 0; border-radius: 14px; overflow: hidden; }
/* .modal-dialog-scrollable scrolls .modal-body only when it is a direct flex child of .modal-content. The <form> in
   between grew to its full height and .modal-content (overflow:hidden) cut the bottom of the form off on laptops.
   Make the form the flex column instead: header and Submit stay visible, the fields scroll. */
#careerApplyModal .modal-content > form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: 100%; overflow: hidden; }
#careerApplyModal .modal-content > form > .modal-body { overflow-y: auto; overscroll-behavior: contain; }
#careerApplyModal .modal-header, #careerApplyModal .modal-footer { flex-shrink: 0; }
#careerApplyModal .modal-footer { background: #fff; border-top: 1px solid #ece7ff; }
@media (max-height: 760px) and (min-width: 576px) {
    #careerApplyModal .modal-dialog { --bs-modal-margin: 1rem; }
    #careerApplyModal .modal-header { padding-top: 12px; padding-bottom: 12px; }
    #careerApplyModal .modal-body .row { --bs-gutter-y: .75rem; }
}
#careerApplyModal .modal-header { background: var(--theme, #6A47ED); color: #fff; }
#careerApplyModal .modal-title { color: #fff; font-weight: 600; font-size: 20px; }
#careerApplyModal .modal-body { padding: 18px 22px 8px; }
#careerApplyModal label { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--header, #17012C); }
#careerApplyModal label small { font-weight: 400; color: #777; }
#careerApplyModal .form-control { border-radius: 8px; font-size: 14px; padding: 8px 12px; }
#careerApplyModal .form-control:focus { border-color: var(--theme, #6A47ED); box-shadow: 0 0 0 .2rem rgba(106, 71, 237, .15); }
#careerApplyModal .radio-row label:not(.d-block) { font-weight: 400; margin-right: 18px; cursor: pointer; }
#careerApplyModal .career-type-choose { background: #f5f3fd; border: 1px solid #e3ddf8; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
#careerApplyModal .career-type-choose .career-types { justify-content: flex-start; }
#careerApplyModal .career-type-opt { display: inline-block; border: 1px solid var(--theme, #6A47ED); border-radius: 20px; padding: 5px 14px; margin: 4px 8px 2px 0; background: #fff; font-weight: 500; cursor: pointer; }
#careerApplyModal .career-type-opt input { margin-right: 4px; accent-color: var(--theme, #6A47ED); }
#careerApplyModal .modal-footer .btn-light { border-radius: 30px; padding: 10px 22px; }
@media (max-width: 400px) { #careerApplyModal .g-recaptcha { transform: scale(.85); transform-origin: 0 0; } }

@media (max-width: 767px) {
    .career-filter { margin-bottom: 24px; }
    /* All on top, then the job types 2 per row */
    .career-filter { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .career-filter button { padding: 10px 8px; font-size: 12px; letter-spacing: 0; }
    .career-filter button[data-filter="all"] { grid-column: 1 / -1; }
    .career-card-body { flex-direction: column; padding: 16px 16px 8px; }
    .career-card-img { margin: 0 0 15px; flex-basis: auto; width: 120px; height: 120px; }
    .career-card-foot { text-align: center; }
    .career-detail .career-specs td:first-child { width: 115px; }
    #careerApplyModal .modal-dialog { margin: 10px; }
}
