/* Enhanced Professional Arabic Style - style.css */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #2980b9;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --light-bg: #f8fafc;
  --text-color: #2d3748;
  --border-radius: 12px;
  --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --gradient-primary: linear-gradient(135deg, #3498db, #2980b9);
  --gradient-success: linear-gradient(135deg, #27ae60, #219653);
  --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Main Container */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 30px 20px;
  position: relative;
  overflow-x: hidden;
}

/* Professional Background Pattern */
.container::before {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(52, 152, 219, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(41, 128, 185, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(39, 174, 96, 0.05) 0%, transparent 50%);
  z-index: -1;
}

/* Logo Container */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 900px;
  gap: 40px;
  margin-bottom: 30px;
  position: relative;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  padding: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--gradient-card);
  backdrop-filter: blur(10px);
  box-shadow: var(--box-shadow);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.logo::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 100%);
  z-index: 1;
}

/* Center Logo (Highlighted) */
.logo-container .logo:nth-child(2) {
  width: 140px;
  height: 140px;
  background: var(--gradient-card);
  border: 2px solid rgba(52, 152, 219, 0.3);
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(52, 152, 219, 0.15);
}

.logo img {
  width: 85%;
  height: 85%;
  object-fit: contain;
  display: block;
  z-index: 2;
  transition: all 0.3s ease;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.logo:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.logo:hover img {
  transform: scale(1.1);
}

/* Program Title */
.program-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin: 20px 0 40px;
  color: var(--primary-color);
  position: relative;
  padding: 25px 50px;
  max-width: 900px;
  line-height: 1.4;
  background: var(--gradient-card);
  backdrop-filter: blur(15px);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.program-title i {
  margin-left: 15px;
  color: var(--secondary-color);
}

.program-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 50%;
  transform: translateX(50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(to right, #3498db, #2ecc71);
  border-radius: 2px;
}

/* Enhanced Professional Progress Tracker */
.progress-tracker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin: 30px 0 50px;
  position: relative;
  padding: 0 40px;
}

.progress-tracker::before {
  content: '';
  position: absolute;
  top: 25px;
  right: 10%;
  width: 80%;
  height: 3px;
  background: #e0e6ed;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  z-index: 2;
}

.step-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0e6ed;
  color: #64748b;
  font-size: 1.2rem;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

.progress-step.active .step-icon {
  background: var(--secondary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.progress-step.completed .step-icon {
  background: var(--success-color);
  color: white;
}

.progress-step.completed .step-icon i {
  transform: scale(1);
}

.progress-step span {
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: all 0.3s ease;
}

.progress-step.active span {
  color: var(--primary-color);
  font-weight: 700;
}

.progress-step.completed span {
  color: var(--success-color);
}

/* Form Styling */
.form-container {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
  width: 100%;
  max-width: 900px;
}

/* Fieldset Styling */
fieldset {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

fieldset::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 0;
  background: var(--secondary-color);
  transition: height 0.3s ease;
}

fieldset:hover::before {
  height: 100%;
}

legend {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--primary-color);
  padding: 0 1rem;
  background: white;
  border-radius: 30px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Question Styling */
h3 {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 109, 119, 0.2);
}

/* Enhanced Input and Label Styling */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="time"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 2px solid #e0e3e7;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="time"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: var(--secondary-color);
  outline: none;
  background: white;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Enhanced Radio and Checkbox Styling */
.radio-group,
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.radio-group label,
.checkbox-group label {
  display: flex;
  align-items: center;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0;
}

input[type="radio"],
input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

input[type="radio"] + span,
input[type="checkbox"] + span {
  position: relative;
  padding-right: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

input[type="radio"] + span::before,
input[type="checkbox"] + span::before {
  content: "";
  position: absolute;
  right: 0;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #ced4da;
  background: white;
  transition: all 0.2s ease;
}

input[type="radio"] + span::before {
  border-radius: 50%;
}

input[type="checkbox"] + span::before {
  border-radius: 4px;
}

input[type="radio"]:checked + span::before,
input[type="checkbox"]:checked + span::before {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
}

input[type="radio"]:checked + span::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: white;
}

input[type="checkbox"]:checked + span::after {
  content: "✓";
  position: absolute;
  right: 3px;
  top: -1px;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
}

input[type="radio"]:focus + span::before,
input[type="checkbox"]:focus + span::before {
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Button Styling */
.buttons-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.submit-button {
  background: linear-gradient(to left, var(--accent-color), var(--secondary-color));
  box-shadow: 0 4px 15px rgba(0, 109, 119, 0.3);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-family: 'Tajawal', sans-serif;
}

.submit-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 109, 119, 0.4);
}

.submit-button:active {
  transform: translateY(1px);
}

/* List Styling */
ul {
  list-style: none;
  padding: 0;
  width: 100%;
}

li {
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: rgba(240, 247, 255, 0.5);
  border-radius: 8px;
  transition: all 0.2s ease;
}

li:hover {
  background: rgba(0, 109, 119, 0.05);
}

/* Success Page Styling */
.success-container {
  background: white;
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  max-width: 600px;
  width: 100%;
  margin: 2rem auto;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: white;
  font-size: 2rem;
}

.success-message {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

/* Enhanced Form Div Layout */
.form-div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.form-div .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Message Styling */
.message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Tajawal', sans-serif;
  direction: rtl;
  max-width: 400px;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Choice Message Styling */
.choice-message {
  background: #e3f2fd;
  color: #1565c0;
  padding: 20px;
  border-radius: var(--border-radius);
  margin: 20px auto;
  max-width: 700px;
  text-align: center;
  border: 2px solid #bbdefb;
  direction: rtl;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.choice-buttons {
  margin-top: 15px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.choice-btn {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
}

.choice-btn.continue {
  background: var(--success-color);
  color: white;
}

.choice-btn.finish {
  background: var(--warning-color);
  color: white;
}

.choice-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
  .logo-container {
    gap: 30px;
  }
  
  .logo {
    width: 100px;
    height: 100px;
  }
  
  .logo-container .logo:nth-child(2) {
    width: 120px;
    height: 120px;
  }
  
  .program-title {
    font-size: 1.6rem;
    padding: 20px 30px;
  }
  
  .form-container {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }
  
  .logo-container {
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .logo {
    width: 80px;
    height: 80px;
    padding: 10px;
  }
  
  .logo-container .logo:nth-child(2) {
    width: 100px;
    height: 100px;
    order: -1;
    width: 100%;
    max-width: 120px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
  }
  
  .program-title {
    font-size: 1.3rem;
    margin: 10px 0 30px;
    padding: 15px 20px;
  }
  
  .progress-tracker {
    flex-direction: column;
    gap: 25px;
    padding: 0 20px;
    margin: 20px 0 40px;
  }
  
  .progress-tracker::before {
    display: none;
  }
  
  .form-container {
    padding: 1rem;
  }
  
  fieldset {
    padding: 1rem;
  }
  
  .form-div {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .radio-group,
  .checkbox-group {
    flex-direction: column;
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px 10px;
  }
  
  .logo {
    width: 70px;
    height: 70px;
  }
  
  .logo-container .logo:nth-child(2) {
    max-width: 100px;
    height: 80px;
  }
  
  .program-title {
    font-size: 1.1rem;
    padding: 12px 15px;
  }
  
  .success-container {
    padding: 2rem 1rem;
  }
}