/* ==============================
   إعداد الألوان والمتغيرات العامة
   ============================== */
:root {
  --brand-orange: #FFB300;
  --brand-green: #28B06E;
  --bg-light: #FFF7EE;
  --text-dark: #222;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  --header-h: 76px; /* ارتفاع الهيدر */
}

/* ==============================
   القواعد العامة
   ============================== */
html, body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
  background-color: var(--bg-light);
  font-family: 'Tajawal', sans-serif;
}

/* إصلاح أي فراغ أسفل الهيدر */
main.driver-section {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
  top: 0;
}

/* الهيدر الثابت */
header.main-header {
  position: fixed;
  width: 100%;
  z-index: 999;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* إضافة مساحة مساوية لارتفاع الهيدر */
.header-spacer {
  height: var(--header-h);
  width: 100%;
}

/* ==============================
   قسم البانر (HERO)
   ============================== */
.driver-hero {
  margin: 0 !important;
  padding: 120px 20px 140px !important;
  margin-top: -5px !important;
  background: linear-gradient(rgba(40, 176, 110, 0.45), rgba(255, 179, 0, 0.45)),
              url('../images/driver-banner.jpg') center/cover no-repeat;
  color: #fff;
  text-align: center;
  position: relative;
  z-index: 1;
  border-bottom-left-radius: 80px;
  border-bottom-right-radius: 80px;
}

.driver-hero h1 {
  font-size: 2.6rem;
  font-weight: 900;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.driver-hero p {
  font-size: 1.15rem;
  opacity: 0.95;
  margin: 0 auto;
  max-width: 700px;
  line-height: 1.6;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ==============================
   كارت النموذج (FORM CARD)
   ============================== */
.driver-card {
  max-width: 700px;
  margin: -80px auto 60px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 40px 30px;
  position: relative;
  z-index: 2;
}

.driver-card h2 {
  text-align: center;
  color: var(--brand-green);
  margin-bottom: 25px;
  font-size: 1.8rem;
  font-weight: 800;
}

/* ==============================
   النموذج
   ============================== */
.driver-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.driver-form input,
.driver-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fdfdfd;
  transition: 0.3s;
  font-size: 1rem;
}

.driver-form input:focus,
.driver-form select:focus {
  border-color: var(--brand-green);
  outline: none;
  box-shadow: 0 0 6px rgba(40, 176, 110, 0.3);
}

/* ==============================
   رفع الصور
   ============================== */
.upload-section {
  margin-top: 30px;
}

.upload-section label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.file-upload {
  background: #fafafa;
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  transition: 0.3s;
  margin-bottom: 15px;
  cursor: pointer;
}

.file-upload:hover {
  border-color: var(--brand-orange);
  background: #fff3e0;
}

.preview-img {
  display: none;
  margin-top: 10px;
  width: 100%;
  border-radius: 10px;
}

/* ==============================
   زر الإرسال
   ============================== */
.btn-submit {
  width: 100%;
  background: linear-gradient(90deg, var(--brand-green), var(--brand-orange));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 25px;
  transition: 0.3s;
}

.btn-submit:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow);
}

/* ==============================
   التنبيهات (Alerts)
   ============================== */
.alert {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 600;
}

.alert-success {
  background: #d1f7e5;
  color: var(--brand-green);
}

.alert-error {
  background: #fde2e2;
  color: #c62828;
}

/* ==============================
   تجاوب الموبايل
   ============================== */
@media (max-width: 768px) {
  .driver-form .form-grid {
    grid-template-columns: 1fr;
  }

  .driver-hero h1 {
    font-size: 2rem;
  }

  .driver-card {
    padding: 25px 20px;
    margin: -60px auto 40px;
  }

  .btn-submit {
    font-size: 1rem;
  }
}

/* ==============================
   تنبيهات التحقق (Frontend Validation)
   ============================== */
.form-alert {
  background: #ffecec;
  border: 1px solid #ffb6b6;
  color: #d32f2f;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 600;
  animation: fadeIn 0.3s ease-in-out;
}

.form-alert strong {
  display: block;
  margin-bottom: 6px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
