/* Join Page Specific Styles */

.join-hero {
  padding: 140px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 163, 255, 0.1), transparent);
}

/* Progress Bar */
.progress-section {
  padding: 40px 24px;
}

.progress-bar-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  width: 0%;
  transition: width 0.5s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  color: var(--text-primary);
  z-index: 2;
}

/* Join Timeline */
.join-timeline-section {
  padding: 80px 24px;
}

.join-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.join-timeline::before {
  content: "";
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  width: 3px;
  height: 100%;
  background: var(--border-color);
  top: 0;
}

.timeline-step {
  display: flex;
  gap: 32px;
  margin-bottom: 60px;
  position: relative;
}

.timeline-step:nth-child(odd) {
  flex-direction: row-reverse;
  text-align: left;
}

.timeline-step:nth-child(even) {
  flex-direction: row;
  text-align: right;
}

.step-marker {
  position: relative;
  flex-shrink: 0;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border: 3px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.step-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: var(--transition);
  color: white;
}

.timeline-step.completed .step-number {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-color: var(--primary-color);
  color: transparent;
}

.timeline-step.completed .step-icon {
  opacity: 1;
}

.step-content {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.step-content:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.step-button {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.step-button:hover {
  background: var(--primary-color);
  color: white;
}

.timeline-step.completed .step-button {
  background: var(--primary-color);
  color: white;
  pointer-events: none;
}

/* Registration Form */
.registration-section {
  padding: 80px 24px;
  background: linear-gradient(180deg, rgba(0, 163, 255, 0.05), transparent);
}

.form-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  text-align: center;
}

.form-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

.required {
  color: #ef4444;
}

.optional {
  color: var(--text-muted);
  font-weight: 400;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  transition: var(--transition);
}

/* Enhanced select dropdown styling - FIXED VERSION */
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2300a3ff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 40px;
  cursor: pointer;
  color: var(--text-primary);
  min-height: 44px;
  position: relative;
  z-index: 1;
}

/* Simplified option styling to not interfere with browser dropdown */
.form-select option {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  padding: 10px;
  margin: 5px 0;
}

.form-select option:checked {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  background-color: var(--primary-color);
  color: white;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.1);
  z-index: 10;
}

.form-select optgroup {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-weight: 600;
}

/* Alternative styling for better browser compatibility */

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 163, 255, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: #ef4444;
}

.form-input.valid,
.form-select.valid,
.form-textarea.valid {
  border-color: #10b981;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.form-error {
  font-size: 12px;
  color: #ef4444;
  display: none;
}

.form-error.show {
  display: block;
}

.char-counter {
  font-size: 12px;
  color: var(--text-muted);
  text-align: left;
}

/* Section Divider */
.form-divider {
  height: 1px;
  background: var(--border-color);
  margin: 16px 0;
}

.section-subtitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* File Upload */
.file-upload {
  position: relative;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.file-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
}

.file-label:hover {
  border-color: var(--primary-color);
  background: rgba(0, 163, 255, 0.05);
}

.file-label svg {
  color: var(--primary-color);
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.form-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-text {
  flex: 1;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.terms-link {
  color: var(--primary-color);
  text-decoration: none;
}

.terms-link:hover {
  text-decoration: underline;
}

/* Submit Button */
.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 16px;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 163, 255, 0.4);
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-icon {
  transition: transform 0.3s ease;
}

.submit-button:hover:not(:disabled) .button-icon {
  transform: translateX(-4px);
}

/* Success Modal */
.success-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.success-modal.active {
  display: flex;
}

.success-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.success-modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  z-index: 3001;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon {
  margin-bottom: 24px;
  animation: successPulse 0.6s ease;
}

@keyframes successPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.success-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.success-message {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.success-reference {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 24px;
  font-size: 14px;
}

.success-reference strong {
  color: var(--text-primary);
}

.success-reference span {
  color: var(--primary-color);
  font-weight: 600;
}

.success-button {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  padding: 12px 40px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.success-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 163, 255, 0.4);
}

/* Add styling for closed applications section */
.closed-applications-section {
  padding: 120px 24px;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.05), transparent);
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.closed-applications-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
}

.closed-icon {
  margin-bottom: 32px;
  display: flex;
  justify-content: center;
  color: #ef4444;
  animation: closedIconFloat 3s ease-in-out infinite;
}

@keyframes closedIconFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.closed-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.closed-message {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.closed-message.secondary {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.closed-note {
  font-size: 14px;
  background: rgba(0, 163, 255, 0.05);
  border-left: 3px solid var(--primary-color);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 24px 0;
  color: var(--text-secondary);
}

.closed-note strong {
  color: var(--primary-color);
  font-weight: 600;
}

.back-home-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 24px;
}

.back-home-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 163, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
  .join-timeline::before {
    right: 30px;
    transform: none;
  }

  .timeline-step,
  .timeline-step:nth-child(odd),
  .timeline-step:nth-child(even) {
    flex-direction: row;
    text-align: right;
  }

  .step-marker {
    position: absolute;
    right: 0;
  }

  .step-content {
    margin-right: 90px;
  }

  .form-container {
    padding: 24px;
  }

  .closed-applications-container {
    padding: 40px 24px;
  }

  .closed-title {
    font-size: 28px;
  }
}
