/* Job Detail Revamp Styles */
/* Modern card-based design with gradient hero and improved visual hierarchy */

/* ========================================================================== */
/* Design Tokens & Variables                                                */
/* ========================================================================== */

 :root {
  /* Colors */
  --jd-bg: #f4f5f7;
  --jd-bg-muted: #ffffff;
  --jd-border-subtle: #e1e4ea;
  --jd-text-main: #111827;
  --jd-text-muted: #6b7280;
  --jd-accent: var(--color-brand-primary);
  --jd-accent-soft: rgba(0, 30, 60, 0.08);
  --jd-accent-dark: var(--color-brand-secondary);
  
  /* Shadows */
  --jd-shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
  --jd-shadow-subtle: 0 6px 18px rgba(15, 23, 42, 0.06);
  
  /* Border Radius */
  --jd-radius-lg: 16px;
  --jd-radius-full: 999px;
}

/* ========================================================================== */
/* Page Container                                                            */
/* ========================================================================== */

.page-job-detail {
  min-height: 100vh;
  background: linear-gradient(to bottom, 
              rgba(0, 30, 60, 0.02) 0%, 
              transparent 200px),
              var(--jd-bg);
  /* padding-bottom: 4rem; */
}

.jd-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

/* ========================================================================== */
/* Breadcrumbs                                                               */
/* ========================================================================== */

.jd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.jd-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}

.jd-breadcrumb a:hover {
  text-decoration: underline;
  color: rgba(255, 255, 255, 0.95);
}

.jd-breadcrumb-sep {
  opacity: 0.5;
}

/* ========================================================================== */
/* Hero Section                                                              */
/* ========================================================================== */

.jd-hero {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  position: relative;
  overflow: visible; /* allow dropdowns (share menu) to overflow the hero */
}

.jd-hero::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 100px;
  /* Neutral, brand-dark glow without accent color */
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.jd-hero-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.jd-hero-card {
  background: rgba(255, 255, 255, 0.08);
  color: #f9fafb;
  border-radius: 24px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--jd-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: visible; /* allow nested dropdowns to render outside card bounds */
  isolation: isolate;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.jd-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Subtle brand-dark vignette; no accent gradient */
  background:
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.18), transparent 55%),
    radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.12), transparent 50%);
  opacity: 0.8;
  pointer-events: none;
  z-index: -1;
}

.jd-hero-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
  justify-content: space-between;
}

/* Pills & Badges */
.jd-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e5e7eb;
  gap: 0.25rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.jd-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.25rem 0 0;
  color: var(--color-brand-accent);
}

/* Meta Information */
.jd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.75rem;
  padding: 0.75rem 0;
  line-height: 1.5;
  border-top: var(--border-width-thin) solid rgba(255, 255, 255, 0.08);
  border-bottom: var(--border-width-thin) solid rgba(255, 255, 255, 0.08);
}

.jd-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.jd-meta-item .icon {
  color: var(--color-brand-primary);
  background: var(--color-brand-accent);
  padding: 0.3rem;
  border-radius: 0.35rem;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.jd-meta-item:hover .icon {
  transform: scale(1.05);
}

.jd-meta-item .icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--color-brand-primary);
  stroke-width: 2.5;
  display: block;
}

.jd-meta-item > span:not(.icon) {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.jd-location-item {
  position: relative;
}

.jd-location-toggle {
  cursor: pointer;
  color: var(--color-brand-accent);
  padding: -0.25rem;
  font-weight: 500;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

.jd-location-toggle:focus {
  outline: 2px solid var(--color-brand-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.jd-location-toggle:hover {
  color: var(--color-brand-accent);
}

.jd-location-more {
  font-size: 0.8em;
  color: var(--color-brand-accent);
}

.jd-locations-popup {
  position: absolute;
  z-index: 10000;
  background: var(--gradient-brand);
  border: var(--border-width-medium) solid var(--color-brand-accent);
  border-radius: 0.4rem;
  padding: 0.5rem 0.55rem;
  min-width: 180px;
  max-width: 240px;
  max-height: 200px;
  overflow: auto;
  top: calc(100% + 0.4rem);
  left: 0;
  box-shadow: 0 14px 36px rgba(0, 30, 60, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.jd-locations-popup:not([hidden]) {
  display: block;
}

.jd-locations-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

.jd-locations-list li {
  padding: 0.3rem 0.35rem 0.3rem 0.65rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  line-height: 1.4;
  border-radius: 0;
  border: none;
  background: transparent;
  position: relative;
}

.jd-locations-list li:hover {
  background: rgba(255, 255, 255, 0.05);
}


.jd-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.7);
}

/* Hero Bottom Section */
.jd-hero-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.jd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
}

.jd-tag {
  border-radius: 0.375rem;
  border: var(--border-width-thin) solid rgba(148, 163, 184, 0.55);
  padding: 0.25rem 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.jd-hero-hint {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  max-width: 600px;
  margin-top: 1.5rem;
}

/* Hero CTA Section */
.jd-hero-cta {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  --jd-cta-height: calc(0.75rem * 2 + 1rem); /* match button height (padding + font) */
}

.jd-hero-cta > a,
.jd-hero-cta > .job-share {
  flex: 1 1 50%;
  min-width: 0;
}

.jd-hero-cta .jd-btn {
  width: 100%;
  justify-content: center;
}

.jd-hero-cta .job-share {
  display: flex;
  width: 100%;
  position: static; /* let the menu anchor to the CTA container */
}

.jd-hero-cta .job-share__menu {
  left: 0;
  right: 0;
  width: auto;
  min-width: 0;
  max-width: none;
  top: calc(100% + 0.75rem); /* always drops below Apply/Share row */
  min-height: var(--jd-cta-height);
  display: flex;
  align-items: center;
  padding-block: 0.35rem;
}

.jd-hero-cta .job-share [data-share-toggle] {
  width: 100%;
}

/* ========================================================================== */
/* Buttons                                                                   */
/* ========================================================================== */

.jd-btn {
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background-color 0.2s ease, transform 0.25s ease-in-out, 
              box-shadow 0.25s ease-in-out, color 0.2s ease,
              border-color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.jd-btn-primary {
  background: #ffffff;
  color: var(--color-brand-primary);
  border: var(--border-width-medium) solid #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.jd-btn-primary:hover {
  background: var(--color-brand-accent);
  color: var(--color-brand-primary);
  border-color: var(--color-brand-accent);
  transform: translateY(-2px);
  box-shadow: var(--jd-shadow-subtle);
}

.jd-btn-outline {
  background: transparent;
  color: #ffffff;
  border: var(--border-width-medium) solid #ffffff;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.15);
}

.jd-btn-outline:hover {
  background: #ffffff;
  color: var(--color-brand-primary);
  border-color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.jd-btn-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: var(--border-width-thin) solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.jd-btn-sm {
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
}

/* ========================================================================== */
/* Main Layout                                                               */
/* ========================================================================== */

.jd-main {
  margin-top: 2.5rem;
  padding-bottom: 1rem;
}

.jd-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr);
  gap: 1.75rem;
  align-items: flex-start;
}

/* ========================================================================== */
/* Cards                                                                     */
/* ========================================================================== */

.jd-card {
  background: var(--jd-bg-muted);
  border-radius: var(--jd-radius-lg);
  padding: 1.5rem 1.6rem;
  border: var(--border-width-thin) solid rgba(226, 232, 240, 0.75);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.jd-card + .jd-card {
  margin-top: 0.9rem;
}

.jd-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.jd-card-header > .jd-card-title {
  flex: 0 1 auto;
}

.jd-card-header > .jd-card-subtitle {
  flex: 0 0 auto;
  text-align: right;
  margin-left: auto;
}

.jd-card-title {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 600;
  margin: 0;
  color: var(--jd-text-main);
  line-height: 1.3;
}

.jd-card-subtitle {
  font-size: 1rem;
  color: var(--jd-text-muted);
  margin: 0;
  line-height: 1.5;
  text-align: right;
  white-space: nowrap;
}

/* ========================================================================== */
/* Typography                                                                */
/* ========================================================================== */

.jd-paragraph {
  margin: 0.45rem 0 0.35rem;
  font-size: 1rem;
  color: #374151;
  line-height: 1.65;
}

.jd-paragraph:first-of-type {
  margin-top: 0;
}

.jd-list {
  padding-left: 1.25rem;
  margin: 0.25rem 0 0.4rem;
  color: #374151;
  font-size: 1rem;
  line-height: 1.7;
}

.jd-list li + li {
  margin-top: 0.25rem;
}

/* ========================================================================== */
/* Sidebar                                                                   */
/* ========================================================================== */

.jd-sidebar-card {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--gradient-brand);
  color: #ffffff;
  border: var(--border-width-thin) solid rgba(0, 212, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 30, 60, 0.28);
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 0.9rem;
}

.jd-sidebar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  /* Neutral sidebar glow using brand-dark tones only */
  background: radial-gradient(circle at top right, rgba(15, 23, 42, 0.18), transparent 60%),
              radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.12), transparent 50%);
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
}

.jd-sidebar-card .jd-card-title {
  color: var(--color-brand-accent);
  font-size: clamp(1.5rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  text-shadow: none;
}

/* Key-Value Grid */
.jd-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.5rem;
  margin-top: 0.45rem;
}

.jd-kv-item-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.15rem;
}

.jd-kv-item-value {
  font-size: 1rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.5;
}

/* Badge */
.jd-badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: rgba(0, 212, 255, 0.15);
  color: var(--color-brand-accent);
  font-size: 0.8rem;
  font-weight: 600;
  border: var(--border-width-thin) solid rgba(0, 212, 255, 0.3);
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jd-badge-soft-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--color-brand-accent);
}

/* Divider */
.jd-divider {
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05));
  margin: 0.9rem 0 0.75rem;
}

/* Sidebar Meta */
.jd-sidebar-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.8rem;
  margin-top: 0.75rem;
}

.jd-sidebar-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.jd-sidebar-meta-row .icon {
  color: var(--color-brand-accent);
  opacity: 0.9;
  padding: 0;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
}

.jd-sidebar-meta-row .icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

.jd-sidebar-meta-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.5;
}

.jd-rate-pill {
  border-radius: 0.375rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.875rem;
  background: rgba(0, 212, 255, 0.15);
  color: var(--color-brand-accent);
  font-weight: 500;
}

/* Sidebar Location Row */
.jd-sidebar-location-row {
  position: relative;
}

.jd-sidebar-location-text {
  display: inline;
}

.jd-sidebar-location-toggle {
  cursor: pointer;
  color: rgba(0, 212, 255, 0.9);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
  margin-left: 0.25rem;
  -webkit-user-select: none;
  user-select: none;
}

.jd-sidebar-location-toggle:focus {
  outline: 2px solid var(--color-brand-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.jd-sidebar-location-toggle:hover {
  color: var(--color-brand-accent);
}

.jd-sidebar-location-more {
  font-size: 0.8em;
}

.jd-sidebar-locations-popup {
  position: fixed;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.98);
  border: var(--border-width-thin) solid rgba(148, 163, 184, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem;
  min-width: 200px;
  max-width: 350px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.jd-sidebar-locations-popup:not([hidden]) {
  display: block;
}

/* Chips */
.jd-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.jd-chip {
  border-radius: 0.375rem;
  border: var(--border-width-thin) solid rgba(0, 212, 255, 0.3);
  padding: 0.2rem 0.65rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 212, 255, 0.08);
}

.jd-sidebar-card .jd-note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.jd-note {
  font-size: 0.875rem;
  color: var(--jd-text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ========================================================================== */
/* Secondary Sidebar Cards - Simple & Clean Design                          */
/* ========================================================================== */

aside .jd-card:not(.jd-sidebar-card) {
  background: var(--gradient-brand);
  color: #f8fafc;
  border: var(--border-width-thin) solid rgba(0, 212, 255, 0.25);
  padding: 1rem 1.1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
  --related-list-item-height: 80px;
}

aside .jd-card:not(.jd-sidebar-card):hover {
  border-color: rgba(0, 212, 255, 0.45);
  transform: translateY(-1px);
}

aside .jd-card:not(.jd-sidebar-card) .jd-card-title {
  color: var(--color-brand-accent);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 0.65rem;
  border-bottom: var(--border-width-medium) solid rgba(0, 212, 255, 0.35);
  text-shadow: none;
}

/* Compact List Styling */
aside .jd-card:not(.jd-sidebar-card) .related-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

aside .jd-card:not(.jd-sidebar-card) .related-list-wrapper--scroll {
  max-height: calc(var(--related-list-item-height, 96px) * 3);
  overflow-y: scroll;
  padding-right: 0.35rem;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.75) transparent;
  display: flex;
  flex-direction: column;
}

aside .jd-card:not(.jd-sidebar-card) .related-list-wrapper--scroll::-webkit-scrollbar {
  width: 6px;
}

aside .jd-card:not(.jd-sidebar-card) .related-list-wrapper--scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

aside .jd-card:not(.jd-sidebar-card) .related-list-wrapper--scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

aside .jd-card:not(.jd-sidebar-card) .related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

aside .jd-card:not(.jd-sidebar-card) .related-list li {
  padding: 0;
  border-bottom: var(--border-width-thin) solid rgba(255, 255, 255, 0.08);
  box-sizing: border-box;
  min-height: var(--related-list-item-height, 80px);
  height: auto;
  display: flex;
  align-items: stretch;
}

aside .jd-card:not(.jd-sidebar-card) .related-list li:last-child {
  border-bottom: none;
}

aside .jd-card:not(.jd-sidebar-card) .related-list a {
  color: #f8fafc;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 0.5rem 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

aside .jd-card:not(.jd-sidebar-card) .related-list a:hover {
  padding-left: 0.5rem;
  color: #ffffff;
  transform: translateX(2px);
}

aside .jd-card:not(.jd-sidebar-card) .related-list a:hover .heading-xs {
  color: var(--color-brand-accent);
}

/* Compact Job Title */
aside .jd-card:not(.jd-sidebar-card) .heading-xs {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.3rem 0;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

/* Compact Metadata - Single Line */
aside .jd-card:not(.jd-sidebar-card) .job-meta-compact {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

aside .jd-card:not(.jd-sidebar-card) .job-meta-compact .icon {
  width: 14px;
  height: 14px;
  color: var(--color-brand-accent);
  opacity: 0.9;
  flex-shrink: 0;
}

aside .jd-card:not(.jd-sidebar-card) .job-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  opacity: 0.8;
  flex-shrink: 0;
}

/* Empty State */
aside .jd-card:not(.jd-sidebar-card) .jd-empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.85rem;
  line-height: 1.5;
}

aside .jd-card:not(.jd-sidebar-card) .jd-empty-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 0.5rem;
  opacity: 0.5;
  color: rgba(255, 255, 255, 0.7);
}

/* ========================================================================== */
/* Sticky Apply Bar (Mobile)                                                */
/* ========================================================================== */

.jd-apply-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease-out, opacity 0.25s ease-out;
  background: transparent;
}

.jd-apply-bar-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.jd-apply-bar-inner {
  max-width: 1100px;
  margin: 0 auto 0.65rem;
  padding: 0.75rem 1.2rem;
  border-radius: 1rem;
  background: var(--gradient-brand);
  color: #e5e7eb;
  border: var(--border-width-medium) solid var(--color-brand-accent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.jd-apply-bar-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.jd-apply-bar-title {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  color: var(--color-brand-accent);
}

.jd-apply-bar-sub {
  color: #9ca3af;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ========================================================================== */
/* Utility Classes                                                           */
/* ========================================================================== */

.jd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================================================== */
/* Responsive Breakpoints                                                    */
/* ========================================================================== */

/* Tablet (768px - 960px) */
@media (max-width: 960px) {
  .jd-layout {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.1fr);
    gap: 1.25rem;
  }

  .jd-hero-card {
    border-radius: 20px;
    padding: 1.5rem 1.25rem 1.35rem;
  }

  .jd-card {
    padding: 1.35rem 1.4rem;
  }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
  .jd-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .jd-sidebar-card {
    position: static;
  }

  .jd-hero-cta {
    width: 100%;
    justify-content: flex-start;
  }

  .jd-hero-card {
    gap: 0.85rem;
  }
  
  .jd-meta {
    gap: 0.4rem 0.75rem;
    padding: 0.5rem 0;
    font-size: 1rem;
  }
  
  .jd-meta-item {
    gap: 0.4rem;
  }
  
  .jd-meta-item .icon {
    padding: 0.25rem;
  }
  
  .jd-meta-item .icon svg {
    width: 13px;
    height: 13px;
  }
  
  .jd-hero-container {
    padding: 0 1.5rem;
  }
  
  .jd-apply-bar {
    display: block;
  }
}

/* Small Mobile (< 640px) */
@media (max-width: 640px) {
  .jd-container {
    padding-inline: 1.1rem;
  }

  .jd-hero-container {
    padding: 0 1.1rem;
  }

  .jd-hero-card {
    border-radius: 18px;
    padding: 1.35rem 1.15rem;
  }

  .jd-hero-top,
  .jd-hero-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .jd-apply-bar-inner {
    border-radius: 14px;
    margin-inline: 1rem;
  }

  .jd-hero-cta {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .jd-hero-cta .jd-btn {
    width: 100%;
    flex: 1 1 50%;
    min-width: 0;
  }
}

/* Hide apply bar on desktop */
@media (min-width: 769px) {
  .jd-apply-bar {
    display: none;
  }
}

.applied-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 0.5rem;
  border: var(--border-width-thin) solid rgba(148, 163, 184, 0.5);
  padding: 0.25rem 0.85rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e5e7eb;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  margin: 0.5rem 0;
}

@media (min-width: 769px) {
  .applied-flag {
    position: absolute;
    top: 1.75rem;
    right: 1.75rem;
    margin: 0;
  }
  
  .applied-flag.applied-flag--sidebar {
    position: static;
    margin: 0;
    width: 100%;
    justify-content: center;
  }
}

.applied-flag[hidden] {
  display: none !important;
}

.applied-flag__dot {
  display: none;
}

/* ========================================================================== */
/* Apply Page Specific Styles                                               */
/* ========================================================================== */

.page-job-detail .quick-apply-card {
  background: var(--jd-bg-muted);
  border-radius: var(--jd-radius-lg);
  padding: 1.75rem 1.85rem;
  box-shadow: var(--jd-shadow-subtle);
  border: var(--border-width-thin) solid rgba(226, 232, 240, 0.75);
}

.page-job-detail .quick-apply-prefill {
  background: rgba(0, 30, 60, 0.04);
  border: var(--border-width-thin) solid rgba(0, 30, 60, 0.15);
}

/* .page-job-detail .quick-apply-prefill {
  background: rgba(0, 30, 60, 0.04);
  border: var(--border-width-thin) solid rgba(0, 30, 60, 0.15);
} */

.page-job-detail .quick-apply-form {
  background: transparent;
}

/* Apply page sidebar adjustments */
.page-job-detail #apply-form .jd-sidebar-card {
  top: 120px;
}

/* Match Hire Talent page icon styling */
.page-job-detail .hiring-request-form__step {
  background-color: var(--color-brand-accent);
  color: var(--color-brand-primary);
  box-shadow: none;
}

.page-job-detail .hiring-request-form__step .icon svg {
  stroke: var(--color-brand-primary);
  width: 24px;
  height: 24px;
}

/* Application form heading styling - match contact and talent pages exactly */
.page-job-detail .hiring-request-card {
  padding-top: 0.2rem;
  /* further reduced top padding */
  gap: 0;
  /* remove gap between heading and form */
  display: flex;
  flex-direction: column;
}

.page-job-detail .hiring-request-card .heading-sm {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 1rem 0;
  color: var(--color-brand-accent);
  /* reduced margin bottom to match standard padding */
}

.page-job-detail .hiring-request-card .hiring-request-form {
  margin-top: 0;
  /* ensure no additional top margin on form */
}

.jd-layout .hiring-request-card {
  box-shadow: none;
}

/* Job detail CTA buttons: remove accent-colored hover shadow */
.page-job-detail .cta-card .btn-primary:hover {
  box-shadow: var(--jd-shadow-subtle);
}

@media (max-width: 767px) {
  .page-job-detail .hiring-request-card .heading-sm {
    font-size: 1.4rem;
    /* smaller on mobile */
  }
}
