/* ==========================================================================
   منصة ميزان للاستشارات القانونية والذكاء الاصطناعي - Mizan Legal Platform
   نظام تصميم فائق الفخامة والاحترافية - Pure Vanilla CSS3
   متوافق تماماً مع جميع المتصفحات الحديثة والشاشات
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* نظام الألوان الملكي */
  --bg-main: #070a12;
  --bg-surface: #0e1526;
  --bg-surface-elevated: #162038;
  --bg-card: rgba(16, 25, 45, 0.72);
  --bg-card-hover: rgba(26, 38, 68, 0.85);

  --gold-primary: #d4af37;
  --gold-light: #fae18b;
  --gold-dark: #9e7a18;
  --gold-gradient: linear-gradient(135deg, #fae18b 0%, #d4af37 50%, #aa8012 100%);
  --gold-glow: 0 0 25px rgba(212, 175, 55, 0.35);
  --gold-glow-intense: 0 0 35px rgba(250, 225, 139, 0.6);

  --ai-cyan: #00e5ff;
  --ai-cyan-glow: 0 0 20px rgba(0, 229, 255, 0.4);
  --emerald-success: #10b981;
  --ruby-danger: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --border-gold: rgba(212, 175, 55, 0.28);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glass: rgba(255, 255, 255, 0.12);

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6);
  --shadow-elevated: 0 20px 40px -10px rgba(0, 0, 0, 0.8);

  --font-main: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-serif: 'Amiri', serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* نمط الإضاءة النهاري الفاخر المخصص */
[data-theme="light"] {
  --bg-main: #f4f6fa;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #e9eef7;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-glass: rgba(0, 0, 0, 0.06);
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

/* إعادة الضبط الأساسية */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  overflow-x: hidden !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  position: relative;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(212, 175, 55, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(0, 229, 255, 0.04) 0%, transparent 45%);
}

img,
svg,
canvas,
video {
  max-width: 100%;
  height: auto;
}

/* شريط التمرير المخصص الفاخر */
::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* نصوص التمييز */
::selection {
  background: var(--gold-primary);
  color: #070a12;
}

/* شبكة الحاويات العامة - توسيط هندسي مثالي بدون أي انحراف للشمال أو اليمين */
.container {
  width: 100% !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-inline: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
  padding-inline: 1.5rem !important;
  box-sizing: border-box !important;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button,
input[type="button"],
input[type="submit"],
.btn,
[role="button"],
.template-filter-btn,
.post-filter-btn,
.post-action-btn,
.post-like-btn,
.theme-toggle-btn,
.top-admin-badge-btn,
.nav-link,
.nav-target-btn,
.nav-target-link,
.close-modal-btn,
.modal-close-btn,
.share-section-btn,
.training-track-btn,
.scenario-option-btn,
.step-action-btn,
.checklist-label,
.tab-btn,
.category-btn,
.btn-breadcrumb-home,
.open-department-ai-btn {
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

button *,
.btn *,
.template-filter-btn *,
.post-filter-btn *,
.nav-link *,
.nav-target-btn *,
.training-track-btn *,
.scenario-option-btn * {
  pointer-events: none;
}

/* ==========================================================================
   أنيميشن ميزان العدالة الشامل (The Master Scales of Justice Animations)
   ========================================================================== */

/* ميزان الخلفية الخافت المتحرك */
.ambient-scales-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.18;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

.floating-scale-symbol {
  position: absolute;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.3));
  animation: floatAmbientScale 16s ease-in-out infinite alternate;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.floating-scale-symbol:nth-child(1) {
  top: 12%;
  right: 4%;
  width: 140px;
  animation-duration: 20s;
}

.floating-scale-symbol:nth-child(2) {
  top: 45%;
  left: 3%;
  width: 110px;
  animation-duration: 24s;
  animation-delay: -5s;
}

.floating-scale-symbol:nth-child(3) {
  bottom: 15%;
  right: 8%;
  width: 160px;
  animation-duration: 18s;
  animation-delay: -10s;
}

@keyframes floatAmbientScale {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  50% {
    transform: translateY(-30px) rotate(4deg) scale(1.05);
  }

  100% {
    transform: translateY(20px) rotate(-4deg) scale(0.95);
  }
}

/* مكون ميزان SVG التفاعلي المتكامل */
.scale-justice-svg {
  display: inline-block;
  overflow: visible;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.25));
  transition: transform 0.4s ease;
}

/* حركة ذراع الميزان الطبيعية */
.scale-beam-group {
  transform-origin: 100px 38px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

/* إلغاء الـ CSS transition لميزان الهيرو التفاعلي لتفادي التصادم مع حلقة الفيزياء السريعة 60fps */
#heroMasterScale .scale-beam-group,
#heroMasterScale .scale-pan-left,
#heroMasterScale .scale-pan-right {
  transition: none !important;
}

.scale-sway-active .scale-beam-group {
  animation: naturalBalanceSway 6s ease-in-out infinite;
}

/* كفتا الميزان تحافظان على استقامتهما العمودية الجاذبية */
.scale-pan-left,
.scale-pan-right {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
}

@keyframes naturalBalanceSway {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-3.5deg);
  }

  75% {
    transform: rotate(3.5deg);
  }
}

/* توهج كفة الحق والعدالة */
.scale-pan-glow {
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
}

/* عنوان القسم مع ميزان العدالة المتذبذب الأنيق */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
  position: relative;
  z-index: 1;
}

.section-scale-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1.25rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-scale-badge .mini-scale {
  width: 24px;
  height: 24px;
  animation: miniScaleBalance 4s ease-in-out infinite;
}

@keyframes miniScaleBalance {

  0%,
  100% {
    transform: rotate(0deg);
  }

  50% {
    transform: rotate(6deg);
  }
}

.section-scale-badge span {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.section-title .text-gold-gradient {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-inline: auto;
}

/* فاصل ميزان العدالة الزخرفي */
.scale-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.scale-divider-line {
  height: 1px;
  width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.scale-divider-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.45));
  animation: pulseScaleDivider 3s ease-in-out infinite;
  transform: translateZ(0);
}

@keyframes pulseScaleDivider {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* ==========================================================================
   شريط التنقل العلوي الفاخر (Glassmorphic Navbar)
   ========================================================================== */
.top-announcement-bar {
  background: linear-gradient(90deg, #070c18, #0f1c38, #070c18);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.45rem 0;
  font-size: 0.85rem;
  color: #ffffff !important;
  position: relative;
  z-index: 101;
}

.top-announcement-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: #ffffff;
}

.top-legal-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff !important;
  font-weight: 600;
}

.top-legal-stat .scale-micro {
  width: 16px;
  height: 16px;
  animation: miniScaleBalance 3s infinite;
}

.top-contacts {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-contacts a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-light);
}

.top-contacts a:hover {
  color: var(--text-primary);
}

.main-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-gold);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.main-navbar.scrolled {
  background: rgba(7, 10, 18, 0.96);
  box-shadow: var(--shadow-card);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 0.75rem;
  position: relative;
}

/* شريط تمرير الأقسام الأفقي الذكي للكمبيوتر واللابتوب لمنع الانزياح والتجمد */
.desktop-nav-scroll-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  margin: 0 0.75rem;
}

.desktop-nav-scroll-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 38px;
  background: rgba(14, 21, 38, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-light);
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 10;
  flex-shrink: 0;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.desktop-nav-scroll-btn.prev {
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.desktop-nav-scroll-btn.next {
  border-radius: 6px 0 0 6px;
  border-right: none;
}

.desktop-nav-scroll-btn:hover {
  background: var(--gold-primary);
  color: #070a12;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

.desktop-nav-scroll-btn:active {
  transform: scale(0.92);
}

/* شعار المنصة الفاخر */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-logo-scale-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
}

.brand-logo-scale {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
  transition: transform 0.4s ease;
}

.brand-logo:hover .brand-logo-scale {
  transform: scale(1.1) rotate(5deg);
}

.brand-name {
  display: flex;
  flex-direction: column;
}

.brand-name-ar {
  font-weight: 900;
  letter-spacing: -0.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.55rem;
  line-height: 1.1;
}

.brand-name-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  font-weight: 600;
}

/* روابط القائمة الفاخرة المدمجة للشاشات واللابتوب مع التمرير الأفقي السلس */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  flex: 1;
  padding: 0.25rem 0.4rem;
  margin: 0;
}

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

.nav-menu > li {
  flex-shrink: 0;
}

@media (min-width: 992px) {
  .desktop-nav-scroll-btn {
    display: flex;
  }
}

.nav-link {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold-light);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* القوائم المنسدلة الذكية الفاخرة للنافبار */
.nav-item-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  transition: var(--transition-smooth);
}

.nav-dropdown-btn:hover,
.nav-item-dropdown:hover .nav-dropdown-btn,
.nav-item-dropdown.active .nav-dropdown-btn {
  color: var(--gold-light);
}

.nav-dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.25s ease;
  color: var(--text-muted);
}

.nav-item-dropdown:hover .nav-dropdown-arrow,
.nav-item-dropdown.open .nav-dropdown-arrow {
  transform: rotate(180deg);
  color: var(--gold-primary);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 255px;
  background: rgba(11, 17, 33, 0.98);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
  z-index: 1000;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu,
.nav-item-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  width: 100%;
}

.nav-dropdown-link {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.9rem !important;
  color: var(--text-secondary) !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-link::after {
  display: none !important;
}

.nav-dropdown-link:hover,
.nav-dropdown-link.active {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light) !important;
  transform: translateX(-3px);
}

.nav-drop-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* أزرار مخصصة */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.btn-gold {
  background: var(--gold-gradient);
  color: #070a12;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.55);
}

.btn-outline-gold {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(8px);
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-ai-consult {
  background: linear-gradient(135deg, #00e5ff 0%, #0077ff 100%);
  color: #ffffff;
  box-shadow: var(--ai-cyan-glow);
}

.btn-ai-consult:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
}

.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-gold);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  padding: 0.5rem;
}

/* ==========================================================================
   القسم الرئيسي (Hero Section With Massive Interactive 3D Scale)
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  padding: 1.5rem 0 2rem;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform: translateZ(0);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-backdrop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hero-backdrop-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
      rgba(7, 10, 18, 0.72) 0%,
      rgba(7, 10, 18, 0.92) 60%,
      var(--bg-main) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-badge-legal {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  width: fit-content;
  backdrop-filter: blur(10px);
}

.hero-badge-legal .scale-hero-icon {
  width: 22px;
  height: 22px;
  animation: miniScaleBalance 3s infinite;
}

.hero-badge-legal span {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold-light);
}

.hero-headline {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.22;
  color: #ffffff;
}

.hero-headline .highlight-gold {
  position: relative;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
}

.hero-action-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.hero-trust-indicators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.hero-stat-card {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-light);
  font-family: var(--font-main);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ميزان البطل التفاعلي المهيب (Hero Interactive Scales Centerpiece) */
.hero-scale-visual-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.scale-visual-card {
  width: 100%;
  max-width: 480px;
  background: rgba(14, 21, 38, 0.96);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-elevated), var(--gold-glow);
  position: relative;
  text-align: center;
  overflow: hidden;
  transform: translateZ(0);
}

.scale-visual-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-interactive-scale {
  width: 100%;
  max-width: 360px;
  height: auto;
  cursor: default;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.scale-caption-box {
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(14, 21, 38, 0.8);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scale-balance-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.balance-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald-success);
  box-shadow: 0 0 10px var(--emerald-success);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

.tilt-hint-text {
  font-size: 0.8rem;
  color: var(--gold-light);
  font-weight: 600;
}

/* ==========================================================================
   أداة محاكي ميزان ترجيح القضية (Interactive Case Balance Evaluator)
   ========================================================================== */
.case-simulator-section {
  padding: 2.8rem 0 2rem;
  position: relative;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-surface) 50%, var(--bg-main) 100%);
}

.simulator-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-elevated);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  backdrop-filter: blur(15px);
}

.simulator-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.simulator-controls-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.evidence-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(22, 32, 56, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.evidence-toggle-item:hover {
  background: rgba(22, 32, 56, 0.9);
  border-color: var(--border-gold);
}

.evidence-toggle-item.checked {
  border-color: var(--gold-primary);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.evidence-info {
  display: flex;
  flex-direction: column;
}

.evidence-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.98rem;
}

.evidence-impact {
  font-size: 0.8rem;
  color: var(--gold-light);
}

.custom-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.evidence-toggle-item.checked .custom-checkbox {
  background: var(--gold-primary);
  color: #070a12;
}

/* منطقة عرض ميزان الترجيح والنتيجة */
.simulator-scale-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(7, 10, 18, 0.7);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  border: 1px solid var(--border-subtle);
  position: relative;
}

.simulator-scale-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-bottom: 1.5rem;
}

.simulator-result-box {
  width: 100%;
}

.meter-percentage {
  font-size: 3rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: var(--font-main);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.meter-status-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.meter-status-description {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   قسم مجالات الاستشارات القانونية (Practice Areas Grid)
   ========================================================================== */
.services-section {
  padding: 2.8rem 0 2rem;
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.85rem;
  transition: var(--transition-bounce);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card), 0 0 25px rgba(212, 175, 55, 0.15);
}

.service-card:hover::before {
  opacity: 1;
}

.service-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.service-icon-box {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 1.6rem;
}

/* أنيميشن الميزان الخاص بكل بطاقة خدمة */
.card-scale-container {
  width: 50px;
  height: 50px;
}

.card-scale-svg {
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.service-card:hover .card-scale-svg {
  transform: scale(1.15) rotate(-6deg);
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.8));
}

.service-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.service-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.service-feature-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.service-feature-item svg {
  color: var(--gold-primary);
  flex-shrink: 0;
}

.service-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.consult-link-btn {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.consult-link-btn:hover {
  color: #ffffff;
  gap: 0.7rem;
}

/* ==========================================================================
   قسم الحاسبات القانونية الفورية (Legal Calculators Hub)
   ========================================================================== */
.calculators-section {
  padding: 2.8rem 0 2rem;
  background: var(--bg-surface);
  position: relative;
}

.calculator-card-container {
  max-width: 900px;
  margin-inline: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-elevated);
}

.calc-nav-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  overflow-x: auto;
}

.calc-tab-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.calc-tab-btn.active {
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.calc-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-control {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  display: block;
  font-family: inherit;
  font-size: 0.95rem;
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.calc-result-display {
  background: rgba(7, 10, 18, 0.8);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px dashed var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.result-stat-amount {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold-light);
}

/* ==========================================================================
   قسم نخبة المستشارين المعتمدين (Verified Lawyers Showcase)
   ========================================================================== */
.lawyers-section {
  padding: 2.8rem 0 2rem;
  position: relative;
}

.lawyers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.lawyer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.lawyer-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-card);
}

.lawyer-avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.25rem;
}

.lawyer-avatar-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--gold-primary);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.08);
}

.lawyer-avatar-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--gold-light);
}

.lawyer-scale-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 30px;
  background: #070a12;
  border: 1px solid var(--gold-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: miniScaleBalance 4s infinite;
}

.lawyer-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.lawyer-title {
  font-size: 0.875rem;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.lawyer-specialty {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.lawyer-rating-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   قسم آراء الموكلين وقصص النجاح (Testimonials)
   ========================================================================== */
.testimonials-section {
  padding: 2.8rem 0 2rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-surface) 50%, var(--bg-main) 100%);
  position: relative;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quote-icon-scale {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 44px;
  height: 44px;
  opacity: 0.15;
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.client-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.client-avatar-initial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.client-info span {
  font-size: 0.8rem;
  color: var(--gold-light);
}

/* ==========================================================================
   قسم الأسئلة الشائعة (Interactive FAQ Accordion)
   ========================================================================== */
.faq-section {
  padding: 2.8rem 0 2rem;
  position: relative;
}

.faq-accordion {
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item.active {
  border-color: var(--border-gold);
  background: var(--bg-card-hover);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.faq-question-btn {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: right;
}

.faq-scale-indicator {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: transform 0.4s ease;
}

.faq-item.active .faq-scale-indicator {
  transform: rotate(15deg) scale(1.1);
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.8));
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
  padding: 0 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.5rem;
}

/* ==========================================================================
   قسم حجز استشارة فورية (Consultation Booking Form)
   ========================================================================== */
.booking-section {
  padding: 2.8rem 0 2rem;
  position: relative;
  background: radial-gradient(circle at center, rgba(22, 32, 56, 0.5) 0%, var(--bg-main) 70%);
}

.booking-card {
  max-width: 900px;
  margin-inline: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: var(--shadow-elevated), var(--gold-glow);
  position: relative;
}

.booking-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.full-col {
  grid-column: 1 / -1;
}

/* ==========================================================================
   نافذة ومستشار شات الذكاء الاصطناعي القانوني الفائق (Legal AI Chat System)
   ========================================================================== */

/* زر إطلاق الشات العائم - مخفي الآن بناءً على طلب المستخدم وتحويله لقسم مستقل */
.ai-chat-launcher {
  display: none !important;
}

@keyframes launcherFloat {

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

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

.ai-launcher-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-elevated), var(--gold-glow), var(--ai-cyan-glow);
  transition: var(--transition-bounce);
  overflow: visible;
}

.ai-launcher-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.7), var(--gold-glow-intense);
}

.launcher-scale-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.launcher-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--ai-cyan);
  opacity: 0.8;
  animation: radarPing 2.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPing {
  0% {
    transform: scale(0.95);
    opacity: 0.9;
  }

  80%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.launcher-label-pill {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

.launcher-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-success);
}

/* نافذة محادثة الذكاء الاصطناعي القانونية الكاملة */
.ai-chat-window {
  position: fixed;
  bottom: 6.5rem;
  left: 2.25rem;
  width: 420px;
  max-width: calc(100vw - 2.5rem);
  height: 640px;
  max-height: calc(100vh - 8rem);
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), var(--gold-glow);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  transform: scale(0.85) translateY(40px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.ai-chat-window.fullscreen {
  width: 90vw;
  max-width: 900px;
  height: 85vh;
  bottom: 5vh;
  left: 5vw;
}

/* ترويسة شات الذكاء الاصطناعي */
.chat-header {
  padding: 1rem 1.25rem;
  background: linear-gradient(90deg, #070a12, #10192d);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.chat-ai-scale-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--gold-primary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070a12;
}

.chat-ai-scale-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-title-text h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-title-text span {
  font-size: 0.75rem;
  color: var(--emerald-success);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-btn-icon {
  background: transparent;
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.chat-btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.chat-btn-close-prominent {
  background: rgba(239, 68, 68, 0.22);
  border: 1.5px solid rgba(239, 68, 68, 0.65);
  color: #ff7878;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
  margin-right: 0.35rem;
  z-index: 20;
}

.chat-btn-close-prominent:hover,
.chat-btn-close-prominent:active {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.6);
}

/* منطقة رسائل الشات */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-disclaimer-notice {
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* فقاعات الرسائل */
.chat-bubble {
  display: flex;
  gap: 0.75rem;
  max-width: 88%;
  animation: bubbleFadeIn 0.3s ease-out;
}

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

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

.chat-bubble.bot {
  align-self: flex-start;
}

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

.bubble-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.chat-bubble.bot .bubble-avatar {
  background: #070a12;
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
}

.chat-bubble.user .bubble-avatar {
  background: var(--gold-primary);
  color: #070a12;
  font-weight: 800;
}

.bubble-content {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.65;
}

.chat-bubble.bot .bubble-content {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-top-right-radius: 2px;
}

.chat-bubble.user .bubble-content {
  background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
  color: #070a12;
  font-weight: 600;
  border-top-left-radius: 2px;
}

/* مؤشر الميزان داخل رد المستشار القانوني الذكي */
.bot-scale-evaluation {
  margin-top: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: rgba(7, 10, 18, 0.6);
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--gold-light);
}

.bot-scale-evaluation .mini-scale {
  width: 20px;
  height: 20px;
  animation: miniScaleBalance 3s infinite;
}

/* مؤشر الكتابة مع الميزان المتأرجح */
.chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  width: fit-content;
  border: 1px solid var(--border-subtle);
}

.typing-scale-icon {
  width: 24px;
  height: 24px;
  animation: naturalBalanceSway 2s ease-in-out infinite;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

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

  40% {
    transform: translateY(-6px);
  }
}

/* الاقتراحات السريعة داخل الشات */
.chat-quick-suggestions {
  padding: 0.6rem 1rem;
  background: rgba(7, 10, 18, 0.4);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.suggestion-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.suggestion-chip:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

/* مدخلات الشات */
.chat-input-area {
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-text-input {
  flex: 1;
  background: rgba(7, 10, 18, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  transition: var(--transition-smooth);
}

.chat-text-input:focus {
  border-color: var(--gold-primary);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--gold-gradient);
  color: #070a12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-bounce);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.08);
}

.voice-record-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.voice-record-btn.recording {
  background: var(--ruby-danger);
  color: #ffffff;
  animation: pulseRecording 1s infinite;
}

@keyframes pulseRecording {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* ==========================================================================
   التذييل الفاخر (Footer Section)
   ========================================================================== */
.main-footer {
  background: #04060b;
  border-top: 1px solid var(--border-gold);
  padding: 2.5rem 0 1.5rem;
  position: relative;
  z-index: 2;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 1.5rem;
}

.footer-brand-info p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.8;
  margin-top: 1.25rem;
}

.footer-col-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 35px;
  height: 2px;
  background: var(--gold-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--gold-primary);
  transform: translateX(-4px);
}

.footer-bottom-bar {
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-scale-emblem {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   التجاوب مع الشاشات المختلفة (Responsive Media Queries)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-description {
    margin-inline: auto;
  }

  .hero-action-group {
    justify-content: center;
  }

  .hero-trust-indicators {
    width: 100%;
    justify-content: center;
  }

  .simulator-wrapper {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   ضبط دقيق لشاشات اللابتوب والمتوسطة (1025px إلى 1280px) لمنع أي انحراف للشمال أو اليمين
   ========================================================================== */
@media (max-width: 1280px) and (min-width: 1025px) {
  .nav-menu {
    gap: 0.65rem !important;
  }
  .nav-link {
    font-size: 0.88rem !important;
    padding: 0.4rem 0.2rem !important;
  }
  .nav-dropdown-btn {
    font-size: 0.88rem !important;
    padding: 0.4rem 0.5rem !important;
    gap: 0.25rem !important;
  }
  .brand-logo {
    gap: 0.6rem !important;
  }
  .brand-name-ar {
    font-size: 1.35rem !important;
  }
  .brand-name-sub {
    font-size: 0.65rem !important;
  }
  .nav-actions {
    gap: 0.5rem !important;
  }
  .btn-ai-consult span {
    display: none !important;
  }
}

/* الأجهزة اللوحية والشاشات المتوسطة (1024px فما دون) - تفعيل القائمة الجانبية الملمومة */
@media (max-width: 1024px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    right: 0;
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
    width: 85%;
    max-width: 320px;
    height: calc(100vh - 80px);
    background: var(--bg-surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    border-left: 1px solid var(--border-gold);
    box-shadow: var(--shadow-elevated);
    transition: transform 0.35s ease, visibility 0.35s ease;
    overflow-y: auto;
    z-index: 1001;
  }

  .nav-menu.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .top-announcement-bar {
    display: block !important;
    padding: 0.35rem 0.6rem !important;
    font-size: 0.74rem !important;
  }

  .top-announcement-content {
    flex-direction: column !important;
    gap: 0.25rem !important;
    align-items: center !important;
    text-align: center !important;
  }

  .top-legal-stat {
    font-size: 0.74rem !important;
    white-space: normal !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .top-contacts {
    display: flex !important;
    gap: 0.75rem !important;
    font-size: 0.72rem !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .hero-headline {
    font-size: 2.2rem;
  }

  .hero-trust-indicators {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .booking-form-grid {
    grid-template-columns: 1fr;
  }

  .booking-card {
    padding: 2rem 1.5rem;
  }

  .ai-chat-window {
    width: calc(100vw - 2rem);
    left: 1rem;
    bottom: 5.5rem;
    height: 540px;
  }

  .ai-chat-launcher {
    bottom: 1.25rem;
    left: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   تنسيقات منصة LegaCourt المتطورة - التلميحات وخريطة الطريق ومكتبة الصيغ وCRUD
   ========================================================================== */

/* 1. نظام التلميحات التفاعلية القضائية (Court Interactive Tooltips) */
.court-term {
  color: var(--gold-light);
  font-weight: 700;
  text-decoration: underline dotted var(--gold-primary);
  text-underline-offset: 4px;
  cursor: help;
  transition: var(--transition-smooth);
  position: relative;
  display: inline-block;
}

.court-term:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--gold-primary);
}

.court-tooltip-box {
  position: absolute;
  z-index: 9999;
  width: 320px;
  max-width: 90vw;
  background: rgba(14, 21, 38, 0.96);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), var(--gold-glow);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.court-tooltip-box.visible {
  opacity: 1;
  pointer-events: none;
  transform: translateY(0);
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
}

.tooltip-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.tooltip-tip {
  background: rgba(212, 175, 55, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--gold-light);
  line-height: 1.5;
  border-right: 2px solid var(--gold-primary);
}

/* 2. قسم تحليل القضية وخريطة الطريق للمحامي المبتدئ */
.case-analysis-section {
  padding: 2.8rem 0 2rem;
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-surface) 50%, var(--bg-main) 100%);
  position: relative;
}

.analysis-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-elevated);
  max-width: 920px;
  margin: 0 auto 3rem;
  backdrop-filter: blur(15px);
}

.analysis-output-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-elevated), var(--gold-glow);
  margin-top: 2rem;
  animation: bubbleFadeIn 0.5s ease-out;
}

.analysis-header-badge {
  text-align: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.badge-tag {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-full);
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.analysis-title {
  font-size: 1.6rem;
  color: #ffffff;
  font-weight: 800;
}

.analysis-grid-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.analysis-card {
  background: rgba(7, 10, 18, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: var(--transition-smooth);
}

.analysis-card:hover {
  border-color: var(--border-gold);
}

.analysis-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.card-num-pill {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.analysis-card-header h4 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-light);
}

/* الحل القانوني */
.summary-p {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.statutes-box {
  background: rgba(22, 32, 56, 0.6);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.statutes-box h5 {
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.statutes-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.statutes-box li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.6;
}

.verdict-highlight {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--emerald-success);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-size: 0.95rem;
  color: #ffffff;
  line-height: 1.7;
}

/* خريطة الطريق للمحامي المبتدئ */
.roadmap-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.roadmap-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  padding-right: 1.5rem;
}

.roadmap-timeline::before {
  content: '';
  position: absolute;
  top: 15px;
  bottom: 15px;
  right: 13px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold-primary), rgba(212, 175, 55, 0.2));
}

.roadmap-step-item {
  display: flex;
  gap: 1.25rem;
  position: relative;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #070a12;
  border: 2px solid var(--gold-primary);
  color: var(--gold-light);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  z-index: 1;
}

.step-body {
  background: rgba(14, 21, 38, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  flex-grow: 1;
}

.step-body h5 {
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.step-body p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}

.step-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-block;
}

/* الدفوع والردود */
.defenses-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.defense-block {
  background: rgba(14, 21, 38, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.opponent-arg {
  margin-bottom: 0.85rem;
}

.arg-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ruby-danger);
  margin-bottom: 0.25rem;
}

.opponent-arg p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.lawyer-rebuttal {
  background: rgba(212, 175, 55, 0.08);
  border-right: 3px solid var(--gold-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.rebuttal-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
}

.lawyer-rebuttal p {
  font-size: 0.92rem;
  color: #ffffff;
  line-height: 1.6;
}

.analysis-loading-box {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
}

/* 3. مكتبة الصيغ القانونية (Legal Templates Library) */
.templates-section {
  padding: 2.8rem 0 2rem;
  position: relative;
}

.templates-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.template-filter-btn {
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  transition: var(--transition-smooth);
}

.template-filter-btn.active,
.template-filter-btn:hover {
  background: var(--gold-gradient);
  color: #070a12;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-bounce);
}

.template-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-card), 0 0 20px rgba(212, 175, 55, 0.15);
}

.template-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.template-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  color: var(--gold-light);
}

.template-icon {
  font-size: 1.5rem;
}

.template-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.template-description {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.template-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}

/* 4. قسم مجتمع وتفاعل المحامين (CRUD Posts System) */
.community-section {
  padding: 2.8rem 0 2rem;
  background: var(--bg-surface);
  position: relative;
}

.community-ai-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.25rem;
  box-sizing: border-box;
}

.post-author-text {
  min-width: 0;
  flex: 1;
}

.community-layout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: start;
}

.new-post-box {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 100px;
}

.new-post-header {
  font-size: 1.2rem;
  color: var(--gold-light);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.community-create-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.community-form-group {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.community-form-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.community-input {
  width: 100%;
  box-sizing: border-box;
}

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

.custom-file-upload-wrapper {
  width: 100%;
  box-sizing: border-box;
}

.custom-file-input-hidden {
  display: none !important;
}

.custom-file-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-md);
  background: rgba(212, 175, 55, 0.05);
  color: var(--gold-light);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.custom-file-upload-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-primary);
}

.custom-file-upload-btn .upload-text.file-selected {
  color: #4ade80;
  font-weight: 700;
}

.btn-post-expand {
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 3px 0;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.share-modal-author-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.community-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: var(--transition-smooth);
}

.post-card:hover {
  border-color: var(--border-gold);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.author-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.post-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-owner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-smooth);
}

.post-action-btn.edit-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.post-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--ruby-danger);
  color: var(--ruby-danger);
}

.post-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.post-content {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.post-attachment-box {
  background: rgba(14, 21, 38, 0.8);
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.attachment-title {
  font-size: 0.85rem;
  color: var(--gold-light);
  font-weight: 600;
}

.btn-download-attach {
  font-size: 0.75rem;
  color: #070a12;
  background: var(--gold-primary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
}

.post-like-btn {
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.post-like-btn:hover {
  color: var(--gold-primary);
}

/* 5. قسم عن المطور (About Developer) المخصص والبارز */
.developer-section {
  padding: 3.2rem 0 2.5rem;
  background: radial-gradient(circle at center, rgba(22, 32, 56, 0.7) 0%, var(--bg-main) 80%);
  position: relative;
  z-index: 2;
}

.developer-card {
  max-width: 820px;
  margin-inline: auto;
  background: var(--bg-card);
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-elevated), var(--gold-glow-intense);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.developer-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

.developer-emblem-wrap {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: #070a12;
  border: 2px solid var(--gold-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--gold-glow);
}

.dev-scale-icon {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.45));
  animation: pulseScaleDivider 3s infinite;
  transform: translateZ(0);
}

.developer-exclusive-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.8vw, 1.95rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.65;
  margin-bottom: 2rem;
  position: relative;
  padding: 0 1rem;
}

.developer-exclusive-quote::before {
  content: '“';
  font-size: 3rem;
  color: var(--gold-primary);
  display: block;
  line-height: 0.5;
  margin-bottom: 0.5rem;
}

.developer-contact-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.developer-phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(14, 21, 38, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.6rem;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-developer-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 1.1rem 2.2rem;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.35);
  transition: var(--transition-bounce);
  max-width: 100%;
}

.btn-developer-whatsapp:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 40px rgba(37, 211, 102, 0.6);
  color: #ffffff;
}

/* قفل التمرير بالخلفية عند فتح أي نافذة منبثقة لمنع التداخل البصري */
body.modal-open {
  overflow: hidden !important;
  touch-action: none !important;
}

/* النوافذ المنبثقة العامة (Modals) */
.custom-modal {
  position: fixed;
  inset: 0;
  z-index: 1000050 !important;
  background: rgba(4, 7, 14, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#googleAuthModal,
#profileOnboardingModal,
#lawyerProfileModal,
#ownerAdminModal,
#adminLoginModal,
#adminDashboardModal {
  z-index: 1000055 !important;
}

#adminAddLawyerModal {
  z-index: 1000075 !important;
}

.custom-modal.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-inner-card {
  background: #0d121f !important;
  border: 1.5px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 650px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2.25rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.2);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal.open .modal-inner-card {
  transform: scale(1);
}

.owner-admin-card,
.admin-dashboard-card {
  background: #0b0f19 !important;
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.modal-header-row h3 {
  font-size: 1.25rem;
  color: var(--gold-light);
}

.modal-close-btn,
.close-modal-btn {
  background: rgba(220, 38, 38, 0.18) !important;
  border: 2px solid rgba(239, 68, 68, 0.65) !important;
  color: #ffffff !important;
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6), 0 0 10px rgba(239, 68, 68, 0.3) !important;
  z-index: 1000020 !important;
  flex-shrink: 0 !important;
  touch-action: manipulation !important;
}

.modal-close-btn:hover,
.close-modal-btn:hover,
.modal-close-btn:active,
.close-modal-btn:active {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #f87171 !important;
  transform: scale(1.12) !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5) !important;
}

.danger-zone-box {
  background: rgba(239, 68, 68, 0.08) !important;
  border: 1.5px dashed #ef4444 !important;
  border-radius: 14px !important;
  padding: 1.1rem !important;
}

.danger-zone-box button:hover {
  background: #dc2626 !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
}

@media (max-width: 900px) {
  .community-layout-grid {
    grid-template-columns: 1fr;
  }

  .new-post-box {
    position: static;
  }
}

/* ==========================================================================
   نظام التوجيه وعرض الأقسام المستقلة الفوري وفائق السلاسة (Instant & Snappy SPA Routing)
   ========================================================================== */
.page-section {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.page-section.active-section {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  padding: 0.75rem 0 1.75rem !important;
  margin: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.active-section .hero-nav-card,
.active-section .service-card,
.active-section .case-bidding-card,
.active-section .lawyer-directory-card {
  animation: cardFadeInSmooth 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeInSmooth {
  from {
    opacity: 0.85;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تثبيت مؤشر الرابط النشط بالقائمة العلوية */
.nav-link.active {
  color: var(--gold-light) !important;
  font-weight: 800 !important;
}

.nav-link.active::after {
  width: 100% !important;
  background: var(--gold-gradient) !important;
  box-shadow: 0 0 12px rgba(250, 225, 139, 0.8) !important;
}

/* شريط المسار داخل كل قسم مستقل */
.section-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  padding: 0.8rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
}

.btn-breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--gold-light);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.btn-breadcrumb-home:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.breadcrumb-separator {
  color: var(--text-muted);
  font-weight: bold;
}

.breadcrumb-current-title {
  color: var(--text-secondary);
  font-weight: 600;
}

/* لوحة الاستعراض السريع لكافة الأقسام في الصفحة الرئيسية */
.hero-sections-navigator {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 992px) {
  .hero-sections-navigator {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero-sections-navigator {
    grid-template-columns: 1fr;
  }
}

.hero-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateZ(0);
}

.hero-nav-card:hover {
  border-color: var(--gold-primary);
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), var(--gold-glow);
  background: var(--bg-card-hover);
}

.nav-card-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.hero-nav-card h4 {
  font-size: 1.15rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.hero-nav-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.nav-card-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.hero-nav-card:hover .nav-card-link {
  color: #ffffff;
  transform: translateX(-4px);
}

/* شارة توجيه السحب والتمرير الأفقي للأقسام على الموبايل */
.mobile-swipe-hint {
  display: none;
}

/* شريط حالة الذكاء الاصطناعي في محلل القضية */
.analyzer-ai-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

#analyzerAiLiveIndicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* نافذة إعدادات مفتاح الذكاء الاصطناعي (AI Key Modal) */
.ai-settings-card {
  max-width: 580px;
  width: 92%;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), var(--gold-glow);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.ai-info-alert {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.ai-key-guide {
  background: rgba(14, 21, 38, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.ai-status-alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.ai-status-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* زر لوحة تحكم الأدمن في الشريط العلوي */
.top-admin-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.top-admin-badge-btn:hover {
  background: var(--gold-gradient);
  color: #070a12;
  box-shadow: 0 0 10px rgba(250, 225, 139, 0.5);
  transform: translateY(-1px);
}

/* لوحة تحكم إدارة المنصة (Admin Dashboard Card) */
.admin-dashboard-card {
  max-width: 640px;
  width: 94%;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), var(--gold-glow);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ==========================================================================
   تنسيقات مكتبة الصيغ والطعون والمستندات (Templates & Documents Library)
   ========================================================================== */
.templates-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.template-filter-btn {
  padding: 0.65rem 1.4rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  transition: var(--transition-bounce);
  backdrop-filter: blur(8px);
}

.template-filter-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

.template-filter-btn.active {
  background: var(--gold-gradient);
  border-color: var(--gold-primary);
  color: #070a12;
  box-shadow: var(--gold-glow);
  transform: translateY(-2px);
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.template-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.template-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-elevated), var(--gold-glow);
  background: var(--bg-card-hover);
}

.template-card:hover::before {
  opacity: 1;
}

.template-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.template-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}

.template-icon {
  font-size: 1.4rem;
}

.template-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
}

.template-description {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex-grow: 1;
}

.template-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.template-card-actions .btn {
  flex: 1;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
}

/* ==========================================================================
   تنسيقات مجتمع المحامين ومشاركات الأعضاء (Community Posts)
   ========================================================================== */
.community-feed-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-filters-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.post-filter-btn {
  padding: 0.5rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.post-filter-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.post-filter-btn.active {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  font-weight: 700;
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
}

.post-card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 900;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--gold-glow);
}

.author-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.post-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-owner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-action-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition-smooth);
}

.post-action-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: #fff;
}

.post-action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--ruby-danger);
  color: #ef4444;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-light);
  line-height: 1.35;
}

.post-content {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-line;
}

.post-attachment-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 21, 38, 0.85);
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  margin-top: 0.5rem;
}

.attachment-icon {
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

.attachment-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--gold-light);
  flex-grow: 1;
}

.btn-download-attach {
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-download-attach:hover {
  box-shadow: var(--gold-glow);
  transform: translateY(-1px);
}

.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.85rem;
  margin-top: 0.5rem;
}

.post-like-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-bounce);
}

.post-like-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  transform: scale(1.05);
}

.empty-posts-box {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(14, 21, 38, 0.4);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

/* ==========================================================================
   شريط الومضات والنصائح القانونية فائق الوضوح (Section Ticker Bar)
   عالي التباين، فوري الظهور، بدون اقتطاع نصوص في الاتجاه العربي RTL
   ========================================================================== */
.section-ticker-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(10, 17, 34, 0.96), rgba(19, 31, 60, 0.94));
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(212, 175, 55, 0.08);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  margin-bottom: 2rem;
  position: relative;
  backdrop-filter: blur(12px);
  gap: 0.85rem;
  flex-wrap: wrap;
}

.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold-gradient);
  color: #05070e;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
  z-index: 2;
}

.ticker-wrap {
  flex: 1 1 320px;
  overflow: visible;
  position: relative;
  white-space: normal;
  margin-inline: 0.5rem;
}

.ticker-move {
  display: flex;
  align-items: center;
  white-space: normal;
  padding-right: 0 !important;
  animation: none !important;
  width: 100%;
}

.ticker-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #ffffff !important;
  margin-left: 0 !important;
  line-height: 1.6;
}

.ticker-item .ticker-highlight {
  color: #fae18b !important;
  font-weight: 800;
  font-size: 1.02rem;
  text-shadow: 0 0 8px rgba(250, 225, 139, 0.3);
}

.ticker-item .ticker-bullet {
  color: var(--gold-primary);
  margin-left: 0.2rem;
  font-size: 1.2rem;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.5));
}

/* زر تغيير المعلومة وتجديد الومضة الفوري */
.btn-ticker-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-ticker-refresh:hover {
  background: var(--gold-primary);
  color: #070a12;
  border-color: var(--gold-primary);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
}

/* ==========================================================================
   زر وإجراءات المشاركة الموحدة في الأقسام (Universal Section Share)
   ========================================================================== */
.section-header-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  transition: var(--transition-bounce);
  backdrop-filter: blur(8px);
}

.section-share-btn:hover {
  background: var(--gold-gradient);
  color: #070a12;
  box-shadow: var(--gold-glow);
  transform: translateY(-2px);
}

/* نافذة النشر والمشاركة الموحدة (Universal Share Modal) */
.share-modal-card {
  max-width: 680px;
  width: 94%;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), var(--gold-glow);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
}

.share-dropzone {
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: rgba(14, 21, 38, 0.6);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.share-dropzone:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-light);
}

/* ==========================================================================
   نظام المصادقة وعضوية المحامين (Lawyer Auth & Profile System)
   ========================================================================== */
.auth-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  transition: var(--transition-smooth);
}

.auth-nav-btn:hover {
  background: var(--gold-gradient);
  color: #070a12;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
}

/* غلاف حقل كلمة المرور مع زر إظهار/إخفاء كلمة المرور */
.password-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-field-wrapper .form-control {
  padding-left: 2.85rem !important;
}

.btn-toggle-password {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.35rem;
  font-size: 1.15rem;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  user-select: none;
}

.btn-toggle-password:hover {
  color: var(--gold-light);
  transform: translateY(-50%) scale(1.12);
}

/* ==========================================================================
   تبويب الملف المهني المنسدل الفاخر (Lawyer Profile Dropdown System)
   ========================================================================== */
.lawyer-profile-pill-wrapper {
  position: relative;
  display: inline-block;
}

.lawyer-header-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(14, 21, 38, 0.9) 100%);
  border: 1px solid var(--border-gold);
  padding: 0.32rem 0.85rem 0.32rem 0.55rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  user-select: none;
}

.lawyer-header-profile-btn:hover,
.lawyer-header-profile-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(14, 21, 38, 0.98) 100%);
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.lawyer-header-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 1.5px solid var(--gold-light);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  flex-shrink: 0;
}

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

.lawyer-header-meta {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.25;
}

.lawyer-header-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lawyer-header-badge {
  font-size: 0.68rem;
  color: var(--gold-light);
  font-weight: 600;
}

.lawyer-header-chevron {
  color: var(--gold-light);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.lawyer-header-profile-btn.active .lawyer-header-chevron {
  transform: rotate(180deg);
}

/* القائمة المنسدلة للبروفايل */
.lawyer-profile-dropdown {
  position: absolute;
  top: calc(100% + 0.65rem);
  left: 0;
  min-width: 280px;
  max-width: 325px;
  background: rgba(14, 21, 38, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), 0 0 25px rgba(212, 175, 55, 0.2);
  padding: 0.85rem;
  z-index: 1000;
  display: none;
  animation: dropdownFadeSlide 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform-origin: top left;
}

.lawyer-profile-dropdown.show {
  display: block;
}

@keyframes dropdownFadeSlide {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.dropdown-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  border: 2px solid var(--gold-light);
  overflow: hidden;
  flex-shrink: 0;
}

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

.dropdown-user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-user-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-degree {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 700;
}

.dropdown-user-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.6rem;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.84rem;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s ease;
}

.dropdown-menu-item:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  transform: translateX(-3px);
}

.dropdown-menu-item.danger {
  color: #ef4444;
}

.dropdown-menu-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.dropdown-menu-item .item-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.dropdown-menu-item .item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.dropdown-menu-item .item-text strong {
  font-size: 0.84rem;
}

.dropdown-menu-item .item-text small {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* خلفية حجب للشاشات الصغيرة عند فتح القائمة الجانبية */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ترويسة القائمة الجانبية وزر الإغلاق على الموبايل */
.mobile-nav-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.25rem 0 1rem 0;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  margin-bottom: 0.75rem;
}

.mobile-nav-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-close-mobile-nav {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.btn-close-mobile-nav:hover,
.btn-close-mobile-nav:active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
}

@media (max-width: 992px) {
  .mobile-nav-header {
    display: flex;
  }
}

/* بطاقة المحامي داخل درج الموبايل */
.mobile-user-profile-item {
  display: none;
  width: 100%;
  padding: 0.5rem 0.5rem 1rem 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

@media (max-width: 992px) {
  .mobile-user-profile-item {
    display: block;
  }
}

.auth-modal-card {
  max-width: 540px;
  width: 94%;
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), var(--gold-glow);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
}

.auth-switch-tabs {
  display: flex;
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.3rem;
  margin-bottom: 1.75rem;
}

.auth-switch-btn {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.auth-switch-btn.active {
  background: var(--gold-gradient);
  color: #070a12;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}

/* ==========================================================================
   قسم "تعال أدرّبك" - أكاديمية المحامي الممارس (The Legal Academy)
   ========================================================================== */
.training-section {
  padding-bottom: 1.5rem;
}

.training-hero-card {
  background: linear-gradient(135deg, rgba(16, 25, 45, 0.85) 0%, rgba(26, 38, 68, 0.75) 100%);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-elevated), var(--gold-glow);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}

.training-hero-card::after {
  content: '⚖️';
  position: absolute;
  left: 2rem;
  bottom: -1rem;
  font-size: 8rem;
  opacity: 0.08;
  pointer-events: none;
}

.training-hero-text {
  max-width: 720px;
}

.training-hero-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.training-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.training-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.training-track-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  transition: var(--transition-bounce);
}

.training-track-btn .track-icon {
  font-size: 2rem;
}

.training-track-btn .track-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.training-track-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-gold);
  color: var(--gold-light);
  transform: translateY(-4px);
}

.training-track-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(14, 21, 38, 0.9) 100%);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
  transform: translateY(-4px);
}

.training-track-btn.active .track-name {
  color: var(--gold-light);
  font-weight: 800;
}

.training-panel {
  display: none;
  animation: fadeIn 0.4s ease;
}

.training-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* شبكة أروقة المحاكم والدفاتر الإدارية */
.court-offices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.court-office-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.court-office-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-card), var(--gold-glow);
  transform: translateY(-3px);
}

.court-office-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  width: fit-content;
}

.court-office-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.court-office-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.court-office-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.court-office-step-item .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* بطاقة التحذير من البنود الخطيرة والقاتلة */
.fatal-clause-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-right: 5px solid var(--ruby-danger);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
}

.fatal-clause-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ef4444;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.fatal-clause-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* صندوق النصح الذهبي الإجرائي */
.golden-advice-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  border-right: 5px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
}

.golden-advice-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.golden-advice-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* مسارات خطوات التأسيس والعمل القضائي */
.steps-timeline-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  position: relative;
  margin-top: 2rem;
}

.timeline-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  gap: 1.5rem;
  transition: var(--transition-smooth);
}

.timeline-step-card:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-card);
}

.timeline-step-marker {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 900;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--gold-glow);
}

.timeline-step-content {
  flex-grow: 1;
}

.timeline-step-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}

.timeline-step-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* محاكي المواقف العملية (ماذا تفعل لو؟) */
.scenario-sim-box {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

.scenario-question {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.scenario-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.scenario-option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: right;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.scenario-option-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.scenario-feedback {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  display: none;
  font-size: 0.95rem;
  line-height: 1.7;
}

.scenario-feedback.correct {
  display: block;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.scenario-feedback.incorrect {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* قوائم المهام التفاعلية للمحامي (Checklists) */
.checklist-card {
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.checklist-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.checklist-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold-primary);
}

/* ==========================================================================
   شريط الومضات القانونية في الهيدر العلوي الدائم (Permanent Header Ticker)
   ========================================================================== */
.header-live-ticker-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 800px;
  overflow: hidden;
  background: rgba(14, 21, 38, 0.75);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
}

.header-ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--gold-gradient);
  color: #070a12;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.header-ticker-track {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.header-ticker-content {
  display: inline-block;
  white-space: nowrap;
  animation: headerTickerMarquee 38s linear infinite;
  padding-right: 100%;
}

.header-live-ticker-wrap:hover .header-ticker-content {
  animation-play-state: paused;
}

@keyframes headerTickerMarquee {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.ticker-quote {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-left: 2.5rem;
}

.ticker-quote strong {
  color: var(--gold-light);
}

/* ==========================================================================
   شاشة تسجيل الدخول الإجبارية الفاخرة (Mandatory Auth Gatekeeper)
   ========================================================================== */
html.gate-locked,
body.gate-locked {
  overflow: hidden !important;
  height: 100% !important;
  height: 100dvh !important;
  width: 100% !important;
  position: fixed !important;
  inset: 0 !important;
  padding-bottom: 0 !important;
  touch-action: none !important;
}

body.gate-locked > *:not(#mandatoryAuthGate):not(#googleAuthModal):not(#profileOnboardingModal):not(#termsModal):not(#privacyModal):not(script) {
  display: none !important;
}

body.gate-locked main,
body.gate-locked header,
body.gate-locked footer,
body.gate-locked .top-announcement-bar,
body.gate-locked .ai-chat-launcher,
body.gate-locked .mobile-bottom-nav,
body.gate-locked .ambient-scales-bg,
body.gate-locked .mobile-nav-backdrop,
body.gate-locked #liveToastContainer {
  display: none !important;
}

#mandatoryAuthGate {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  z-index: 999999 !important;
  background: radial-gradient(circle at 50% 20%, #162038 0%, #070a12 70%) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  box-sizing: border-box !important;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease;
}

#mandatoryAuthGate.gate-unlocked {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(1.02);
}

.gate-card-wrapper {
  max-width: 520px;
  width: 100%;
  background: rgba(14, 21, 38, 0.96);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), var(--gold-glow);
  padding: 2.2rem 2rem;
  position: relative;
  overflow: hidden;
  margin: auto;
  box-sizing: border-box;
}

.gate-card-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold-gradient);
}

/* مسرح شاكوش القضاء والميزان الثنائي الفاخر: الميزان على الشمال والشاكوش على اليمين */
.gate-header-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  padding: 1rem 1.5rem;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.12) 0%, rgba(14, 21, 38, 0.85) 80%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(212, 175, 55, 0.08);
  position: relative;
  overflow: hidden;
}

/* مسرح ميزان العدالة الفاخر مع أنيميشن التوهج الذهبي السلس والخفيف */
.gate-scale-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.gate-scale-svg {
  width: 130px;
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.45));
  will-change: filter;
  animation: gateScaleGlowBreathe 3.5s ease-in-out infinite alternate;
}

.gate-scale-glow-pulse {
  animation: gateHaloPulse 3.5s ease-in-out infinite alternate;
  transform-origin: 80px 65px;
}

.gate-scale-beam {
  transform-origin: 80px 32px;
  animation: gateScaleSway 4.5s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes gateScaleGlowBreathe {
  0% {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.35));
  }
  100% {
    filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.8));
  }
}

@keyframes gateHaloPulse {
  0% {
    opacity: 0.25;
    transform: scale(0.96);
  }
  100% {
    opacity: 0.65;
    transform: scale(1.08);
  }
}

@keyframes gateScaleSway {
  0% {
    transform: rotate(-1.5deg);
  }
  100% {
    transform: rotate(1.5deg);
  }
}

/* طفو وانسيابية هادئة للشعار بالكامل بدون أي تهنيج أو ثقل */
.royal-scales-symbol {
  transform-origin: 80px 65px;
  animation: royalFloatingEquilibrium 4.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes royalFloatingEquilibrium {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* تذبذب خفيف ووقور لذراع الميزان يعبر عن دقة وميزان العدالة */
.royal-balance-beam {
  transform-origin: 80px 32px;
  animation: gentleBalanceTilt 5.5s ease-in-out infinite;
  will-change: transform;
}

@keyframes gentleBalanceTilt {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(1.4deg);
  }
  75% {
    transform: rotate(-1.4deg);
  }
}

/* نبض الهالة الذهبية الخافتة بنعومة فائقة */
.royal-aura-glow {
  animation: royalAuraBreathe 4s ease-in-out infinite;
  will-change: opacity;
}

@keyframes royalAuraBreathe {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.95;
  }
}

/* دوران بطيء جداً للحلقة الزخرفية الدقيقة */
.royal-orbit-ring {
  transform-origin: 80px 65px;
  animation: royalOrbitSpin 32s linear infinite;
  will-change: transform;
}

@keyframes royalOrbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.gate-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.gate-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* تبويبات التبديل في شاشة القفل */
.gate-nav-tabs {
  display: flex;
  background: rgba(7, 10, 18, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 0.3rem;
  margin-bottom: 1.5rem;
}

.gate-tab-btn {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  text-align: center;
}

.gate-tab-btn.active {
  background: var(--gold-gradient);
  color: #070a12;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}

.gate-guest-btn {
  width: 100%;
  margin-top: 1rem;
  background: transparent;
  border: 1px dashed var(--border-gold);
  color: var(--gold-light);
  font-size: 0.85rem;
  padding: 0.55rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.gate-guest-btn:hover {
  background: rgba(212, 175, 55, 0.1);
  border-style: solid;
  color: #fff;
}

/* ==========================================================================
   طرق الدخول السريع: مصادقة Google والموبايل (Quick Auth Methods)
   ========================================================================== */
.quick-auth-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn-auth-quick {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-decoration: none;
}

.btn-auth-google {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1.5px solid #e5e7eb !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

.btn-auth-google:hover {
  background: #f9fafb !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(255, 255, 255, 0.25);
  border-color: #d1d5db !important;
}

.btn-auth-phone {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16) 0%, rgba(14, 21, 38, 0.9) 100%) !important;
  color: #fae18b !important;
  border: 1.5px solid rgba(212, 175, 55, 0.55) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.btn-auth-phone:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.28) 0%, rgba(14, 21, 38, 0.98) 100%) !important;
  color: #ffffff !important;
  border-color: var(--gold-primary) !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.35);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.auth-divider span {
  padding: 0 0.85rem;
  white-space: nowrap;
}

.otp-notice-box {
  animation: fadeInNotice 0.3s ease-in-out;
}

@keyframes fadeInNotice {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   نظام جدول المواعيد والمدد القانونية الحاسمة (Legal Timelines & Deadlines)
   ========================================================================== */
.legal-timelines-container {
  margin-top: 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
}

.legal-timelines-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.timelines-title-wrap h3 {
  font-size: 1.4rem;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}

.timelines-title-wrap p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.timelines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.timeline-branch-card {
  background: rgba(14, 21, 38, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition-smooth);
}

.timeline-branch-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.timeline-branch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-branch-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timeline-item-row {
  background: rgba(255, 255, 255, 0.02);
  border-right: 3px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: var(--transition-smooth);
}

.timeline-item-row:hover {
  background: rgba(212, 175, 55, 0.05);
}

.timeline-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.timeline-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timeline-badge-duration {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-crimson {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.timeline-item-legal-basis {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   تنسيقات الملف المهني للمحامي وهيدر العضوية الفاخر (Lawyer Header & Profile)
   ========================================================================== */
.lawyer-header-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--border-gold);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
  backdrop-filter: blur(8px);
}

.lawyer-header-profile-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-light);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.lawyer-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  overflow: hidden;
  border: 1.5px solid var(--gold-light);
  flex-shrink: 0;
}

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

.lawyer-header-meta {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.2;
}

.lawyer-header-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 125px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lawyer-header-badge {
  font-size: 0.68rem;
  color: var(--gold-light);
  white-space: nowrap;
}

.lawyer-header-chevron {
  color: var(--gold-light);
  opacity: 0.8;
  transition: var(--transition-smooth);
}

.lawyer-header-profile-btn:hover .lawyer-header-chevron {
  transform: translateY(2px);
}

/* نافذة الملف المهني للمحامي */
.profile-modal-card {
  background: rgba(14, 21, 38, 0.96) !important;
  border: 1px solid var(--border-gold) !important;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #070a12;
  font-size: 2.2rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--gold-light);
  box-shadow: var(--gold-glow);
  flex-shrink: 0;
  overflow: hidden;
}

.lawyer-clickable-author {
  cursor: pointer;
  transition: var(--transition-smooth);
  color: var(--gold-light) !important;
}

.lawyer-clickable-author:hover {
  color: #ffffff !important;
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(250, 225, 139, 0.6);
}

/* تحسينات الشاشات الذكية والموبايل (Mobile & Responsive Optimizations) */
@media (max-width: 768px) {
  .gate-header-duo {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .gate-mini-scales-brand {
    min-width: 80px;
  }

  .gate-mini-scales-svg {
    width: 70px;
    height: 58px;
  }

  .mini-scale-brand-name {
    font-size: 0.82rem;
  }

  .mini-scale-brand-sub {
    font-size: 0.65rem;
  }

  .gate-scale-svg,
  .gavel-stage-svg {
    width: 120px;
    height: auto;
  }

  .gate-card-wrapper {
    width: 95%;
    max-width: 440px;
    padding: 1.25rem 0.85rem;
    margin: 1rem auto;
  }

  .gate-title {
    font-size: 1.25rem;
  }

  /* شريط البروفايل بالهيدر على الموبايل */
  .lawyer-header-profile-btn {
    max-width: 165px !important;
    padding: 0.28rem 0.55rem 0.28rem 0.45rem !important;
    gap: 0.45rem !important;
  }

  .lawyer-header-name {
    max-width: 85px !important;
    font-size: 0.75rem !important;
  }

  .lawyer-header-badge {
    display: none !important;
  }

  /* إصلاح القائمة المنسدلة للبروفايل على الموبايل لتظهر كاملة 100% بدون أي قص أو اختفاء */
  .lawyer-profile-dropdown {
    position: fixed !important;
    top: 68px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    min-width: 0 !important;
    transform-origin: top center !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 175, 55, 0.3) !important;
    z-index: 1000060 !important;
    max-height: calc(100vh - 85px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* ضبط نافذة الملف المهني لتظهر بالكامل وتتسع لجميع شاشات الهواتف بدون أي قص أو تراكب */
  #lawyerProfileModal {
    padding: 0.4rem !important;
    align-items: center !important;
    justify-content: center !important;
  }

  #lawyerProfileModal .modal-inner-card,
  .profile-modal-card {
    width: 100% !important;
    max-width: calc(100vw - 16px) !important;
    max-height: 94vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1.15rem 0.85rem !important;
    margin: 0.35rem auto !important;
    box-sizing: border-box !important;
  }

  #lawyerProfileModal form div[style*="grid-template-columns"],
  .profile-social-inputs-box div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .profile-photo-upload-zone {
    flex-direction: column !important;
    text-align: center !important;
    gap: 0.75rem !important;
    padding: 0.85rem !important;
  }

  .profile-photo-upload-zone .profile-avatar-large {
    margin: 0 auto !important;
  }

  .profile-photo-upload-zone .btn {
    font-size: 0.8rem !important;
    padding: 0.45rem 0.75rem !important;
  }

  #lawyerProfileModal form button[type="submit"],
  #lawyerProfileModal form button[type="button"],
  #lawyerProfileModal form .btn {
    width: 100% !important;
    justify-content: center !important;
    margin-bottom: 0.35rem !important;
  }

  .danger-zone-box {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    gap: 0.75rem !important;
  }

  .danger-zone-box button {
    width: 100% !important;
  }

  #profilePublicSection .public-profile-card {
    padding: 1rem 0.75rem !important;
  }

  #profilePublicSection .public-profile-card .btn {
    width: 100% !important;
    margin-bottom: 0.35rem !important;
    justify-content: center !important;
  }
}

/* ==========================================================================
   المكونات التدريبية المتقدمة للمحامي المتدرب (Trainee Practical Curriculum)
   ========================================================================== */
.legal-sample-document {
  background: linear-gradient(135deg, rgba(14, 21, 38, 0.98) 0%, rgba(20, 29, 52, 0.95) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin: 1.5rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(212, 175, 55, 0.05);
  font-size: 1rem;
  line-height: 2;
  color: #f1f5f9;
}

.legal-sample-header {
  text-align: center;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.35);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.legal-sample-title {
  color: var(--gold-light);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.legal-sample-badge {
  display: inline-block;
  font-size: 0.8rem;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-primary);
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-full);
}

.sample-clause-breakdown {
  background: rgba(255, 255, 255, 0.03);
  border-right: 4px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  margin: 1rem 0;
}

.sample-clause-label {
  font-weight: 800;
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sample-clause-explanation {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.docket-schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.docket-schedule-table th,
.docket-schedule-table td {
  padding: 0.85rem 1rem;
  text-align: right;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.docket-schedule-table th {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  font-weight: 800;
}

.docket-schedule-table tr:hover {
  background: rgba(212, 175, 55, 0.04);
}

/* بطاقة مساعد الذكاء الاصطناعي لتدريب المحامي */
.ai-trainee-mentor-box {
  background: linear-gradient(135deg, rgba(14, 21, 38, 0.98) 0%, rgba(26, 38, 68, 0.92) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-top: 1.5rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), inset 0 0 25px rgba(212, 175, 55, 0.08);
}

.ai-mentor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.ai-mentor-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-mentor-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.ai-mentor-quick-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.ai-mentor-chip {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ai-mentor-chip:hover {
  background: var(--gold-gradient);
  color: #070a12;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.ai-mentor-output-card {
  background: rgba(7, 10, 18, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #ffffff;
  display: none;
}

/* ==========================================================================
   شريط التنقل السفلي للأجهزة الذكية مع أزرار التمرير (Mobile Bottom Navigation Bar)
   ========================================================================== */
.mobile-bottom-nav-container {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(7, 10, 18, 0.98);
  border-top: 1.5px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 100000;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.mobile-bottom-nav {
  display: flex;
  flex: 1;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.5rem;
  touch-action: pan-x pan-y !important;
}

.mobile-bottom-nav::-webkit-scrollbar {
  display: none;
}

.mobile-bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  flex: 0 0 auto;
  min-width: 66px;
  text-align: center;
  white-space: nowrap;
}

.mobile-bottom-nav-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
  transition: color 0.2s ease;
  pointer-events: none;
}

.mobile-bottom-nav-item.active,
.mobile-bottom-nav-item:hover {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.14);
}

.mobile-bottom-nav-item.active .mobile-bottom-nav-label,
.mobile-bottom-nav-item:hover .mobile-bottom-nav-label {
  color: var(--gold-light);
  font-weight: 800;
}

.mobile-bottom-nav-item.active .mobile-bottom-nav-icon {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.65));
}

.mobile-bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn-bottom-nav-scroll {
  width: 26px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 21, 38, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-light);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  z-index: 2;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.btn-bottom-nav-scroll:active {
  background: var(--gold-primary);
  color: #000;
  transform: scale(0.92);
}

.btn-bottom-nav-scroll.scroll-prev,
.btn-bottom-nav-scroll.btn-bottom-nav-prev {
  border-radius: 0 8px 8px 0;
  border-left: none;
}

.btn-bottom-nav-scroll.scroll-next,
.btn-bottom-nav-scroll.btn-bottom-nav-next {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 74px;
  }
  .mobile-bottom-nav-container {
    display: flex;
  }
}

/* ==========================================================================
   قسم البحث القانوني الموثق والذكاء الاصطناعي (Legal Research & AI Station)
   ========================================================================== */
.legal-search-section {
  position: relative;
  padding: 2.2rem 0 1.5rem;
}

.legal-search-preset-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .legal-search-preset-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .legal-search-preset-cards {
    grid-template-columns: 1fr;
  }
}

.search-preset-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-card);
}

.search-preset-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-light);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), var(--gold-glow);
}

.preset-card-icon {
  font-size: 1.75rem;
}

.preset-card-info h5 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.35rem;
}

.preset-card-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.btn-preset-action {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
}

.btn-preset-action:hover {
  background: var(--gold-primary);
  color: #070a12;
}

/* محطة الشات المدمجة داخل القسم المستقل */
.legal-search-workstation-container {
  width: 100%;
  margin: 0 auto;
}

.legal-search-section .ai-chat-window {
  position: static !important;
  width: 100% !important;
  max-width: 1020px !important;
  margin: 0 auto !important;
  height: 740px !important;
  max-height: calc(100vh - 12rem) !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: all !important;
  border: 1px solid var(--border-gold) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--gold-glow) !important;
  background: var(--bg-card) !important;
  backdrop-filter: blur(16px) !important;
}

.legal-search-section .ai-chat-window #chatCloseBtn,
.legal-search-section .ai-chat-window #chatExpandBtn {
  display: none !important;
}

.legal-search-section .chat-header {
  padding: 1.25rem 1.5rem !important;
}

.legal-search-section .chat-messages-container {
  padding: 1.5rem !important;
}

.legal-search-section .chat-input-area {
  padding: 1.15rem 1.5rem !important;
}

/* ==========================================================================
   قسم أرشيف وسجل محادثات الذكاء الاصطناعي (AI Chat History & Archive)
   ========================================================================== */
.ai-conversations-section {
  position: relative;
  padding: 2.2rem 0 1.5rem;
}

.ai-conv-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(26, 38, 68, 0.85));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-gold-subtle);
  flex-wrap: wrap;
  gap: 1.5rem;
}

.ai-conv-header-info {
  flex: 1 1 400px;
}

.ai-conv-header-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.ai-conv-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.badge-total-convs {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.ai-conversations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.ai-conv-card {
  background: linear-gradient(145deg, rgba(14, 21, 38, 0.92), rgba(22, 33, 60, 0.85));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.ai-conv-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-gradient);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.ai-conv-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.2);
}

.ai-conv-card:hover::before {
  opacity: 1;
}

.ai-conv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.ai-conv-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.5;
  margin: 0;
  word-break: break-word;
}

.ai-conv-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.ai-conv-badge-tag {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-light);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.ai-conv-snippet {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.35rem;
  background: rgba(7, 10, 18, 0.4);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border-right: 2px solid var(--gold-primary);
  max-height: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.ai-conv-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
  margin-top: auto;
}

.btn-enter-conv {
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-enter-conv:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  transform: translateY(-1px);
}

.btn-edit-conv {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
}

.btn-edit-conv:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.btn-delete-conv {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
}

.btn-delete-conv:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.ai-conv-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 600px;
  margin: 2rem auto;
}

.ai-conv-empty-state .empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.4));
}

.ai-conv-empty-state h3 {
  font-size: 1.35rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.ai-conv-empty-state p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* زر أرشيف المحادثات داخل نافذة الدردشة العائمة */
.chat-action-btn-archive {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.chat-action-btn-archive:hover {
  background: var(--gold-primary);
  color: #070a12;
}

/* ==========================================================================
   أزرار وخانات منصات التواصل الاجتماعي للمحامي (Social Media Badges & Inputs)
   ========================================================================== */
.profile-social-inputs-box {
  transition: var(--transition-smooth);
}

.profile-social-inputs-box:hover {
  border-color: var(--border-gold);
}

.social-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

.social-profile-badge svg {
  flex-shrink: 0;
}

/* فيسبوك */
.badge-facebook {
  background: rgba(24, 119, 242, 0.12);
  border: 1px solid rgba(24, 119, 242, 0.35);
  color: #60a5fa;
}
.badge-facebook:hover {
  background: #1877f2;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.4);
}

/* تيك توك */
.badge-tiktok {
  background: rgba(255, 0, 80, 0.1);
  border: 1px solid rgba(255, 0, 80, 0.35);
  color: #ff4d79;
}
.badge-tiktok:hover {
  background: #ff0050;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 0, 80, 0.4);
}

/* لينكد إن */
.badge-linkedin {
  background: rgba(10, 102, 194, 0.12);
  border: 1px solid rgba(10, 102, 194, 0.35);
  color: #38bdf8;
}
.badge-linkedin:hover {
  background: #0a66c2;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(10, 102, 194, 0.4);
}

/* انستجرام */
.badge-instagram {
  background: linear-gradient(45deg, rgba(245, 133, 41, 0.12), rgba(221, 42, 123, 0.12), rgba(129, 52, 175, 0.12));
  border: 1px solid rgba(221, 42, 123, 0.35);
  color: #f472b6;
}
.badge-instagram:hover {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(221, 42, 123, 0.4);
}

/* ==========================================================================
   بنك القضايا التجريبية والحلول الإجرائية بالخطوات (Case Studies Bank)
   ========================================================================== */
.case-studies-bank-wrapper {
  position: relative;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  backdrop-filter: blur(12px);
}

.case-studies-filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.case-studies-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .case-studies-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.case-study-card {
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.case-study-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(212, 175, 55, 0.12);
}

.case-study-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.case-study-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
}

.case-study-difficulty-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.case-study-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.85rem;
}

.case-study-summary-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.case-study-details-drawer {
  display: none;
  flex-direction: column;
  gap: 1.1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding-top: 1.25rem;
  margin-top: 0.5rem;
}

.case-study-card.expanded .case-study-details-drawer {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.case-block-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
}

.case-block-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--gold-primary);
}

/* جدول خطوات الحل الإجرائي المتسلسلة */
.case-steps-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.case-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: rgba(14, 21, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  transition: var(--transition-smooth);
}

.case-step-item:hover {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(20, 30, 55, 0.9);
}

.case-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #0b0f19;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.case-step-body {
  flex: 1;
}

.case-step-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.case-step-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* صندوق المحاذير والأخطاء القاتلة */
.case-pitfalls-box {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  font-size: 0.84rem;
  color: #fca5a5;
  line-height: 1.6;
}

.case-pitfalls-title {
  font-weight: 700;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
}

/* أزرار كارت القضية التجريبية */
.case-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 1rem;
}

.btn-toggle-case-details {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  transition: var(--transition-smooth);
}

.btn-toggle-case-details:hover {
  background: var(--gold-primary);
  color: #0b0f19;
}

.btn-case-action-small {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.btn-case-action-small:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
}

/* ==========================================================================
   رسائل الترحيب باسم المنصة في بوابة تسجيل الدخول (Auth Gate Welcome Banners)
   ========================================================================== */
.gate-welcome-banner {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08) 0%, rgba(15, 23, 42, 0.6) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.gate-welcome-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.gate-welcome-banner .welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 0.45rem;
}

.gate-welcome-banner .welcome-heading {
  font-size: 1.18rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.gate-welcome-banner .welcome-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   التبويبات الفرعية لقسم الأقسام وبنك القضايا (Department Sub-Nav Tabs)
   ========================================================================== */
.dept-subnav-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
  flex-wrap: wrap;
}

.dept-subnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.98rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.dept-subnav-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.08);
  transform: translateY(-2px);
}

.dept-subnav-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22) 0%, rgba(14, 21, 38, 0.9) 100%);
  border-color: var(--gold-primary);
  color: #fae18b;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25), 0 0 12px rgba(212, 175, 55, 0.15);
}

.subnav-pill-count {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.dept-subnav-btn.active .subnav-pill-count {
  background: rgba(212, 175, 55, 0.3);
  color: #fff;
}

/* ==========================================================================
   تحسينات التجاوب الشاملة للهواتف المحمولة (Mobile Optimization Overhauls)
   ========================================================================== */
@media (max-width: 768px) {
  /* ==========================================================================
     محرك الأداء الفائق للهواتف (Zero-Lag Mobile Engine) - إلغاء التهنيج والتأخير تماماً
     ========================================================================== */
  
  /* 1. استجابة لمس فورية للأزرار والروابط بدون تأخير الـ 300ms */
  button, a, input, select, textarea, .btn, [role="button"], .nav-link, .hero-nav-card, .service-card {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* 2. إلغاء البلور الثقيل المعطل لمعالج الموبايل واستبداله بخلفيات داكنة ناعمة وسريعة */
  .card,
  .service-card,
  .template-card,
  .analysis-card,
  .hero-badge-legal,
  .booking-card,
  .ai-conv-card,
  .hero-sections-navigator .hero-nav-card,
  .modal-inner-card,
  .custom-modal-box {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(14, 21, 38, 0.96) !important;
  }

  /* 3. إيقاف الجسيمات والخلفيات المتحركة المستمرة لتوفير طاقة المعالج */
  .ambient-scales-bg {
    display: none !important;
  }

  /* إخفاء ميزان الهيرو ثلاثي الأبعاد المخصص للماوس على شاشات الموبايل لظهور الأقسام فورياً في الواجهة */
  .hero-scale-visual-container {
    display: none !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* 4. تسريع الهاردوير بالـ GPU للكروت التفاعلية */
  .hero-sections-navigator .hero-nav-card,
  #departmentsCardsGrid .service-card {
    transform: translateZ(0);
    will-change: scroll-position;
  }

  /* الحاوية الأساسية وضبط الحشو لمنع أي خروج عن حدود الشاشة */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    margin-inline: auto !important;
    padding-inline: 0.85rem !important;
    box-sizing: border-box !important;
  }

  /* شاشة الدخول الإجبارية على الموبايل */
  #mandatoryAuthGate {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 1rem 0.65rem 2.5rem 0.65rem !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  .gate-card-wrapper {
    padding: 1.25rem 0.95rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.25rem auto 1.5rem auto !important;
    box-sizing: border-box !important;
  }

  .gate-title {
    font-size: 1.25rem;
  }

  .gate-subtitle {
    font-size: 0.8rem;
    margin-bottom: 1.2rem;
  }

  .gate-welcome-banner {
    padding: 0.85rem 0.9rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
  }

  .gate-welcome-banner .welcome-heading {
    font-size: 1.05rem;
  }

  .gate-welcome-banner .welcome-desc {
    font-size: 0.78rem;
  }

  .gate-header-centered {
    padding: 0.75rem 0.5rem !important;
  }

  .royal-emblem-svg,
  .gate-scale-svg,
  .gavel-stage-svg {
    max-width: 135px !important;
    height: auto !important;
  }

  /* النوافذ المنبثقة العامة على الموبايل - منع تداخل الشاشات والمربعات الصفراء */
  .custom-modal {
    padding: 0.75rem 0.5rem !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: rgba(5, 8, 16, 0.97) !important;
    z-index: 1000050 !important;
  }

  .modal-inner-card {
    padding: 1.25rem 0.95rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0.5rem auto !important;
    background: #0d121f !important;
    max-height: none !important;
    overflow: visible !important;
    border: 1.5px solid var(--border-gold) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95) !important;
  }

  /* تبويبات الأقسام وبنك القضايا */
  .dept-subnav-tabs {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
  }

  .dept-subnav-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
  }

  /* فلترة القضايا والنماذج على الموبايل لتسمح بالتمرير اللمسي السلس */
  .case-studies-filter-bar,
  .templates-filter-bar {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 0.6rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: 0.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .case-studies-filter-bar .template-filter-btn,
  .templates-filter-bar .template-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.45rem 0.85rem;
  }

  /* كروت القضايا على الموبايل */
  .case-study-card {
    padding: 1.15rem 1rem;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .case-study-title {
    font-size: 1.05rem;
  }

  .case-study-facts-box,
  .case-characterization-box,
  .case-statutes-box,
  .case-pitfalls-box {
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
    box-sizing: border-box;
  }

  .case-card-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-toggle-case-details,
  .btn-case-action-small {
    width: 100%;
    justify-content: center;
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  /* قسم المطور على الموبايل */
  .developer-card {
    padding: 1.5rem 1rem;
    box-sizing: border-box;
  }

  .developer-exclusive-quote {
    font-size: 1.05rem;
    padding: 0.75rem;
  }

  /* نافذة وترويسة الشات على الموبايل لضمان بقاء زر الإغلاق X ظاهراً دوماً */
  .ai-chat-window {
    width: calc(100vw - 1.25rem) !important;
    left: 0.625rem !important;
    bottom: 4.8rem !important;
    height: 520px;
    max-height: 82vh;
    box-sizing: border-box;
  }

  .chat-header {
    padding: 0.65rem 0.75rem;
    gap: 0.4rem;
  }

  .chat-header-info {
    max-width: 48%;
    gap: 0.5rem;
  }

  .chat-ai-scale-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }

  .chat-title-text h3 {
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .chat-title-text span {
    display: none; /* إخفاء النص الفرعي الطويل على الهواتف لتوفير المساحة */
  }

  .chat-header-actions {
    flex-shrink: 0;
    gap: 0.25rem;
    align-items: center;
  }

  .chat-action-btn-archive {
    padding: 0.25rem 0.45rem;
    font-size: 0.72rem;
  }

  #chatExpandBtn {
    display: none !important; /* إخفاء الأزرار غير الضرورية على الموبايل لضمان ظهور زر الإغلاق بوضوح تام */
  }

  .chat-btn-close-prominent {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    font-size: 1.45rem !important;
    margin-right: 0.2rem;
  }

  /* منع تداخل عناوين وأسماء الأقسام على الموبايل */
  .section-title {
    font-size: clamp(1.2rem, 5vw, 1.65rem) !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    margin-bottom: 0.5rem !important;
  }

  .section-subtitle {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }

  /* شريط التنقل العلوي على الموبايل - منع التصادم وتراكب العناصر */
  .navbar-inner {
    height: 66px !important;
    padding: 0 0.6rem !important;
    gap: 0.4rem !important;
  }

  .brand-logo {
    gap: 0.45rem !important;
  }

  .brand-name-sub {
    display: none !important;
  }

  .brand-name-ar {
    font-size: 1.22rem !important;
  }

  .brand-logo-scale-wrap {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-logo-scale {
    width: 26px !important;
    height: 26px !important;
  }

  .nav-actions {
    gap: 0.35rem !important;
  }

  .btn-ai-consult {
    padding: 0.45rem !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }

  .btn-ai-consult span {
    display: none !important;
  }

  /* قائمة التنقل الجانبية المنسدلة على الموبايل */
  .nav-menu {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 0.6rem !important;
    padding: 1.5rem 1rem 3rem 1rem !important;
    z-index: 1000 !important;
  }

  .nav-menu li {
    width: 100% !important;
  }

  .nav-menu .nav-link {
    display: block !important;
    width: 100% !important;
    padding: 0.65rem 0.9rem !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.96rem !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
  }

  .nav-item-dropdown {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .nav-dropdown-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.65rem 0.9rem !important;
    font-size: 0.96rem !important;
    font-weight: 700 !important;
    color: var(--gold-light) !important;
    border-radius: var(--radius-sm) !important;
    background: rgba(212, 175, 55, 0.08) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    box-sizing: border-box !important;
  }

  .nav-dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: none !important;
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(212, 175, 55, 0.12) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.35rem 0.5rem !important;
    margin: 0.35rem 0 0.5rem 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.3rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-dropdown-link {
    font-size: 0.88rem !important;
    padding: 0.45rem 0.65rem !important;
    border-radius: var(--radius-sm) !important;
    display: flex !important;
  }

  /* أزرار الهيرو الرئيسية على الموبايل */
  .hero-action-group {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.75rem !important;
  }

  .hero-action-group .btn {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* شريط مسار القسم والرجوع للرئيسية */
  .section-breadcrumb-bar {
    padding: 0.45rem 0.75rem !important;
    font-size: 0.8rem !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    box-sizing: border-box;
  }

  .breadcrumb-current-title {
    max-width: 220px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-block !important;
    vertical-align: middle !important;
    font-size: 0.84rem !important;
  }

  .top-legal-stat {
    font-size: 0.74rem !important;
    white-space: normal !important;
    text-align: center !important;
  }

  /* شريط الومضات التفاعلي على الموبايل بكامل العرض بدون قطع */
  .section-ticker-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.85rem 1rem !important;
    margin-bottom: 1.5rem !important;
    gap: 0.65rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .section-ticker-bar .ticker-badge {
    align-self: flex-start !important;
    font-size: 0.8rem !important;
  }

  .section-ticker-bar .ticker-wrap {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    margin-inline: 0 !important;
    overflow: visible !important;
  }

  .section-ticker-bar .ticker-move {
    width: 100% !important;
  }

  .section-ticker-bar .ticker-item {
    font-size: 0.88rem !important;
    line-height: 1.55 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .section-ticker-bar .ticker-item .ticker-highlight {
    font-size: 0.9rem !important;
    display: inline !important;
  }

  .section-ticker-bar .btn-ticker-refresh,
  .section-ticker-bar .section-share-btn {
    align-self: center !important;
  }

  /* شارة إرشاد السحب الأفقي للموبايل وأزرار الأسهم التفاعلية */
  .mobile-swipe-hint {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    padding: 0.4rem 0.75rem !important;
    background: rgba(212, 175, 55, 0.12) !important;
    border: 1px dashed rgba(212, 175, 55, 0.5) !important;
    border-radius: 20px !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    color: var(--gold-light) !important;
    margin: 1rem auto 0.85rem auto !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-swipe-control {
    background: rgba(212, 175, 55, 0.25) !important;
    border: 1px solid var(--gold-primary) !important;
    color: var(--gold-light) !important;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    padding: 0 !important;
    touch-action: manipulation !important;
    transition: all 0.2s ease !important;
  }

  .btn-swipe-control:active {
    background: var(--gold-primary) !important;
    color: #070a12 !important;
    transform: scale(0.9) !important;
  }

  /* لوحة استعراض الأقسام بالصفحة الرئيسية - سحب وتمرير أفقي سلس من اليمين للشمال */
  .hero-sections-navigator,
  #heroSectionsNavigator {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    gap: 0.85rem !important;
    padding: 0.5rem 0.25rem 1.25rem 0.25rem !important;
    margin-top: 0.75rem !important;
    scrollbar-width: thin !important;
    scrollbar-color: var(--gold-primary) rgba(15, 23, 42, 0.6) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .hero-sections-navigator::-webkit-scrollbar {
    height: 6px !important;
  }

  .hero-sections-navigator::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6) !important;
    border-radius: 10px !important;
  }

  .hero-sections-navigator::-webkit-scrollbar-thumb {
    background: var(--gold-gradient) !important;
    border-radius: 10px !important;
  }

  .hero-nav-card {
    flex: 0 0 78% !important;
    min-width: 250px !important;
    max-width: 285px !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
    touch-action: pan-x pan-y !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  /* قسم الأقسام والدوائر القانونية المتخصصة - سحب وتمرير أفقي سلس من اليمين للشمال */
  #departmentsCardsGrid,
  #departmentsSection .services-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-x pan-y !important;
    overscroll-behavior-x: contain !important;
    gap: 1rem !important;
    padding: 0.5rem 0.25rem 1.5rem 0.25rem !important;
    scrollbar-width: thin !important;
    scrollbar-color: var(--gold-primary) rgba(15, 23, 42, 0.6) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #departmentsCardsGrid::-webkit-scrollbar,
  #departmentsSection .services-grid::-webkit-scrollbar {
    height: 6px !important;
  }

  #departmentsCardsGrid::-webkit-scrollbar-track,
  #departmentsSection .services-grid::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6) !important;
    border-radius: 10px !important;
  }

  #departmentsCardsGrid::-webkit-scrollbar-thumb,
  #departmentsSection .services-grid::-webkit-scrollbar-thumb {
    background: var(--gold-gradient) !important;
    border-radius: 10px !important;
  }

  #departmentsCardsGrid .service-card,
  #departmentsSection .service-card {
    flex: 0 0 80% !important;
    min-width: 250px !important;
    max-width: 290px !important;
    scroll-snap-align: start !important;
    box-sizing: border-box !important;
    touch-action: pan-x pan-y !important;
    user-select: none !important;
    -webkit-user-select: none !important;
  }

  /* قسم سجل واستشارات المحادثات السابقة على الموبايل */
  .ai-conv-header-info {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .ai-conv-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.85rem 1rem !important;
    box-sizing: border-box;
  }

  .search-box-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  /* شبكات البطاقات بالكامل على الموبايل بعمود واحد مرن بدون أي تجاوز أو ترحيل */
  .services-grid,
  .templates-grid,
  .legal-templates-grid,
  .case-studies-grid,
  .training-grid,
  .training-nav-grid,
  .timelines-grid,
  .practice-court-grid,
  .court-offices-grid,
  .testimonials-grid,
  .conversations-history-grid,
  .ai-conversations-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.15rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .service-card,
  .template-card,
  .case-study-card,
  .ai-conv-card,
  .timeline-card,
  .court-office-card,
  .testimonial-card,
  .training-track-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 1.25rem 1rem !important;
  }

  .service-title {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  /* ==========================================================================
     تنسيقات قسم مجتمع المحامين والمنشورات على الهواتف والموبايل (100% Responsive)
     ========================================================================== */
  .community-section {
    padding: 2.2rem 0 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .community-layout-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .community-ai-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.65rem !important;
    padding: 0.85rem 1rem !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .community-ai-banner button {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.55rem 1rem !important;
    font-size: 0.84rem !important;
  }

  .community-filter-bar {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 0.45rem !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 1.25rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .community-filter-bar::-webkit-scrollbar {
    display: none !important;
  }

  .community-filter-bar .post-filter-btn {
    flex-shrink: 0 !important;
    padding: 0.42rem 0.85rem !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
  }

  .community-feed {
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* --------------------------------------------------------------------------
     تنسيقات خانات إنشاء ورفع المنشور على الموبايل (.new-post-box & Form Controls)
     -------------------------------------------------------------------------- */
  .new-post-box {
    position: static !important;
    padding: 0.85rem 0.95rem !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(212, 175, 55, 0.28) !important;
    background: rgba(14, 21, 38, 0.92) !important;
    margin-bottom: 1rem !important;
  }

  .new-post-header {
    font-size: 0.92rem !important;
    color: var(--gold-light) !important;
    margin-bottom: 0.65rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
  }

  .community-create-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.45rem !important;
  }

  .community-form-group {
    margin-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.18rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .community-form-label {
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
  }

  .community-input {
    font-size: 0.80rem !important;
    padding: 0.42rem 0.65rem !important;
    min-height: 35px !important;
    height: auto !important;
    border-radius: 7px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(7, 10, 18, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-primary) !important;
    line-height: 1.35 !important;
  }

  .community-input::placeholder {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.35) !important;
  }

  .community-textarea {
    min-height: 55px !important;
    max-height: 105px !important;
    line-height: 1.4 !important;
    font-size: 0.80rem !important;
    padding: 0.42rem 0.65rem !important;
    resize: vertical !important;
  }

  .custom-file-upload-wrapper {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .custom-file-input-hidden {
    display: none !important;
  }

  .custom-file-upload-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0.45rem 0.65rem !important;
    border: 1px dashed rgba(212, 175, 55, 0.4) !important;
    border-radius: 7px !important;
    background: rgba(212, 175, 55, 0.05) !important;
    color: var(--gold-light) !important;
    font-size: 0.75rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
  }

  .custom-file-upload-btn .upload-icon {
    font-size: 0.85rem !important;
  }

  .custom-file-upload-btn .upload-text.file-selected {
    color: #4ade80 !important;
    font-weight: 700 !important;
  }

  .btn-community-submit {
    width: 100% !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    margin-top: 0.2rem !important;
  }

  /* --------------------------------------------------------------------------
     تنسيقات بطاقات المنشورات الرشيقة على الموبايل (.post-card & Elements)
     -------------------------------------------------------------------------- */
  .community-feed {
    gap: 0.65rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .post-card {
    padding: 0.75rem 0.85rem !important;
    border-radius: 11px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.4rem !important;
    overflow: hidden !important;
    background: rgba(14, 21, 38, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  }

  .post-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin-bottom: 0.25rem !important;
    padding-bottom: 0 !important;
  }

  .post-author-info {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .author-avatar {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 0.84rem !important;
    flex-shrink: 0 !important;
  }

  .post-author-text {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .post-author-name-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.3rem !important;
  }

  .author-name {
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    margin: 0 !important;
  }

  .badge-author-you {
    font-size: 0.65rem !important;
    padding: 1px 5px !important;
    margin: 0 !important;
  }

  .post-meta {
    font-size: 0.66rem !important;
    line-height: 1.35 !important;
    display: block !important;
    word-break: break-word !important;
    color: var(--text-muted) !important;
    margin-top: 1px !important;
  }

  .post-category-tag {
    color: var(--gold-light) !important;
    font-weight: 600 !important;
  }

  .post-owner-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    width: auto !important;
    margin: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    flex-shrink: 0 !important;
  }

  .post-action-btn {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.68rem !important;
    gap: 0.2rem !important;
    border-radius: 5px !important;
  }

  .post-action-btn svg {
    width: 12px !important;
    height: 12px !important;
  }

  .post-title {
    font-size: 0.90rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    margin-bottom: 0.25rem !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    color: var(--gold-light) !important;
  }

  .post-content-wrap {
    margin-bottom: 0.25rem !important;
  }

  .post-content {
    font-size: 0.80rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    color: var(--text-secondary) !important;
  }

  .post-content.is-clamped {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .btn-post-expand {
    background: none !important;
    border: none !important;
    color: var(--gold-light) !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    padding: 2px 4px !important;
    margin-top: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
  }

  .post-attachment-box {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.4rem !important;
    padding: 0.35rem 0.65rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(212, 175, 55, 0.05) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 6px !important;
    margin-bottom: 0.35rem !important;
  }

  .attachment-info-pill {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .attachment-icon {
    font-size: 0.82rem !important;
    flex-shrink: 0 !important;
  }

  .attachment-title {
    font-size: 0.72rem !important;
    color: var(--gold-light) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .btn-download-attach {
    width: auto !important;
    text-align: center !important;
    padding: 0.2rem 0.55rem !important;
    font-size: 0.68rem !important;
    box-sizing: border-box !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
  }

  .post-footer {
    padding-top: 0.35rem !important;
    margin-top: 0.15rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    gap: 0.4rem !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .post-like-btn {
    padding: 0.2rem 0.55rem !important;
    font-size: 0.72rem !important;
    border-radius: 15px !important;
    gap: 0.3rem !important;
  }

  .post-like-btn svg {
    width: 13px !important;
    height: 13px !important;
  }

  .post-footer-tag {
    font-size: 0.66rem !important;
    color: var(--text-muted) !important;
    white-space: nowrap !important;
  }

  /* النوافذ المنبثقة على الهواتف */
  .share-modal-card {
    padding: 1.1rem 0.95rem !important;
    width: 95% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    border-radius: 12px !important;
  }

  .share-modal-author-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    margin-bottom: 0.6rem !important;
  }

  .share-dropzone {
    padding: 0.75rem !important;
    border-radius: 8px !important;
  }

  .modal-inner-card {
    padding: 1.1rem 0.95rem !important;
    width: 95% !important;
    border-radius: 12px !important;
  }
}

/* حركة التنبيه والاهتزاز عند وجود خطأ في الإدخال أو تسجيل الدخول */
@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake-error {
  animation: shakeError 0.4s ease-in-out !important;
}

/* شارة (أنت) للناشر الفعلي في مجتمع المحامين */
.badge-author-you {
  font-size: 0.75rem;
  background: rgba(200, 150, 62, 0.18);
  color: var(--gold-light, #fae18b);
  border: 1px solid rgba(200, 150, 62, 0.45);
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  font-weight: 600;
  vertical-align: middle;
  display: inline-block;
}

/* ==========================================================================
   تحسينات الأداء الفائق وخفة التصفح للهواتف المحمولة والأجهزة اللوحية
   Ultra-High Performance & Smoothness Optimization for Mobile Devices
   ========================================================================== */
@media (max-width: 768px) {
  /* استبدال تأثيرات الـ blur المكلفة بخلفيات متباينة سريعة جداً لمعالج الجوال */
  .main-navbar,
  .mobile-bottom-nav,
  .mobile-bottom-nav-container,
  .citizen-focused-topbar,
  .citizen-service-card,
  .simulator-wrapper,
  .ai-chat-window,
  .court-tooltip-box,
  .share-modal-card,
  .modal-inner-card,
  .login-gate-card,
  .hero-nav-card,
  .service-card,
  .template-card,
  .post-card {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .mobile-bottom-nav-container {
    background: #070a12 !important;
  }

  /* إيقاف حركات الأقسام والكروت عند التمرير لمنع تأخر ظهور الأزرار والمحتوى */
  .page-section,
  .page-section.active-section {
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
  }

  .active-section .hero-nav-card,
  .active-section .service-card,
  .active-section .case-bidding-card,
  .active-section .lawyer-directory-card,
  .citizen-service-card {
    animation: none !important;
    transform: none !important;
  }

  /* إزالة تأخير النقر 300ms ومنع تعليق أو تغييب الأزرار أثناء التمرير */
  a, button, .btn, .nav-link, .citizen-service-card, .btn-hub-tab, .mobile-bottom-nav-item, .btn-bottom-nav-scroll {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .btn, button, .mobile-bottom-nav-item {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* إيقاف الحركات التكرارية غير المنتهية لتوفير 100% من طاقة بطارية ومعالج الموبايل */
  .ambient-scales-bg,
  .floating-scale-symbol,
  .scale-pan-left,
  .scale-pan-right,
  .card-scale-container svg,
  .mini-scale-balance,
  .section-scale-badge-icon svg,
  .scale-divider-icon svg,
  .balance-status-dot {
    animation: none !important;
  }

  /* تفعيل التمرير السريع والسلس بالأصبع */
  html, body {
    -webkit-overflow-scrolling: touch;
  }

  /* تقليل كلفة تجميع الطبقات والظلال الثقيلة على الموبايل لتثبيت معدل الإطارات عند 60fps */
  .service-card,
  .template-card,
  .post-card,
  .lawyer-card,
  .hero-nav-card {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
    transform: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease !important;
  }

  .service-card:hover,
  .template-card:hover,
  .post-card:hover,
  .hero-nav-card:hover {
    transform: none !important;
  }

  /* شريط الموبايل السفلي المحسن: ثبات الأسماء ومنع الاختفاء أو القص إطلاقاً */
  .mobile-bottom-nav-container {
    height: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: #070a12 !important;
    border-top: 1.5px solid rgba(212, 175, 55, 0.4) !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.9) !important;
    z-index: 99999 !important;
  }

  .mobile-bottom-nav {
    display: flex !important;
    flex: 1 !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0.2rem 0.5rem !important;
    gap: 0.35rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    scrollbar-width: none !important;
  }

  .mobile-bottom-nav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .mobile-bottom-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 0.25rem 0.45rem !important;
    min-width: 62px !important;
    max-width: 86px !important;
    flex: 0 0 auto !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    transition: transform 0.15s ease, background 0.15s ease !important;
  }

  .mobile-bottom-nav-label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 0.73rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #cbd5e1 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-align: center !important;
    pointer-events: none !important;
  }

  .mobile-bottom-nav-item.active .mobile-bottom-nav-label,
  .mobile-bottom-nav-item:hover .mobile-bottom-nav-label {
    color: var(--gold-light, #fae18b) !important;
    font-weight: 800 !important;
  }

  .mobile-bottom-nav-icon {
    font-size: 1.25rem !important;
    line-height: 1 !important;
  }

  /* أسهم التمرير الجانبية الأنيقة في حال الحاجة للتمرير السريع */
  .btn-bottom-nav-scroll {
    display: none !important;
  }

  /* منع حجب العناصر والأزرار أثناء التمرير للأعلى والأسفل على الموبايل */
  .ambient-scales-bg {
    z-index: -1 !important;
    pointer-events: none !important;
    display: none !important;
  }

  #liveToastContainer {
    bottom: 82px !important;
    right: 12px !important;
    left: 12px !important;
    max-width: calc(100% - 24px) !important;
    pointer-events: none !important;
  }

  .custom-modal:not(.open) {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }

  .btn, button, input[type="button"], input[type="submit"] {
    position: relative;
    z-index: 2;
    touch-action: manipulation;
  }

  .new-post-box,
  .sticky-sidebar {
    position: static !important;
    top: auto !important;
  }

  /* مساحة تنفس سفلية لمنع تغطية شريط الموبايل السفلي للأزرار ومحتوى الأقسام */
  .page-section.active-section {
    padding-bottom: 95px !important;
  }
}

/* ==========================================================================
   موسوعة الدوائر التخصصية الشاملة - Department Encyclopedia Modal & Cards
   ========================================================================== */

.modal-large-encyclopedia {
  width: 95vw;
  max-width: 1240px;
  height: 90vh;
  max-height: 900px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5rem 2rem;
  background: var(--bg-surface, #12141a);
  border: 1px solid var(--border-gold-subtle, rgba(212, 175, 55, 0.25));
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 30px rgba(212, 175, 55, 0.1);
}

.dept-encyclopedia-header-info {
  flex: 1;
}

.dept-encyclopedia-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.dept-encyclopedia-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dept-encyclopedia-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-accent, #d4af37);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

.dept-encyclopedia-counter {
  font-size: 0.78rem;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
}

.dept-encyclopedia-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary, #ffffff);
  margin: 0.25rem 0 0.5rem;
  line-height: 1.3;
}

.dept-encyclopedia-desc {
  font-size: 0.88rem;
  color: var(--text-secondary, #94a3b8);
  margin: 0;
  line-height: 1.5;
  max-width: 900px;
}

/* شريط الأدوات والبحث والتبويبات */
.dept-encyclopedia-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.25rem 0 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.dept-encyclopedia-search-wrap {
  position: relative;
  width: 100%;
}

.dept-encyclopedia-search-wrap .search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold-accent, #d4af37);
  pointer-events: none;
}

.dept-encyclopedia-search-input {
  width: 100%;
  background: var(--bg-surface-elevated, #1a1d26);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  color: var(--text-primary, #ffffff);
  border-radius: 10px;
  padding: 0.75rem 2.75rem 0.75rem 2.25rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.dept-encyclopedia-search-input:focus {
  outline: none;
  border-color: var(--gold-accent, #d4af37);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
  background: #202430;
}

.dept-encyclopedia-search-wrap .search-clear-btn {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted, #64748b);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.dept-encyclopedia-search-wrap .search-clear-btn:hover {
  color: #ef4444;
}

/* تبويبات الفئات التخصصية */
.dept-encyclopedia-tabs-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.dept-tab-btn {
  background: var(--bg-surface-elevated, #1a1d26);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: var(--text-secondary, #cbd5e1);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dept-tab-btn:hover {
  color: #ffffff;
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
}

.dept-tab-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border-color: var(--gold-accent, #d4af37);
  color: var(--gold-accent, #d4af37);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* محتوى شبكة البطاقات */
.dept-encyclopedia-body {
  flex: 1;
  overflow-y: auto;
  padding-left: 0.5rem;
  padding-right: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.dept-encyclopedia-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.25rem;
  padding-bottom: 1.5rem;
}

/* بطاقة المحور التخصصي */
.dept-encyclopedia-card {
  background: var(--bg-surface-elevated, #181b24);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.dept-encyclopedia-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.dept-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dept-card-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dept-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.tag-legislation {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.tag-defenses {
  background: rgba(212, 175, 55, 0.15);
  color: #e6ca65;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.tag-procedures {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tag-documents {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-cassation {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.dept-item-num {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.dept-meta-pill {
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.dept-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.dept-card-content {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary, #cbd5e1);
  margin-bottom: 0.85rem;
}

.dept-card-content p {
  margin: 0;
}

.dept-card-ref {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  background: rgba(0, 0, 0, 0.25);
  border-right: 2px solid var(--gold-accent, #d4af37);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.85rem;
}

.dept-card-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dept-card-actions .btn {
  flex: 1;
  font-size: 0.78rem;
  padding: 0.45rem 0.5rem;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* رسالة عدم وجود نتائج */
.dept-empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-secondary, #94a3b8);
}

.dept-empty-state svg {
  color: var(--gold-accent, #d4af37);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.dept-empty-state h4 {
  font-size: 1.15rem;
  color: var(--text-primary, #ffffff);
  margin-bottom: 0.5rem;
}

.dept-empty-state p {
  font-size: 0.88rem;
  margin: 0;
}

/* Toast الإشعار السريع */
.dept-encyclopedia-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 20, 26, 0.95);
  color: var(--text-primary, #ffffff);
  border: 1px solid var(--gold-accent, #d4af37);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(8px);
}

.dept-encyclopedia-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* تعديلات أزرار بطاقات الأقسام في الصفحة الرئيسية */
.service-card-action {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.service-card-action .open-dept-encyclopedia-btn {
  width: 100%;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
  color: #0b0c10;
  border: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}

.service-card-action .open-dept-encyclopedia-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, #f3cf55 0%, #bf9512 100%);
}

.service-card-action .open-department-ai-btn {
  width: 100%;
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

/* تكيف الشاشات الصغيرة */
@media (max-width: 768px) {
  .modal-large-encyclopedia {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 1rem;
  }

  .dept-encyclopedia-cards-grid {
    grid-template-columns: 1fr;
  }

  .dept-encyclopedia-title {
    font-size: 1.2rem;
  }

  .dept-encyclopedia-desc {
    display: none;
  }
}

/* ==========================================================================
   تنسيقات ركن المواطن وأدوات المحامي الفائقة (Citizen Hub & Lawyer Pro Tools)
   ========================================================================== */
.btn-hub-tab:hover, .btn-pro-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.citizen-chat-msg {
  animation: fadeIn 0.25s ease-out;
}

.citizen-quick-prompt:hover {
  background: rgba(212, 175, 55, 0.15) !important;
  border-color: var(--gold-primary) !important;
  color: #fae18b !important;
}

.lawyer-directory-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border-color: var(--gold-light) !important;
}

.account-type-tabs .btn-role-tab:hover {
  filter: brightness(1.1);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.15); }
}

@media (max-width: 640px) {
  .citizen-hub-tabs, .lawyer-pro-tabs {
    flex-direction: row !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    padding: 0.5rem 0.25rem 0.85rem 0.25rem !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }
  .btn-hub-tab, .btn-pro-tab {
    width: auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 0.84rem !important;
    padding: 0.55rem 0.95rem !important;
  }
}

/* ==========================================================================
   شارة التوثيق الزرقاء الملكية وشارة المالك (Verified Royal Blue Badge & Owner Badge)
   ========================================================================== */
.verified-badge-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  background: linear-gradient(135deg, #1d9bf0 0%, #0084ff 100%);
  color: #ffffff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  margin-inline-start: 5px;
  vertical-align: middle;
  box-shadow: 0 2px 8px rgba(29, 155, 240, 0.65), 0 0 4px rgba(0, 132, 255, 0.4);
  border: 1.5px solid #ffffff;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.verified-badge-blue:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 12px rgba(29, 155, 240, 0.85), 0 0 6px rgba(0, 132, 255, 0.6);
}

.verified-badge-blue svg {
  width: 11px;
  height: 11px;
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: block;
}

.owner-badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(250, 225, 139, 0.35));
  border: 1px solid #d4af37;
  color: #fae18b;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 800;
  margin-inline-start: 6px;
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* بطاقة حث المواطنين على التواصل مع محامٍ حقيقي */
.real-lawyers-cta-card {
  animation: fadeIn 0.35s ease-out;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.real-lawyers-cta-card:hover {
  border-color: var(--gold-light) !important;
}

/* ==========================================================================
   الفصل الصارم الشامل بين بوابة المحامي وبوابة الموكل (Portal Separation System)
   ========================================================================== */
html.portal-citizen .lawyer-portal-only,
body.portal-citizen .lawyer-portal-only,
html.portal-citizen .lawyer-nav-only,
body.portal-citizen .lawyer-nav-only,
html.portal-citizen #navAiConsultBtn,
body.portal-citizen #navAiConsultBtn,
html.portal-citizen .nav-menu li.lawyer-portal-only,
body.portal-citizen .nav-menu li.lawyer-portal-only,
html.portal-citizen #heroSection,
body.portal-citizen #heroSection,
html.portal-citizen #caseAnalysisSection,
body.portal-citizen #caseAnalysisSection,
html.portal-citizen #trainingSection,
body.portal-citizen #trainingSection,
html.portal-citizen #legalSearchSection,
body.portal-citizen #legalSearchSection,
html.portal-citizen #aiConversationsSection,
body.portal-citizen #aiConversationsSection,
html.portal-citizen #departmentsSection,
body.portal-citizen #departmentsSection,
html.portal-citizen #templatesSection,
body.portal-citizen #templatesSection,
html.portal-citizen #courtDocketSection,
body.portal-citizen #courtDocketSection,
html.portal-citizen #courtFeesSection,
body.portal-citizen #courtFeesSection,
html.portal-citizen #legalDocBuilderSection,
body.portal-citizen #legalDocBuilderSection,
html.portal-citizen #caseMarketplaceSection,
body.portal-citizen #caseMarketplaceSection,
html.portal-citizen #lawyerJobsSection,
body.portal-citizen #lawyerJobsSection,
html.portal-citizen #communitySection,
body.portal-citizen #communitySection,
html.portal-citizen #simulatorSection,
body.portal-citizen #simulatorSection,
html.portal-citizen #lawyerProSection,
body.portal-citizen #lawyerProSection,
html.portal-citizen [data-target="heroSection"],
body.portal-citizen [data-target="heroSection"],
html.portal-citizen [data-target="caseAnalysisSection"],
body.portal-citizen [data-target="caseAnalysisSection"],
html.portal-citizen [data-target="trainingSection"],
body.portal-citizen [data-target="trainingSection"],
html.portal-citizen [data-target="legalSearchSection"],
body.portal-citizen [data-target="legalSearchSection"],
html.portal-citizen [data-target="aiConversationsSection"],
body.portal-citizen [data-target="aiConversationsSection"],
html.portal-citizen [data-target="departmentsSection"],
body.portal-citizen [data-target="departmentsSection"],
html.portal-citizen [data-target="templatesSection"],
body.portal-citizen [data-target="templatesSection"],
html.portal-citizen [data-target="courtDocketSection"],
body.portal-citizen [data-target="courtDocketSection"],
html.portal-citizen [data-target="courtFeesSection"],
body.portal-citizen [data-target="courtFeesSection"],
html.portal-citizen [data-target="legalDocBuilderSection"],
body.portal-citizen [data-target="legalDocBuilderSection"],
html.portal-citizen [data-target="caseMarketplaceSection"],
body.portal-citizen [data-target="caseMarketplaceSection"],
html.portal-citizen [data-target="lawyerJobsSection"],
body.portal-citizen [data-target="lawyerJobsSection"],
html.portal-citizen [data-target="communitySection"],
body.portal-citizen [data-target="communitySection"],
html.portal-citizen [data-target="simulatorSection"],
body.portal-citizen [data-target="simulatorSection"],
html.portal-citizen [data-target="lawyerProSection"],
body.portal-citizen [data-target="lawyerProSection"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

html.portal-citizen .citizen-portal-only,
body.portal-citizen .citizen-portal-only {
  display: list-item !important;
}

html.portal-citizen #citizenHubSection,
body.portal-citizen #citizenHubSection {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html.portal-lawyer .citizen-portal-only,
body.portal-lawyer .citizen-portal-only {
  display: none !important;
}

html.portal-lawyer .lawyer-portal-only,
body.portal-lawyer .lawyer-portal-only {
  display: list-item !important;
}

/* ==========================================================================
   تحسينات التجاوب الشاملة للموبايل والشاشات الصغيرة (Mobile & Responsive UX)
   ========================================================================== */
@media (max-width: 768px) {
  .citizen-tip-card,
  .lawyer-directory-card {
    padding: 1rem !important;
  }
  .citizen-faq-card {
    padding: 0 !important;
    overflow: hidden !important;
  }

  .btn-hub-tab, .btn-pro-tab {
    white-space: normal !important;
    text-align: center !important;
    padding: 0.6rem 0.9rem !important;
  }

  .lawyers-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .lawyers-filter-bar > * {
    width: 100% !important;
    min-width: 100% !important;
  }

  .consultation-booking-modal .modal-container,
  .custom-modal-content {
    width: 95% !important;
    max-width: 95% !important;
    padding: 1.25rem !important;
    margin: 1rem auto !important;
  }

  .citizen-chat-msg {
    max-width: 96% !important;
  }
}

/* ضمان عدم اختفاء أو اقتصاص أي زر على الشاشات بمختلف أحجامها */
.btn, button, .btn-hub-tab, .btn-pro-tab {
  max-width: 100%;
  box-sizing: border-box;
}

/* إتاحة الالتفاف التلقائي للنصوص والعناصر المرنة */
.flex-wrap-mobile {
  flex-wrap: wrap !important;
}

/* ==========================================================================
   قسم ملتقى التوظيف والتدريب القانوني (Legal Career & Apprenticeship Hub)
   ========================================================================== */
.lawyer-jobs-section {
  position: relative;
  padding: 2.5rem 0 2rem;
}

.jobs-hero-card {
  background: linear-gradient(135deg, rgba(22, 32, 56, 0.95), rgba(10, 15, 30, 0.98));
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), var(--gold-glow);
  position: relative;
  overflow: hidden;
}

.jobs-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.jobs-stat-box {
  background: rgba(14, 21, 38, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-align: center;
  transition: var(--transition-smooth);
}

.jobs-stat-box:hover {
  border-color: var(--gold-primary);
  transform: translateY(-3px);
  background: rgba(22, 32, 56, 0.9);
}

.jobs-stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold-light);
  display: block;
}

.jobs-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.jobs-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
}

.btn-job-filter {
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-job-filter:hover {
  border-color: var(--gold-primary);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.1);
}

.btn-job-filter.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
  border-color: var(--gold-primary);
  color: var(--gold-light);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.job-card {
  background: rgba(14, 21, 38, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.job-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.15);
}

.job-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--gold-primary);
}

.job-card.type-hire::before { background: #3b82f6; }
.job-card.type-trainee-seeking::before { background: #10b981; }
.job-card.type-training-offer::before { background: #f59e0b; }
.job-card.type-collaboration::before { background: #8b5cf6; }

.job-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.badge-hire { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-trainee-seeking { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-training-offer { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-collaboration { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }

/* زر متابعة المحامي (Lawyer Follow Button) */
.btn-follow-lawyer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-light);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-follow-lawyer:hover {
  background: rgba(212, 175, 55, 0.22);
  border-color: var(--gold-primary);
  transform: scale(1.03);
}

.btn-follow-lawyer.following {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-success);
  color: #34d399;
}

.btn-follow-lawyer.following:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--ruby-danger);
  color: #f87171;
}

/* بطاقة نافذة الإرشادات الترحيبية للبروفايل */
.onboarding-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  line-height: 1.6;
}

.onboarding-step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   1. مركز الإشعارات والتنبيهات المباشرة (Notifications Center & Toast Alerts)
   ========================================================================== */
.notifications-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notifications-trigger-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.notifications-trigger-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.notifications-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  text-align: center;
  border: 2px solid #070a12;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
  animation: pulseBadge 2s infinite;
}

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

.notifications-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 380px;
  max-width: 92vw;
  background: rgba(14, 21, 38, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(212, 175, 55, 0.2);
  z-index: 1000080;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDownFade 0.22s ease-out;
}

.notifications-dropdown-menu.open {
  display: flex !important;
}

/* ضبط استجابة منسدلة الإشعارات على شاشات الموبايل حتى لا تنقص أو تخرج عن الشاشة */
@media (max-width: 768px) {
  .notifications-dropdown-menu {
    position: fixed !important;
    top: 72px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(88vh - 72px) !important;
    z-index: 1000080 !important;
  }
}

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

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.notif-dropdown-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-mark-all-read {
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  transition: all 0.2s;
  background: rgba(212, 175, 55, 0.08);
}

.btn-mark-all-read:hover {
  background: rgba(212, 175, 55, 0.2);
  color: #fff;
}

.btn-clear-notifs {
  color: #f87171 !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.btn-clear-notifs:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
}

/* شارة تعريف صفة المستخدم في التنبيهات */
.notif-role-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.notif-role-banner .notif-role-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.notif-role-banner .notif-role-text {
  display: flex;
  flex-direction: column;
}

.notif-role-banner .notif-role-text strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.notif-role-banner .notif-role-text small {
  font-size: 0.72rem;
  opacity: 0.8;
  line-height: 1.2;
}

.notif-role-banner.citizen {
  background: rgba(16, 185, 129, 0.12);
  border-right: 3px solid #10b981;
  color: #34d399;
}

.notif-role-banner.lawyer {
  background: rgba(212, 175, 55, 0.12);
  border-right: 3px solid var(--gold-primary);
  color: var(--gold-light);
}

.notif-role-banner.admin {
  background: rgba(168, 85, 247, 0.12);
  border-right: 3px solid #a855f7;
  color: #d8b4fe;
}

.notif-role-banner.guest {
  background: rgba(100, 116, 139, 0.12);
  border-right: 3px solid #94a3b8;
  color: #cbd5e1;
}

/* شريط تبويبات فلترة الإشعارات */
.notif-filters-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.notif-filter-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  border-radius: 20px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.notif-filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.notif-filter-btn.active {
  background: var(--gold-primary);
  color: #070a12;
  border-color: var(--gold-primary);
  font-weight: 700;
}

.notif-dropdown-body {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.3rem 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
  cursor: pointer;
  position: relative;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-item.unread {
  background: rgba(212, 175, 55, 0.07);
  border-right: 3px solid var(--gold-primary);
}

.notif-unread-dot {
  width: 8px;
  height: 8px;
  background: var(--gold-primary);
  border-radius: 50%;
  position: absolute;
  top: 14px;
  left: 12px;
  box-shadow: 0 0 8px var(--gold-primary);
}

.notif-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-icon-circle.case { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.notif-icon-circle.session { background: rgba(212, 175, 55, 0.2); color: var(--gold-light); border: 1px solid rgba(212, 175, 55, 0.3); }
.notif-icon-circle.job { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.notif-icon-circle.system { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.notif-head h5 {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.notif-item.unread .notif-head h5 {
  color: var(--gold-light);
}

.notif-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.notif-content p {
  margin: 0 0 0.35rem 0;
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.notif-action-hint {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--gold-light);
  font-weight: 600;
  background: rgba(212, 175, 55, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.notif-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.notif-dropdown-footer {
  padding: 0.65rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.btn-notif-footer {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.btn-notif-footer:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.btn-notif-footer.citizen:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.notif-empty-state i {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  opacity: 0.4;
  color: var(--gold-light);
}

/* Toast Notifications Container */
#liveToastContainer {
  position: fixed;
  bottom: 25px;
  right: 25px;
  left: auto;
  z-index: 1000000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  pointer-events: none;
}

.toast-notification {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  color: #fff;
  font-size: 0.86rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification.toast-success { border-right: 4px solid #10b981; }
.toast-notification.toast-info { border-right: 4px solid var(--gold-primary); }
.toast-notification.toast-warning { border-right: 4px solid #f59e0b; }
.toast-notification.toast-danger { border-right: 4px solid #ef4444; }

/* ==========================================================================
   2. أجندة الجلسات ورول المحكمة الذكي (Court Docket System)
   ========================================================================== */
.docket-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.docket-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.docket-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.docket-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.docket-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0;
}

.docket-actions-header {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-docket-action {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-docket-primary {
  background: var(--gold-gradient);
  color: #070a12;
  border: none;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.btn-docket-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.btn-docket-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
}

.btn-docket-secondary:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
}

.docket-filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 1.75rem;
}

.docket-filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.docket-filter-item label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.docket-input, .docket-select {
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

.docket-sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.session-card {
  background: rgba(14, 21, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
}

.session-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.session-card.status-finished {
  opacity: 0.65;
  border-color: rgba(16, 185, 129, 0.3);
}

.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.roll-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.priority-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.priority-high { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.priority-medium { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.priority-low { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }

.session-body {
  flex: 1;
}

.session-case-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.35rem 0;
}

.session-court-info {
  font-size: 0.82rem;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.session-parties {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
}

.party-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.party-row:last-child { margin-bottom: 0; }
.party-lbl { color: var(--text-muted); }
.party-name { font-weight: 600; color: #fff; }

.session-decision-box {
  background: rgba(212, 175, 55, 0.08);
  border-right: 3px solid var(--gold-primary);
  padding: 0.6rem 0.85rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.decision-lbl {
  font-weight: 700;
  color: var(--gold-light);
  display: block;
  margin-bottom: 0.2rem;
}

.session-footer-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-session-action {
  flex: 1;
  padding: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.btn-session-action:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-session-action.btn-wa-share:hover {
  background: rgba(37, 211, 102, 0.2);
  border-color: #25d366;
  color: #25d366;
}

/* ==========================================================================
   3. حاسبة الرسوم القضائية والدمغات (Court Fees Calculator)
   ========================================================================== */
.court-fees-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.fees-calculator-header {
  text-align: center;
  margin-bottom: 2rem;
}

.calc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.fees-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.fees-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0;
}

.fees-grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .fees-grid-layout {
    grid-template-columns: 1fr;
  }
}

.fees-form-card, .fees-results-card {
  background: rgba(14, 21, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.fees-field-group {
  margin-bottom: 1.25rem;
}

.fees-field-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

.fees-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.45rem;
}

.fees-label i {
  margin-left: 0.35rem;
}

.fees-input, .fees-select {
  width: 100%;
  background: rgba(7, 10, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  transition: border 0.2s;
}

.fees-input:focus, .fees-select:focus {
  border-color: var(--gold-primary);
  outline: none;
}

.input-with-addon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-addon .addon-tag {
  position: absolute;
  left: 12px;
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.85rem;
}

.field-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.fees-actions-bar {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-calc-primary {
  flex: 1.2;
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 800;
  border: none;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: transform 0.2s;
}

.btn-calc-primary:hover {
  transform: translateY(-2px);
}

.btn-calc-secondary {
  flex: 0.8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  font-weight: 700;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.result-hero-box {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.03));
  border: 2px solid var(--gold-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.hero-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.35rem;
}

.hero-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-light);
  text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.hero-badge {
  display: inline-block;
  font-size: 0.74rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.45rem;
}

.fee-breakdown-table {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  margin-bottom: 1.25rem;
}

.breakdown-header {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
}

.breakdown-row:last-child {
  border-bottom: none;
}

.breakdown-divider {
  height: 1px;
  background: rgba(212, 175, 55, 0.25);
  margin: 0.4rem 0;
}

.total-estimated-row {
  background: rgba(212, 175, 55, 0.05);
  border-radius: 4px;
}

.text-muted-gold { color: #e5c158; }

.fee-notes-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.fee-notes-box h5 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  margin: 0 0 0.45rem 0;
}

.fee-notes-box ul {
  margin: 0;
  padding-right: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   4. صانع المحررات والعقود التفاعلي (Legal Document Builder)
   ========================================================================== */
.doc-builder-container {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.doc-builder-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.doc-templates-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}

.doc-tab-btn {
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.doc-tab-btn:hover {
  border-color: var(--gold-primary);
  color: #fff;
}

.doc-tab-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-light);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

.doc-wizard-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: flex-start;
}

@media (max-width: 992px) {
  .doc-wizard-grid {
    grid-template-columns: 1fr;
  }
}

.doc-form-pane {
  background: rgba(14, 21, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  max-height: 750px;
  overflow-y: auto;
}

.doc-field-wrap {
  margin-bottom: 1.1rem;
}

.doc-field-wrap label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
}

.doc-input {
  width: 100%;
  background: rgba(7, 10, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.6rem 0.85rem;
  font-size: 0.86rem;
}

.doc-textarea {
  resize: vertical;
  line-height: 1.5;
}

.doc-preview-pane {
  background: rgba(14, 21, 38, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.preview-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.preview-status {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
}

.btn-preview-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.btn-preview-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-print-highlight {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

.btn-print-highlight:hover {
  background: var(--gold-primary);
  color: #070a12;
}

.document-paper-wrapper {
  background: #ffffff;
  color: #1a1a1a;
  padding: 2.5rem;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-family: 'Amiri', 'Cairo', serif;
  font-size: 1.05rem;
  line-height: 1.9;
  max-height: 650px;
  overflow-y: auto;
  border-top: 6px solid #b38e36;
}

.legal-print-document .doc-header-banner {
  text-align: center;
  border-bottom: 2px solid #222;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.legal-print-document .doc-header-banner h3 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: #0b1329;
}

.legal-print-document .doc-party-box {
  background: #f8f9fa;
  border-right: 4px solid #b38e36;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  border-radius: 0 4px 4px 0;
}

.legal-print-document .doc-clause {
  margin: 1.1rem 0;
  text-align: justify;
}

.legal-print-document .doc-bailiff-callout {
  background: #fafafa;
  border: 1px dashed #666;
  padding: 0.85rem;
  margin: 1rem 0;
  border-radius: 4px;
}

.legal-print-document .doc-signatures {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px dotted #ccc;
}

.legal-print-document .sig-box {
  width: 45%;
  text-align: center;
  font-size: 0.95rem;
}

/* ==========================================================================
   5. سوق القضايا وطلب عروض الأتعاب (Case Marketplace & Quotes)
   ========================================================================== */
.case-market-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.market-hero-header {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
}

.market-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.header-content-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.header-content-flex h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.4rem 0;
}

.header-content-flex p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin: 0;
}

.btn-post-case {
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 800;
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
  transition: var(--transition-smooth);
}

.btn-post-case:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.market-filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 1.75rem;
}

.market-filter-select {
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

.market-stats-tag {
  margin-right: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cases-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.case-item-card {
  background: rgba(14, 21, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.case-item-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.case-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.badge-cat {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.case-meta-top {
  display: flex;
  gap: 0.65rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.case-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.5rem 0;
  line-height: 1.45;
}

.case-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 1rem 0;
  flex: 1;
}

.case-budget-bar {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.budget-item .lbl {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.budget-item .val {
  font-size: 0.92rem;
}

.proposals-accordion {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}

.proposals-toggle {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.proposals-content {
  display: none;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

.proposals-accordion.expanded .proposals-content {
  display: block;
}

.proposals-accordion.expanded .arrow-icon {
  transform: rotate(180deg);
}

.single-proposal-card {
  background: rgba(14, 21, 38, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
}

.single-proposal-card:last-child {
  margin-bottom: 0;
}

.p-lawyer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.p-lawyer-title {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.p-fee-tag {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.p-strategy {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0.35rem 0;
}

.p-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-submit-proposal-trigger {
  width: 100%;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  font-weight: 700;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  transition: all 0.2s;
}

.btn-submit-proposal-trigger:hover {
  background: var(--gold-primary);
  color: #070a12;
}

/* Custom Modal Styles for Bidding & Cases */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000005 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-inner-card {
  background: #0e1526;
  border: 1px solid var(--gold-primary);
  border-radius: var(--radius-md);
  width: 580px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header-top h4 {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-form-body {
  padding: 1.5rem;
}

.modal-input, .modal-select, .modal-textarea {
  width: 100%;
  background: rgba(7, 10, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  margin-top: 0.35rem;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-cancel-modal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-confirm-modal {
  background: var(--gold-gradient);
  color: #070a12;
  font-weight: 800;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ==========================================================================
   6. البطاقة المهنية الرقمية ورمز QR (Digital Business Card)
   ========================================================================== */
.lawyer-qr-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  text-align: center;
}

.nfc-gold-card {
  width: 380px;
  max-width: 90vw;
  background: linear-gradient(135deg, #070a12 0%, #0d1527 50%, #162038 100%);
  border: 2px solid var(--gold-primary);
  border-radius: 18px;
  padding: 1.75rem;
  position: relative;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.25);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.nfc-gold-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.card-top-branding {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.card-brand-logo {
  font-weight: 900;
  color: var(--gold-light);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-nfc-icon {
  color: var(--gold-primary);
  font-size: 1.2rem;
}

.card-qr-box {
  background: #ffffff;
  padding: 10px;
  border-radius: 12px;
  width: 170px;
  height: 170px;
  margin: 0 auto 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card-qr-box img, .card-qr-box svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-lawyer-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.35rem 0;
}

.card-lawyer-degree {
  font-size: 0.85rem;
  color: var(--gold-light);
  margin-bottom: 0.45rem;
}

.card-lawyer-office {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-footer-strip {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
}

.qr-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.btn-qr-action {
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.2s;
}

/* ==========================================================================
   7. زر وتثبيت تطبيق PWA
   ========================================================================== */
.btn-pwa-install {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  border: 1px solid #10b981;
  color: #34d399;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.25s;
}

.btn-pwa-install:hover {
  background: #10b981;
  color: #070a12;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   8. قسم مركز الإشعارات والتنبيهات القضائية الحقيقية (Notifications Section)
   ========================================================================== */
.notifications-section {
  padding: 2.2rem 0 2.5rem 0;
  min-height: auto;
}

.sec-notif-role-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  background: rgba(14, 21, 38, 0.7);
  border: 1px solid var(--border-gold);
  backdrop-filter: blur(14px);
}

.sec-notif-role-card.citizen {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(14, 21, 38, 0.8));
}

.sec-notif-role-card.lawyer {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(14, 21, 38, 0.8));
}

.sec-notif-role-card.admin {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(14, 21, 38, 0.8));
}

.sec-role-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.sec-role-info {
  flex: 1;
}

.sec-role-info h3 {
  margin: 0 0 0.35rem 0;
  font-size: 1.15rem;
  color: #fff;
  font-weight: 700;
}

.sec-role-info p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sec-role-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
}

.sec-notif-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  background: rgba(14, 21, 38, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
}

.sec-notif-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sec-filter-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: 25px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.sec-filter-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sec-filter-tab.active {
  background: var(--gold-primary);
  color: #070a12;
  border-color: var(--gold-primary);
  font-weight: 800;
}

.sec-filter-tab .tab-badge {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.45rem;
  border-radius: 12px;
  font-size: 0.72rem;
}

.sec-filter-tab.active .tab-badge {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

.sec-filter-tab .tab-badge.unread {
  background: #ef4444;
  color: #fff;
}

.sec-notif-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.sec-notifications-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 250px;
}

.sec-notif-card {
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.sec-notif-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.15);
}

.sec-notif-card.unread {
  border-right: 4px solid var(--gold-primary);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.06), rgba(14, 21, 38, 0.9));
}

.sec-notif-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.sec-notif-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.sec-notif-type-tag.case { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.sec-notif-type-tag.session { background: rgba(212, 175, 55, 0.15); color: var(--gold-light); border: 1px solid rgba(212, 175, 55, 0.3); }
.sec-notif-type-tag.job { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.sec-notif-type-tag.system { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.sec-notif-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sec-notif-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.sec-badge-unread {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.sec-badge-read {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  padding: 0.15rem 0.55rem;
  border-radius: 12px;
  font-size: 0.72rem;
}

.btn-delete-single-notif {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.2s;
}

.btn-delete-single-notif:hover {
  color: #ef4444;
}

.sec-notif-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 700;
}

.sec-notif-card.unread .sec-notif-title {
  color: var(--gold-light);
}

.sec-notif-body {
  margin: 0 0 1rem 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.sec-notif-card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
}

/* Empty State Real Notifications */
.notif-real-empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: rgba(14, 21, 38, 0.4);
  border: 1px dashed rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
}

.empty-bell-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto 1.25rem auto;
}

.notif-real-empty-state h3 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.notif-real-empty-state p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem auto;
  line-height: 1.6;
}

.empty-reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  text-align: right;
  max-width: 960px;
  margin: 0 auto;
}

.empty-reason-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.empty-reason-card .reason-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.empty-reason-card strong {
  color: var(--gold-light);
  font-size: 0.88rem;
}

.empty-reason-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.sec-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.sec-quick-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(14, 21, 38, 0.6);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  color: #fff;
  text-decoration: none;
}

.sec-quick-card:hover {
  background: rgba(212, 175, 55, 0.12);
  transform: translateY(-2px);
  border-color: var(--gold-light);
}

.sec-quick-card .card-icon {
  font-size: 1.8rem;
}

.sec-quick-card .card-text {
  flex: 1;
}

.sec-quick-card .card-text strong {
  display: block;
  font-size: 0.92rem;
  color: var(--gold-light);
  margin-bottom: 0.2rem;
}

.sec-quick-card .card-text small {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.sec-quick-card .card-arrow {
  font-size: 1.2rem;
  color: var(--gold-primary);
}

/* ==========================================================================
   9. تبويبات لوحة تحكم المالك وأزرار التحكم في المدد والإعلانات (Owner Panel Tabs & Duration Controls)
   ========================================================================== */
.admin-pane {
  display: none;
}

.admin-pane.active {
  display: block;
}

.btn-admin-tab.active {
  border-color: var(--gold-primary) !important;
  background: rgba(212, 175, 55, 0.22) !important;
  color: #fae18b !important;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3) !important;
}

.admin-ctrl-btn-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.65rem;
}

.btn-ctrl-action {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  line-height: 1.2;
}

.btn-ctrl-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
}

.btn-ctrl-action.stop {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-ctrl-action.stop:hover {
  background: #dc2626;
  color: #fff;
}

.btn-ctrl-action.add-time {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.btn-ctrl-action.add-time:hover {
  background: #059669;
  color: #fff;
}

.btn-ctrl-action.sub-time {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-ctrl-action.sub-time:hover {
  background: #d97706;
  color: #fff;
}

.btn-ctrl-action.pin {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.btn-ctrl-action.pin:hover {
  background: #0284c7;
  color: #fff;
}

.badge-days-left {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 800;
}

.badge-days-left.featured {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-days-left.verified {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* لافتة التنبيه التوجيهي لصفة المستخدم الجديد لمنع خلط الحسابات */
.auth-role-guidance-banner {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(16, 185, 129, 0.08));
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
  text-align: right;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.auth-role-guidance-banner strong {
  color: var(--gold-light);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
}

.auth-role-guidance-banner .guidance-lawyer {
  color: #fae18b;
}

.auth-role-guidance-banner .guidance-citizen {
  color: #34d399;
}



/* --- HOTFIXES FOR Z-INDEX AND SEAMLESS SPACING --- */
.mobile-bottom-nav-container {
  z-index: 100000 !important;
}
.navbar {
  z-index: 100000 !important;
}

/* إلغاء أي هوامش أو فراغات رأسية مبالغ فيها عبر كافة أقسام الموقع */
.page-section {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.page-section.active-section {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  padding: 0.65rem 0 1.75rem !important;
  margin: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* قسم المطور وقسم الإشعارات: إلغاء الفراغ العلوي والبدء المباشر تحت الهيدر */
#developerSection,
#notificationsSection {
  display: none !important;
  visibility: hidden !important;
  position: relative;
  z-index: 5;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

#developerSection.active-section,
#notificationsSection.active-section {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  min-height: auto !important;
  padding: 0.4rem 0 1.5rem !important;
  margin: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
}

/* هوامش ذكية ومدمجة لإلغاء أي فراغات ميتة أعلى وأسفل المحتوى */
.section-header {
  margin-bottom: 0.85rem !important;
}

.section-breadcrumb-bar {
  margin-bottom: 0.5rem !important;
  padding: 0.35rem 0.85rem !important;
}

.section-ticker-bar {
  margin-bottom: 0.65rem !important;
}

.sec-notif-role-card {
  margin-bottom: 0.75rem !important;
  padding: 0.65rem 1rem !important;
}

.sec-notif-controls-bar {
  margin-bottom: 0.75rem !important;
}

.developer-card {
  padding: 1.5rem 1.25rem !important;
  margin-top: 0 !important;
  margin-bottom: 1.25rem !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 30px rgba(212,175,55,0.25) !important;
}

.notif-empty-state-card {
  padding: 2rem 1.25rem !important;
  margin: 1rem 0 !important;
  animation: fadeIn 0.3s ease-in-out;
}

/* إخفاء تام وصارم لأي عناصر أو حاويات فارغة لمنع الفجوات الوهمية (Ghost Spacing) */
.sec-notif-role-card:empty,
#secNotifRoleCard:empty,
#secNotificationsContainer:empty,
#devPropAlertMsg:empty,
#contractAuditResult:empty,
#visionDocResult:empty,
#voiceBriefResult:empty,
#docketDeadlineResultBox:empty,
#departmentsCardsGrid:empty,
#legalTemplatesGrid:empty,
#courtsDirectoryList:empty,
#lawyersDirectoryGrid:empty,
#inheritanceResultContainer:empty,
#laborResultContainer:empty,
#notaryResultContainer:empty,
#caseAnalysisResult:empty,
.training-content-area:empty,
.card-scale-container:empty {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  border: none !important;
}

/* تحسين أحجام الخطوط على شاشات الموبايل لمنع أي انكماش أو صغر مفرط */
@media (max-width: 768px) {
  .post-meta,
  .post-footer-tag,
  .attachment-title,
  .badge-author-you {
    font-size: 0.82rem !important;
  }
  .post-action-btn,
  .post-like-btn,
  .btn-download-attach {
    font-size: 0.8rem !important;
    padding: 0.35rem 0.65rem !important;
  }
  .section-breadcrumb-bar {
    font-size: 0.85rem !important;
  }
  .section-title {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem) !important;
  }
  .section-desc {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
  }
}

/* ==========================================================================
   أمان لوحة الإدارة والمالك - تظهر حصرياً للمالك braffo77@gmail.com
   ========================================================================== */
#openAdminLoginBtn,
#btnOwnerAdminPanel,
#dropdownOwnerAdminBtn,
.top-admin-badge-btn {
  display: none !important;
}

body.is-platform-owner #openAdminLoginBtn,
body.is-platform-owner #btnOwnerAdminPanel,
body.is-platform-owner #dropdownOwnerAdminBtn,
body.is-platform-owner .top-admin-badge-btn {
  display: inline-flex !important;
}

/* ==========================================================================
   الفصل التام بنسبة 100% بين منصة الموكل (بوابة 1) ومنصة المحامي (بوابة 2)
   ========================================================================== */
/* منصة الموكل: حجب وإخفاء تام لأي أدوات أو أقسام أو أزرار تخص المحامي */
body.portal-citizen #heroSection,
body.portal-citizen #caseAnalysisSection,
body.portal-citizen #trainingSection,
body.portal-citizen #legalSearchSection,
body.portal-citizen #departmentsSection,
body.portal-citizen #templatesSection,
body.portal-citizen #courtDocketSection,
body.portal-citizen #lawyerProSection,
body.portal-citizen #courtFeesSection,
body.portal-citizen #legalDocBuilderSection,
body.portal-citizen #caseMarketplaceSection,
body.portal-citizen #lawyerJobsSection,
body.portal-citizen #communitySection,
body.portal-citizen #simulatorSection,
body.portal-citizen .lawyer-portal-only,
body.portal-citizen .lawyer-nav-only,
body.portal-citizen #btnNavCreateAd {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* منصة المحامي: حجب قسم خدمات الموكلين التخصصي والروابط الخاصة به */
body.portal-lawyer #citizenHubSection,
body.portal-lawyer .citizen-portal-only,
body.portal-lawyer .citizen-nav-only {
  display: none !important;
}
