/* Import Dana Font - A beautiful and modern Persian font */
@import url('https://fonts.googleapis.com/css2?family=Dana:wght@400;500;700&display=swap');

:root {
  --primary-color: #6d28d9; /* A nice purple */
  --primary-color-dark: #5b21b6;
  --text-color: #334155;
  --label-color: #64748b;
  --border-color: #cbd5e1;
  --bg-light: #f8fafc;
  --error-color: #ef4444;
  /* Using the new font */
  --font-family: 'Dana', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-family);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.main-container {
  display: flex;
  min-height: 100vh;
}

/* Branding Section */
.branding-section {
  flex: 1;
  background-image: linear-gradient(to top right, #8b5cf6, #6d28d9), url('https://images.unsplash.com/photo-1511379938547-c1f69419868d?w=800');
  background-blend-mode: multiply;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column; /* Center content vertically */
  justify-content: center;
  align-items: center;
  color: #fff;
  padding: 40px;
  text-align: center;
  animation: fadeInBranding 1s ease-out;
}

@keyframes fadeInBranding {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.branding-content .logo {
  margin-bottom: 24px;
}

.branding-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.branding-content p {
  font-size: 1.1rem;
  max-width: 400px;
  opacity: 0.9;
  line-height: 1.7;
}

/* Form Section */
.form-section {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  padding: 40px;
  animation: fadeInForm 1s 0.2s ease-out backwards;
}

@keyframes fadeInForm {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


.form-wrapper {
  width: 100%;
  max-width: 420px;
}

.form-wrapper h2 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 30px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--label-color);
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: var(--label-color);
  pointer-events: none;
  transition: color 0.3s;
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 45px 12px 15px; /* Swapped padding for RTL */
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-light);
  font-size: 1rem;
  font-family: var(--font-family); /* Ensure font is inherited */
  transition: border-color 0.3s, box-shadow 0.3s;
}

.field select {
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 15px center;
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
}

.field input:focus + i, .field select:focus + i, .field textarea:focus + i {
    color: var(--primary-color);
}

.grid-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.error {
  color: var(--error-color);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 5px;
  display: block;
  min-height: 1.2em;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-submit:hover:not(:disabled) {
  background-color: var(--primary-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(109, 40, 217, 0.3);
}

.btn-submit:disabled {
  background-color: #c4b5fd;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-message { padding: 12px; text-align: center; border-radius: 8px; margin-top: 20px; }
.form-message.success { background-color: #dcfce7; color: #166534; }
.form-message.error { background-color: #fee2e2; color: #991b1b; }

/* Responsive */
@media (max-width: 992px) {
  .branding-section {
    display: none;
  }
  .form-section {
    padding: 20px;
    align-items: flex-start; /* Better for mobile keyboard */
    padding-top: 40px;
  }
}