/* ========== Base spacing (unchanged) ========== */
.site-section{ padding-top:2rem; }

/* (kept: your generic helpers & project styles) */
.project{ margin:15px 0; }
.no-gutter .project{ margin:0!important; padding:0!important; }
.has-spacer,.has-spacer-extra-space{ margin:0 30px 30px; }
.has-side-spacer{ margin:0 30px; }
.project-title{ font-size:1.25rem; }
.project-skill{ font-size:.9rem; letter-spacing:.06rem; }
.project-info-box{ margin:15px 0; background:#fff; padding:20px 5px; border-radius:5px; }
.project-info-box p{ margin-bottom:15px; padding-bottom:8px; border-bottom:1px solid #d5dadb; }
.project-info-box p:last-child{ margin-bottom:0; padding-bottom:0; border-bottom:none; }
.img01{ width:100%; height:200px; max-width:100%; -webkit-backface-visibility:hidden; }
.rounded{ border-radius:5px!important; }
.btn-xs.btn-icon{ width:34px; height:34px; max-width:34px!important; max-height:34px!important; font-size:10px; line-height:34px; }
.btn-xs.btn-icon span,.btn-xs.btn-icon i{ line-height:34px; }
.btn-icon.btn-circle span,.btn-icon.btn-circle i{ margin-top:-1px; margin-right:-1px; }
.btn-icon i{ margin-top:-1px; }
.btn-icon span,.btn-icon i{ display:block; line-height:50px; }
a.btn,a.btn-social{ display:inline-block; }
.mr-5{ margin-right:5px!important; }
.mb-0{ margin-bottom:0!important; }
.btn-circle{ border-radius:50%!important; }
p{ font-weight:300; font-size:1rem; color:#686c6d; letter-spacing:.03rem; margin-bottom:10px; }
b,strong{ font-weight:700!important; }

/* ========== Similar Jobs ========== */
.sj-list{ list-style:none; margin:0; padding:0; }
.sj-card{ position:relative; border-radius:16px; background:#fff; box-shadow:0 2px 12px rgba(0,0,0,.05); overflow:hidden; margin-bottom:18px; transition:transform .18s ease, box-shadow .18s ease; }
.sj-card:hover{ transform:translateY(-2px); box-shadow:0 10px 28px rgba(0,0,0,.10); }
.sj-link{ display:grid; grid-template-columns:88px 1fr auto; gap:20px; padding:24px 24px 24px 0; text-decoration:none!important; color:inherit; }
.sj-card a,.sj-card a:hover,.sj-card a:focus,.sj-card a:active{ text-decoration:none!important; color:inherit; }
.sj-accent{ position:absolute; left:0; top:0; bottom:0; width:0; background:linear-gradient(90deg,#06b6d4,#6366f1); transition:width .28s ease; }
.sj-card:hover .sj-accent{ width:8px; }
.sj-media{ display:flex; align-items:center; justify-content:center; width:88px; }
.sj-logo{ width:72px; height:72px; object-fit:cover; border-radius:14px; border:1px solid rgba(0,0,0,.06); background:#f7f8fa; }
.sj-body{ display:flex; flex-direction:column; justify-content:center; min-width:0; }
.sj-title-row{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.sj-title{ font-size:1.35rem; line-height:1.25; font-weight:800; margin:0; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden; }
.sj-meta{ color:#6c757d; font-size:1rem; display:flex; align-items:center; gap:8px; }
.sj-company{ font-weight:600; }
.sj-sep{ opacity:.5; }
.sj-loc i{ margin-right:6px; }
.sj-sub{ color:#98a2b3; font-size:.95rem; }
.sj-aside{ display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:10px; min-width:220px; }
.sj-chip{ display:inline-block; border-radius:999px; padding:8px 12px; font-size:.95rem; font-weight:700; line-height:1; }
.sj-chip--success{ background:#ecfdf5; color:#065f46; }
.sj-chip--danger{ background:#fef2f2; color:#991b1b; }
.sj-chip--info{ background:#e0f2fe; color:#075985; }
.sj-chip--secondary{ background:#f1f5f9; color:#0f172a; }
.sj-chip--primary{ background:#eef2ff; color:#3730a3; }
.sj-due.sj-due--ok{ background:#ecfdf5; color:#065f46; }
.sj-due.sj-due--warn{ background:#fff7ed; color:#9a3412; }
.sj-due.sj-due--danger{ background:#fef2f2; color:#991b1b; }
.sj-deadline{ color:#6c757d; }
.sj-track{ width:200px; height:8px; background:#eef2f7; border-radius:999px; overflow:hidden; }
.sj-fill{ height:100%; background:linear-gradient(90deg,#22c55e,#f59e0b,#ef4444); }
@media (max-width:768px){
  .sj-link{ grid-template-columns:64px 1fr; padding:18px; }
  .sj-media{ width:64px; }
  .sj-logo{ width:56px; height:56px; }
  .sj-aside{ grid-column:1 / -1; align-items:flex-start; }
  .sj-track{ width:100%; }
}
@media (max-width:480px){
  .sj-link{ grid-template-columns:52px 1fr; gap:12px; padding:14px; }
  .sj-logo{ width:48px; height:48px; border-radius:10px; }
  .sj-title{ font-size:1.05rem; -webkit-line-clamp:2; }
  .sj-chip{ padding:6px 10px; font-size:.82rem; }
  .sj-meta{ font-size:.9rem; flex-wrap:wrap; row-gap:4px; }
  .sj-sep{ display:none; }
  .sj-aside{ gap:8px; }
  .sj-track{ height:6px; }
}
@media (max-width:360px){
  .sj-link{ grid-template-columns:44px 1fr; padding:12px; }
  .sj-logo{ width:40px; height:40px; }
  .sj-title{ font-size:1rem; }
  .sj-chip{ font-size:.78rem; padding:5px 8px; }
  .sj-deadline{ font-size:.85rem; }
}

/* Social buttons */
.btn-fb{ color:#fff; background:#2846a7; }
.btn-linkedin{ color:#fff; background:#0b5192; }

/* ========== JOB SINGLE ========== */

/* Hero container */
.jd-hero{
  display:block; width:100%; max-width:100%; flex:1 1 100%;
  position:relative; border-radius:18px;
  background:
    radial-gradient(1200px 400px at 10% -20%, rgba(99,102,241,.14), transparent 60%),
    radial-gradient(900px 300px at 100% 0%, rgba(6,182,212,.10), transparent 60%),
    #fff;
  box-shadow:0 8px 26px rgba(0,0,0,.06);
  padding:22px; margin-bottom:22px;
}

/* Hero grid */
.jd-hero-row{
  display:grid;
  grid-template-columns:84px minmax(0,1fr) clamp(260px,28vw,320px);
  gap:16px; align-items:center;
}
.jd-hero-row > :nth-child(2){ min-width:0; }

.jd-logo{ width:76px; height:76px; object-fit:cover; border-radius:16px; background:#f7f8fa; border:1px solid rgba(0,0,0,.06); }
.jd-logo-initial{
  width:76px; height:76px; border-radius:16px; display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:800; font-size:30px; user-select:none; border:1px solid rgba(0,0,0,.06); box-shadow:0 4px 12px rgba(0,0,0,.06);
}

.jd-title{ margin:0; font-weight:800; font-size:1.5rem; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.jd-meta{ color:#6b7280; display:flex; flex-wrap:wrap; gap:10px; row-gap:6px; align-items:center; margin-top:6px; }
.jd-meta .sep{ opacity:.5; }

.jd-chip{ display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:6px 10px; font-weight:700; font-size:.85rem; line-height:1; }
.jd-chip--type.jd-success{ background:#ecfdf5; color:#065f46; }
.jd-chip--type.jd-danger{ background:#fef2f2; color:#991b1b; }
.jd-chip--type.jd-info{ background:#e0f2fe; color:#075985; }
.jd-chip--type.jd-secondary{ background:#f1f5f9; color:#0f172a; }
.jd-chip--type.jd-primary{ background:#eef2ff; color:#3730a3; }
.jd-chip--due.ok{ background:#ecfdf5; color:#065f46; }
.jd-chip--due.warn{ background:#fff7ed; color:#9a3412; }
.jd-chip--due.danger{ background:#fef2f2; color:#991b1b; }

/* Work-arrangement chips */
.jd-chip--work{ border-radius:999px; padding:4px 10px; font-weight:700; font-size:.85rem; }
.jd-chip--work i{ margin-right:6px; }
.jd-work--remote{ background:#ecfeff; color:#0369a1; }
.jd-work--hybrid{ background:#f5f3ff; color:#6d28d9; }
.jd-work--onsite{ background:#eef2f7; color:#0f172a; }

/* Right side of hero */
.jd-hero-right{ justify-self:end; text-align:right; white-space:normal; }
.jd-deadline{ color:#6b7280; display:block; margin-top:6px; }
.jd-track{ width:100%; max-width:320px; height:8px; background:#eef2f7; border-radius:999px; overflow:hidden; margin-top:10px; }
.jd-fill{ height:100%; background:linear-gradient(90deg,#22c55e,#f59e0b,#ef4444); }

/* ===== Make .jd-grid full-width inside Bootstrap .row ===== */
.site-section .container > .row > .jd-hero,
.site-section .container > .row > .jd-stat,
.site-section .container > .row > .jd-grid{
  flex:0 0 100% !important;
  max-width:100% !important;
  width:100% !important;
}

/* ===== Content layout below hero — FLEX with sticky aside ===== */
.jd-grid{
  display:flex !important;
  flex-wrap:nowrap;
  align-items:flex-start;
  gap:22px;
}

/* Left column */
.jd-grid > div{
  flex:1 1 0;
  min-width:0;                 /* allows long content to shrink */
}

/* Right column (sticky on desktop) */
.jd-grid > aside{
  flex:0 0 320px;
  width:320px;
  max-width:320px;
  position:sticky;
  top:88px;
  align-self:flex-start;
  height:max-content;
}

@media (max-width:1200px){
  .jd-grid > aside{
    flex-basis:300px;
    width:300px;
    max-width:300px;
  }
}

/* Stack on tablet/phone */
@media (max-width:992px){
  .jd-grid{ flex-direction:column; }
  .jd-grid > aside{
    position:static;
    flex-basis:auto;
    width:auto;
    max-width:none;
  }
}

/* Cards / sticky wrapper / actions */
.jd-card{ background:#fff; border-radius:14px; padding:18px; box-shadow:0 2px 10px rgba(0,0,0,.05); margin-bottom:16px; }
.jd-card h4{ font-weight:800; margin-bottom:10px; }
.jd-card p{ margin-bottom:10px; color:#4b5563; }
.jd-info p{ margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid #e5e7eb; }
.jd-info p:last-child{ border-bottom:none; margin-bottom:0; padding-bottom:0; }

/* visual container only; sticky is on <aside> */
.jd-sticky{ background:#fff; border-radius:14px; padding:16px; box-shadow:0 2px 10px rgba(0,0,0,.06); }
.jd-sticky .btn{ width:100%; }
.jd-actions{ display:flex; gap:12px; }
.jd-actions > a, .jd-actions > form{ flex:1 1 0; }
.jd-actions .btn{ width:100%!important; min-height:52px; display:flex; align-items:center; justify-content:center; gap:8px; font-weight:700; white-space:nowrap; border-radius:10px; }
.jd-actions .btn i{ margin-right:6px; }

.jd-stat{ color:#6b7280; font-size:.92rem; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.jd-muted{ color:#6b7280; }
.jd-card a,.jd-hero a,.jd-sticky a{ text-decoration:none; }

/* Save + Apply footer CTA */
.jd-cta{ display:grid; grid-template-columns:1fr 2fr; gap:12px; margin-top:14px; margin-bottom:8px; }
.jd-cta-left,.jd-cta-right{ display:flex; align-items:stretch; }
.jd-cta-right form{ width:100%; display:flex; }
.jd-cta .btn{ flex:1 1 auto; width:100%; min-height:52px; display:flex; align-items:center; justify-content:center; gap:8px; font-weight:700; border-radius:10px; white-space:nowrap; }
.jd-cta .btn i{ margin-right:6px; }
@media (max-width:992px){ .jd-cta{ grid-template-columns:1fr; } }

.jd-owner-actions{ display:flex; gap:10px; margin:18px 0 8px; }
.jd-owner-actions .btn{ flex:1; padding:.85rem 1rem; }

.jd-stats--footer,.jd-cta--footer,.jd-owner-actions--footer{ display:none; }
.jd-sticky--desktop{ display:block; }
.jd-stat--hero{ display:flex; }

/* Mobile hero tweaks */
@media (max-width:992px){
  .jd-sticky--desktop{ display:none; }
  .jd-stats--footer,.jd-cta--footer,.jd-owner-actions--footer{ display:block; }
  .jd-stat--hero{ display:none; }

  .jd-hero{ padding:16px; border-radius:16px; }
  .jd-hero-row{ grid-template-columns:56px 1fr; align-items:start; }
  .jd-logo{ width:48px; height:48px; border-radius:12px; }
  .jd-title{ font-size:1.25rem; }
  .jd-meta{ gap:8px; margin-top:4px; }
  .jd-hero-right{ grid-column:1 / -1; text-align:left; margin-top:10px; }
  .jd-track{ max-width:none; width:100%; }
}
@media (max-width:576px){
  .jd-hero{ padding:12px; }
  .jd-hero-row{ grid-template-columns:44px 1fr; gap:10px; }
  .jd-logo{ width:40px; height:40px; border-radius:10px; }
  .jd-title{ font-size:1.1rem; line-height:1.25; }
  .jd-chip{ padding:4px 8px; font-size:.8rem; }
  .jd-deadline{ font-size:.9rem; }
  .jd-card{ padding:14px; border-radius:12px; }
}

/* misc */
.job-meta{ color:#6c757d; }
.job-meta i{ margin-right:4px; color:#495057; }

/* ===== Guardrails: prevent left column content from breaking layout ===== */
.jd-card, .jd-card *{ overflow-wrap:anywhere; word-break:break-word; }
.jd-card img, .jd-card video, .jd-card iframe{ max-width:100%; height:auto; display:block; }
.jd-card table{ width:100%; max-width:100%; table-layout:fixed; }
.jd-card pre, .jd-card code{ white-space:pre-wrap; }

/* Rich HTML pasted into description — keep sane */
.jd-rich *{ max-width:100%; }
.jd-rich [style*="position:fixed"]{ position:static!important; }
.jd-rich [style*="float:"]{ float:none!important; }

/* Sticky requires ancestors without overflow clipping */
html, body, .site-section, .container{ overflow:visible; }

/* Safety: hero never expands the container */
.jd-hero, .jd-hero-row{ max-width:100%; overflow:visible; }

/* Hide empty blocks and <li> that contain only a <br> */
.jd-card p:empty,
.jd-card div:empty,
.jd-card li:empty,
.jd-card li:has(> br:only-child) { display:none; }

/* If your browser support for :has() is a concern, keep PHP/JS sanitizing below. */
