:root {
  /* Professional Dark & Gold Palette */
  --primary-color: #0f172a;      /* Deep Navy instead of pure black */
  --accent-color: #f59e0b;       /* Warm Gold */
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --secondary-accent: #e11d48;   /* Rose/Red */
  --body-bg: #f8fafc;
  --white: #ffffff;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --link-color: #2563eb;
  
  /* Advanced Shadows */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  --radius: 12px; /* Smoother corners */
  --radius-sm: 8px;
  --radius-pill: 9999px;
  
  --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --primary-hover: #1e293b;
}


/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes revealLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-block {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

.reveal-block.active {
  opacity: 1;
  transform: translateY(0);
}


/* =======================================================
   إعدادات عامة
======================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Tajawal', 'Cairo', sans-serif;
}

body {
  background-color: var(--body-bg);
  color: var(--text-dark);
  line-height: 1.7;
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', sans-serif;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}
a:hover { color: var(--primary-hover); }

/* =======================================================
   الموقع العام (Public Layout - Motqdmon Style)
======================================================== */
.top-utility-bar {
  display: none;
}

.logo-section {
  background: var(--white);
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 20px;
  animation: revealRight 1s ease forwards;
}

.logo-section .logo-img {
  max-height: 160px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo-section .logo-img:hover {
  transform: scale(1.1);
}

.site-title-wrapper {
  flex: 1;
  display: flex;
  justify-content: flex-start; /* Left side in RTL */
  animation: revealLeft 1s ease forwards;
}

.site-title {
  font-family: 'Cairo', sans-serif;
  font-size: 2.0rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  position: relative;
  display: inline-block;
  border-left: 3px solid var(--accent-color); /* Typewriter cursor */
  padding-left: 10px;
  line-height: 1.2;
}

.site-title.typing-finished {
  border-left-color: transparent;
  animation: cursorBlink 0.05s step-end infinite;
}


.main-navbar {
  background: rgba(15, 23, 42, 0.9); /* Transparent Navy */
  backdrop-filter: blur(12px);     /* Glassmorphism */
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}
.main-navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}
.navbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}
.social-links-nav {
  display: flex;
  gap: 15px;
  align-items: center;
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 20px;
  margin-left: 5px;
}
.social-links-nav a {
  color: #94a3b8;
  font-size: 1.1rem;
  transition: var(--transition);
}
.social-links-nav a:hover {
  color: var(--accent-color) !important;
  transform: translateY(-3px);
}
.main-navbar ul {
  display: flex;
  list-style: none;
  gap: 5px;
}
.main-navbar ul li a {
  display: block;
  padding: 10px 18px;
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.main-navbar ul li a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--accent-color);
}
.main-navbar ul li a.home-btn {
  background: var(--accent-gradient);
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

/* Featured News Card Enhancements */
.featured-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  height: 400px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}
.featured-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 60%);
  z-index: 1;
}
.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.featured-card:hover img { transform: scale(1.1); }
.featured-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  color: #fff;
  z-index: 2;
}
.featured-card .category-label {
  background: var(--accent-gradient);
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  box-shadow: var(--shadow-md);
}

/* News Cards */
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.03);
}
.news-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}
.news-card .img-wrapper {
  overflow: hidden;
  height: 200px;
}
.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.news-card:hover img {
  transform: scale(1.1);
}

/* Section Header Style */
.section-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 35px;
  position: relative;
  padding-bottom: 12px;
}
.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: var(--radius-pill);
}
.section-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.05);
}
.section-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0;
}
/* Breaking News Ticker */
.breaking-news-ticker {
  animation: slideDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  position: relative;
  z-index: 10;
}

/* News List Item (Sidebar Style) */
.news-item-sm {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.news-item-sm:last-child { border: 0; }
.news-item-sm .thumb {
  width: 90px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: cover;
}
.news-item-sm .content h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #333;
  font-weight: 700;
}
.news-item-sm .content h4:hover { color: var(--link-color); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  padding: 8px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: var(--transition);
}
.btn-primary { background: var(--accent-color); color: #000; }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { background: transparent; border: 2px solid #000; color: #000; }
.btn-outline:hover { background: #000; color: #fff; }

.main-content {
  min-height: calc(100vh - 140px);
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* =======================================================
   لوحة التحكم (Dashboard Layout)
======================================================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* الشريط الجانبي */
.sidebar {
  width: 260px;
  background: var(--dark-color);
  color: var(--gray-200);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-700);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-header .logo { color: var(--white); }

.sidebar-menu {
  padding: 1rem 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-menu ul { list-style: none; }

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--gray-200);
  gap: 1rem;
  transition: var(--transition);
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-right: 4px solid var(--primary-color);
}

/* المحتوى الرئيسي للوحة التحكم */
.dashboard-content {
  flex: 1;
  margin-right: 260px; /* لترك مساحة للشريط الجانبي */
  display: flex;
  flex-direction: column;
  background: var(--gray-100);
}

.topbar {
  background: var(--white);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-content {
  padding: 2rem;
  flex: 1;
}

/* =======================================================
   البطاقات الإحصائية (Cards)
======================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--white);
}
.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.red { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-info h3 { font-size: 0.9rem; color: var(--gray-500); margin-bottom: 0.2rem; }
.stat-info p { font-size: 1.5rem; font-weight: 700; color: var(--dark-color); }

/* =======================================================
   نماذج الإدخال (Forms)
======================================================== */
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--gray-700); }
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* =======================================================
   الجداول (Tables)
======================================================== */
.table-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 1rem 1.5rem; text-align: right; border-bottom: 1px solid var(--gray-200); }
.table th { background: var(--gray-100); font-weight: 700; color: var(--gray-700); }
.table tr:hover { background: var(--gray-100); }

/* التنبيهات */
.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
