body {
    font-family: Arial, sans-serif;
    background-color: #f3f3f3;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.form-container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%; /* تغيير العرض ليكون 100% */
    margin: 20px; /* إضافة هامش */
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap; /* السماح بلف العناصر عند الضرورة */
    gap: 10px; /* إضافة مسافة بين العناصر */
}

.header-container h1 {
    font-size: 2em;
    color: #f1c40f;
    margin: 0;
    flex: 1;
    text-align: center; /* توسيط النص على الشاشات الصغيرة */
    min-width: 200px; /* تحديد عرض أدنى للنص */
}

.header-container .logo {
    width: 190px;
    height: auto;
    margin-left: 10px;
    max-width: 100%; /* جعل الشعار يتكيف مع العرض */
}

/* تعديلات للشاشات الصغيرة */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column; /* ترتيب العناصر عموديًا */
        align-items: center; /* توسيط العناصر */
        text-align: center; /* توسيط النص */
    }

    .header-container h1 {
        font-size: 1.2em; /* تقليل حجم الخط للشاشات الصغيرة */
        margin-bottom: 10px; /* إضافة مسافة أسفل العنوان */
    }

    .header-container .logo {
        margin-left: 0; /* إزالة الهامش الأيسر */
        margin-top: 10px; /* إضافة مسافة فوق الشعار */
    }
}
h1 {
    color: #002c46;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    color: #002c46;
    border-bottom: 2px solid #f3b611;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.btw-ob-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap; /* السماح بلف العناصر عند الضرورة */
}

.btw-ob-group .form-group {
    margin-bottom: 0;
    flex: 1; /* جعل الحقول تأخذ مساحة متساوية */
    min-width: 200px; /* تحديد عرض أدنى للحقول */
}

.btw-ob-group .form-group label {
    display: inline-block;
    margin-right: 10px;
    font-weight: bold;
    min-width: 100px;
}

.btw-ob-group .form-group input {
    width: 100%; /* جعل الحقل يأخذ العرض الكامل */
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.kopie-field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap; /* السماح بلف العناصر عند الضرورة */
}

.kopie-field label {
    font-weight: bold;
    font-size: 16px;
    color: #002c46;
}

.kopie-field .required-text {
    font-size: 14px;
    color: red;
    font-weight: bold;
}

.akkoord-section {
    margin-bottom: 20px;
}

.akkoord-section label {
    font-weight: bold;
    font-size: 16px;
    color: #002c46;
    display: block;
    margin-bottom: 10px;
    line-height: 1.5;
}

.link {
    color: #f3b611;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #002c46;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f39c12;
}

.machtiging-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    line-height: 1.6;
}

.machtiging-section h2 {
    font-size: 18px;
    color: #002c46;
    margin-bottom: 15px;
    border-bottom: 2px solid #f3b611;
    padding-bottom: 5px;
}

.machtiging-section p {
    font-size: 16px;
    color: #333;
    margin: 10px 0;
}

.machtiging-section strong {
    color: #002c46;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    line-height: 1.6;
}

.form-section h2 {
    font-size: 18px;
    color: #002c46;
    margin-bottom: 15px;
    border-bottom: 2px solid #f3b611;
    padding-bottom: 5px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #002c46;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f3b611;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #333;
    resize: vertical;
    background-color: #f9f9f9;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

textarea:focus {
    border-color: #f3b611;
    outline: none;
    box-shadow: 0 0 5px rgba(243, 182, 17, 0.5);
}

input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f9f9f9;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

input[type="date"]:focus {
    border-color: #f3b611;
    outline: none;
    box-shadow: 0 0 5px rgba(243, 182, 17, 0.5);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #002c46;
    font-weight: bold;
}

.form-group input {
    width: 90%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.checkbox-group label {
    display: block;
    margin-bottom: 10px;
    font-size: clamp(0.6em, 0.8em, 2em);
    width: fit-content;
    color: #002c46;
}

.signature-container {
    text-align: center;
    margin-top: 20px;
}

canvas {
    border: 1px solid #002c46;
    border-radius: 5px;
    background-color: #f9f9f9;
}

@media (max-width: 450px) {
    canvas {
        width: 90%;
    }
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

#clear-signature {
    background-color: #f3b611;
    color: #002c46;
    margin-top: 10px;
}

.submit-btn {
    background-color: #002c46;
    color: #ffffff;
    width: 100%;
    margin-top: 20px;
}

.submit-btn:hover {
    background-color: #f3b611;
    color: #002c46;
}

.container {
    max-width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.radio-group {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

input[type="radio"] {
    transform: scale(1.5);
}

.footer {
    background-color: #ffffff;
    color: #002c46;
    text-align: center;
    padding: 15px 20px;
    font-size: 14px;
    line-height: 1.6;
    border-top: 3px solid #f3b611;
}

.footer p {
    margin: 5px 0;
    font-weight: 400;
    font-size: clamp(0.8em, 1vw, 1.2em); /* جعل حجم الخط يتكيف مع جميع الشاشات */
}

.footer a {
    color: #f3b611;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* ---------------------------------------- التحميل----------------------------------- */

/* From Uiverse.io by AbanoubMagdy1 */ 
/* الحاوية التي تغطي الشاشة بالكامل */
.fullscreenOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* خلفية شفافة */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* للتأكد من أنه فوق جميع العناصر */
  }
  
  /* تحسين تصميم الـ Spinner */
  .loadingSpinner {
    --dim: 3rem;
    width: var(--dim);
    height: var(--dim);
    position: relative;
    animation: spin988 2s linear infinite;
  }
  
  /* تعديل لون الدوائر */
  .loadingSpinner .circle {
    --color: #002c46; /* اللون المطلوب */
    --dim: 1.2rem;
    width: var(--dim);
    height: var(--dim);
    background-color: var(--color);
    border-radius: 50%;
    position: absolute;
  }
  
  /* تحديد موقع الدوائر */
  .loadingSpinner .circle:nth-child(1) {
    top: 0;
    left: 0;
  }
  
  .loadingSpinner .circle:nth-child(2) {
    top: 0;
    right: 0;
  }
  
  .loadingSpinner .circle:nth-child(3) {
    bottom: 0;
    left: 0;
  }
  
  .loadingSpinner .circle:nth-child(4) {
    bottom: 0;
    right: 0;
  }
  
  /* حركة الدوران */
  @keyframes spin988 {
    0% {
      transform: scale(1) rotate(0);
    }
    20%, 25% {
      transform: scale(1.3) rotate(90deg);
    }
    45%, 50% {
      transform: scale(1) rotate(180deg);
    }
    70%, 75% {
      transform: scale(1.3) rotate(270deg);
    }
    95%, 100% {
      transform: scale(1) rotate(360deg);
    }
  }
  

  