/* Sections Contracting & Trading Ltd — public careers (matches sectionsltd.co.uk light theme) */

.sg-careers, .sg-careers * { box-sizing: border-box; }

.sg-careers {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #3d4f5f;
  line-height: 1.55;
  font-size: 15px;
}

/* Full page — standalone or within site header/footer */
.sg-careers-page {
  background: #f4f6f8;
}

body.sg-careers-page {
  margin: 0;
  background: #f4f6f8;
}

.sg-careers-page .sg-careers-hero {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  color: #fff;
  padding: 48px 24px 40px;
  text-align: center;
}

.sg-careers-page .sg-careers-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  color: #fff;
}

.sg-careers-page .sg-careers-hero .sg-sub {
  font-size: 1rem;
  opacity: 0.92;
  max-width: 560px;
  margin: 0 auto;
  color: #e8eef4;
}

.sg-careers-page .sg-careers-hero .sg-brand {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.85;
  margin-bottom: 12px;
  font-weight: 600;
}

/* Embed mode — sits inside Odoo page content, no hero */
.sg-careers.sg-embed {
  background: transparent;
  padding: 0;
}

.sg-careers.sg-embed .sg-careers-intro {
  margin-bottom: 24px;
}

.sg-careers.sg-embed .sg-careers-intro h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #991b1b;
  margin: 0 0 8px;
}

.sg-careers.sg-embed .sg-careers-intro p {
  margin: 0;
  color: #5a6a7a;
  font-size: 0.95rem;
}

.sg-careers-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.sg-careers.sg-embed .sg-careers-wrap {
  max-width: none;
  padding: 0;
}

.sg-careers-loading {
  text-align: center;
  padding: 32px;
  color: #5a6a7a;
}

.sg-careers-job {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(153, 27, 27, 0.06);
  overflow: hidden;
}

.sg-careers-summary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: inherit;
  font-family: inherit;
  color: inherit;
}

.sg-careers-summary:hover { background: #fafbfc; }

.sg-careers-summary-text { flex: 1; min-width: 0; }

.sg-careers-job h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #991b1b;
  margin: 0;
}

.sg-careers-meta {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #5a6a7a;
  line-height: 1.4;
}

.sg-careers-chev {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid #991b1b;
  border-bottom: 2px solid #991b1b;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  margin-top: -4px;
}

.sg-careers-job.open .sg-careers-chev {
  transform: rotate(225deg);
  margin-top: 4px;
}

.sg-careers-details {
  display: none;
  padding: 4px 16px 18px;
  border-top: 1px solid #eef2f6;
}

.sg-careers-job.open .sg-careers-details { display: block; }

.sg-careers-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sg-careers-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  background: #fef2f2;
  color: #991b1b;
}

.sg-careers-tag.loc { background: #fee2e2; color: #b91c1c; }

.sg-careers-desc {
  font-size: 0.9rem;
  color: #5a6a7a;
  line-height: 1.65;
  margin: 12px 0;
  white-space: pre-wrap;
}

.sg-careers-desc strong { color: #991b1b; }

.sg-careers-job.is-rtl {
  direction: rtl;
  text-align: right;
}
.sg-careers-job.is-rtl .sg-careers-tags { justify-content: flex-start; }
.sg-careers-job.is-rtl .sg-careers-apply,
.sg-careers-job.is-rtl .sg-careers-btn {
  direction: ltr;
  text-align: left;
}
.sg-careers-job.is-rtl .sg-careers-btn { display: inline-block; }
.sg-careers-job.is-rtl .sg-careers-summary { flex-direction: row; }

.sg-careers-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}

.sg-careers-btn-primary {
  background: #dc2626;
  color: #fff;
}

.sg-careers-btn-primary:hover { background: #b91c1c; }

.sg-careers-btn-submit {
  background: #2d6a4f;
  color: #fff;
  margin-top: 8px;
}

.sg-careers-btn-submit:hover { background: #3d8a63; }

.sg-careers-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.sg-careers-apply {
  display: none;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.sg-careers-apply.on { display: block; }

.sg-careers-field { margin-bottom: 14px; }

.sg-careers-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #991b1b;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sg-careers-field input,
.sg-careers-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1dae3;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #3d4f5f;
  background: #fff;
}

.sg-careers-field input:focus,
.sg-careers-field textarea:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.sg-careers-field input[type="file"] {
  padding: 8px 10px;
  font-size: 0.85rem;
  background: #fff;
  cursor: pointer;
}

.sg-careers-field .sg-file-hint {
  font-size: 0.75rem;
  color: #5a6a7a;
  margin-top: 4px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.sg-careers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  .sg-careers-grid { grid-template-columns: 1fr; }
}

.sg-careers-empty,
.sg-careers-alert {
  padding: 20px;
  border-radius: 8px;
  background: #eef2f6;
  border: 1px solid #e2e8f0;
  color: #5a6a7a;
}

.sg-careers-alert.err {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.sg-careers-success {
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.sg-careers-success h2 {
  color: #2d6a4f;
  font-size: 1.25rem;
  margin: 0 0 10px;
}

.sg-careers-success p { color: #5a6a7a; margin: 0; }
