/* الخط العام */
body {
  font-family: 'Tahoma', sans-serif;
  margin: 0;
  padding: 0;
  direction: rtl;
  background: linear-gradient(to bottom right, #00a86b, #0077be);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* الهيدر */
header {
  text-align: center;
  padding: 40px 20px 20px;
}

header h1 {
  margin-bottom: 10px;
  font-size: 2em;
}

header p {
  font-size: 1.1em;
  opacity: 0.9;
}

/* زر تغيير اللغة */
.language-switch {
  position: absolute;
  top: 15px;
  left: 15px;
}

#langBtn {
  background: white;
  color: #0077be;
  border: none;
  font-size: 1.2em;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#langBtn:hover {
  transform: scale(1.1);
}

.lang-options {
  display: none;
  flex-direction: column;
  background: white;
  position: absolute;
  top: 45px;
  left: 0;
  border-radius: 5px;
  overflow: hidden;
  z-index: 999;
}

.lang-options button {
  padding: 10px;
  border: none;
  background: white;
  color: #0077be;
  text-align: right;
  cursor: pointer;
}

.lang-options button:hover {
  background: #f0f0f0;
}

/* المنطقة الرئيسية */
main {
  padding: 20px;
  flex-grow: 1;
}

/* أزرار النماذج */
.toggle-btn {
  background-color: #004d40;
  color: white;
  border: none;
  padding: 12px 20px;
  margin-bottom: 10px;
  font-size: 1em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
}

.toggle-btn:hover {
  background-color: #00695c;
  transform: translateY(-2px);
}

/* النماذج */
.form-section {
  margin-bottom: 30px;
}

.hidden-form {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 10px;
  margin-top: 10px;
}

form input,
form textarea {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  color: #333;
}

form textarea {
  resize: vertical;
  min-height: 80px;
}

form input::placeholder,
form textarea::placeholder {
  color: #999;
}

/* زر نشر / بحث */
form button[type="submit"] {
  background-color: white;
  color: #0077be;
  border: 2px solid #0077be;
  padding: 12px;
  font-weight: bold;
  border-radius: 30px;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease;
}

form button[type="submit"]:hover {
  background-color: #0077be;
  color: white;
}

/* الخريطة */
.map-container {
  height: 180px; /* بدلًا من 250 */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

/* زر شروط الاستخدام */
footer {
  text-align: center;
  padding: 10px 0;
}

.terms-btn {
  background: transparent;
  border: 1px solid white;
  padding: 6px 12px;
  border-radius: 20px;
  color: white;
  font-size: 0.9em;
  cursor: pointer;
  transition: background 0.3s;
}

.terms-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* التاريخ والوقت */
.date-wrapper,
.input-with-icon {
  position: relative;
  width: 100%;
}

.date-wrapper input[type="date"],
.input-with-icon input[type="time"] {
  width: 100%;
  padding-right: 35px;
  direction: ltr;
  text-align: left;
  font-family: Arial, sans-serif;
}

.calendar-icon,
.input-with-icon .icon {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1.2em;
  color: #444;
}

/* حقل واتساب */
.form-group {
  margin-bottom: 15px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  direction: rtl;
}

/* زر واتساب */
.whatsapp-button {
  display: inline-block;
  background-color: #25D366;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  margin-top: 10px;
  font-weight: bold;
}

/* زر الحجز */
.book-btn {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: #25D366;
  /* ✅ اللون الأخضر لواتساب */
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.book-btn:hover {
  background-color: #1da851;
  /* لون أغمق عند التحويم */
}

.book-btn:disabled {
  background-color: gray;
  cursor: not-allowed;
}

/* نتائج البحث */
#tripResults {
  margin-top: 20px;
}

/* تنسيق بطاقة الرحلة */
.trip-card {
  background-color: white;
  color: #333;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
  transition: transform 0.2s ease;
}

.trip-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.trip-card h3 {
  margin-top: 0;
  font-size: 1.2em;
}

.trip-card p {
  margin: 5px 0;
}

.trip-card .whatsapp-button {
  display: inline-block;
  background-color: #25D366;
  color: white;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 10px;
  font-weight: bold;
}

.trip-card .whatsapp-button:hover {
  background-color: #1ebe5d;
}
/* تنسيق زر رحلاتي بجانب زر اللغة */
.top-buttons {
  position: absolute;
  top: 15px;
  right: 15px;
  left: 15px;
  display: flex;
  justify-content: space-between; /* هذا يحط الزرين على الأطراف */
  align-items: center;
  z-index: 1000;
}

.my-trips-btn {
  background-color: white;
  color: #0077be;
  border: none;
  padding: 8px 14px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.my-trips-btn:hover {
  background-color: #f0f0f0;
}

/* ✅ تحسين العرض على الشاشات الصغيرة */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.5em;
  }

  .toggle-btn,
  form button[type="submit"],
  .my-trips-btn,
  #langBtn {
    font-size: 0.9em;
    padding: 10px;
  }

  .trip-card {
    padding: 10px;
    font-size: 0.95em;
  }

  .map-container {
    height: 150px;
  }
  
  .language-switch, .top-buttons {
    flex-direction: column;
    align-items: flex-start;
  }
}
.cancel-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  margin-right: 8px;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
}
.toast {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.toast.show {
  visibility: visible;
  opacity: 1;
}
.top-buttons {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

.language-switch {
  position: relative;
}

.circle-btn {
  background-color: #fff;
  border: none;
  border-radius: 50%;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 5px;
}
.top-bar {
  position: absolute;
  top: 75px;
  left: 0;
  right: 0;
  height: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  direction: ltr; /* ✅ ثابت في جميع الصفحات */
  z-index: 10;
}
/* النمط الافتراضي من اليمين لليسار */
.trip-card {
  direction: rtl;
  text-align: right;
}

/* إذا كانت لغة الصفحة إنجليزية أو هولندية، نعكس الاتجاه */
html[lang="en"] .trip-card,
html[lang="nl"] .trip-card {
  direction: ltr;
  text-align: left;
}
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 10px;
}

html[lang="ar"] .button-group {
  justify-content: flex-end;
}

.button-group button,
.button-group a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.button-confirm {
  background-color: #28a745;
  color: white;
}

.button-confirm:hover {
  background-color: #218838;
}

.button-reject {
  background-color: #dc3545;
  color: white;
}

.button-reject:hover {
  background-color: #c82333;
}

.button-contact {
  background-color: #17a2b8;
  color: white;
}

.button-contact:hover {
  background-color: #138496;
}
.trip-card .trip-buttons {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trip-card .trip-buttons button,
.trip-card .trip-buttons a {
  flex: 1;
  min-width: 100px;
  max-width: 150px;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-align: center;
}

.trip-card .book-btn {
  background-color: #28a745;
  color: white;
}

.trip-card .cancel-btn {
  background-color: #dc3545;
  color: white;
}

.trip-card .contact-btn {
  background-color: #25D366;
  color: white;
  text-decoration: none;
  display: inline-block;
}
.terms-btn {
  background-color: #ffffff33;
  border: 1px solid #ffffff55;
  border-radius: 20px;
  color: #fff;
  padding: 8px 16px;
  margin: 5px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.terms-btn:hover {
  background-color: #ffffff55;
}