/* =============================================================
   Postulia — Single Job (assets/css/single-job.css)
   Scope: .single-job
   - Unboxed animated header with left-aligned content
   - Two-column layout with sticky sidebar
   - Company card below description
   - Related jobs grid (template-parts/job-card)
   - Token-first: uses variables from tokens.css only
   ============================================================= */

/* ---------------------------
   1) Header (unboxed hero)
   --------------------------- */
.single-job .job-hero{
  position: relative;
  color: var(--text-default);
  border-bottom: 1px solid var(--border-default);
  background:
    radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--brand-100) 80%, #fff), transparent),
    radial-gradient(700px 400px at 85% 0%,  color-mix(in srgb, #dbeafe 60%, #fff), transparent),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 60%, #f4f7ff 100%);
}

.single-job .job-hero > .container{
  padding-block: var(--sp-8);
  position: relative;
  z-index: 2;
  text-align: left;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 641px){
  .single-job .job-hero > .container{ padding-block: var(--sp-9); }
}
@media (min-width: 1000px){
  .single-job .job-hero > .container{ padding-block: var(--sp-11); }
}

.single-job .job-hero__title{
  margin: 0 0 var(--sp-5);
  font-weight: 700;
  line-height: 1.15;
  font-size: 1.75rem;
  color: var(--text-default);
}
@media (min-width: 641px){
  .single-job .job-hero__title{ font-size: 2.125rem; }
}
@media (min-width: 1000px){
  .single-job .job-hero__title{ font-size: 2.5rem; }
}

.single-job .job-hero__meta{
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: nowrap;
}
.single-job .job-hero__logo{
  width: 75px;
  height: 75px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.single-job .job-hero__logo img{ width: 100%; height: 100%; object-fit: cover; }

/* Letter fallback for hero company logo */
.single-job .job-hero__logo--fallback{
  color: #fff;
  font-size: 50px;
  line-height: 1;
  letter-spacing: .3px;
  background: conic-gradient(from 210deg at 70% 0%,
              var(--brand-500), var(--brand-700) 50%,
              var(--brand-500) 50%, var(--brand-300));
}

.single-job .job-hero__info{ display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.single-job .job-hero__line1{ display: flex; align-items: center; gap: var(--sp-2); flex-wrap: nowrap; }
.single-job .job-hero__company{ font-weight: 600; color: var(--text-default); }
.single-job .job-hero__chips{
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2);
  margin-block-start: var(--sp-2);
  margin-block-end: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-block-end: 2px;
  min-width: 0;
  
  /* For Firefox: Reserve space and make scrollbar transparent by default */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  scrollbar-gutter: stable;
}

/* On hover, color the Firefox scrollbar thumb */
.job-hero__chips:hover {
  scrollbar-color: var(--border-default) transparent;
}

/* For WebKit/Chromium: Style the scrollbar to be transparent by default */
.job-hero__chips::-webkit-scrollbar {
  height: 8px;
  background: transparent;
}

.job-hero__chips::-webkit-scrollbar-track {
  background: transparent;
}

.job-hero__chips::-webkit-scrollbar-thumb {
  background-color: transparent; /* Hidden by default */
  border-radius: 999px;
  transition: background-color var(--dur-2) var(--ease-out);
}

/* On hover, color the WebKit scrollbar thumb */
.job-hero__chips:hover::-webkit-scrollbar-thumb {
  background-color: var(--border-default);
}

.job-hero__chips > * {
  flex: 0 0 auto;
}

/* Status badge next to company name */
.single-job .job-hero .status-badge,
.single-job .job-hero .badge{ margin-inline-start: var(--sp-1); }

/* Darker, visible grid */
@keyframes job-hero-move-grid{
  from { background-position: 0 0; }
  to   { background-position: 100px 100px; }
}
.single-job .job-hero::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: .5;
  pointer-events: none;
  background-image:
    linear-gradient(to right, hsla(215,40%,80%,.2) 1px, transparent 1px),
    linear-gradient(to bottom, hsla(215,40%,80%,.2) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: job-hero-move-grid 10s linear infinite;
}



/* ---------------------------
   2) Main layout + content
   --------------------------- */
.single-job .page-content{
  padding-block: var(--sp-8);
  background: var(--bg);
}
@media (min-width: 641px){
  .single-job .page-content{ padding-block: var(--sp-9); }
}
@media (min-width: 1000px){
  .single-job .page-content{ padding-block-start: var(--sp-11); padding-block-end: var(--sp-6); }
}

.single-job .grid-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
}
@media (min-width: 1000px){
  .single-job .grid-layout{
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  }
}
.single-job .main-content{
  display: grid;
  gap: var(--sp-7);
}

/* Primary article card */
.single-job .entry-content{
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
}
@media (min-width: 1000px){
  .single-job .entry-content{ padding: var(--sp-7); }
}

/* Section headings and prose rhythm */
.single-job .section-title{
  margin: 0 0 var(--sp-4);
  font-weight: 700;
  line-height: 1.2;
  font-size: 1.25rem;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-default);
}
@media (min-width: 641px){
  .single-job .section-title{ font-size: 1.375rem; }
}
@media (min-width: 1000px){
  .single-job .section-title{ font-size: 1.5rem; }
}
.single-job .section-content p{ margin: 0 0 var(--sp-4); }
.single-job .section-content ul{
  margin: var(--sp-4) 0;
  padding-inline-start: 1.2rem;
}
.single-job .section-content li{ margin-block: var(--sp-2); }

/* Requirement 2: list markers in brand color */
.single-job .section-content li::marker{ color: var(--brand-500); }

@media (max-width: 999px){
  /* Flatten only the job description card on single Job */
  .single-job .entry-content.card{
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }
}


/* ---------------------------
   3) Sidebar
   --------------------------- */
.single-job .sidebar{ position: relative; }
.single-job .sidebar__sticky{ position: sticky; top: var(--sp-8); }
.single-job .sidebar .card{
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
@media (min-width: 1000px){
  .single-job .sidebar .card{ padding: var(--sp-7); }
}
.single-job .sidebar .section-title{ margin: 0; }

/* Definition list layout */
.single-job .meta-list{
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--sp-3);
  row-gap: var(--sp-4);
  margin: 0;
}
.single-job .meta-list dt,
.single-job .meta-list dd{ margin: 0; }
.single-job .meta-label{
  color: var(--text-muted);
  white-space: nowrap;
}
.single-job .meta-value{
  text-align: end;
  color: var(--text-default);

}

/* CTA at the bottom of the sidebar card */
.single-job .sidebar .apply-cta,
.single-job .sidebar .button{
  width: 100%;
}

/* ---------------------------
   4) Company card
   --------------------------- */
.single-job .company-card{
  background: var(--surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
  border-top: 4px solid var(--brand-500);
}
@media (min-width: 1000px){
  .single-job .company-card{ padding: var(--sp-7); }
}
.single-job .company-card__head{
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.single-job .company-card__logo{
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden; flex: 0 0 auto;
  display: grid; place-items: center;
}
.single-job .company-card__logo img{ width:100%; height:100%; object-fit:cover; }
.single-job .company-card__title{
  margin: 0;
  font-weight: 700;
  color: var(--text-default);
  font-size: var(--fs-18);
}
.single-job .company-card__meta{ color: var(--text-muted); font-size: var(--fs-14); margin-block: unset; }
.single-job .company-card__body{
  margin-top: var(--sp-3);
  color: var(--text-muted);
  font-size: var(--fs-14);
}
.single-job .company-card__actions{
  margin-top: var(--sp-5);
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}


/* ---------------------------
   5) Related jobs
   --------------------------- */
.single-job .related-jobs{
    padding-bottom: var(--sp-7);
}

.single-job .related-jobs__title{
  margin: 0 0 var(--sp-5);
  font-weight: 700;
  color: var(--text-default);
}
.single-job .related-jobs-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 1000px){
  .single-job .related-jobs-grid{
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------------------
   6) Motion
   --------------------------- */
@keyframes jobHeroShift{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 100% 50%; }
}