/* إعدادات عامة */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  direction: rtl;
  text-align: right;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  overflow: hidden;
  animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* رابط العودة */
.back-link {
  display: inline-block;
  margin: 30px 30px 0;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 10px 15px;
  border-radius: 25px;
  background: rgba(102, 126, 234, 0.1);
}

.back-link:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateX(-5px);
}

/* العنوان والوصف */
h1 {
  text-align: center;
  color: #2d3748;
  font-size: 2.5rem;
  margin: 20px 0;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea, #764ba2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.description {
  text-align: center;
  color: #4a5568;
  font-size: 1.1rem;
  margin: 0 30px 30px;
  line-height: 1.6;
  padding: 20px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 15px;
  border-right: 4px solid #667eea;
}

/* النموذج */
.booking-form {
  padding: 30px;
}

.form-section {
  margin-bottom: 30px;
  padding: 25px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s ease;
}

.form-section:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-section h3 {
  color: #2d3748;
  font-size: 1.3rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #667eea;
  position: relative;
}

.form-section h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 50px;
  height: 2px;
  background: #764ba2;
}

.form-row {
  margin-bottom: 20px;
  position: relative;
}

.form-row label {
  display: block;
  margin-bottom: 8px;
  color: #2d3748;
  font-weight: 600;
  font-size: 1rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  direction: rtl;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #a0aec0;
  font-style: italic;
}

/* صفوف التواريخ والأوقات */
.dates-row,
.time-row {
  display: flex;
  gap: 20px;
}

.dates-row > div,
.time-row > div {
  flex: 1;
}

/* خيارات الغرف */
.room-type {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.room-type label {
  display: flex;
  align-items: center;
  background: rgba(102, 126, 234, 0.1);
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-weight: 500;
}

.room-type label:hover {
  background: rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.room-type input[type="radio"] {
  margin-left: 10px;
  width: auto;
  accent-color: #667eea;
}

.room-type input[type="radio"]:checked + label,
.room-type label:has(input[type="radio"]:checked) {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* زر الإرسال */
.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 18px 30px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
  transform: translateY(-1px);
}

/* تأثيرات الحركة */
.form-row {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.form-row:nth-child(1) { animation-delay: 0.1s; }
.form-row:nth-child(2) { animation-delay: 0.2s; }
.form-row:nth-child(3) { animation-delay: 0.3s; }
.form-row:nth-child(4) { animation-delay: 0.4s; }
.form-row:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تصميم متجاوب */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .container {
    border-radius: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .booking-form {
    padding: 20px;
  }
  
  .form-section {
    padding: 20px;
  }
  
  .dates-row,
  .time-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .room-type {
    flex-direction: column;
  }
  
  .room-type label {
    justify-content: center;
  }
  
  .back-link {
    margin: 20px 20px 0;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }
  
  .description {
    font-size: 1rem;
    margin: 0 20px 20px;
    padding: 15px;
  }
  
  .booking-form {
    padding: 15px;
  }
  
  .form-section {
    padding: 15px;
  }
  
  .form-row input,
  .form-row select,
  .form-row textarea {
    padding: 12px 15px;
  }
}

/* تحسينات إضافية */
.form-row input[type="date"],
.form-row input[type="time"] {
  position: relative;
}

.form-row select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: left 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-left: 40px;
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
}

/* تأثيرات التحويم للحقول */
.form-row input:hover,
.form-row select:hover,
.form-row textarea:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* تنسيق خاص للحقول المطلوبة */
.form-row input:required,
.form-row select:required {
  border-right: 3px solid #667eea;
}

.form-row input:required:invalid {
  border-right-color: #e53e3e;
}

.form-row input:required:valid {
  border-right-color: #38a169;
}

/* تحسين مظهر الراديو بوتن */
.room-type input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #667eea;
  border-radius: 50%;
  margin-left: 10px;
  position: relative;
  cursor: pointer;
}

.room-type input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
}

/* تأثير التحميل */
.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* تحسينات الوصولية */
.form-row input:focus-visible,
.form-row select:focus-visible,
.form-row textarea:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* تنسيق خاص للأقسام المخفية */
.form-section[style*="display: none"] {
  display: none !important;
}

/* تأثير الظهور للأقسام الديناميكية */
.form-section {
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.form-section.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

