/* ============================================
   Navbar & Footer Unified Styling
   ============================================ */

/* ========== NAVBAR STYLES ========== */

/* ========== NAVBAR STYLES ========== */

.navbar {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 3px solid #6ba3e5;
  border-right: 3px solid #6ba3e5;
  border-radius: 0 0 8px 8px;
  transition: all 0.3s ease;
  padding-top: 0.4rem !important;
  padding-bottom: 0.4rem !important;
}

/* جعل محتوى النافبار يمتد تقريبًا على كامل العرض مع حواف بسيطة */
.navbar .container {
  max-width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

@media (min-width: 992px) {
  .navbar .container {
    padding-right: 70px !important;
    /* فراغ البداية (اليمين) */
    padding-left: 70px !important;
    /* فراغ النهاية (اليسار) */
  }

}

.navbar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff !important;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand img {
  height: 54px;
  max-width: 200px;
  object-fit: contain;
  transition: all 0.3s ease;
  margin-right: 14px;
  /* إزاحة بسيطة عن حافة اليمين   16 أو 18*/
}

.navbar-brand img:hover {
  filter: brightness(1.1);
}

/* Nav Links */
.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.45rem 0.5rem !important;
  font-size: 0.95rem;
}

.nav-link:hover {
  color: #fff !important;
  transform: translateY(-2px);
}

.nav-link.active {
  color: #fff !important;
  font-weight: 600;
  border-bottom: 2px solid #ffc107;
}

.nav-link i {
  margin-left: 8px;
}

/* إزاحة بسيطة لمجموعة أيقونة المستخدم عن حافة النافبار */
.navbar-nav:last-child {
  margin-left: 1.25rem;
}

/* توزيع روابط النافبار على كامل المساحة بين الشعار وأيقونة الحساب (للديسكتوب فقط) */
@media (min-width: 992px) {
  .nav-link {
    font-size: 1rem !important;
    /* زيادة حجم الخط للشاشات الكبيرة */
  }

  .navbar-nav.me-auto {
    flex: 1 1 auto;
    justify-content: flex-start;
    column-gap: 1.5rem;
  }
}

/* Dropdown Menu Styling */
.dropdown-menu {
  background: #f8f9fa !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
  min-width: 220px !important;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.dropdown-item {
  color: #2c3e50 !important;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.75rem 1.5rem !important;
}

.dropdown-item:hover {
  background: #e3f2fd !important;
  color: #1a5490 !important;
  transform: translateX(-5px);
}

.dropdown-item.text-danger {
  color: #dc3545 !important;
}

.dropdown-item.text-danger:hover {
  background: #ffe5e5 !important;
}


.dropdown-divider {
  margin: 0.5rem 0 !important;
  opacity: 0.3;
}

/* User Dropdown */
.navbar-nav .dropdown-toggle::after {
  display: none;
}

.navbar-nav .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-nav .dropdown-toggle i {
  margin-left: 0;
}

/* Navbar Toggler */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.75rem;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========== MOBILE SIDEBAR STYLES ========== */

#customSidebar {
  position: fixed;
  top: 56px;
  right: -320px;
  width: 300px;
  height: calc(100vh - 56px);
  background: #ffffff;
  z-index: 10001;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
}

#customSidebar.active {
  right: 0;
}

#sidebarOverlay {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#sidebarOverlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 18px 25px;
  color: #2c3e50;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: #ffffff;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  color: #1a5490;
  border-right: 4px solid #1a5490;
  padding-right: 21px;
}

.sidebar-menu a i {
  margin-left: 15px;
  font-size: 1.3rem;
  width: 25px;
  text-align: center;
  color: #1a5490;
  transition: all 0.2s ease;
}

.sidebar-menu a:hover i {
  transform: scale(1.1);
}

.sidebar-dropdown a {
  padding: 15px 25px 15px 50px;
  font-size: 0.95rem;
  background: #ffffff;
}

/* ========== BREADCRUMB STYLES ========== */

.breadcrumb {
  background: transparent;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.breadcrumb-item {
  color: #666;
  font-size: 0.95rem;
}

.breadcrumb-item.active {
  color: #1a5490;
  font-weight: 600;
}

.breadcrumb-item a {
  color: #1a5490;
  text-decoration: none;
  transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
  color: #0d3a6f;
  text-decoration: underline;
}

.breadcrumb-item+.breadcrumb-item::before {
  content: "/";
  color: #999;
  margin: 0 0.5rem;
}

/* ========== NOTIFICATION BADGE ========== */

.notification-badge {
  position: relative;
  display: inline-block;
}

.notification-badge .badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(220, 53, 69, 0);
  }
}

/* ========== FOOTER STYLES ========== */

footer {
  background: #1e2837;
  color: white;
  padding: 60px 0 20px;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer h4,
footer h5 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #fff;
}

footer p {
  opacity: 0.9;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* Footer Links */
footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
  padding: 5px 0;
}

footer .footer-legal-link {
  display: inline-block;
  padding: 0 0 0 10px;
}

footer a:hover {
  color: white;
  padding-right: 10px;
}

footer .social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 5px;
  transition: all 0.3s ease;
  text-decoration: none;
}

footer .social-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

footer .social-icon-btn i {
  color: white;
  font-size: 1.1rem;
}

/* Contact Info */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0;
}

.contact-info>div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-info i {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  min-width: 20px;
  margin-top: 3px;
}

.contact-info a {
  color: white;
  font-weight: 500;
  padding: 0;
}

.contact-info a:hover {
  color: #4CAF50;
  padding: 0;
}

/* Footer Divider */
footer hr {
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.6);
  margin: 40px 0 20px;
}

/* Footer Bottom */
footer .row:last-child {
  padding-top: 0;
  border-top: none;
}

footer .row:last-child p {
  opacity: 0.8;
  font-size: 0.9rem;
  margin: 0;
}

/* WhatsApp Floating Button */
.whatsapp-btn {
  position: fixed;
  bottom: 80px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn i {
  color: white;
  font-size: 2rem;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* ========== RESPONSIVE STYLES ========== */

@media (max-width: 991px) {
  .navbar {
    padding: 0.35rem 0 !important;
    min-height: 60px !important;
  }

  .navbar-brand {
    font-size: 1rem;
    gap: 6px;
  }

  .navbar-brand img {
    height: 32px;
    margin-right: 8px;
  }

  .nav-link {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.85rem;
  }

  .navbar-nav:last-child {
    margin-left: 0.5rem;
  }

  #customSidebar {
    width: 280px;
  }

  .sidebar-menu a {
    padding: 15px 20px;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .navbar {
    padding: 0.25rem 0 !important;
    min-height: 55px !important;
  }

  .navbar-brand {
    font-size: 1rem;
    gap: 5px;
  }

  .navbar-brand img {
    height: 32px;
    margin-right: 8px;
  }

  .navbar-brand span {
    display: inline;
    font-size: 0.95rem;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.25rem 0.4rem !important;
  }

  .navbar-nav:last-child {
    margin-left: 0.25rem;
  }

  #customSidebar {
    width: 250px;
    right: -250px;
  }

  .sidebar-menu a {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .sidebar-menu a i {
    font-size: 1rem;
  }

  footer {
    padding: 40px 0 20px;
  }

  footer h5 {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  footer p {
    font-size: 0.85rem;
  }

  .whatsapp-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-btn i {
    font-size: 1.5rem;
  }
}

/* ========== EXTRA SMALL DEVICES ========== */

@media (max-width: 360px) {
  .navbar {
    padding: 0.2rem 0 !important;
    min-height: 50px !important;
  }

  .navbar-brand {
    font-size: 0.85rem;
    gap: 3px;
  }

  .navbar-brand img {
    height: 24px;
    margin-right: 4px;
  }

  .navbar-brand span {
    display: inline;
    font-size: 0.7rem;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.2rem 0.3rem !important;
  }

  .navbar-nav:last-child {
    margin-left: 0.1rem;
  }

  .sidebar-menu a {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  footer h5 {
    font-size: 0.9rem;
  }

  footer p {
    font-size: 0.8rem;
  }

  .breadcrumb-item {
    font-size: 0.85rem;
  }
}

/* ========== DARK MODE SUPPORT ========== */

@media (prefers-color-scheme: dark) {
  .dropdown-menu {
    background: #2d3748 !important;
  }

  .dropdown-item {
    color: #e2e8f0 !important;
  }

  .dropdown-item:hover {
    background: #4a5568 !important;
    color: #63b3ed !important;
  }

  #customSidebar {
    background: #2d3748;
  }

  .sidebar-menu a {
    color: #e2e8f0;
    background: #2d3748;
  }

  .sidebar-menu a:hover,
  .sidebar-menu a.active {
    background: #4a5568;
    color: #63b3ed;
  }
}