/* =============================================================
   career-detail.css — Career Detail Page (Figma redesign)
   Reuses: .container, .section, .ca-connect-* from career.css & global.css
   All rem values based on global.css base (19px)
   ============================================================= */

/* ---------------------------------------------------------------
   1. HERO — breadcrumb + title + full-width description
--------------------------------------------------------------- */
.cd2-hero {
  padding: 9rem 0 4rem;
  /* background: #ffffff; */
}

.cd2-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1.263rem;
}

/* Breadcrumb */
.cd2-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.368rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.cd2-breadcrumb-item {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 1rem;
  color: var(--text-sub);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cd2-breadcrumb-item:hover {
  color: var(--primary-blue);
}

.cd2-breadcrumb-item--current {
  color: var(--text-sub);
}

.cd2-breadcrumb-sep {
  color: var(--text-sub);
  font-size: 1rem;
  font-weight: 300;
}

/* Job title block */
.cd2-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cd2-job-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 2.263rem; /* ~43px */
  color: var(--base-dark);
  line-height: 1.15;
  margin: 0;
}

.cd2-job-subtitle {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 1.053rem;
  color: var(--base-dark);
  margin: 0;
  line-height: 1.5;
}

/* Description full-width text */
.cd2-description {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  color: var(--blog-content-color);
}

.cd2-description * {
  color: var(--blog-content-color);
}

body.dark-theme .cd2-description,
body.dark-theme .cd2-description *,
body.dark-theme .cd2-description p,
body.dark-theme .cd2-description .cd2-section-heading,
body.dark-theme .cd2-description .cd2-list li,
body.dark-theme .cd2-section-heading,
body.dark-theme .cd2-list li {
  color: var(--blog-content-color) !important;
}

.cd2-description p {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 1.158rem; /* ~22px matching Figma */
  color: var(--blog-content-color);
  line-height: 2rem;
  margin: 0;
  text-transform: capitalize;
}

.cd2-section-heading {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1.263rem;
  color: var(--blog-content-color);
  margin: 1rem 0 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f1f5f9;
}

.cd2-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0;
  margin: 0;
}

.cd2-list li {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 1.158rem;
  color: var(--blog-content-color);
  line-height: 1.6;
  padding-left: 1.5rem;
  position: relative;
}

.cd2-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-blue);
  opacity: 0.5;
}

/* ---------------------------------------------------------------
   2. APPLY PANEL — Inline (not a modal overlay, but a visible panel)
--------------------------------------------------------------- */
.cd2-apply-section {
  background: var(--body-bg-white);
  padding: 4rem 0 5rem;
}

.cd2-apply-panel {
  background: var(--bg-white);
  border-radius: 1rem;
  width: 100%;
  max-width: 79.0625rem; /* ~1265px / 19 */
  max-height: 61.875rem;
  margin: 0 auto;
  overflow-y: auto;   /* instead of hidden */
  overflow-x: hidden;
  box-shadow: 0 4px 40px rgba(8, 75, 129, 0.08);
}


/* Panel header */
.cd2-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 2rem 1.2rem;
  /* border-bottom: 1px solid var(); */
  /* background: #f8f8f8; */
}

.cd2-panel-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.421rem;
}

.cd2-panel-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 2rem;
  color: var(--base-dark);
  margin: 0;
  line-height: 1.2;
}

.cd2-panel-subtitle {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.875rem;
  color: var(--text-sub);
  margin: 0;
  line-height: 1.6;
}

.cd2-req {
  color: #ef4444;
  font-weight: 600;
}

.cd2-panel-close {
  flex-shrink: 0;
  width: 2.105rem;
  height: 2.105rem;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 0.25rem;
}

.cd2-panel-close:hover {
  background: #e2e8f0;
}

/* Panel form */
.cd2-panel-form {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.cd2-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.cd2-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.421rem;
}

.cd2-form-label {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-sub);
}

.cd2-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cd2-input-icon {
  position: absolute;
  left: 0.737rem;
  pointer-events: none;
  flex-shrink: 0;
}

.cd2-form-input {
  width: 100%;
  height: 2.842rem;
  background: var(--body-bg-white);
  border: 1px solid #e2e8f0;
  border-radius: 0.421rem;
  padding: 0 0.842rem 0 2.526rem;
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.737rem;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, font-weight 0.15s ease, color 0.15s ease;
}

.cd2-form-input::placeholder {
  color: #94a3b8;
  font-weight: 300;
}

.cd2-form-input:focus,
.cd2-form-input:not(:placeholder-shown) {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  outline: none;
  color: var(--text-sub);
  font-weight: 500;
}

.cd2-form-input--readonly {
  background: var(--body-bg-white);
  color: var(--text-sub);
  cursor: default;
  padding-left: 0.9rem;
}

/* Select */
.cd2-select-wrap {
  position: relative;
}

.cd2-form-select {
  width: 100%;
  height: 2.842rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.421rem;
  padding: 0 2.5rem 0 0.9rem;
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.737rem;
  color: #475569;
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, font-weight 0.15s ease, color 0.15s ease;
}

.cd2-form-select:focus,
.cd2-form-select:valid {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  outline: none;
  color: #020617;
  font-weight: 500;
}

.cd2-select-chevron {
  position: absolute;
  right: 0.737rem;
  pointer-events: none;
}

/* File upload zone */
.cd2-upload-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.cd2-upload-zone {
  width: 100%;
  max-width: 37.5rem;
  background: var(--body-bg-white);
  border: 2px dashed #cbd5e1;
  border-radius: 0.737rem;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.526rem;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
  text-align: center;
}

.cd2-upload-zone.drag-over {
  border-color: #3b82f6;
  background: #eff6ff;
}

.cd2-upload-icon-wrap {
  width: 3rem;
  height: 3rem;
  background: var(--body-bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.cd2-upload-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.842rem;
  color: #0f172a;
  margin: 0;
}

body.dark-theme .cd2-upload-title {
  color: #a0a0b0;
}

.cd2-upload-or {
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 0.737rem;
  color: #64748b;
  margin: 0;
}

body.dark-theme .cd2-upload-or {
  color: #a0a0b0;
}

.cd2-choose-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.526rem 1.316rem;
  border: 1px solid #3b82f6;
  border-radius: 0.421rem;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 0.737rem;
  color: #2563eb;
  background: var(--body-bg-white);
  cursor: pointer;
  transition: background 0.2s ease;
}

.cd2-choose-file-btn:hover {
  background: var(--bg-light);
}

.cd2-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.cd2-upload-hint {
  font-family: var(--font-primary);
  font-size: 0.632rem;
  color: #94a3b8;
  margin: 0;
}

body.dark-theme .cd2-upload-hint {
  color: #a0a0b0;
}

.cd2-upload-filename {
  font-family: var(--font-primary);
  font-size: 0.737rem;
  color: #2563eb;
  font-weight: 500;
  margin: 0;
  word-break: break-all;
}

/* Form footer */
.cd2-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

.cd2-footer-note {
  display: flex;
  align-items: flex-start;
  gap: 0.526rem;
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  flex: 1;
  min-width: 14rem;
}

body.dark-theme .cd2-footer-note {
  color: #a0a0b0;
}

.cd2-footer-note svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.cd2-footer-btns {
  display: flex;
  align-items: center;
  gap: 0.737rem;
  flex-shrink: 0;
}

.cd2-btn-cancel {
  height: 2.316rem;
  padding: 0 1.316rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.421rem;
  background: var(--bg-white);
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 0.737rem;
  color: var(--text-sub);
  cursor: pointer;
  transition: background 0.2s ease;
}

.cd2-btn-cancel:hover {
  background: #f8fafc;
  color: #464646;
}

.cd2-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.526rem;
  height: 2.316rem;
  padding: 0 1.316rem;
  border-radius: 0.421rem;
  background: var(--primary-blue);
  color: #ffffff;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 0.737rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(8, 75, 129, 0.3);
  min-width: 12.2rem;
  justify-content: center;
}

[dir=rtl] .cd2-btn-submit svg {
  transform: scale(1, -1) rotate(180deg);
}

.cd2-btn-submit:hover {
  background: #063b66;
  transform: translateY(-1px);
}

.cd2-btn-submit:active {
  transform: none;
}

/* Form feedback */
.cd2-form-feedback {
  border-radius: 0.526rem;
  padding: 0.842rem 1.053rem;
  font-family: var(--font-primary);
  font-size: 0.842rem;
  font-weight: 500;
  text-align: center;
}

.cd2-form-feedback.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.cd2-form-feedback.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

/* ---------------------------------------------------------------
   3. RESPONSIVE
--------------------------------------------------------------- */
@media (max-width: 1024px) {
  .cd2-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cd2-hero {
    padding: 7rem 0 2.5rem;
  }

  .cd2-job-title {
    font-size: 1.7rem;
  }

  .cd2-description p,
  .cd2-list li {
    font-size: 1rem;
  }

  .cd2-panel-header {
    padding: 1.5rem 1.5rem 1rem;
  }

  .cd2-panel-form {
    padding: 1.5rem;
  }

  .cd2-panel-title {
    font-size: 1.4rem;
  }

  .cd2-form-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .cd2-footer-btns {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .cd2-breadcrumb {
    gap: 0.25rem;
  }

  .cd2-footer-btns {
    flex-direction: column;
  }

  .cd2-btn-submit,
  .cd2-btn-cancel {
    width: 100%;
    justify-content: center;
  }
}
