
:root {
  /* Light Mode (default) */
  --bg: #ffffff;
  --bgSoft: #EEEEEE;
  --text: #222222;
  --textSoft: #666666;
  --primary: #CE5842;
  --secondary: #FFAB94;
  --border: #dddddd;
}

body.dark {
  /* Dark Mode */
  --bg: #1e1e1e;
  --bgSoft: #242424;
  --text: #f1f1f1;
  --textSoft: #aaaaaa;
  --primary: #B2422E;
  --secondary: #BF958D;
  --border: #333333;

}

/* إزاحة الفراغات من بداية الصفحة */
* {
  margin: 0;
  box-sizing: border-box;
}

/* لون الخط */
body {
  background: var(--bg);
  color: var(--text);
}


/* لون الرابط */
a {
  color: var(--primary);
  text-decoration: none;
}

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

.container {
  max-width: 700x;
  padding-left: 1rem;
  padding-right: 1rem;
  margin: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* NAVBAR START */

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  position: sticky;
  top: 0;
  background-color: var(--bg);
}
/* هنا وضع صورة الشعار📍 */
.logo {
  font-weight: bold;
  font-size: 24px;
  display: flex;
  margin-left: 10px;
}

/* روابط التروسة */
.links {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 18px;
}

/* الوضع المظلم والفاتح */
/* .toggle {
  width: 40px;
  height: 20px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: var(--bgSoft);
  border: 0.5px solid var(--textSoft);
  padding: 5px;
  position: relative;
}

.ball {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  position: absolute;
  left: 0;
  background-color: var(--textSoft);
  border: 1px solid var(--bgSoft);
}

.light .ball {
  left: unset;
  right: 0;
} */


/* NAVBAR END */

/* light and dark mood */



body.light-mode {
  background-color: var(--bgSoft);
  color: var(--text);
}

body.dark-mode {
  background-color: #1e1e1e;
  color: #f1f1f1;
}


/* FOOTER START */



.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  font-size: 14px;
  gap: 30px;
}

/* FOOTER END */

/* من هنا استطيع تعديل الصورة المصغرة للقصة المصورة والعنوان */
/* LIST START */

.listItem {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 50px;
}

.listItemImage {
  width: 200px;
  height: 200px;
  object-fit: cover;
}

.listItemTexts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* LIST END */

/* لتناسب جميع الشاشات */
/* @media (max-width: 1536px) {
  .container {
    max-width: 1366px;
  }
} */
/* @media (max-width: 1366px) {
  .container {
    max-width: 1280px;
  }
} */
/* @media (max-width: 1280px) {
  .container {
    max-width: 1024px;
  }
} */
/* @media (max-width: 1024px) {
  .container {
    max-width: 768px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .singleHeadImg {
    display: none;
  }

  .singleBottom {
    flex-direction: column-reverse;
  }

  .rightBarImg {
    display: none;
  }

  .rightBarImgHr {
    display: block;
    width: 100%;
  }
} */
@media (max-width: 768px) {
  .container {
    max-width: 640px;
  }
  .links {
    font-size: 14px;
  }

  .listItemImage {
    display: none;
  }

  .searchButton span{
    display: none;
  }
.stories-grid {
    display: flex;
    flex-direction: column;
    align-items: center; /* يوسّط البطاقات */
  }

  .story-card {
    width: 90%;
    max-width: 400px;
  }  

}
@media (max-width: 640px) {
  .container {
    max-width: 475px;
  }
   .story-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .story-info {
    max-width: 100%;
  }
.stories-grid {
    display: flex;
    flex-direction: column;
    align-items: center; /* يوسّط البطاقات */
  }

  .story-card {
    width: 90%;
    max-width: 400px;
  }

}


/* بطاقات الصفحة الرئيسية */

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
  
}

.story-card {
  background-color: #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  width: 250px;
  height: 430px;
  
}

.story-card:hover {
  transform: scale(1.03);
}

.story-card img {
  width: 100%;
  height: 350px;
  object-fit: cover;

}

.story-card h2 {
  font-size: 1.2rem;
  margin: 0.5rem;
  color: var(--primary);
  text-align: center;
}

.story-card p {
  font-size: 1rem;
  margin: 0 0.5rem 0.8rem;
  color:var(--secondary);
  text-align: center;
  font-weight: bold;
}



.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}


.story-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  background: var(--bg);
  transition: transform 0.2s ease, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.card img {
  width: 100%;
  height: 350px;
  object-fit: cover;
}

.card-body {
  /* background: var(--bg); */
  color: var(--text);
}

.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--secondary);
}


/* نهاية بطاقات الصفحة الرئيسية */

/* التدوينات */

.blog-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.blog-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  
}

.blog-title {
  font-size: 1.4rem;
  font-weight: bold;
  text-decoration: none;
  margin-right: 1rem;
}

.blog-title:hover {
  text-decoration: none;
  color: var(--secondary)
}

.blog-date {
  color: var(--textSoft);
  font-size: 0.9rem;
}

.blog-datein {
   margin-top: 0px;
   color: var(--textSoft);
}

h1 {
  margin: 0px;
  font-size: 2rem;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.post-card {
  flex: 1;
  min-width: 250px;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 2px 3px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 5px #ce5742be;
  
}

.post-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.post-card small {
  font-size: 0.8rem;
  color: var(--textSoft);
}

.post-card strong {
  font-size: 1.1rem;
  color: var(--text);
}

.blog-img {
  margin: 1.5rem auto;
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}


/* نهاية تنسيق التدوينات */

/* تنسيق الصفحة الرئيسية */
.intro-box {
 text-align: center;
  padding: 2rem;
}

.imh {
  display: block;
  margin: auto;
  width:50%;
}

.tran {
 text-align: center;
  padding : 4rem;
}
/* نهاية تنسيق الصفحة الرئيسية */

/* تنسيق قائمة القصة المصورة */
.story-details {
  padding: 2rem;
  color: var(--text);
  
}

.story-header {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.cover img {
  width: 160px;
  border-radius: 10px;
  box-shadow: 0 0 4px #000;
}

.story-info p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

hr {
  border: none;
  border-top: 2px solid #444;
  margin: 2rem 0;
}

.chapters-list {
  display: flex;
  flex-direction: column-reverse;
 
}

.chapter-box {
  background-color: var(--bg);
  border-radius: 2px;
  transition: background 0.2s;
}

.chapter-box:hover {
  background-color: var(--bgSoft);
}

.chapter-box a {
  color: var(--primary);
}

.chapters-list {
  display: flex;
  flex-direction: column;
}

/* .chapter-box {
  display: flex;
  align-items: center;
  border-radius: 2px;
  transition: background 0.2s;
  box-sizing: border-box;
}

.chapter-box:hover {
  background-color: var(--border);
}

.chapter-box img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  vertical-align: text-bottom;
}

.chapter-box span {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: bold;

} */

.chapter-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--bgSoft);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.3s;
  box-sizing: border-box;
}

.chapter-box:hover {
  background-color: var(--border);
  color: #fff;
}

.chapter-box img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  vertical-align: text-bottom;
}

.chapter-box span {
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: bold;

}

.ch_name {
  padding: 2%;
  text-align: center;
  color: var(--textSoft);
}

/*  نهاية تنسيق القصة المصورة */
/* تنسيق صفحة 404 */
.lost {
  text-align: center;
}
/* نهاية تنسيق صفحة 404 */

.site-wrapper {
  max-width: 650px;      /* أو 720px إذا تبين أضيق */
  margin: 0 auto;        /* يوسّط المحتوى */
  padding: 1rem;         /* فراغ داخلي بسيط */
  width: 100%;           /* ضروري عشان التوسيط يشتغل صح */
  box-sizing: border-box;
}
