/* ===== الأنماط الأساسية ===== */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@400;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #2E7D32;
  --secondary-color: #D4AF37;
  --background-color: #F5F5F5;
  --text-color: #333333;
  --accent-color: #81D4FA;
  --white: #FFFFFF;
  --light-gray: #EEEEEE;
  --dark-gray: #666666;
  --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
}

body {
  font-family: 'Tajawal', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

/* ===== العناوين والنصوص ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Amiri', serif;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

ul, ol {
  margin-right: 2rem;
  margin-bottom: 1rem;
}

/* ===== الحاويات ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 3rem 0;
}

.card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ===== القائمة العلوية ===== */
.navbar {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-left: 10px;
}

.logo-text {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-right: 1.5rem;
}

.nav-links a {
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  padding: 0.5rem;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
  border-bottom: 2px solid var(--secondary-color);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* ===== القسم الرئيسي ===== */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-banner.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
  padding: 5rem 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--white);
}

.hero p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* ===== أقسام الصفحة الرئيسية ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
}

.cta-section {
  background-color: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta-section h2 {
  color: var(--white);
  border-bottom: none;
}

/* ===== صفحات المحتوى ===== */
.content-page {
  padding: 2rem 0;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
}

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

.sidebar {
  position: sticky;
  top: 100px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-title {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}

.sidebar-links {
  list-style: none;
  margin-right: 0;
}

.sidebar-links li {
  margin-bottom: 0.5rem;
}

.sidebar-links a {
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.sidebar-links a:hover, .sidebar-links a.active {
  background-color: var(--light-gray);
}

/* ===== الجداول ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.75rem;
  text-align: right;
  border-bottom: 1px solid var(--light-gray);
}

th {
  background-color: var(--primary-color);
  color: var(--white);
}

tr:nth-child(even) {
  background-color: var(--light-gray);
}

/* ===== نموذج الاتصال ===== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* ===== تذييل الصفحة ===== */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

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

.footer-logo {
  margin-bottom: 1rem;
}

.footer h3 {
  color: var(--white);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}

.footer-links {
  list-style: none;
  margin-right: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--white);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.social-links {
  display: flex;
  list-style: none;
  margin-right: 0;
}

.social-links li {
  margin-left: 1rem;
}

.social-links a {
  color: var(--white);
  font-size: 1.5rem;
}

.social-links a:hover {
  color: var(--secondary-color);
}

.copyright {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== زر العودة للأعلى ===== */
.back-to-top {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background-color: var(--primary-color);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
}

/* ===== وضع القراءة الليلي ===== */
body.dark-mode {
  background-color: #121212;
  color: #E0E0E0;
}

body.dark-mode .navbar,
body.dark-mode .card,
body.dark-mode .sidebar {
  background-color: #1E1E1E;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: var(--secondary-color);
}

body.dark-mode a {
  color: var(--accent-color);
}

body.dark-mode a:hover {
  color: var(--secondary-color);
}

body.dark-mode .nav-links a {
  color: #E0E0E0;
}

body.dark-mode .btn {
  background-color: var(--secondary-color);
  color: #121212;
}

body.dark-mode .btn:hover {
  background-color: var(--accent-color);
}

body.dark-mode th {
  background-color: var(--secondary-color);
  color: #121212;
}

body.dark-mode tr:nth-child(even) {
  background-color: #2A2A2A;
}

/* ===== الاستجابة للشاشات المختلفة ===== */
@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
    padding: 1rem;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    display: none;
  }
  
  .nav-links.show {
    display: flex;
  }
  
  .nav-links li {
    margin-right: 0;
    margin-bottom: 0.5rem;
    text-align: center;
  }
  
  .mobile-menu-btn {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
}
