/* Scrollbar */

.extended-menu-content::-webkit-scrollbar {
  width: 6px;
}

.extended-menu-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.extended-menu-content::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: 3px;
}
/* ===== CHATBOT TOGGLE BUTTON ===== */
.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9cebc8 0%, #6dd5b0 100%);
  border: none;
  box-shadow: 0 8px 30px rgba(156, 235, 200, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 40px rgba(156, 235, 200, 0.6);
}

.chatbot-toggle:active {
  transform: scale(0.95);
}

.chatbot-toggle .chat-icon {
  display: block;
}

.chatbot-toggle .close-icon {
  display: none;
}

.chatbot-toggle.active .chat-icon {
  display: none;
}

.chatbot-toggle.active .close-icon {
  display: block;
}

.chatbot-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #e74c3c;
  color: white;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 7px;
  border-radius: 12px;
  display: none;
}

.chatbot-badge.show {
  display: block;
  animation: badgePulse 1s infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* ===== CHATBOT WINDOW ===== */
.chatbot-window {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 400px;
  height: 600px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chatbot-window.active {
  display: flex;
}

.chatbot-window.minimized {
  height: 60px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== CHATBOT HEADER ===== */
.chatbot-header {
  background: linear-gradient(
    135deg,
    #2f3133 0%,
    /* رمادي غامق */ #66686a 100% /* رمادي متوسط */
  );
  color: #ffffff;
  border: 2px solid #8a8c8f; /* رمادي فاتح */

  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #8a8c8f;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bot-info h3 {
  font-size: 16px;
  margin-bottom: 3px;
}

.status {
  color: #aebdbb;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.header-actions {
  display: flex;
  gap: 8px;
}

.header-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.header-btn:hover {
  background: rgba(229, 126, 58, 0.2);
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: flex;
  gap: 2px;
  justify-content: center;
  padding: 4px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  overflow-x: auto;
  scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
  display: none;
}

.quick-action {
  padding: 8px;
  background: #8a8c8f;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s;
  flex-shrink: 0;
}

.quick-action:hover {
  background: #9cebc8;
  border-color: #9cebc8;
  color: #002b28;
  transform: translateY(-2px);
}

/* ===== MESSAGES CONTAINER ===== */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #e9ecef;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #9cebc8;
  border-radius: 3px;
}

/* ===== MESSAGE ===== */
.message {
  display: flex;
  gap: 10px;
  animation: messageSlide 0.3s ease;
}

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

.bot-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-message .message-avatar {
  background: linear-gradient(135deg, #9cebc8 0%, #6dd5b0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #002b28;
  font-size: 18px;
  font-weight: bold;
}

.message-content {
  max-width: 75%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.5;
  font-size: 14px;
}

.bot-message .message-bubble {
  background: white;
  color: #212529;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-message .message-bubble {
  background: linear-gradient(135deg, #9cebc8 0%, #6dd5b0 100%);
  color: #002b28;
  border-bottom-right-radius: 4px;
}

.message-bubble p {
  margin: 0 0 8px 0;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble ul {
  margin: 8px 0;
  padding-right: 20px;
}

.message-bubble li {
  margin: 5px 0;
}

.message-time {
  font-size: 11px;
  color: #6c757d;
  align-self: flex-end;
}

.user-message .message-time {
  align-self: flex-start;
}

.send-btn {
  background: linear-gradient(
    135deg,
    var(--accent-orange) 0%,
    var(--accent-orange-dark) 100%
  );
  color: white;
}

.send-btn:hover {
  box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
}
button:not(.header-btn):not(.action-btn):not(.send-btn) {
  background: var(--accent-orange);
  color: white;
  border: none;
}

button:not(.header-btn):not(.action-btn):not(.send-btn):hover {
  background: var(--accent-orange-dark);
}
.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(
    135deg,
    #ffb072 0%,
    /* برتقالي فاتح */ #f3741f 100% /* برتقالي أساسي */
  );
  color: #fff; /* برتقالي داكن للنص */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(156, 235, 200, 0.4);
}

.send-btn:active {
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== EMOJI PICKER ===== */
.emoji-picker {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 10px;
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  font-size: 24px;
}

.emoji-grid span {
  cursor: pointer;
  transition: transform 0.2s;
}

.emoji-grid span:hover {
  transform: scale(1.3);
}
.welcome-message .message-bubble {
  background: #fff;
  color: #212529;
  border: 2px solid #9a9c9e;
}
.bot-info h3 {
  color: var(--accent-orange);
}

/* ===== BOTTOM NAV EXTENDED (10 Items) ===== */
.bottom-nav-extended {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(102, 104, 106, 0.9);
  /* backdrop-filter: blur(10px); */
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  padding: 8px 5px;
  border-top: 1px solid rgba(229, 126, 58, 0.2);
  z-index: 1000;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.nav-item-ext {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  color: #c9c9c9;
  position: relative;
}

.nav-item-ext:hover {
  background: #ffa25a29;
  color: #c6c6c6;
  transform: translateY(-2px);
}

.nav-item-ext.active {
  background: #ffa25a29;
  color: #c6c6c6;
}

.nav-item-ext svg {
  flex-shrink: 0;
}

.nav-item-ext span {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

/* زر المزيد مع مؤشر */
.nav-item-ext.nav-more::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ===== EXTENDED MENU POPUP ===== */
.extended-menu-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.extended-menu-popup.active {
  pointer-events: auto;
  opacity: 1;
}

.extended-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.extended-menu-content {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  max-height: 75vh;
  background: var(--primary-dark);
  border-radius: 25px 25px 0 0;
  padding: 25px 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

.extended-menu-popup.active .extended-menu-content {
  transform: translateY(0);
}

.extended-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(229, 126, 58, 0.2);
}

.extended-menu-header h3 {
  color: var(--accent-teal);
  font-size: 20px;
  font-weight: bold;
}

.close-extended-menu {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-white);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s;
}

.close-extended-menu:hover {
  background: var(--accent-teal);
  color: var(--primary-dark);
  transform: rotate(90deg);
}

.extended-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.extended-menu-section h4 {
  color: var(--accent-teal);
  font-size: 13px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.extended-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-white);
  transition: all 0.3s;
  border: 1px solid transparent;
  margin-bottom: 8px;
}

.extended-menu-link:hover {
  background: #ee8b4a1a;
  border-color: #e57e3a;
  transform: translateX(-3px);
  color: #fff;
}

.extended-menu-link .link-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.extended-menu-link span:last-child {
  font-size: 14px;
  font-weight: 500;
}

.extended-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--accent-teal);
  color: var(--primary-dark);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.3s;
}

.quick-action-btn:hover {
  background: var(--text-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(156, 235, 200, 0.3);
}

/* Scrollbar */
.extended-menu-content::-webkit-scrollbar {
  width: 6px;
}

.extended-menu-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.extended-menu-content::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .bottom-nav-extended {
    grid-template-columns: repeat(5, 1fr);
  }

  .nav-item-ext:nth-child(n + 6) {
    display: none;
  }

  .nav-item-ext.nav-more {
    display: flex;
  }
}

@media (max-width: 768px) {
  .bottom-nav-extended {
    grid-template-columns: repeat(5, 1fr);
    padding: 6px 3px;
  }

  .nav-item-ext {
    padding: 6px 2px;
  }

  .nav-item-ext span {
    font-size: 9px;
  }

  .nav-item-ext svg {
    width: 18px;
    height: 18px;
  }

  .extended-menu-grid {
    grid-template-columns: 1fr;
  }

  .extended-menu-content {
    padding: 20px 15px;
    max-height: 80vh;
  }

  .extended-quick-actions {
    grid-template-columns: 1fr;
  }
  body {
  padding-top: 60px;
  height: 100vh;
}
}

@media (max-width: 480px) {
  .bottom-nav-extended {
    grid-template-columns: repeat(6, 1fr);
  }

  .nav-item-ext span {
    font-size: 8px;
  }

  .extended-menu-header h3 {
    font-size: 18px;
  }

  .extended-menu-link {
    padding: 10px;
  }

  .quick-action-btn {
    font-size: 12px;
    padding: 10px;
  }
}

/* إخفاء القائمة القديمة على الصفحات الفرعية */
.bottom-nav {
  display: none;
}
/* تحسينات إضافية للقائمة الموسعة */

.extended-menu-note {
  background: #8a8c8f33;
  border: 1px solid #ffa25ad1;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  text-align: center;
}

.extended-menu-note p {
  color: var(--accent-teal);
  font-size: 12px;
  margin: 0;
  line-height: 1.5;
}

/* تمييز العناصر في القائمة المنبثقة */
.extended-menu-link.main-page {
  background: rgba(156, 235, 200, 0.08);
  border: 1px solid rgba(229, 126, 58, 0.2);
}

/* تحسين عرض الأيقونات في الموبايل */
@media (max-width: 768px) {
  .nav-item-ext span {
    font-size: 8.5px;
    max-width: 55px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* تحسين العرض على الشاشات الصغيرة جداً */
@media (max-width: 380px) {
  .bottom-nav-extended {
    grid-template-columns: repeat(5, 1fr);
    padding: 5px 2px;
  }

  .nav-item-ext {
    padding: 5px 1px;
  }

  .nav-item-ext svg {
    width: 16px;
    height: 16px;
  }

  .nav-item-ext span {
    font-size: 7.5px;
  }

  /* إخفاء بعض العناصر على الشاشات الصغيرة جداً */
  .nav-item-ext:nth-child(n + 6):not(.nav-more) {
    display: none;
  }
}

/* تأثير خاص للعناصر الرئيسية */
.nav-item-ext:nth-child(-n + 9) {
  position: relative;
}

.nav-item-ext:nth-child(-n + 9):hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: #f3741f;
  border-radius: 2px;
}

/* تحسين ترتيب العناصر في التابلت */
@media (max-width: 1024px) and (min-width: 769px) {
  .bottom-nav-extended {
    grid-template-columns: repeat(5, 1fr);
  }

  /* إظهار أول 4 عناصر + المزيد */
  .nav-item-ext:nth-child(n + 6):not(.nav-more) {
    display: none;
  }

  .nav-item-ext.nav-more {
    display: flex;
  }
}

/* تحسين الظهور على الشاشات العريضة */
@media (min-width: 991px) {
  .bottom-nav-extended {
    padding: 10px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: min-content;
    left: 74%;
    transform: translateX(-45%);
    border-radius: 20px 20px 0 0;
  }

  .nav-item-ext {
    padding: 10px 8px;
  }

  .nav-item-ext span {
    font-size: 11px;
  }
}

.nav-icons {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  width: 100%;
  align-items: center;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 10px 0;
}

.nav-icons::-webkit-scrollbar {
  display: none;
}

.sidebar-nav-btn {
  width: 50%;
  height: 7%;
  border-radius: 50%;
  background: transparent !important;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px !important;
  position: relative;
}

.sidebar-nav-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.sidebar-nav-btn:hover {
  background: #f37521 !important;
  color: var(--accent-teal);
}

.sidebar-nav-btn.active {
  background: #f37521 !important;
  color: var(--primary-dark);
  box-shadow: 0 0 15px rgba(156, 235, 200, 0.3);
}

.sidebar-nav-btn::after {
  content: attr(title);
  position: absolute;
  right: 70px;
  background: var(--accent-teal);
  color: var(--primary-dark);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 1000;
}

.sidebar-nav-btn:hover::after {
  opacity: 1;
}

.back-home-btn {
  margin-top: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.back-home-btn:hover {
  background: var(--accent-gold);
  color: var(--primary-dark);
}

.back-home-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 90%;
  max-width: 500px;
  z-index: 999;
  transition: transform 0.4s ease;
}

.search-bar.active {
  transform: translateX(-50%) translateY(0);
}

.search-bar input {
  width: 85%;
  padding: 15px;
  border: none;
  border-radius: 30px;
  background: transparent;
  /* display: none; */
  color: var(--text-white);
  font-size: 16px;
  font-family: inherit;
  box-shadow: var(--shadow);
}

.search-bar input::placeholder {
  color: #c9c9c9;
}

.search-results {
  background: var(--primary-medium);
  border-radius: 15px;
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s;
}

.search-result-item:hover {
  background: rgba(156, 235, 200, 0.1);
}

/* ===== CONTENT AREA ===== */
.content-area {
  flex: 1;
  position: relative;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.content-section {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
  padding: 40px;
}

.content-section.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  padding: 60px 70px 0 10px;
  height: 90%;
}
.main-header {
  background: transparent !important;
  border-bottom: none !important;
}
.content-section::-webkit-scrollbar {
  width: 6px;
}
.content-section::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.content-section::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 3px;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  margin-bottom: 30px;
  text-align: center;
}

.section-header h1 {
  font-size: 36px;
  color: var(--accent-teal);
  margin-bottom: 10px;
}

.section-header p {
  color: var(--text-dim);
  font-size: 16px;
}

.sidebar {
  width: 4%;
  background: #4a4c4f;
  position: absolute;
  top: 10%;
  right: 6px;
  height: fit-content;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-left: 1px solid var(--border-color);
  z-index: 100;
  padding: 5px 0;
}

.header-box h1 {
  color: var(--accent-orange-dark);
}
.text-block h3 {
  color: #ff7826;
}
.extended-menu-content {
  background: #4f5153;
}
.extended-menu-link {
  background: #66686a;
}
#home-view {
  padding: 0 !important;
}
#main-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ===== MENU OVERLAY (Darb Colors) ===== */
#menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;

  /* ألوان درب */
  --brand-gray: #66686a;
  /* الأساسي */
  --brand-orange: #f3741f;
  /* عند التأشير */

  /* تدرجات من الرمادي */
  --menu-mid: #4f5153;
  /* وسط أغمق من #66686a */
  --menu-panel: #66686a;
  /* الهيدر/الفوتر */
  --menu-card: #6f7173;
  /* الكارد (أخف شوي من الهيدر لتمييز بسيط) */

  --menu-border: rgba(255, 255, 255, 0.12);
  --menu-text: rgba(255, 255, 255, 0.95);
  --menu-dim: rgba(255, 255, 255, 0.72);

  background: var(--menu-mid);
}

#menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
  display: block;
}

/* تقسيم الشاشة 3 مناطق */
#menu-overlay .menu-shell {
  height: 100%;
  display: grid;
  grid-template-rows: 74px 1fr 64px;
}

/* ===== HEADER ===== */
#menu-overlay .menu-top {
  background: #66686a;
  border-bottom: 1px solid var(--menu-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: relative;
}

#menu-overlay .menu-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

#menu-overlay .menu-brand img {
  height: 44px;
  width: auto;
  display: block;
}

/* زر الإغلاق داخل الهيدر */
#menu-overlay .menu-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--menu-text);
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

#menu-overlay .menu-close:hover {
  transform: rotate(90deg);
  background: rgba(243, 116, 31, 0.2);
  border-color: rgba(243, 116, 31, 0.55);
}

/* ===== BODY (أغمق) ===== */
#menu-overlay .menu-body {
  background: var(--menu-mid);
  padding: 18px 22px;
  overflow: auto;
}

/* ===== GRID ===== */
#menu-overlay .menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  align-content: start;
}

/* توزيع مثل الصورة (آخر كرت يمين بالأسفل) */
#menu-overlay .card-licenses {
  grid-column: 1;
  grid-row: 1;
}

#menu-overlay .card-partners {
  grid-column: 2;
  grid-row: 1;
}

#menu-overlay .card-about {
  grid-column: 2;
  grid-row: 1;
}

#menu-overlay .card-eservices {
  grid-column: 1;
  grid-row: 2;
}

#menu-overlay .card-invest {
  grid-column: 2;
  grid-row: 2;
}

#menu-overlay .card-contact {
  grid-column: 3;
  grid-row: 2;
}

#menu-overlay .card-visit {
  grid-column: 3;
  grid-row: 3;
}

/* ===== CARD ===== */
#menu-overlay .menu-card {
  height: 120px;
  padding: 18px 16px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;

  text-align: center;
  text-decoration: none;

  background: var(--menu-card);
  border: 1px solid var(--menu-border);
  color: var(--menu-text);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);

  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}

/* عند التأشير: الكارد برتقالي درب */
#menu-overlay .menu-card:hover,
#menu-overlay .menu-card:focus-visible {
  transform: translateY(-2px);
  background: var(--brand-orange);
  border-color: rgba(243, 116, 31, 0.85);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  outline: none;
}

#menu-overlay .card-ico {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;

  color: rgba(255, 255, 255, 0.92);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#menu-overlay .card-ico svg {
  width: 55px;
  height: 55px;
}

#menu-overlay .card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  color: var(--menu-text);
  transition: color 0.18s ease;
}

#menu-overlay .menu-card:hover .card-ico,
#menu-overlay .menu-card:focus-visible .card-ico {
  color: #fff;
}

#menu-overlay .menu-card:hover .card-title,
#menu-overlay .menu-card:focus-visible .card-title {
  color: #fff;
}

/* Active (اختياري) */
#menu-overlay .menu-card.is-active {
  background: var(--brand-orange);
  border-color: rgba(243, 116, 31, 0.85);
}

#menu-overlay .menu-card.is-active .card-ico {
  color: #fff;
}

#menu-overlay .menu-card.is-active .card-title {
  color: #fff;
}

/* ===== FOOTER ===== */
#menu-overlay .menu-footer,
.page-footer {
  background: #66686a;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 22px;

  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}
.page-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
}

#menu-overlay .menu-footer a,
.page-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.18s ease;
}

#menu-overlay .menu-footer a:hover,
.page-footer a:hover {
  color: var(--brand-orange);
}

#menu-overlay .menu-footer .sep,
.page-footer .sep {
  opacity: 0.35;
}

#menu-overlay .menu-footer .muted,
.page-footer .muted {
  opacity: 0.65;
}

/* Responsive */
@media (max-width: 980px) {
  #menu-overlay .menu-grid {
    grid-template-columns: 1fr 1fr;
  }

  #menu-overlay .card-licenses,
  #menu-overlay .card-partners,
  #menu-overlay .card-about,
  #menu-overlay .card-eservices,
  #menu-overlay .card-invest,
  #menu-overlay .card-contact,
  #menu-overlay .card-visit {
    grid-column: auto;
    grid-row: auto;
  }
}

.video-controls {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 20;
  display: flex;
  gap: 10px;
}

.video-control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.video-control-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .video-controls {
    bottom: 120px;
    right: 20px;
  }
  .section-header h1 {
    font-size: 22px;
  }
  .section-header p {
    font-size: 14px;
  }
  .content-section.active {
    top: 6%;
    overflow: hidden;
  }
  .content-section-overview,
  .content-section-application {
    overflow-y: auto !important;
  }
  .form-row{
        grid-template-columns: 1fr;
  }
  .reasons-grid {
    grid-template-columns: repeat(1, 1fr);
  }
  .opportunities-filters{
    overflow-x: auto;
  }
  .glass-card {
    display: flex;
    flex-direction: column;
    height: 90vh;
  }
  .content-body,
  .values-container,
  .files-list,
  .values-container,
  .content-body-services,
  .service-detail-layout,
  .products-grid,
  .maintenance-services,
  .ev-content,
  .prayer-features,
  .loyalty-content,
  .digital-services,
  .opportunities-grid,
  .space-types,
  .benefits-showcase,
  .requirements-content,
  .services-showcase,
  .success-stories,
  .support-content,
  .faq-container {
    flex: 1;
    display: block;
    height: auto;
    overflow-y: auto;
  }
  .value-card,
  .file-item,
  .product-category,
  .maint-card,
  .prayer-item,
  .how-it-works,
  .digital-card,
  .opportunity-card,
  .type-card {
    margin-bottom: 20px;
  }
  .content-body::-webkit-scrollbar-thumb,
  .values-container::-webkit-scrollbar-thumb,
  .files-list::-webkit-scrollbar-thumb,
  .values-container::-webkit-scrollbar-thumb,
  .content-body-services::-webkit-scrollbar-thumb,
  .service-detail-layout::-webkit-scrollbar-thumb,
  .maintenance-services::-webkit-scrollbar-thumb,
  .products-grid::-webkit-scrollbar-thumb,
  .ev-content::-webkit-scrollbar-thumb,
  .prayer-features::-webkit-scrollbar-thumb,
  .loyalty-content::-webkit-scrollbar-thumb,
  .digital-services::-webkit-scrollbar-thumb,
  .opportunity-grid::-webkit-scrollbar-thumb,
  .space-types::-webkit-scrollbar-thumb,
  .benefits-showcase::-webkit-scrollbar-thumb,
  .requirements-content::-webkit-scrollbar-thumb,
  .services-showcase::-webkit-scrollbar-thumb,
  .success-stories::-webkit-scrollbar-thumb,
  .support-content::-webkit-scrollbar-thumb,
  .faq-container::-webkit-scrollbar-thumb
   {
    border-radius: 2px;
    background: #57595b6e;
  }
  .content-body::-webkit-scrollbar,
  .values-container::-webkit-scrollbar,
  .files-list::-webkit-scrollbar,
  .values-container::-webkit-scrollbar,
  .content-body-services::-webkit-scrollbar,
  .service-detail-layout::-webkit-scrollbar,
  .maintenance-services::-webkit-scrollbar,
  .products-grid::-webkit-scrollbar,
  .ev-content::-webkit-scrollbar,
  .prayer-features::-webkit-scrollbar,
  .loyalty-content::-webkit-scrollbar,
  .digital-services::-webkit-scrollbar,
  .opportunities-grid::-webkit-scrollbar,
  .space-types::-webkit-scrollbar,
  .benefits-showcase::-webkit-scrollbar,
  .requirements-content::-webkit-scrollbar,
  .services-showcase::-webkit-scrollbar,
  .success-stories::-webkit-scrollbar,
  .support-content::-webkit-scrollbar,
  .faq-container::-webkit-scrollbar
   {
    width: 4px;
  }
}

@media (max-width: 576px) {
  .video-controls {
    bottom: 90px;
    right: 16px;
  }
}

.bg-img {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("../images/slide.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  z-index: 0;
}

.bg-img::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgb(74 76 79 / 70%) 0%,
    rgb(73 75 78 / 50%) 50%,
    rgb(74 76 79 / 70%) 100%
  );
}

.glass-card {
  background: #57595b6e;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
}
.icon-btn {
  font-size: 15px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: 0.3s;
}

.breadcrumb a:hover {
  color: var(--accent-orange-light);
}

.section-header {
  margin-bottom: 30px;
  position: relative;
}

.section-header::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-teal), transparent);
  border-radius: 2px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgb(102 104 106 / 60%);
  color: #ededed;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 15px;
  border: 1px solid rgba(229, 126, 58, 0.3);
}
/* ===== SEARCH BAR ===== */
.search-bar {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  width: 90%;
  max-width: 500px;
  z-index: 999;
  transition: transform 0.4s ease;
}

.search-bar.active {
  transform: translateX(-50%) translateY(0);
}

.search-bar input {
  width: 78%;
  padding: 15px;
  border: none;
  border-radius: 30px;
  background: transparent;
  /* display: none; */
  color: var(--text-white);
  font-size: 10px;
  font-family: inherit;
  box-shadow: var(--shadow);
}

.search-close-btn {
  position: absolute;
  top: 50%;
  left: 12px; /* لأن RTL: خليته يسار عشان يكون واضح كـ X */
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}

.search-close-btn:hover {
  background: rgba(243, 116, 31, 0.25);
  border-color: rgba(243, 116, 31, 0.55);
}
.search-bar input::placeholder {
  color: #c9c9c9;
}

.search-results {
  background: var(--primary-medium);
  border-radius: 15px;
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.3s;
}

.search-result-item:hover {
  background: rgba(156, 235, 200, 0.1);
}
/* خلفية شاشة كاملة عند فتح البحث */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  z-index: 99998; /* أقل من البحث */
}

/* البحث لازم يكون فوق الـ overlay */
#search-bar {
  z-index: 99999;
}

/* عند تفعيل البحث */
.search-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease, visibility 0s;
}

/* مربع البحث داخل الهيدر بالمنتصف */
.header-search {
  position: relative;
  width: min(560px, 100%);
}

/* شكل الحقل */
.header-search input {
  width: 100%;
  padding: 12px 48px 12px 18px; /* مساحة لزر الإغلاق */
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
  outline: none;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* زر الإغلاق داخل نفس الحقل */
.header-search .search-close-btn {
  position: absolute;
  top: 50%;
  left: 12px; /* مناسب للـ RTL */
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* نتائج البحث تحت الحقل مباشرة */
.header-search .search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  display: none;
  max-height: 300px;
  overflow-y: auto;
  z-index: 2000;
}
.header-search .search-results.active {
  display: block;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
      135deg,
      rgba(0, 43, 40, 0.95) 0%,
      rgba(0, 43, 40, 0.7) 50%,
      transparent 100%
    ),
    center/cover;
  z-index: -1;
}
/* ===== السايدبار يصبح Tab Bar في الأسفل على الموبايل والتابلت ===== */
@media (max-width: 991.98px) {
  /* السايدبار نفسه يتحول إلى شريط سفلي ثابت */
  .sidebar {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    top: auto;
    width: 100%;
    height: 64px;
    background: rgba(102, 104, 106, 0.95); /* نفس ألوانك تقريباً */
    border-radius: 0;
    border-left: none;
    border-top: 1px solid rgba(229, 126, 58, 0.2);
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }

  /* نحول الأيقونات إلى صف أفقي (tabs) */
  .nav-icons {
    flex-direction: row;
    gap: 4px;
    width: 100%;
    /* border-radius: 0; */
    justify-content: space-around;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .nav-icons::-webkit-scrollbar {
    display: none;
  }

  /* شكل زر كل تاب */
  .sidebar-nav-btn {
    width: 55px;
    height: 50px;
    border-radius: 10px;
    padding: 5px 16px !important;
    background: transparent !important;
  }

  .sidebar-nav-btn svg {
    width: 22px;
    height: 22px;
  }

  /* إلغاء التولتيب (النص اللي كان يطلع يمين في الهوفر) */
  .sidebar-nav-btn::after {
    display: none;
  }

  /* لو عندك back-home-btn في السايدبار، نخفيه في النسخة السفلية */
  .back-home-btn {
    display: none;
  }

  /* مساحة تحت المحتوى حتى لا يختفي خلف شريط التابات */
  .content-section {
    padding: 20px 15px 90px 15px;
  }

  .content-section.active {
    padding: 10px 15px;
  }
  .sidebar-nav-btn {
    flex-direction: column;
  }

  .sidebar-nav-btn .tab-label {
    display: block;
    font-size: 9px;
    margin-top: 2px;
    color: #c9c9c9;
  }

  .sidebar-nav-btn.active .tab-label {
    color: #fff;
  }
  .page-footer {
    display: none;
  }
}
