/* Registration multi-step wizard — desert brand */

.reg-page {
  min-height: 100vh;
  position: relative;
  background-color: var(--background-color);
  padding-bottom: 2.5rem;
  margin: 0;
  box-sizing: border-box;
}

.reg-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("../img/motifs/website_background.png");
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.reg-page .registration-container {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  box-sizing: border-box;
}

.reg-page .form-container.reg-form-shell {
  max-width: none;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.reg-page .registration-form {
  max-width: none;
}

.reg-header {
  text-align: center;
  padding: 1.75rem 1.25rem 1.5rem;
  border-radius: 0 0 1.5rem 1.5rem;
  background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 28px rgba(62, 39, 35, 0.18);
}

.reg-header .navbar-logo {
  width: 72px;
  height: auto;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

.reg-header .page-title {
  margin: 0;
  font-family: var(--font-english);
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.reg-header .page-subtitle {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  opacity: 0.92;
  color: #fff;
  font-weight: 400;
}

.reg-progress-wrap {
  margin-bottom: 1.25rem;
}

.reg-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-color);
}

.reg-progress-meta strong {
  color: var(--heading-color);
  font-weight: 600;
}

.reg-progress-track {
  height: 6px;
  background: rgba(210, 180, 140, 0.45);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.reg-progress-fill {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.reg-progress-steps {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: space-between;
  gap: 0.35rem;
}

.reg-progress-steps li {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: #8a7a6a;
  position: relative;
  padding-top: 0.85rem;
}

.reg-progress-steps li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d2b48c;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border-color);
}

.reg-progress-steps li.is-done,
.reg-progress-steps li.is-active {
  color: var(--heading-color);
  font-weight: 600;
}

.reg-progress-steps li.is-done::before,
.reg-progress-steps li.is-active::before {
  background: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(212, 167, 106, 0.35);
}

.reg-progress-steps li.is-active::before {
  transform: translateX(-50%) scale(1.2);
}

@media (min-width: 640px) {
  .reg-progress-steps {
    display: flex;
  }
}

.reg-form-shell {
  background: rgba(255, 248, 225, 0.88);
  border: 1px solid rgba(210, 180, 140, 0.55);
  border-radius: 1.25rem;
  padding: 1.35rem 1.15rem 1.5rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(62, 39, 35, 0.06);
}

.reg-step {
  display: none;
  animation: regStepIn 0.32s ease;
}

.reg-step.is-active {
  display: block;
}

@keyframes regStepIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reg-step {
    animation: none;
  }
  .reg-progress-fill {
    transition: none;
  }
}

.reg-step-heading {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  color: var(--heading-color);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.reg-step-lead {
  margin: 0 0 1.25rem;
  color: var(--text-color);
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.9;
}

/* ITS prefilled identity block */
.reg-its-banner {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  border: 1.5px solid rgba(212, 167, 106, 0.55);
  background: linear-gradient(135deg, rgba(212, 167, 106, 0.16), rgba(230, 177, 122, 0.12));
  color: var(--heading-color);
}

.reg-its-banner strong {
  font-size: 0.92rem;
  font-weight: 700;
}

.reg-its-banner span {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-color);
  opacity: 0.9;
}

.reg-locked-block {
  margin-bottom: 0.35rem;
  padding: 0.85rem 1rem 0.25rem;
  border-radius: 1rem;
  border: 1px dashed rgba(179, 139, 109, 0.55);
  background: rgba(247, 240, 228, 0.65);
}

.reg-locked-block .input-group {
  margin-bottom: 0.9rem;
}

.reg-locked-block input[readonly],
.reg-locked-block select:disabled {
  background: #efe6d6 !important;
  border-color: rgba(210, 180, 140, 0.7) !important;
  color: var(--heading-color) !important;
  opacity: 1 !important;
  font-weight: 600;
  cursor: default;
}

/* Override theme/Bootstrap .input-group horizontal flex rules */
.reg-page .registration-form .input-group,
.reg-form-shell .input-group {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  margin-bottom: 1.1rem;
  width: 100%;
}

.reg-form-shell .form-label {
  display: block;
  font-weight: 600;
  color: var(--heading-color);
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.reg-form-shell input[type="text"],
.reg-form-shell input[type="number"],
.reg-form-shell input[type="date"],
.reg-form-shell input[type="email"],
.reg-form-shell input[type="tel"],
.reg-form-shell select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border-color);
  background: #fff;
  color: var(--text-color);
  font-family: var(--font-english);
  font-size: 1rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.reg-form-shell input:focus,
.reg-form-shell select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(212, 167, 106, 0.22);
}

.reg-form-shell input[readonly],
.reg-form-shell select:disabled {
  background: #f7f0e4;
  color: #5a5a5a;
  cursor: default;
}

.reg-page .reg-form-shell .form-row,
.reg-form-shell .form-row {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 0;
}

@media (min-width: 560px) {
  .reg-page .reg-form-shell .form-row,
  .reg-form-shell .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* Choice chips — gender & hijri (override theme .gender-option flex row) */
.reg-page .choice-group,
.reg-page .choice-group.gender-options,
.reg-form-shell .choice-group,
.reg-form-shell .gender-options {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.reg-page .choice-option,
.reg-page .choice-option.gender-option,
.reg-form-shell .choice-option,
.reg-form-shell .gender-option {
  position: relative;
  display: block !important;
  gap: 0;
}

.reg-page .choice-option input,
.reg-page .choice-option.gender-option input[type="radio"],
.reg-form-shell .choice-option input,
.reg-form-shell .gender-option input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

.reg-page .choice-option label,
.reg-page .choice-option.gender-option label,
.reg-form-shell .choice-option label,
.reg-form-shell .gender-option label {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 2px solid var(--border-color);
  background: #fff;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.reg-page .choice-option input:checked + label,
.reg-page .choice-option.gender-option input:checked + label,
.reg-form-shell .choice-option input:checked + label,
.reg-form-shell .gender-option input:checked + label,
.choice-option input:checked + label {
  border-color: var(--primary-color) !important;
  background: linear-gradient(135deg, rgba(212, 167, 106, 0.28), rgba(230, 177, 122, 0.22)) !important;
  color: var(--heading-color) !important;
  box-shadow: 0 0 0 2px rgba(212, 167, 106, 0.35), 0 2px 8px rgba(212, 167, 106, 0.25) !important;
  font-weight: 700 !important;
}

.reg-page .choice-option label:hover,
.reg-form-shell .choice-option label:hover,
.choice-option label:hover {
  border-color: var(--secondary-color);
}

.reg-page .choice-option input:focus-visible + label,
.reg-form-shell .choice-option input:focus-visible + label,
.choice-option input:focus-visible + label {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.reg-page .hijri-choices,
.reg-form-shell .hijri-choices {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem;
  align-items: stretch;
}

.reg-page .hijri-choices .choice-option,
.reg-form-shell .hijri-choices .choice-option {
  height: 100%;
  display: flex !important;
}

.reg-page .hijri-choices .choice-option label,
.reg-form-shell .hijri-choices .choice-option label,
.hijri-choices label {
  flex: 1 1 auto;
  width: 100%;
  min-height: 3.5rem;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 1.3;
  padding: 0.85rem 0.75rem;
  box-sizing: border-box;
}

.programs-peek {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.1rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-color);
  background: #fff;
  color: var(--heading-color);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-english);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.programs-peek:hover {
  background: var(--light-color);
  border-color: var(--primary-color);
}

#further-questions {
  display: block !important;
}

#programDetails h2 {
  font-size: 1.05rem;
  color: var(--heading-color);
  margin: 1rem 0 0.65rem;
}

#programDetails {
  margin-bottom: 0.5rem;
}

.reg-form-shell .program-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid var(--heading-color);
  box-shadow: 0 2px 8px rgba(62, 39, 35, 0.08);
}

.reg-form-shell .program-table th,
.reg-form-shell .program-table td {
  padding: 0.55rem 0.65rem;
  border-right: 1px solid rgba(210, 180, 140, 0.45);
  border-bottom: 1px solid rgba(210, 180, 140, 0.45);
  text-align: left;
}

.reg-form-shell .program-table th:last-child,
.reg-form-shell .program-table td:last-child {
  border-right: none;
}

.reg-form-shell .program-table tbody tr:last-child td {
  border-bottom: none;
}

.reg-form-shell .program-table thead th {
  background: var(--dark-color);
  color: #fff;
  border-bottom: 2px solid var(--heading-color);
}

.reg-review {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}

.reg-review h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--heading-color);
}

.reg-review dl {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.reg-review .review-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(210, 180, 140, 0.35);
}

.reg-review .review-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reg-review dt {
  color: #8a7a6a;
  font-weight: 500;
  margin: 0;
}

.reg-review dd {
  margin: 0;
  color: var(--text-color);
  font-weight: 600;
  word-break: break-word;
}

.reg-ack {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0.85rem;
  border: 2px solid var(--border-color);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.reg-ack:has(input:checked) {
  border-color: var(--primary-color);
  background: rgba(212, 167, 106, 0.1);
}

.reg-ack input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--primary-color);
}

.reg-ack span {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-color);
}

.reg-field-error {
  border-color: var(--danger-color) !important;
  box-shadow: 0 0 0 0.15rem rgba(198, 40, 40, 0.15) !important;
}

.reg-step-error {
  display: none;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  background: rgba(198, 40, 40, 0.08);
  border: 1px solid rgba(198, 40, 40, 0.25);
  color: var(--danger-color);
  font-size: 0.88rem;
  line-height: 1.4;
}

.reg-step-error.is-visible {
  display: block;
}

/* In-page action buttons (scroll with the form — no sticky bar) */
.reg-actions {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(210, 180, 140, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.reg-nav-help {
  color: var(--heading-color);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}

.reg-nav-help:hover {
  text-decoration: underline;
}

.reg-actions-btns {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.reg-btn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-english);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 0.85rem;
  padding: 0.95rem 1.25rem;
  min-height: 3.15rem;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.reg-btn:active {
  transform: translateY(1px);
}

.reg-btn-back {
  background: #fff;
  color: var(--heading-color);
  border: 2px solid var(--border-color);
  min-width: 5.5rem;
}

.reg-btn-back:hover {
  background: var(--light-color);
}

.reg-btn-back[hidden] {
  display: none !important;
}

.reg-btn-next,
.reg-btn-submit {
  margin-left: auto;
  flex: 1 1 auto;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: #fff;
  box-shadow: 0 4px 12px rgba(179, 139, 109, 0.35);
}

.reg-btn-next:hover,
.reg-btn-submit:hover {
  box-shadow: 0 6px 16px rgba(179, 139, 109, 0.45);
}

.reg-btn-submit[hidden],
.reg-btn-next[hidden] {
  display: none !important;
}

/* Modal */
.image-modal {
  z-index: 9999;
}

.reg-form-shell .button-group[hidden] {
  display: none !important;
}

.reg-form-shell .contact-info {
  display: none;
}
