:root {
  --primary-color: #0a2540;
  --primary-light: #3b82f6;
  --accent-color: #f97316;
  --bg-light: #f8fafc;
  --text-light: #0f172a;
  --card-bg-light: #ffffff;
  --border-light: #e2e8f0;
  --shadow-light: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --header-height: 70px;
}

body.dark-mode {
  --primary-color: #0f172a;
  --primary-light: #60a5fa;
  --accent-color: #fb923c;
  --bg-light: #0f172a;
  --text-light: #f1f5f9;
  --card-bg-light: #1e293b;
  --border-light: #334155;
  --shadow-light: 0 4px 6px -1px rgb(0 0 0 / 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-light);
  line-height: 1.6;
  padding-top: var(--header-height);
  transition: background-color 0.3s, color 0.3s;
  direction: rtl;
}

/* HEADER STICKY */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--card-bg-light);
  box-shadow: var(--shadow-light);
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: 'Cairo', sans-serif;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.logo-main {
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: -0.5px;
}

.logo-360 {
  color: var(--accent-color);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
}

.hamburger, .dark-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.hamburger:hover, .dark-toggle:hover {
  background-color: var(--border-light);
}

.hamburger {
  margin-right: 0;
  margin-left: auto;
}

.dark-toggle {
  margin-left: 0;
  margin-right: auto;
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background-color: var(--card-bg-light);
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  z-index: 1001;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 1.5rem 0;
}

.sidebar.open {
  right: 0;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1.5rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-title {
  font-weight: 600;
  font-size: 1.2rem;
}

.sidebar-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-light);
  cursor: pointer;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section h3 {
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.nav-section ul {
  list-style: none;
}

.nav-section li {
  margin: 0.25rem 0;
}

.nav-section a, .nav-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.6rem 1.5rem;
  color: var(--text-light);
  text-decoration: none;
  transition: background 0.2s;
}

.nav-section a:hover {
  background-color: var(--border-light);
}

.sub-nav {
  padding-right: 2rem !important;
  font-size: 0.9rem;
}

.settings-group {
  padding: 0.75rem 1.5rem;
}

.settings-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.font-size-controls {
  display: flex;
  gap: 5px;
}

.font-size-btn {
  flex: 1;
  padding: 6px 0;
  background: var(--border-light);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-light);
}

.font-size-btn.active {
  background: var(--primary-light);
  color: white;
}

.region-select {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--card-bg-light);
  color: var(--text-light);
}

.toggle-setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-light);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* MAIN */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.page-title {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--primary-color), #2563eb);
  color: white;
  border-radius: 24px;
  padding: 3rem 2rem;
  margin-bottom: 3rem;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: white;
  color: var(--primary-color);
}

.btn-primary:hover {
  background: #e2e8f0;
}

.btn-outline {
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

.btn-large {
  display: block;
  width: fit-content;
  margin: 1.5rem 0;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-light);
  display: block;
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
  margin: 2rem 0;
}

.concours-card {
  background: var(--card-bg-light);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.concours-card:hover {
  transform: translateY(-4px);
}

.card-badge {
  display: inline-block;
  background: var(--primary-light);
  color: white;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-meta {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.deadline-countdown {
  background: var(--bg-light);
  padding: 0.5rem;
  border-radius: 8px;
  margin: 1rem 0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-link {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* SECTION HEADER */
.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: #64748b;
  margin-bottom: 1.5rem;
}

/* ARTICLE DETAIL */
.article-detail-container {
  background: var(--card-bg-light);
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-light);
}

.back-to-list {
  background: none;
  border: none;
  color: var(--primary-light);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-header {
  margin-bottom: 1.5rem;
}

.article-header h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.intro-text {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.image-placeholder {
  background: transparent;
  border: none;
  padding: 0;
  margin: 1.5rem 0;
  text-align: center;
}

/* تعديل حجم الصورة */
.image-placeholder img {
  max-width: 95%;
  height: auto;
  display: inline-block;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  background-color: #f1f5f9;
  padding: 0.5rem;
}

/* رابط نصي داخل المقال */
.text-link {
  color: var(--primary-light);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-light);
  transition: border 0.2s;
}

.text-link:hover {
  border-bottom: 1px solid var(--primary-light);
}

/* قائمة التنقل السريع */
.quick-nav {
  margin: 1rem 0 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
}

.quick-nav-label {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.95rem;
}

.quick-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
}

.quick-nav-link {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 1px dotted transparent;
  transition: border 0.2s;
}

.quick-nav-link:hover {
  border-bottom: 1px dotted var(--primary-light);
}

body.dark-mode .image-placeholder img {
  background-color: #1e293b;
}

.ad-container {
  background: #f1f5f9;
  border: 1px dashed #94a3b8;
  padding: 1rem;
  margin: 2rem 0;
  text-align: center;
  color: #64748b;
  border-radius: 8px;
}

.conditions-list, .pieces-list {
  padding-right: 1.5rem;
  margin: 1rem 0 2rem;
}

.conditions-list li, .pieces-list li {
  margin-bottom: 0.5rem;
}

/* SHARE ACTIONS */
.share-actions {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.share-actions span {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
}

.share-buttons-bottom {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s;
}

.share-btn.facebook {
  background: #1877f2;
  color: white;
}

.share-btn.whatsapp {
  background: #25d366;
  color: white;
}

.share-btn.copy {
  background: var(--border-light);
  color: var(--text-light);
}

.share-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* TABLE */
.salary-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg-light);
  border-radius: 12px;
  overflow: hidden;
}

.salary-table th, .salary-table td {
  padding: 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border-light);
}

.salary-table th {
  background: var(--primary-color);
  color: white;
}

/* CALENDAR */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.calendar-month {
  background: var(--card-bg-light);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-light);
}

.calendar-month h3 {
  margin-bottom: 1rem;
  color: var(--primary-light);
}

.event-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
}

/* SUGGESTIONS */
.suggestions-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.suggestions-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
  color: var(--primary-light);
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.suggestion-card {
  background: var(--bg-light);
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.suggestion-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-light);
}

.suggestion-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.5rem 0 0.25rem;
}

.suggestion-meta {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

/* FOOTER */
.site-footer {
  background: var(--card-bg-light);
  border-top: 1px solid var(--border-light);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
}

.copyright {
  color: #64748b;
  font-size: 0.9rem;
}

/* SCROLL TOP */
.scroll-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary-light);
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 99;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ERROR 404 */
.error-main {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-content h1 {
  font-size: 6rem;
  color: var(--primary-light);
}
/* تحسين تباعد النصوص داخل المقال */
.article-detail p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.article-detail ul li,
.article-detail ol li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-detail h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-detail .deadline-countdown {
  margin: 1.2rem 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-content h1 { font-size: 2rem; }
  .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .header-container { padding: 0 1rem; }
  .btn-large { width: 100%; text-align: center; }
}  
/* ========== PAGE CONTACT ========== */
.contact-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  margin-top: 1rem;
}

/* بطاقة النموذج */
.contact-form {
  background: var(--card-bg-light);
  padding: 2rem 2.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-light);
}

.form-group {
  margin-bottom: 1.8rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background-color: var(--bg-light);
  border: 2px solid var(--border-light);
  border-radius: 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-light);
  transition: all 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background-color: var(--card-bg-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form .btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.contact-form .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
}

/* بطاقة المعلومات */
.contact-info {
  background: var(--card-bg-light);
  padding: 2rem 2rem;
  border-radius: 24px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-light);
  height: fit-content;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--primary-light);
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.8rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.info-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  color: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.2);
}

.info-text p {
  margin-bottom: 0.2rem;
  font-weight: 500;
  word-break: break-word;
}

.info-text .label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* أيقونات التواصل الاجتماعي */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  justify-content: center;
}

.social-links a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: all 0.2s;
  border: 1px solid var(--border-light);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
  transform: translateY(-3px);
}

/* استجابة الجوال */
@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-form {
    padding: 1.8rem;
  }
  
  .contact-info {
    padding: 1.8rem;
  }
}

/* للتوافق مع RTL */
[dir="rtl"] .info-item {
  text-align: right;
}

[dir="rtl"] .contact-info h3 {
  text-align: right;
}