/* =========================================================
   Careers: listing cards, job detail page, application form
   Uses the theme tokens from main.css (--primary-color etc.)
   ========================================================= */
:root {
    --job-border: #4a494980;
    --job-surface: rgba(255, 255, 255, .03);
    --job-surface-hover: rgba(88, 189, 220, .07);
    --job-muted: rgba(255, 255, 255, .6);
}

/* ---------- Shared ---------- */
/* Careers pages are fully dark: never let the white body show between sections. */
body.page-template-career,
body.single-mgm_job { background-color: #000; }

.job-section__title {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.85rem);
    color: #fff;
    margin: 0;
    padding-bottom: 1rem;
}
.req { color: #ff6b6b; }
.opt { color: var(--job-muted); font-size: .85em; font-weight: 400; }

.job-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    color: var(--job-muted);
    font-size: .95rem;
}
.job-facts li { display: inline-flex; align-items: center; gap: .45rem; }
.job-facts i { color: var(--primary-color); }

.job-tag {
    display: inline-block;
    font-size: .78rem;
    letter-spacing: .03em;
    padding: .2rem .7rem;
    border-radius: 50px;
    border: 1px solid rgba(88, 189, 220, .45);
    color: var(--primary-color);
    background: rgba(88, 189, 220, .08);
}

/* ---------- Listing ---------- */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 1.5rem;
}
.job-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem;
    border: 1px solid var(--job-border);
    border-radius: 24px;
    background: var(--job-surface);
    transition: border-color .3s ease, background .3s ease, transform .3s ease;
}
.job-card:hover {
    border-color: rgba(88, 189, 220, .6);
    background: var(--job-surface-hover);
    transform: translateY(-3px);
}
.job-card__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.job-card__title {
    font-family: var(--heading-font);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: .75rem;
}
.job-card__title a { color: #fff; }
.job-card__title a:hover { color: var(--primary-color); }
.job-card__desc {
    color: var(--job-muted);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.job-card__posted { margin: 0; padding-top: 1rem; font-size: .85rem; color: rgba(255, 255, 255, .45); }
.job-card__posted i { margin-right: .3rem; }
.job-card__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.job-card__actions .btn { flex: 1 1 140px; }

.job-empty, .job-general {
    border: 1px dashed var(--job-border);
    border-radius: 24px;
    padding: 2rem;
    color: var(--job-muted);
}
.job-empty { text-align: center; }
.job-empty i { font-size: 2rem; color: var(--primary-color); display: block; margin-bottom: .5rem; }
.job-general {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
}

/* ---------- Job hero ---------- */
.job-hero {
    position: relative;
    background-color: #000;
    color: #fff;
    padding: 170px 0 3.5rem;
    overflow: hidden;
}
.job-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, #000 20%, rgba(0, 0, 0, .75) 60%, rgba(0, 0, 0, .55)),
                      linear-gradient(0deg, #000, transparent 60%),
                      var(--job-hero-img, none);
    background-size: cover;
    background-position: center;
}
.job-hero::after {
    content: "";
    position: absolute;
    left: -10%;
    top: 30%;
    width: 40%;
    height: 60%;
    background: radial-gradient(closest-side, rgba(42, 168, 220, .28), transparent);
    pointer-events: none;
}
.job-breadcrumb { --bs-breadcrumb-divider-color: var(--job-muted); margin-bottom: 1.5rem; font-size: .9rem; }
.job-breadcrumb a { color: var(--job-muted); }
.job-breadcrumb a:hover { color: var(--primary-color); }
.job-breadcrumb .active { color: #fff; }
.job-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .8rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: .75rem;
}
.job-hero__title {
    font-family: var(--heading-font);
    font-weight: 600;
    font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
    line-height: 1.15;
    margin-bottom: .75rem;
}
.job-hero__tagline {
    font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem);
    color: rgba(255, 255, 255, .8);
    margin-bottom: 1.5rem;
}
.job-facts--hero { gap: .75rem; margin-top: 1.25rem; }
.job-hero__note { margin: 0; padding-top: 1.25rem; color: rgba(255, 255, 255, .8); }
.job-hero__note i { color: var(--primary-color); margin-right: .25rem; }
.job-hero__note strong { color: #fff; font-weight: 600; }
.job-apply-intro { color: rgba(255, 255, 255, .6); }
.job-apply-intro strong { color: #fff; }
.job-facts--hero li {
    padding: .6rem 1rem;
    border: 1px solid var(--job-border);
    border-radius: 14px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    color: #fff;
    align-items: flex-start;
}
.job-facts--hero li span { display: flex; flex-direction: column; line-height: 1.3; }
.job-facts--hero small { color: var(--job-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.job-facts--hero i { font-size: 1.15rem; margin-top: .1rem; }

.job-closed-notice {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 193, 7, .5);
    background: rgba(255, 193, 7, .08);
    color: #fff;
}
.job-closed-notice i { color: #ffc107; font-size: 1.4rem; }

/* ---------- Job content ---------- */
.job-section { padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--job-border); }
.job-section:last-of-type { border-bottom: 0; }
.job-content { color: rgba(255, 255, 255, .72); font-size: 1.05rem; line-height: 1.8; }
.job-content strong { color: #fff; font-weight: 600; }
.job-content h3 { font-size: 1.3rem; color: #fff; font-weight: 600; margin: 0 0 .75rem; }
.job-lead .job-content { font-size: 1.12rem; color: rgba(255, 255, 255, .82); }

/* Numbered responsibilities become cards */
.job-content ol {
    list-style: none;
    counter-reset: job;
    padding: 0;
    display: grid;
    gap: 1rem;
}
.job-content ol li {
    counter-increment: job;
    position: relative;
    padding: 1.1rem 1.25rem 1.1rem 4rem;
    border: 1px solid var(--job-border);
    border-radius: 18px;
    background: var(--job-surface);
}
.job-content ol li::before {
    content: counter(job) ".";
    position: absolute;
    left: 1.2rem;
    top: 1.05rem;
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--primary-color);
}
.job-content ol li strong { display: inline-block; margin-bottom: .25rem; }
.custom-bullets.job-content ul li::before { top: .3rem; }

.job-closing {
    padding: 2rem;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(88, 189, 220, .14), rgba(225, 92, 214, .1));
    border: 1px solid rgba(88, 189, 220, .35);
}

/* ---------- Sticky summary ---------- */
.job-summary {
    position: sticky;
    top: 110px;
    padding: 1.75rem;
    border: 1px solid var(--job-border);
    border-radius: 24px;
    background: var(--job-surface);
}
.job-summary__title { font-family: var(--heading-font); font-size: 1.2rem; font-weight: 600; color: #fff; margin-bottom: 1.25rem; }
.job-summary__list { margin: 0 0 1.5rem; }
.job-summary__list dt { color: var(--job-muted); font-weight: 400; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.job-summary__list dd { color: #fff; margin-bottom: .9rem; }
.job-summary__back { display: block; text-align: center; margin-top: 1rem; color: var(--job-muted); font-size: .95rem; }
.job-summary__back:hover { color: var(--primary-color); }

/* ---------- Application form ---------- */
#apply { scroll-margin-top: 90px; }
.mgm-apply { border: 1px solid var(--job-border); background: var(--job-surface); }
.mgm-apply .form-label { color: rgba(255, 255, 255, .85); font-size: .92rem; margin-bottom: .35rem; }
.mgm-apply .form-control,
.mgm-apply .form-select { border: 1px solid var(--job-border); border-radius: 14px; }
.mgm-apply .form-control::placeholder { color: rgba(255, 255, 255, .35); }
.mgm-apply .form-control[readonly] { color: var(--primary-color); background: rgba(88, 189, 220, .06); }
.mgm-apply .form-select { color: #fff; --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
.mgm-apply .form-select option { background: #000; color: #fff; }
.mgm-apply textarea.form-control { border-radius: 18px; }
.mgm-apply .form-text { color: var(--job-muted); }
.mgm-apply .form-check-input { width: 1.15em; height: 1.15em; background-color: transparent; border-color: rgba(255, 255, 255, .5); padding: 0; border-radius: .3em; }
.mgm-apply .form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }
.mgm-apply .form-check-label { color: var(--job-muted); font-size: .92rem; }
.mgm-apply .invalid-feedback { color: #ff8a8a; }
.mgm-apply .is-invalid { border-color: #ff6b6b !important; }

.mgm-file {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .5rem;
    border: 1px dashed var(--job-border);
    border-radius: 14px;
    min-height: 54px;
}
.mgm-file.is-dragover { border-color: var(--primary-color); background: rgba(88, 189, 220, .08); }
.mgm-file__input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.mgm-file__btn {
    cursor: pointer;
    flex-shrink: 0;
    color: #fff;
    padding: .45rem 1.1rem;
    border-radius: 50px;
    background: var(--primary-color);
    font-size: .92rem;
    transition: background .3s;
}
.mgm-file__btn:hover { background: var(--primary-hover-color); }
.mgm-file__input:focus-visible + .mgm-file__btn { outline: 2px solid #fff; outline-offset: 2px; }
.mgm-file__name { color: var(--job-muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgm-file.has-file .mgm-file__name { color: #fff; }

.mgm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.mgm-form-status:focus { outline: none; }
.mgm-form-status:not(:empty) { padding-bottom: 1rem; }
.mgm-form-status .alert { margin: 0; }
.mgm-form-status .alert { border-radius: 16px; }

/* ---------- Mobile ---------- */
.job-mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, .85);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--job-border);
    transition: transform .3s ease;
}
.job-mobile-cta.is-hidden { transform: translateY(100%); }
.single-mgm_job .footer-enquire { display: none !important; }

@media (max-width: 991.98px) {
    .job-hero { padding: 130px 0 2.5rem; }
    .job-summary { position: static; }
    .single-mgm_job footer { padding-bottom: 80px; }
}
@media (max-width: 575.98px) {
    .job-card { padding: 1.35rem; border-radius: 20px; }
    .job-facts--hero li { flex: 1 1 calc(50% - .75rem); }
    .job-content ol li { padding-left: 3.25rem; }
    .job-content ol li::before { left: .9rem; }
    .job-closing { padding: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
    .job-card, .job-mobile-cta { transition: none; }
    .job-card:hover { transform: none; }
}

/* Spacing uses padding utilities (pt-/pb-) in the templates; reset default text margins. */
.job-empty p, .job-general p, .job-general h3, .job-closed-notice p,
.job-apply-intro p:last-child, .mgm-apply > p { margin: 0; }

/* ---------- Semantic markup (lists / definition lists) ---------- */
ul.job-grid { list-style: none; padding: 0; margin: 0; }
ul.job-grid > li { display: flex; }
ul.job-grid > li > .job-card { flex: 1 1 auto; }

p.job-card__tags { margin: 0; padding-bottom: .9rem; }

/* Card facts: <dl><div><dt hidden/><dd/></div></dl> */
dl.job-facts { margin: 0; }
dl.job-facts > div { display: inline-flex; align-items: center; }
dl.job-facts dd { margin: 0; display: inline-flex; align-items: center; gap: .45rem; }

/* Hero facts: <dl><div.job-fact><dt><i/><span/></dt><dd/></div></dl> */
dl.job-facts--hero > .job-fact {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: .45rem;
    align-items: start;
    padding: .6rem 1rem;
    border: 1px solid var(--job-border);
    border-radius: 14px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    color: #fff;
}
dl.job-facts--hero dt { display: contents; font-weight: 400; }
dl.job-facts--hero dt i { grid-row: span 2; font-size: 1.15rem; padding-top: .1rem; color: var(--primary-color); }
dl.job-facts--hero dt span { color: var(--job-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; line-height: 1.3; }
dl.job-facts--hero dd { margin: 0; line-height: 1.3; }
@media (max-width: 575.98px) {
    dl.job-facts--hero > .job-fact { flex: 1 1 calc(50% - .75rem); }
}

p.job-eyebrow { display: block; margin: 0; padding-bottom: .75rem; }
.job-summary__list time, .job-card__posted time { color: inherit; }
