/* ============================================================
   e-Lancer Registration — Styles
   ============================================================ */

@font-face {
  font-family: 'Cairo';
  src: url('/CairoVar.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --clr-primary:       #e85d04;
  --clr-primary-dark:  #c44d02;
  --clr-primary-light: #fff0e6;
  --clr-accent:        #1a56db;
  --clr-accent-light:  #ebf0ff;
  --clr-success:       #0d9f6e;
  --clr-danger:        #e02424;
  --clr-danger-light:  #fde8e8;
  --clr-text:          #1f2937;
  --clr-text-muted:    #6b7280;
  --clr-border:        #d1d5db;
  --clr-bg:            #f3f4f6;
  --clr-card:          #ffffff;
  --clr-hero-start:    #0f172a;
  --clr-hero-end:      #1e3a5f;
  --radius:            12px;
  --radius-sm:         8px;
  --shadow:            0 2px 12px rgba(0,0,0,.08);
  --shadow-md:         0 4px 24px rgba(0,0,0,.12);
  --transition:        .2s ease;
  --font:              'Cairo', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  color: var(--clr-text);
  background: var(--clr-bg);
  direction: rtl;
}

.page { display: flex; flex-direction: column; min-height: 100vh; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--clr-hero-start) 0%, var(--clr-hero-end) 100%);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url('/freelancers-DeaQvLJo.jpg') center/cover no-repeat;
  opacity: .18;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px;
  max-width: 780px;
}

.logo-badge { margin-bottom: 20px; }
.logo-img {
  height: 60px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

.hero-eyebrow {
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: 12px;
}

.hero-title {
  color: #fff;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 16px;
}

.hero-subtitle {
  color: rgba(255,255,255,.82);
  font-size: 14px;
  line-height: 1.85;
  max-width: 620px;
  margin: 0 auto 24px;
}

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.hero-badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ============================================================
   CONTAINER
   ============================================================ */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  flex: 1;
}

/* ============================================================
   INFO CARD
   ============================================================ */
.info-card {
  background: var(--clr-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  overflow: hidden;
}

.info-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-text);
  gap: 12px;
  transition: background var(--transition);
}

.info-toggle:hover { background: var(--clr-bg); }
.info-toggle-title { flex: 1; }

.info-toggle-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-primary-light);
  color: var(--clr-primary);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.info-body {
  padding: 0 24px 24px;
  border-top: 1px solid var(--clr-border);
}

.info-block { padding-top: 20px; }

.info-block h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 10px;
}

.info-block p {
  font-size: 14px;
  color: var(--clr-text-muted);
  line-height: 1.85;
}

.info-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.info-list li {
  font-size: 14px;
  color: var(--clr-text-muted);
  padding-right: 22px;
  position: relative;
}

.info-list li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--clr-success);
  font-weight: 700;
}

/* ============================================================
   FORM CARD
   ============================================================ */
.form-card {
  background: var(--clr-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

/* ============================================================
   PROGRESS
   ============================================================ */
.progress-wrap { margin-bottom: 32px; }

.progress-steps {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 12px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--clr-bg);
  border: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-text-muted);
  transition: all var(--transition);
}

.step-check { display: none; }

.progress-step.is-active .step-circle {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--clr-primary-light);
}

.progress-step.is-complete .step-circle {
  background: var(--clr-success);
  border-color: var(--clr-success);
  color: #fff;
}

.progress-step.is-complete .step-num { display: none; }
.progress-step.is-complete .step-check { display: block; }

.step-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--clr-text-muted);
  white-space: nowrap;
}

.progress-step.is-active .step-label { color: var(--clr-primary); }
.progress-step.is-complete .step-label { color: var(--clr-success); }

.progress-bar-track {
  height: 6px;
  background: var(--clr-bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-primary-dark));
  border-radius: 999px;
  transition: width .4s ease;
}

.progress-percent {
  font-size: 12px;
  color: var(--clr-text-muted);
  text-align: center;
}

/* ============================================================
   GLOBAL ERROR
   ============================================================ */
.global-error {
  background: var(--clr-danger-light);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--clr-danger);
}

.global-error ul { margin-top: 8px; padding-right: 18px; }
.global-error li { margin-bottom: 4px; }

/* ============================================================
   FORM STEPS
   ============================================================ */
.form-step { display: none; }
.form-step.is-active { display: block; }

.step-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13px;
  color: var(--clr-text-muted);
  margin-bottom: 24px;
}

/* ============================================================
   FORM GRID
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group.full-width { grid-column: 1 / -1; }

/* ============================================================
   FORM GROUPS / INPUTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 6px; }

label:not(.radio-pill):not(.checkbox-pill):not(.checkbox-pill-sm) {
  font-size: 13px;
  font-weight: 700;
  color: var(--clr-text);
}

.required { color: var(--clr-danger); margin-right: 2px; }
.optional  { color: var(--clr-text-muted); font-weight: 400; font-size: 12px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--clr-text);
  background: #fff;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

input:focus, textarea:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

textarea { resize: vertical; min-height: 100px; }

.form-group.is-invalid input,
.form-group.is-invalid textarea {
  border-color: var(--clr-danger);
  box-shadow: 0 0 0 3px var(--clr-danger-light);
}

.form-group.is-valid input,
.form-group.is-valid textarea {
  border-color: var(--clr-success);
}

.error-msg {
  font-size: 12px;
  color: var(--clr-danger);
  min-height: 16px;
  display: block;
}

/* ============================================================
   RADIO / CHECKBOX PILLS
   ============================================================ */
.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill,
.checkbox-pill-sm {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.radio-pill input,
.checkbox-pill-sm input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-pill span,
.checkbox-pill-sm span {
  display: inline-block;
  padding: 7px 16px;
  border: 1.5px solid var(--clr-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--clr-text-muted);
  background: #fff;
  transition: all var(--transition);
  user-select: none;
  cursor: pointer;
}

.radio-pill input:checked + span,
.checkbox-pill-sm input:checked + span {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,93,4,.25);
}

.radio-pill:hover span,
.checkbox-pill-sm:hover span {
  border-color: var(--clr-primary);
  color: var(--clr-primary);
}

/* Agreement checkbox */
.checkbox-pill {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-pill input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--clr-primary);
  cursor: pointer;
}

.checkbox-pill span {
  font-size: 13px;
  line-height: 1.75;
  color: var(--clr-text);
  font-weight: 500;
}

/* ============================================================
   OTHER INPUT (conditional text field)
   ============================================================ */
.other-input {
  margin-top: 10px;
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--clr-text);
  background: #fff;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.other-input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

/* ============================================================
   FILE UPLOAD ZONE
   ============================================================ */
.file-upload-zone {
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--clr-bg);
}

.file-upload-zone:hover,
.file-upload-zone:focus,
.file-upload-zone.is-dragover {
  border-color: var(--clr-primary);
  background: var(--clr-primary-light);
  outline: none;
}

.upload-icon { color: var(--clr-primary); margin-bottom: 10px; }

.file-upload-text {
  font-size: 14px;
  color: var(--clr-text);
  margin-bottom: 4px;
}

.file-hint { font-size: 12px; color: var(--clr-text-muted); }

.file-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: var(--clr-success);
  font-size: 14px;
}

.file-selected-name {
  flex: 1;
  text-align: center;
  word-break: break-all;
  font-size: 13px;
  color: var(--clr-text);
}

.file-remove-btn {
  background: none;
  border: none;
  color: var(--clr-danger);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background var(--transition);
}

.file-remove-btn:hover { background: var(--clr-danger-light); }

/* ============================================================
   CHAR COUNTER
   ============================================================ */
.char-counter {
  font-size: 12px;
  color: var(--clr-text-muted);
  text-align: left;
  margin-top: 4px;
}

/* ============================================================
   FORM NAV
   ============================================================ */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--clr-border);
}

.form-nav-right { display: flex; gap: 10px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 28px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,93,4,.3);
}

.btn-primary:hover:not(:disabled) {
  background: var(--clr-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,93,4,.35);
}

.btn-submit {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(232,93,4,.3);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(232,93,4,.4);
}

.btn-ghost {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1.5px solid var(--clr-border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--clr-bg);
  border-color: var(--clr-text-muted);
  color: var(--clr-text);
}

/* ============================================================
   SPINNER
   ============================================================ */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   SUCCESS CARD
   ============================================================ */
.success-card {
  background: var(--clr-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 60px 32px;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.success-icon { width: 80px; height: 80px; }

.success-icon-circle {
  stroke: var(--clr-success);
  stroke-width: 2;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke-circle .6s cubic-bezier(.65,0,.45,1) forwards;
}

.success-icon-check {
  stroke: var(--clr-success);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke-check .4s .6s cubic-bezier(.65,0,.45,1) forwards;
}

@keyframes stroke-circle { 100% { stroke-dashoffset: 0; } }
@keyframes stroke-check  { 100% { stroke-dashoffset: 0; } }

.success-card h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--clr-text);
  margin-bottom: 10px;
}

.success-card p {
  font-size: 14px;
  color: var(--clr-text-muted);
  margin-bottom: 28px;
}

.submission-id-box {
  background: var(--clr-bg);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.submission-id-box .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text-muted);
  letter-spacing: .05em;
}

.submission-id-box .value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--clr-primary);
  letter-spacing: .05em;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-hero-start);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  margin-top: auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .form-card { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full-width { grid-column: 1; }
  .progress-steps { gap: 2px; }
  .step-label { font-size: 9px; }
  .step-circle { width: 28px; height: 28px; font-size: 11px; }
  .hero-content { padding: 32px 16px; }
  .btn { padding: 10px 18px; font-size: 13px; }
  .info-body { padding: 0 16px 16px; }
  .info-toggle { padding: 14px 16px; }
  .success-card { padding: 40px 20px; }
}
