/* ============================================
   Global Styles
   ============================================ */
* {
  font-family: 'Cairo', 'Noto Sans Arabic', 'Tajawal', sans-serif !important;
  box-sizing: border-box; 
}

body { 
  background-color: #ffffff; 
  margin: 0; 
  padding: 10px 0 0 0; 
  direction: rtl; 
}

/* ============================================
   Header Section
   ============================================ */
.top-header { 
  background-color: #F7F8FC; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 14px 20px; 
  position: fixed; 
  top: -100px; 
  left: 0; 
  right: 0; 
  opacity: 0; 
  z-index: 1000; 
  box-shadow: 0 0px 0px rgba(0,0,0,0.1); 
  transition: top 0.8s ease, opacity 0.8s ease; 
}

.top-header.show { 
  top: 0; 
  opacity: 1; 
}

.hamburger-icon { 
  font-size: 26px; 
  color: #67b3f5; 
  cursor: pointer; 
}

.brand-logo { 
  height: 48px; 
  object-fit: contain; 
}

/* ============================================
   Breadcrumb Styles
   ============================================ */
.breadcrumb-container {
  margin-top: 90px; /* ensure it's below fixed header */
  padding: 30px 20px 0;
  text-align: right;
  direction: rtl;
  font-size: 14px;
}

.breadcrumb-container a {
  text-decoration: none;
}

.breadcrumb-separator {
  color: #616469;
  margin: 0 5px;
}

/* ============================================
   Main Content Description
   ============================================ */
.primary-description {
  font-size: 14px;
  white-space: normal;
  line-height: 1.6;
  margin: 10px 20px 20px;
}

@media (max-width: 400px) {
  .primary-description {
    font-size: 14.5px;
    line-height: 1.5;
  }
}

/* ============================================
   Main Title
   ============================================ */
h1 { 
  color: #2e6fb9; 
  text-align: center; 
  font-weight: 570; 
  font-size: 41px; 
  margin-top: 48px; /* reduced to make room for breadcrumb */
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1); 
  position: relative; 
  display: inline-block; 
  width: auto; 
}

h1::before { 
  content: ""; 
  position: absolute; 
  top: 50%; 
  left: 40%; 
  transform: translate(-43%, -40%); 
  background-image: url('https://i.postimg.cc/mktdLGnp/image.png'); 
  background-size: cover; 
  background-repeat: no-repeat; 
  background-position: center; 
  width: calc(100% + 0.1px); 
  height: 80%; 
  z-index: -1; 
}

/* ============================================
   Paragraph Styles
   ============================================ */
p { 
  color: #7c8fa4; 
  text-align: center; 
  font-size: 16px; 
  margin: 10px 20px 30px; 
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05); 
}

/* ============================================
   Form Input Styles
   ============================================ */
.form-input-container { 
  position: relative; 
  margin-bottom: 1.5em; 
}

.form-input-field { 
  width: calc(100% - 30px); 
  display: block; 
  padding: 3px 12px; 
  font-size: 14.5px; 
  margin: 10px auto; 
  border: 1px solid #ccc; 
  border-radius: 6px; 
  background-color: white; 
  text-align: right; 
  transition: border-color 0.3s ease; 
}

.form-input-field:focus { 
  border-color: #67b3f5; 
  outline: none; 
}

/* ============================================
   Button Styles
   ============================================ */
.primary-btn, .secondary-btn, .tertiary-btn, .quaternary-btn { 
    display: block; 
    margin: 24px auto; 
    padding: 3px 10px; 
    background-color: #306db5; 
    color: white; 
    border: 2px solid #0868f7; 
    border-radius: 7px; 
    font-size: 13px; 
    width: 120px; 
    cursor: pointer; 
    position: relative; 
    overflow: hidden; 
    transition: background-color 0.2s ease; 
}

/* التعديل المطلوب: زيادة المسافة بين زر رجوع للاستعلامات والتذييل الأزرق */
.secondary-btn {
    margin-bottom: 100px;
}

/* Loading Button State */
.primary-btn.loading {
  background-color: #415184 !important;
  border-color: #415184 !important;
  cursor: wait;
}

/* ============================================
   Error Message Styles
   ============================================ */
.error-message-tab { 
  background-color: #f8d7da; 
  color: #58151c;           
  text-align: center; 
  padding: 10px; 
  margin: 10px auto; 
  border-radius: 5px; 
  border: 1px solid #E6BABA; 
  width: calc(100% - 40px); 
  display: none; 
}

/* ============================================
   Result Display Box
   ============================================ */
.results-display-box { 
  background-color: #f0f0f0; 
  padding: 20px; 
  margin: 30px auto 15px; 
  border-radius: 2px; 
  width: calc(100% - 25px); 
  text-align: center; 
  display: none; 
  border: 1px solid #ccc; 
}

/* ============================================
   Information Labels
   ============================================ */
.information-label { 
  font-weight: bold; 
  margin-top: 10px; 
}

.information-data { 
  margin-bottom: 15px; 
}

/* ============================================
   Footer Section
   ============================================ */
.page-footer { 
  background-color: #2e6fb9; 
  color: white; 
  padding: 20px 15px 60px 20px; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: flex-start; 
  text-align: center; 
  font-size: 16px; 
  direction: rtl; 
  min-height: 150px; 
  gap: 25px; 
  position: relative; 
}

.page-footer img.footer-brand-logo { 
  height: 65px; 
  filter: none; 
  margin-bottom: 15px; 
}

.footer-description-text { 
  font-size: 13px; 
  line-height: 1.7; 
  white-space: normal; 
  max-width: 700px; 
}

/* ============================================
   Menu Title
   ============================================ */
.primary-menu-title { 
  font-weight: 700; 
  font-size: 15px; 
  margin-top: 30px; 
  position: relative; 
  display: inline-block; 
  color: white; 
  cursor: default; 
}

.primary-menu-title::after { 
  content: ""; 
  position: absolute; 
  bottom: -8px; 
  left: 50%; 
  transform: translateX(-50%); 
  width: 130%; 
  height: 3px; 
  background-color: #a3c1e5; 
  border-radius: 2px; 
}

/* ============================================
   Footer Links
   ============================================ */
.footer-navigation-links { 
  margin-top: 5px; 
  font-size: 14px; 
  display: flex; 
  flex-direction: column; 
  gap: 20px; 
  user-select: none; 
  width: 100%; 
  max-width: 320px; 
  padding: 0 10px; 
}

.footer-navigation-links div { 
  cursor: default; 
  color: #ffffff; 
  font-weight: normal; 
  padding-bottom: 4px; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); 
  margin: 0 8px; 
}

.footer-social-icons {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.footer-social-icons a {
    color: white;
    font-size: 24px;
    transition: color 0.2s;
}

.footer-social-icons a:hover {
    color: #a3c1e5;
}

.contact-information, .working-hours {
    font-size: 12px !important; 
}

.footer-bottom-text {
    font-size: 12px; 
    line-height: 1.8;
}

.footer-bottom-links {
    font-size: 10px; 
    margin-top: -15px;
}

.footer-bottom-links a {
    color: white;
    text-decoration: none;
    margin: 0 5px;
}

/* ============================================
   Navigation Popup Menu
   ============================================ */
.navigation-popup-menu { 
  position: fixed; 
  top: 60px; 
  left: 0; 
  width: 100%; 
  height: 0; 
  background-color: #F7F8FC; 
  display: flex; 
  flex-direction: column; 
  justify-content: flex-start; 
  align-items: center; 
  padding-top: 0; 
  z-index: 999; 
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); 
  overflow: hidden; 
  transition: height 0.5s ease-in-out, padding-top 0.5s ease-in-out; 
}

.navigation-popup-menu.open {
    height: 70vh; /* increased to accommodate new button */
    padding-top: 30px;
}

.navigation-popup-menu .popup-menu-item { 
  font-size: 15px; 
  color: #226699; 
  margin: 15px 0; 
  cursor: pointer; 
  text-decoration: none; 
  position: relative;
  padding-bottom: 8px;
}

.navigation-popup-menu .popup-menu-item::after {
    content: ""; 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 80%; 
    height: 1px; 
    background-color: #a3c1e5; 
    border-radius: 1px; 
}

.navigation-popup-menu .popup-menu-login { 
  background-color: #3c8dc4; 
  color: white; 
  padding: 8px 20px; 
  border-radius: 12px; 
  margin-top: 20px; 
  font-size: 15px; 
  cursor: pointer; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  text-decoration: none; 
}

.navigation-popup-menu .popup-menu-login span { 
  margin-right: 8px; 
}

/* زر تسجيل الدخول الجديد حسب الصورة */
.login-button-custom {
  background-color: #306db5;
  color: white;
  width: 90%;
  max-width: 350px;
  padding: 12px;
  border-radius: 30px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  direction: rtl; /* ensure RTL for icon placement */
}

.login-button-custom i {
  margin-left: 10px;
  font-size: 18px;
}

.tertiary-btn, .quaternary-btn { 
  display: none; 
}

.text-bold { 
  font-weight: bold; 
  color: black; 
}

.text-normal { 
  font-weight: normal; 
  color: black; 
}

.contact-section-title { 
  font-weight: 700; 
  font-size: 15px; 
  margin-top: 18px; 
  color: white; 
}

.contact-divider-line { 
  width: 140px; 
  height: 3px; 
  background-color: #a3c1e5; 
  margin: 6px auto 2px auto; 
  border-radius: 1px; 
}

.contact-information { 
  font-size: 14px; 
  line-height: 1.6; 
  color: white; 
  max-width: 320px; 
  text-align: center; 
  user-select: none; 
}

/* ============================================
   Dot Spinner (مؤشر دوران دائري)
   ============================================ */
.dot-spinner {
  display: none;
  width: 16px;
  height: 16px;
  position: relative;
  margin-right: 8px;
  vertical-align: middle;
  margin-left: 4px;
  animation: orbit-spin 1.2s linear infinite;
}

.dot-spinner div {
  width: 2.4px;
  height: 2.4px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -1.2px;
  margin-top: -1.2px;
}

.dot-spinner div:nth-child(1) { transform: rotate(0deg) translateY(-6px); opacity: 1; }
.dot-spinner div:nth-child(2) { transform: rotate(51.43deg) translateY(-6px); opacity: 0.875; }
.dot-spinner div:nth-child(3) { transform: rotate(102.86deg) translateY(-6px); opacity: 0.75; }
.dot-spinner div:nth-child(4) { transform: rotate(154.29deg) translateY(-6px); opacity: 0.625; }
.dot-spinner div:nth-child(5) { transform: rotate(205.71deg) translateY(-6px); opacity: 0.5; }
.dot-spinner div:nth-child(6) { transform: rotate(257.14deg) translateY(-6px); opacity: 0.375; }
.dot-spinner div:nth-child(7) { transform: rotate(308.57deg) translateY(-6px); opacity: 0.25; }

@keyframes orbit-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================
   Empty Field Error Message
   ============================================ */
.empty-field-error-message {
  background-color: #f8d7da; 
  color: #58151c; 
  text-align: center;
  padding: 10px;
  margin: 15px auto 10px;
  border-radius: 5px;
  border: 1px solid #f1b4ba;
  width: calc(100% - 40px);
  font-weight: normal; 
  display: none; 
  transition: margin-top 0.3s ease; 
}

/* ============================================
   Chat Icon and Popup Styles
   ============================================ */
.chat-icon-fixed {
  position: fixed;
  bottom: 20px;
  right: 40px; 
  width: 100px; 
  height: 85px; 
  z-index: 2000;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.chat-icon-fixed:hover {
  transform: scale(1.05);
}

.chat-icon-fixed img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.chat-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: flex-end; 
  z-index: 3000;
  padding: 20px;
}

.chat-popup-content {
  background-color: white;
  width: 100%;
  max-width: 360px; 
  border-radius: 15px;
  padding: 20px;
  text-align: right;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
  animation: popupSlideUp 0.3s ease;
  margin-bottom: 20px;
  font-family: Arial, sans-serif !important;
}

.chat-popup-content * {
  font-family: Arial, sans-serif !important;
}

@keyframes popupSlideUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-popup-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
  text-align: right;
}

.chat-popup-text {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: justify;
}

.chat-popup-buttons {
  display: flex;
  justify-content: flex-start;
  flex-direction: row-reverse; 
  gap: 10px;
}

.chat-btn-start {
  background-color: #2e6fb9;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none; /* For link */
}

.chat-btn-start i {
  font-size: 12px; 
}

.chat-btn-cancel {
  background-color: #f0f0f0;
  color: #555;
  border: none;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

/* ============================================
   تنسيق أيقونة UserWay لضمان ظهورها بنفس ألوان موقع صحة
   ============================================ */
.uai.userway_dark {
    background: rgb(48, 109, 181) !important; /* اللون الأزرق الرسمي */
}
.uai img {
    content: url('https://cdn.userway.org/widgetapp/images/body_wh.svg') !important;
}