/* إعدادات عامة */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', sans-serif;
  background: #050816;
  color: #e5e7eb;
}

/* تخطيط الصفحة */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* الهيدر */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid #1f2937;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  color: #38bdf8;
}

/* القائمة */
.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  color: #9ca3af;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: #e5e7eb;
  border-color: #374151;
  background: #111827;
}

.nav-link.active {
  color: #e5e7eb;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-color: transparent;
}

/* المحتوى الرئيسي */
.main {
  flex: 1;
  padding: 32px 16px;
  max-width: 960px;
  margin: 0 auto;
}

/* قسم البطل (Hero) */
.hero {
  padding: 40px 24px;
  border-radius: 24px;
  background: radial-gradient(circle at top, #0f172a, #020617);
  border: 1px solid #1f2937;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.8);
}

.hero-title {
  font-size: 32px;
  margin-bottom: 12px;
  color: #f9fafb;
}

.hero-text {
  font-size: 15px;
  color: #9ca3af;
  margin-bottom: 24px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* الأزرار */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn.primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #f9fafb;
}

.btn.primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn.secondary {
  background: #111827;
  color: #e5e7eb;
  border-color: #374151;
}

.btn.secondary:hover {
  background: #020617;
}

/* الفوتر */
.footer {
  padding: 16px 32px;
  border-top: 1px solid #1f2937;
  background: #020617;
  font-size: 13px;
  color: #6b7280;
  text-align: center;
}

/* صفحات المحتوى (مثل posts.html, images.html, ...) */
.page-title {
  font-size: 44px;
  font-weight: 900;
  margin-bottom: 24px;
  line-height: 1.25;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}



.section {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 18px;
  background: #020617;
  border: 1px solid #1f2937;
}

/* قائمة المقالات */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  padding: 16px;
  border-radius: 16px;
  background: #020617;
  border: 1px solid #1f2937;
}

.post-title {
  font-size: 18px;
  margin-bottom: 8px;
  color: #e5e7eb;
}

.post-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.post-content {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.8;
}

/* معرض الصور */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.gallery img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid #1f2937;
  object-fit: cover;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery img:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.8);
}

/* الصوت والفيديو */
audio,
video {
  width: 100%;
  max-width: 640px;
  margin-bottom: 12px;
  border-radius: 16px;
  outline: none;
}

/* قائمة الملفات */
.files-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.files-list a {
  color: #38bdf8;
  text-decoration: none;
  font-size: 14px;
}

.files-list a:hover {
  text-decoration: underline;
}

/* تجاوب */
@media (max-width: 640px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hero {
    padding: 24px 16px;
  }

  .hero-title {
    font-size: 24px;
  }
}

.post-image {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid #1f2937;
}

.post-content {
  font-size: 20px;
  line-height: 2.4;
  color: #e5e7eb;
  white-space: pre-line;
}

.post-content p {
  margin-bottom: 20px;
}

.post-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #f9fafb;
}

.post-meta {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 20px;
}

.post-content p {
  margin-bottom: 20px;
}


.post-image {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 24px;
  border: 1px solid #1f2937;
}
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* الصور تتكيف مع الشاشة */
img {
    max-width: 100%;
    height: auto;
}

/* الفيديوهات تتكيف مع الشاشة */
video {
    max-width: 100%;
    height: auto;
}

/* الحاويات الأساسية */
.container {
    width: 100%;
    max-width: 900px;
    margin: auto;
    padding: 10px;
}

/* النصوص */
p, h1, h2, h3 {
    padding: 5px;
}

/* القوائم */
ul {
    padding-left: 20px;
}
@media (max-width: 600px) {
    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    p {
        font-size: 16px;
    }

    .container {
        padding: 5px;
    }
}
