/* ================== الأساسيات العامة ================== */
body {
  margin: 0;
  font-family: 'Tajawal', Tahoma, sans-serif;
  background-color: #f5f7fa;
  direction: rtl;
  color: #222;
}
main {
  padding: 2rem;
}
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: #0077cc;
}

/* ================== الهيدر ================== */
header.topbar {
  background: #004080;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-weight: bold;
}

nav a {
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 8px;
}

nav a:hover {
  background-color: #0066cc;
  color: #fff;
}

nav a.active {
  background-color: #0077cc;
  color: #fff;
}

/* ================== البحث ================== */
.search-wrapper {
  position: relative;
  max-width: 250px;
  flex: 1;
}

#searchInput {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  font-size: 0.9rem;
}

#searchResults {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 6px;
  z-index: 1000;
  color: #000;
}

/* ================== الرئيسية (index.php) ================== */
.main-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.news-feed h2 {
  margin-bottom: 1rem;
  color: #004080;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-card .thumb {
  height: 180px;
  background-size: cover;
  background-position: center;
}

.news-content {
  padding: 1rem;
}

.news-content h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #004080;
}

.news-content p {
  font-size: 0.9rem;
  color: #555;
  margin: 0.5rem 0 1rem;
}

.news-content small {
  color: #999;
  font-size: 0.85rem;
}

/* ================== القائمة الجانبية ================== */
.sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #004080;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  margin-bottom: 0.8rem;
}

.sidebar a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
}

.sidebar a:hover {
  color: #0077cc;
}
/* ========== صفحة التفاصيل (article.php) ========== */
.article-container {
  width: 100%;
  max-width: 900px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
  .article-container {
    padding: 1rem;
    margin: 1rem;
  }

  .article-container h1 {
    font-size: 1.3rem;
  }

  .article-container .details {
    font-size: 1.2rem;
    line-height: 1.8;
  }

  .main-photo {
    width: 100% !important;
    height: auto;
  }

  .image-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
}

/* ================== الشاشات الصغيرة ================== */
@media (max-width: 768px) {
  .main-container {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar .logo {
    font-size: 1.4rem;
  }

  nav {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  nav a {
    font-size: 1.1rem;
    padding: 10px 14px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-content p {
    font-size: 1rem;
    line-height: 1.8;
  }

  .sidebar {
    margin-top: 2rem;
    padding: 1rem;
  }

  .search-wrapper {
    width: 100%;
  }

  #searchInput {
    font-size: 1rem;
  }
}


/* ================== معرض الصور في صفحة artical.php ================== */

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

.image-gallery a img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: transform 0.2s ease;
}

.image-gallery a img:hover {
  transform: scale(1.03);
}

/* تحسينات على الجوال */
@media (max-width: 768px) {
  .image-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

/* إصلاح ظهور أزرار Lightbox */
.lb-prev, .lb-next {
  opacity: 1 !important;
  z-index: 9999;
}

.lb-prev:hover, .lb-next:hover {
  opacity: 1 !important;
}

.lb-nav a.lb-prev {
  left: 10px !important;
}

.lb-nav a.lb-next {
  right: 10px !important;
}

/* حجم أوضح للسهم */
.lb-prev, .lb-next {
  width: 50px !important;
  height: 50px !important;
  background-size: 100% 100% !important;
}
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.image-gallery img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ccc;
  transition: transform 0.2s ease;
}

.image-gallery img:hover {
  transform: scale(1.03);
}



/* هىيثءزحاح -*/
.latest-slider-section {
  margin: 2rem auto;
  max-width: 1280px;
  padding: 0 1rem;
}

.latest-slider-section h2 {
  color: #004080;
  margin-bottom: 1rem;
}

.slider-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  text-align: center;
}

.slider-card:hover {
  transform: translateY(-5px);
}

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

.slider-card .caption {
  padding: 0.8rem;
  font-size: 0.95rem;
  color: #004080;
  font-weight: bold;
}
.instagram-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  text-align: center;
}

.instagram-section h2 {
  color: #004080;
  margin-bottom: 1rem;
}

.instagram-embed iframe {
  width: 100%;
  min-height: 450px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
/* ===== شريط الأخبار المتحرك ===== */
.news-ticker-wrapper {
  background: #004080;
  color: white;
  overflow: hidden;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid #0077cc;
  position: relative;
  direction: rtl;
}

.news-ticker {
  display: inline-block;
  animation: ticker-scroll-rtl 30s linear infinite;
}

.news-ticker:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: inline-block;
  margin-right: 3rem;
  font-size: 0.95rem;
}

.ticker-item a {
  color: #ffeb3b;
  text-decoration: none;
}

.ticker-item a:hover {
  text-decoration: underline;
}

@keyframes ticker-scroll-rtl {
  0%   { transform: translateX(-40%); }
  100% { transform: translateX(100%); }
}

.breaking-box {
  display: flex;
  align-items: center;
  background-color: #ffebee;
  border: 2px solid #f44336;
  color: #b71c1c;
  padding: 1rem;
  border-radius: 12px;
  margin: 2rem auto 1rem;
  max-width: 1280px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.breaking-label {
  background-color: #f44336;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: bold;
  margin-left: 1rem;
  white-space: nowrap;
}

.breaking-text {
  font-size: 1rem;
  line-height: 1.6;
  flex: 1;
}

/* ===== Main Menu Mobile ===== */
/* قائمة الجوال */
.mobile-menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: white;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1rem;
  background: #004080;
  padding: 1rem;
  border-radius: 8px;
}

.mobile-nav a {
  color: white;
  font-weight: bold;
  padding: 8px;
  border-bottom: 1px solid #ffffff33;
}

@media (max-width: 768px) {
  nav { display: none; } /* إخفاء قائمة الكمبيوتر */
  .mobile-menu-toggle { display: block; }
  .mobile-nav { display: none; } /* تظهر فقط عند الضغط */
  .mobile-nav.active { display: flex; }
}





aside.sidebar {
  font-size: 1rem; /* الخط الافتراضي للكمبيوتر */
  line-height: 1.8;
}

aside.sidebar ul li a {
  font-size: 1rem;
  color: #333;
}

aside.sidebar ul li a:hover {
  color: #0077cc;
  font-weight: bold;
}

/* ✅ حجم الخط للجوال */
@media (max-width: 768px) {
  aside.sidebar {
	    line-height: 1;

    font-size: 1.2rem;
  }

  aside.sidebar ul li a {
    font-size: 1.2rem;
  }
}
.article-container img.main-photo {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
  border-radius: 12px;
  margin: 1rem 0;
  object-fit: contain;
}








@media (max-width: 768px) {
  .article-container {
    padding: 1rem;
    margin: 1rem auto;
    box-sizing: border-box;
    width: 100%;
  }

  .article-container h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  .article-container .meta {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }

  .article-container .details {
    font-size: 1.2rem;
    line-height: 1.8;
    word-wrap: break-word;
  }

  .article-container .main-photo {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1rem auto;
    border-radius: 12px;
    object-fit: contain;
  }

  .image-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .image-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
  }
}












