/* ==========================================================
   MYOL Career pages — extends assets/css/style.css
   Load AFTER style.css (uses its :root variables)
   ========================================================== */

/* ---------- Career hero ---------- */
.career-hero { position: relative; background: linear-gradient(160deg, #0F172A 0%, #1E293B 50%, #0F172A 100%); padding: 80px 0; overflow: hidden; color: var(--white); text-align: center; }
.career-hero .container { position: relative; z-index: 2; }
.career-hero h1 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 800; line-height: 1.15; max-width: 760px; margin: 0 auto 28px; }

/* ---------- Openings / ticket-style job card ---------- */
.openings { background: var(--light-bg); }
.jc { --jc-a: #DC2626; --jc-b: #EF4444; --jc-d1: #0F172A; --jc-d2: #3B1219; --jc-rgb: 220,38,38; }
.jc { display: flex; flex-direction: column; height: 100%; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; position: relative; color: inherit; transition: var(--transition); }
.jc:hover { transform: translateY(-8px); border-color: var(--jc-a); box-shadow: 0 20px 45px rgba(var(--jc-rgb), .18); color: inherit; }
.jc-head { position: relative; padding: 24px 24px 30px; background: linear-gradient(135deg, var(--jc-d1), var(--jc-d2)); color: var(--white); overflow: hidden; }
.jc-head::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(var(--jc-rgb),.14) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--jc-rgb),.14) 1px, transparent 1px); background-size: 28px 28px; }
.jc-head > * { position: relative; }
.jc-bgicon { position: absolute !important; right: -8px; bottom: -22px; font-size: 100px; color: rgba(255,255,255,.06); transition: var(--transition); }
.jc:hover .jc-bgicon { transform: scale(1.15) rotate(-8deg); color: rgba(var(--jc-rgb), .28); }
.jc-icon { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(135deg, var(--jc-a), var(--jc-b)); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 16px; box-shadow: 0 8px 20px rgba(var(--jc-rgb), .4); }
.jc-dept { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--jc-b); }
.jc-type { position: absolute !important; top: 22px; right: 22px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 5px 12px; border-radius: 50px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
.jc-type.urgent { background: var(--accent); border-color: var(--accent); animation: badgePulse 2s ease-in-out infinite; }
.jc-tear { position: relative; z-index: 2; height: 0; border-top: 2px dashed var(--border); }
.jc-tear::before, .jc-tear::after { content: ''; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--light-bg); border: 1px solid var(--border); }
.jc-tear::before { left: -13px; }
.jc-tear::after { right: -13px; }
.jc-body { display: flex; flex-direction: column; flex: 1; padding: 26px 24px 24px; }
.jc h3 { font-size: 19px; font-weight: 700; color: var(--primary); line-height: 1.35; margin-bottom: 14px; }
.jc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.jc-chips span { font-size: 12.5px; font-weight: 600; color: var(--secondary); background: var(--light-bg); padding: 6px 12px; border-radius: 50px; }
.jc-chips i { color: var(--jc-a); margin-right: 6px; }
.jc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px 0; margin-bottom: 20px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.jc-stat small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.jc-stat strong { font-size: 15px; color: var(--primary); }
.jc-btn { margin-top: auto; position: relative; z-index: 0; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 13px 22px; border: 1.5px solid var(--jc-a); border-radius: 50px; color: var(--jc-a); font-size: 14px; font-weight: 700; transition: color .3s ease; }
.jc-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--jc-a); transform: translateX(-101%); transition: transform .35s ease; }
.jc-btn i { transition: transform .3s ease; }
.jc:hover .jc-btn { color: var(--white); }
.jc:hover .jc-btn::before { transform: none; }
.jc:hover .jc-btn i { transform: translateX(4px); }

/* Department colours */
.jc.jc--it { --jc-a: #2563EB; --jc-b: #60A5FA; --jc-d1: #0B1B3A; --jc-d2: #1E3A8A; --jc-rgb: 59,130,246; }
.jc.jc--sales { --jc-a: #EA580C; --jc-b: #FB923C; --jc-d1: #2A1308; --jc-d2: #7C2D12; --jc-rgb: 249,115,22; }
.jc.jc--quality { --jc-a: #059669; --jc-b: #34D399; --jc-d1: #04231B; --jc-d2: #065F46; --jc-rgb: 16,185,129; }

/* ---------- Open application strip ---------- */
.career-open { background: var(--primary); border-radius: var(--radius-lg); padding: 40px; color: var(--white); display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.career-open h3 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.career-open p { margin: 0; color: rgba(255,255,255,.65); }

/* ---------- Single job page ---------- */
.job-hero { background: linear-gradient(160deg, #0F172A 0%, #1E293B 100%); padding: 60px 0 70px; color: var(--white); position: relative; overflow: hidden; }
.job-hero .container { position: relative; z-index: 2; }
.job-crumb { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 18px; }
.job-crumb a:hover { color: var(--accent-light); }
.job-hero h1 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; margin-bottom: 18px; }
.job-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.job-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 50px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.job-chip i { color: var(--accent-light); }

.job-detail { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; box-shadow: var(--shadow-sm); }
.job-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; }
.job-fact { background: var(--light-bg); border-radius: var(--radius-md); padding: 16px; }
.job-fact small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.job-fact strong { font-size: 15px; color: var(--primary); }
.job-detail h4 { font-size: 18px; font-weight: 800; color: var(--primary); margin: 28px 0 14px; display: flex; align-items: center; gap: 10px; }
.job-detail h4::before { content: ''; width: 4px; height: 20px; background: var(--accent); border-radius: 4px; }
.job-detail p { color: var(--text-muted); }
.job-list { display: grid; gap: 10px; }
.job-list li { position: relative; padding-left: 28px; color: var(--text-muted); font-size: 15px; }
.job-list li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-glow); color: var(--accent); font-size: 9px; display: flex; align-items: center; justify-content: center; }

/* ---------- Apply form ---------- */
.apply-card { position: sticky; top: 96px; background: var(--white); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-lg); }
.apply-card h3 { font-size: 20px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.apply-card > p { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.apply-field { margin-bottom: 14px; }
.apply-field label { display: block; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.apply-field label span { color: var(--accent); }
.apply-field input, .apply-field select, .apply-field textarea { width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 14px; background: var(--light-bg); transition: var(--transition); font-family: inherit; }
.apply-field textarea { resize: vertical; min-height: 96px; }
.apply-field input:focus, .apply-field select:focus, .apply-field textarea:focus { outline: none; border-color: var(--accent); background: var(--white); box-shadow: 0 0 0 4px var(--accent-glow); }
.file-drop { display: flex; align-items: center; gap: 14px; border: 2px dashed var(--border); border-radius: var(--radius-md); padding: 16px; cursor: pointer; transition: var(--transition); background: var(--light-bg); }
.file-drop:hover, .file-drop.drag { border-color: var(--accent); background: var(--accent-glow); }
.file-drop.has-file { border-style: solid; border-color: var(--accent); background: var(--white); }
.file-drop > i { font-size: 24px; color: var(--accent); }
.file-drop strong { display: block; font-size: 14px; color: var(--primary); word-break: break-all; }
.file-drop small { font-size: 12px; color: var(--text-muted); }
.file-drop input { display: none; }
.apply-error { display: none; font-size: 12px; color: var(--accent-dark); margin-top: 6px; }
.apply-error.show { display: block; }
.apply-alert { margin-bottom: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: #FEF2F2; border: 1px solid #FECACA; color: var(--accent-dark); font-size: 13px; font-weight: 500; }
.btn-apply { width: 100%; justify-content: center; margin-top: 6px; cursor: pointer; }
.btn-apply:disabled { opacity: .7; pointer-events: none; }
.apply-note { font-size: 12px; color: var(--text-muted); text-align: center; margin: 12px 0 0; }
.apply-success { text-align: center; padding: 20px 0; }
.apply-success .tick { width: 70px; height: 70px; margin: 0 auto 16px; border-radius: 50%; background: var(--accent); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: var(--shadow-accent); }
.apply-fab { display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 998; justify-content: center; }

@media (max-width: 991.98px) {
    .career-hero { padding: 56px 0; }
    .job-facts { grid-template-columns: repeat(2, 1fr); }
    .apply-card { position: static; margin-top: 24px; }
    .apply-fab { display: inline-flex; }
    .back-to-top { bottom: 80px; }
}
@media (max-width: 575.98px) {
    .job-detail { padding: 22px; }
    .career-open { padding: 28px 22px; }
    .job-pills { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 4px; }
    .job-pill { white-space: nowrap; }
}