/* ========== الخط العام ========== */
* {
font-family: 'Cairo', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

/* ========== الجسم العام ========== */
body {
  font-size: 16px;
  line-height: 1.6;
  background-color: #f8f9fa;
  color: #212529;
  margin: 0;
  overflow-x: hidden;
  direction: rtl;
  text-align: right;
}

/* ========== العناوين ========== */
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 600; }
h3, h4, h5 { font-size: 1.1rem; font-weight: 500; }

/* ========== البنر ========== */
.admin-banner {
  background-color: #d5ffb0 !important;
}

/* ========== البطاقات ========== */
.card {
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.card:hover {
  transform: translateY(-5px);
}
.card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
}
.card .card-text {
  font-size: 1rem;
  font-weight: 400;
}
.card-footer {
  text-align: center;
}

/* ========== الفوتر ========== */
footer {
  background-color: #2f732f;
  color: white;
  padding: 10px 0;
  text-align: center;
}
footer h5 {
  margin-bottom: 8px;
  font-size: 1rem;
}
footer .social-links i {
  font-size: 1.5rem;
  transition: transform 0.2s ease;
}
footer .social-links i:hover {
  transform: scale(1.2);
}
footer a {
  color: #c8e6c9;
}
footer a:hover {
  color: white;
}

/* ========== أزرار التحكم ========== */
.btn-square {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 6px;
  flex-shrink: 0;
  gap: 2px;
}

/* ========== قائمة التنقل ========== */
#nav-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  flex-direction: row-reverse;
  justify-content: flex-start;
}
body.ltr #nav-menu {
  flex-direction: row;
  justify-content: flex-start;
}
#nav-menu .nav-link {
  color: white;
  font-weight: bold;
  font-size: 16px;
  transition: background 0.3s;
  padding: 10px 15px;
}
#nav-menu .nav-link:hover {
  background-color: #1b5e20;
}

/* ========== الوضع الليلي ========== */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}
body.dark-mode .card,
body.dark-mode .contact-form,
body.dark-mode .admin-content {
  background-color: #1e1e1e;
  color: #e0e0e0;
}
body.dark-mode nav {
  background-color: #1b5e20;
}
body.dark-mode a,
body.dark-mode .admin-sidebar a {
  color: #90caf9;
}
body.dark-mode .admin-sidebar a:hover {
  background-color: #333;
}
body.dark-mode table th,
body.dark-mode table td {
  background-color: #222;
  color: #fff;
  border-color: #444;
}
body.dark-mode .btn {
  background-color: #2e7d32;
}
body.dark-mode footer {
  background-color: #1b5e20;
  color: #e0e0e0;
}

/* ========== حجم الخط الكبير ========== */
body.large-font {
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ========== اتجاه اللغة ========== */
body.rtl { direction: rtl; text-align: right; }
body.ltr { direction: ltr; text-align: left; }
body.ltr .text-end { text-align: left !important; }
body.ltr .text-start { text-align: right !important; }
body.rtl #nav-menu { flex-direction: row-reverse; justify-content: flex-start; }
body.ltr #nav-menu { flex-direction: row; justify-content: flex-start; }

/* ========== قائمة الجوال (hamburger) ========== */
#menu-toggle {
  display: none;
}
@media (max-width: 992px) {
  #menu-toggle {
    display: inline-block;
  }
  #nav-menu {
    display: none;
    flex-direction: column;
    background-color: #2f732f;
    width: 100%;
    margin-top: 10px;
  }
  #nav-menu.active {
    display: flex;
  }
  #nav-menu .nav-link {
    padding: 10px;
    border-bottom: 1px solid #ccc;
  }
}

/* ========== استجابة عامة ========== */
@media (max-width: 768px) {
  #nav-menu {
    justify-content: center !important;
  }
  nav .d-flex.gap-2 {
    justify-content: center;
    width: 100%;
  }
}

/* ========== طباعة ========== */
@media print {
  body * {
    visibility: hidden;
  }
  .container, .container * {
    visibility: visible;
  }
  .container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: white;
  }
  footer, nav, .btn, .admin-sidebar {
    display: none !important;
  }
}

/* ========== صورة السلايدر المتجاوبة ========== */
.slider-img {
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  height: 260px;
}
@media (max-width: 768px) {
  .slider-img {
    height: 200px;
  }
}
@media (min-width: 1200px) {
  .slider-img {
    height: 300px;
  }
}
