/**
 * Job detail — маркетингов layout (от careers-design/ototon-job.html).
 * Зарежда се само на job.php; стиловете са под body.careers-job-detail.
 */
body.careers-job-detail {
  --cj-red: #b92746;
  --cj-red-light: #e13554;
  --cj-red-bg: #fef2f2;
  --cj-green: #2c9c51;
  --cj-dark: #1a1a1a;
  --cj-border: #cec0c3;
  --cj-gray-bg: #f9f9f9;

  margin: 0;
  font-family: "Manrope", sans-serif;
  color: #111;
  /* clip предпочитано; hidden като fallback за стари браузъри */
  overflow-x: hidden;
  overflow-x: clip;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main + apply form: flex column върху body — позволява вложен .row да не „чупи“ ширината */
body.careers-job-detail #job-root {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

body.careers-job-detail .careers-apply-form.job-form {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
}

body.careers-job-detail .careers-apply-form.job-form > .row {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
}

body.careers-job-detail .careers-apply-form.job-form .row > [class*='col-'] {
  min-width: 0;
}

body.careers-job-detail *,
body.careers-job-detail *::before,
body.careers-job-detail *::after {
  box-sizing: border-box;
}

body.careers-job-detail a {
  text-decoration: none;
  color: inherit;
}

/* ── NAVBAR ── */
body.careers-job-detail nav.navbar.job-detail-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #f3f4f6;
  backdrop-filter: blur(6px);
  min-height: 81px;
  padding: 0 1.5rem;
}

body.careers-job-detail nav.job-detail-nav .navbar-brand.navbar-brand-logo {
  font-weight: 800;
  letter-spacing: -0.5px;
  text-decoration: none;
}

body.careers-job-detail nav.job-detail-nav .navbar-brand.navbar-brand-logo img {
  display: block;
  height: 50px;
  width: auto;
  max-width: 200px;
}

body.careers-job-detail nav.job-detail-nav .nav-link {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.35;
  color: #1a1a1a !important;
}

body.careers-job-detail nav.job-detail-nav .nav-link.btn-nav-cta {
  background: var(--cj-green);
  color: #fff !important;
  border-radius: 9999px;
  padding: 12px 28px !important;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none !important;
}

body.careers-job-detail .nav-link.btn-nav-cta:hover {
  background: #268a47;
  color: #fff !important;
}

body.careers-job-detail .offcanvas#careersJobDetailNavOffcanvas.offcanvas-start {
  --bs-offcanvas-width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
}

body.careers-job-detail .offcanvas#careersJobDetailNavOffcanvas .offcanvas-body {
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

body.careers-job-detail .offcanvas#careersJobDetailNavOffcanvas .nav-link.btn-nav-cta {
  width: 100%;
  justify-content: center;
  text-align: center;
  background: #7d9d30;
  color: #ffffff !important;
  border-radius: 9999px;
  padding: 12px 28px !important;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none !important;
}

body.careers-job-detail .offcanvas#careersJobDetailNavOffcanvas .nav-link.btn-nav-cta:hover {
  background: #3b520f;
  color: #ffffff !important;
}

/* ── HERO ── */
body.careers-job-detail section.job-hero {
  padding: 100px 0 60px;
  background: #fff;
}

body.careers-job-detail .job-hero-title {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--cj-red);
  margin-bottom: 1.25rem;
}

body.careers-job-detail .job-hero-desc {
  font-weight: 600;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  color: #3c434c;
  margin-bottom: 1.5rem;
}

body.careers-job-detail .job-hero-desc.cj-prose p {
  margin-bottom: 0.75rem;
}

body.careers-job-detail .job-hero-desc.cj-prose p:last-child {
  margin-bottom: 0;
}

body.careers-job-detail .job-meta-grid {
  padding: 1.5rem 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 1.5rem;
}

body.careers-job-detail .meta-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  color: #111;
}

body.careers-job-detail .meta-icon {
  flex-shrink: 0;
  display: inline-flex;
  margin-top: 1px;
}

body.careers-job-detail .meta-icon img {
  display: block;
  width: 16px;
  height: 16px;
}

body.careers-job-detail .btn-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  background: var(--cj-green);
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  color: #fff !important;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

body.careers-job-detail .btn-green:hover {
  background: #268a47;
  color: #fff !important;
}

body.careers-job-detail .btn-border {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border: 1px solid #e5e7eb;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  color: #111 !important;
  background: transparent;
}

body.careers-job-detail .btn-border:hover {
  background: #f3f4f6;
  color: #111 !important;
}

body.careers-job-detail .job-hero-img {
  position: relative;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: linear-gradient(145deg, #f2c8d0 0%, #edb8c4 30%, #e5a8b8 60%, #f0c0cc 100%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.careers-job-detail .job-hero-img-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.careers-job-detail .hearing-badge {
  background: rgba(255, 255, 255, 0.93);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.6;
  text-align: center;
  display: inline-block;
  margin-top: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.careers-job-detail .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #5b5f67;
  margin-bottom: 1rem;
}

body.careers-job-detail .back-link:hover {
  color: #111;
}

/* ── ROLE ── */
body.careers-job-detail section.role-section {
  background: var(--cj-gray-bg);
  border-top: 1px solid #f9fafb;
  padding: 80px 0;
}

body.careers-job-detail .role-h2 {
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.875rem);
  line-height: 1.2;
  text-transform: uppercase;
  color: #111;
  margin-bottom: 1.5rem;
}

body.careers-job-detail .role-para {
  font-weight: 700;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: #32363b;
  text-align: justify;
}

body.careers-job-detail .role-separator {
  border-top: 1px solid #f3f4f6;
  margin: 2.5rem 0;
  opacity: 1;
}

body.careers-job-detail .role-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

body.careers-job-detail .role-list-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

body.careers-job-detail .list-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #d6334d;
  flex-shrink: 0;
  margin-top: 10px;
}

body.careers-job-detail .list-text {
  font-weight: 600;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  line-height: 1.4;
  color: #374151;
}

/* Editorial HTML (доверен админ) */
body.careers-job-detail .cj-prose {
  font-weight: 600;
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: #32363b;
}

body.careers-job-detail .cj-prose p:last-child {
  margin-bottom: 0;
}

body.careers-job-detail .cj-prose a {
  color: var(--cj-red-light);
  text-decoration: underline;
}

/* Семантични ul/ol от CKEditor — визуално като role-list (pistachio accent) */
body.careers-job-detail .cj-prose ul,
body.careers-job-detail .cj-prose ol {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0.75rem;
}

body.careers-job-detail .cj-prose li {
  position: relative;
  padding-left: 1.25rem;
  margin: 0.35rem 0;
  line-height: 1.55;
}

body.careers-job-detail .cj-prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #d6334d;
}

body.careers-job-detail .cj-prose ol {
  counter-reset: cjp;
}

body.careers-job-detail .cj-prose ol > li {
  counter-increment: cjp;
}

body.careers-job-detail .cj-prose ol > li::before {
  content: counter(cjp) ".";
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  background: transparent;
  color: #d6334d;
  font-weight: 700;
  font-size: 0.95em;
}

body.careers-job-detail .cj-prose strong,
body.careers-job-detail .cj-prose b {
  font-weight: bold;
  /*color: #d6334d;*/
}

/* Traits — картите са с предишния box style; ограничения по размер само за <img> в иконата (без оразмеряване на SVG от CSS). */
body.careers-job-detail .trait-card {
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
  background: #fff;
  border: 1px solid var(--cj-border);
  border-radius: 60px;
  height: 100%;
  transition: box-shadow 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

body.careers-job-detail .trait-card:hover,
body.careers-job-detail .trait-card:focus-within {
  box-shadow: 0 25px 50px -12px rgba(59, 82, 15, 0.12);
  border-color: #c6e0ba;
  transform: translateY(-2px);
}

body.careers-job-detail .trait-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

body.careers-job-detail .trait-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
}

body.careers-job-detail .trait-icon--image {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

body.careers-job-detail .trait-icon--image img {
  max-width: 64px;
  width: auto;
  height: auto;
  display: block;
}

body.careers-job-detail .trait-label {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #b92847;
}

body.careers-job-detail .trait-desc {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  color: #382f2f;
}

body.careers-job-detail .trait-desc img {
  max-width: 100%;
  height: auto;
}

/* Academy */
body.careers-job-detail section.academy-section {
  background: var(--cj-red-bg);
  padding: 80px 0;
}

body.careers-job-detail .academy-img {
  position: relative;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: #f3f1eb;
  aspect-ratio: 1/1;
}

body.careers-job-detail .academy-img-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.careers-job-detail .academy-eyebrow {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #d6334d;
  margin-bottom: 0.5rem;
}

body.careers-job-detail .academy-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  --academy-title-size: clamp(1.8rem, 4vw, 3rem);
}

body.careers-job-detail .academy-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

body.careers-job-detail .academy-logo-img {
  height: var(--academy-title-size);
  width: auto;
  max-width: min(55vw, 14rem);
  display: block;
  object-fit: contain;
}

body.careers-job-detail .academy-word {
  font-weight: 700;
  font-size: var(--academy-title-size);
  line-height: 1;
  color: #111;
}

body.careers-job-detail .academy-desc {
  font-weight: 600;
  font-size: clamp(0.95rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: #3c444e;
  margin-bottom: 2rem;
}

body.careers-job-detail .academy-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

body.careers-job-detail .step-num {
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  color: #b92847;
  flex-shrink: 0;
  width: 56px;
}

body.careers-job-detail .step-title {
  font-weight: 700;
  font-size: 18px;
  color: #111;
  margin-bottom: 0.25rem;
}

body.careers-job-detail .step-desc {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: #4e535c;
}

/* Benefits */
body.careers-job-detail section.benefits-section {
  padding: 80px 0;
  background: #fff;
}

body.careers-job-detail .benefits-h2 {
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.875rem);
  text-transform: uppercase;
  color: #111;
  text-align: center;
  margin-bottom: 3rem;
}

body.careers-job-detail .benefit-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.careers-job-detail .benefit-item > svg:first-child {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

body.careers-job-detail .b-icon {
  color: #bc2745;
  flex-shrink: 0;
}

body.careers-job-detail .b-icon svg {
  display: block;
}

body.careers-job-detail .b-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

body.careers-job-detail .b-title {
  font-weight: 700;
  font-size: 16px;
  color: #1e1d1d;
}

body.careers-job-detail .b-desc {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.5;
  color: #4a4848;
}

body.careers-job-detail .b-desc img {
  max-width: 100%;
  height: auto;
}

body.careers-job-detail .job-detail-closed-banner {
  background: #fbf9dc;
  border: 1px solid #e5a005;
  color: #3b520f;
}

/* Quote emphasis (admin-entered motivational quote) */
body.careers-job-detail .quote-text p {
  margin: 0 0 0.4em;
}
body.careers-job-detail .quote-text p:last-child {
  margin-bottom: 0;
}

body.careers-job-detail .quote-text strong,
body.careers-job-detail .quote-text b {
  color: #bc2745;
  font-weight: 700;
}

/* Quote section layout */
body.careers-job-detail section.quote-section {
  padding: 80px 0 100px;
  background: #fff;
}

body.careers-job-detail .quote-text {
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.2;
  text-align: center;
  color: #111;
}

body.careers-job-detail .quote-text .red {
  color: #e13554;
}

body.careers-job-detail .quote-sub {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid var(--cj-red);
  padding-bottom: 4px;
}

body.careers-job-detail .quote-label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #d6334d;
}

/* Apply form */
body.careers-job-detail section.job-application-section {
  padding: 80px 0;
  background: var(--cj-red-bg);
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

body.careers-job-detail .app-h2 {
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-transform: uppercase;
  color: #111;
  text-align: center;
  margin-bottom: 2rem;
}

body.careers-job-detail .form-card {
  background: #fff;
  border-radius: 40px;
  padding: 2.5rem 2.5rem 3.5rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body.careers-job-detail .job-form .flabel {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: #43464c;
  margin-bottom: 0.4rem;
  display: block;
}

body.careers-job-detail .job-form .finput {
  width: 100%;
  padding: 15px 16px;
  background: #f9fafb;
  border: none;
  border-radius: 30px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  color: #535964;
  outline: none;
}

body.careers-job-detail .job-form .finput::placeholder {
  color: #6b7280;
}

body.careers-job-detail .job-form textarea.finput {
  resize: vertical;
  min-height: 114px;
}

body.careers-job-detail .job-form .careers-field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 12px;
  font-weight: 600;
  color: var(--cj-red-light);
}

body.careers-job-detail .job-form .careers-field-error[hidden] {
  display: none !important;
}

body.careers-job-detail .job-form .finput.careers-input-invalid,
body.careers-job-detail .job-form select.finput.careers-input-invalid {
  box-shadow: inset 0 0 0 1px var(--cj-red-light);
}

body.careers-job-detail .file-box {
  width: 100%;
  height: 68px;
  background: #f9fafb;
  border: 2px dashed #e5e7eb;
  border-radius: 30px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

body.careers-job-detail .file-box .cj-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}

body.careers-job-detail .file-choose {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  padding: 7px 16px;
  background: var(--cj-red);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
  pointer-events: none;
}

body.careers-job-detail .file-none {
  margin-left: 150px;
  font-size: 14px;
  color: #9ca3af;
  pointer-events: none;
}

body.careers-job-detail .file-hint {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 0.25rem;
}

body.careers-job-detail .btn-submit {
  width: 100%;
  padding: 16px;
  background: var(--cj-green);
  border-radius: 30px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(44, 156, 81, 0.28), 0 4px 6px -4px rgba(44, 156, 81, 0.22);
}

body.careers-job-detail .btn-submit:hover:not(:disabled) {
  background: #268a47;
  color: #fff;
}

body.careers-job-detail .btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

body.careers-job-detail .form-privacy {
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
  margin-top: 0.5rem;
  font-weight: 700;
}

body.careers-job-detail .form-privacy a {
  color: #7d9d30;
  text-decoration: underline;
}

body.careers-job-detail .form-privacy a:hover {
  color: #3b520f;
}

body.careers-job-detail .gap-form {
  gap: 1.5rem;
}

/* Alerts inside job page */
body.careers-job-detail [data-careers-apply-alert],
body.careers-job-detail #apply-alert {
  border-radius: 30px;
  border: none;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

/* Публични HTTP грешки (job.php, router) */
body.careers-job-detail .careers-http-error-page {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  font-family: "Manrope", sans-serif;
}

body.careers-job-detail .careers-http-error-card {
  max-width: 28rem;
  width: 100%;
  text-align: center;
  padding: 2.25rem 1.75rem;
  background: var(--cj-red-bg);
  border: 1px solid rgba(185, 39, 70, 0.28);
  border-radius: 1.25rem;
  box-shadow: 0 8px 32px rgba(26, 26, 26, 0.06);
}

body.careers-job-detail .careers-http-error-logo-link {
  display: inline-flex;
  margin-bottom: 1.25rem;
  line-height: 0;
}

body.careers-job-detail .careers-http-error-logo {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

body.careers-job-detail .careers-http-error-code {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--cj-red);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

body.careers-job-detail .careers-http-error-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cj-dark);
  margin: 0 0 1rem;
  line-height: 1.3;
}

body.careers-job-detail .careers-http-error-text {
  font-size: 0.95rem;
  color: #3c434c;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

body.careers-job-detail .careers-http-error-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  background: var(--cj-red);
  color: #ffffff;
  border: none;
  transition: background 0.15s ease;
}

body.careers-job-detail .careers-http-error-back:hover {
  background: var(--cj-red-light);
  color: #ffffff;
}
body.careers-job-detail footer.site-footer {
  padding: 3rem 2rem;
  background: #1a1a1a;
}

body.careers-job-detail .footer-logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

body.careers-job-detail .footer-logo-link:focus-visible {
  outline: 2px solid #7d9d30;
  outline-offset: 3px;
  border-radius: 4px;
}

body.careers-job-detail .footer-logo-img {
  height: 40px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

body.careers-job-detail .footer-copy {
  font-weight: 600;
  font-size: 14px;
  color: #9ca3af;
}

body.careers-job-detail .footer-social {
  color: #9ca3af;
  display: flex;
  align-items: center;
}
