
/* === القواعد العامة === */
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
  background-color: #f0f0f0;
  overflow-x: hidden;
  width: 100%;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 15px;
}

/* === الهيدر === */
header {
  background-color: #fff;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ddd;
  flex-wrap: wrap;
}
.logo {
  height: 80px;
}
.ad-banner img {
  height: 80px;
  object-fit: contain;
}

/* === التنقل === */
nav {
  background-color: #004080;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  flex-direction: row-reverse;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}
.social-icons {
  display: flex;
  gap: 10px;
}
.social-icons a {
  color: #fff;
  font-size: 20px;
  text-decoration: none;
}

/* === الأخبار العاجلة === */
.breaking-news {
  display: flex;
  align-items: center;
  background-color: #c62828;
  color: #fff;
  padding: 10px;
  position: relative;
  flex-wrap: wrap;
}
.breaking-news .label {
  font-weight: bold;
  margin-left: 15px;
  white-space: nowrap;
}
.breaking-news .news-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 30px;
}
.breaking-news .news {
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
.breaking-news .news.active {
  opacity: 1;
}
.breaking-news .news a {
  color: white;
  text-decoration: none;
}
.breaking-news .controls {
  display: flex;
  flex-direction: column;
  margin-right: 10px;
}
.breaking-news .controls button {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 2px;
}

/* === محتوى الصفحة === */
.main-boxed {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: #fdfdfd;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-radius: 8px;
}
.main-boxed img {
  display: block;
  margin: 0 auto;
}

/* === السلايدر والراعي الرسمي (الصفحة الرئيسية) === */
.slider-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.custom-slider {
  flex: 2;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  height: 450px;
}
.custom-slide {
  display: none;
  position: absolute;
  height: 100%;
  width: 100%;
}
.custom-slide.active {
  display: block;
  position: relative;
}
.custom-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.custom-slide .caption {
  position: absolute;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  color: #FFF;
  width: 100%;
  padding: 10px;
  font-weight: bold;
  font-size: 20px;
  text-align: center;
}
.slider-buttons {
  position: absolute;
  width: 100%;
  top: 50%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 1;
}
.slider-buttons button {
  background-color: rgba(0, 0, 0, 0.4);
  border: none;
  color: white;
  font-size: 24px;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
}
.sponsor {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 10px;
  height: 450px;
}
.sponsor p {
  font-weight: bold;
  font-size: 18px;
  background: #004080;
  color: white;
  padding: 8px;
  border-radius: 5px;
  margin: 0 0 10px;
  text-align: center;
}
.sponsor img {
  width: 100%;
  height: calc(100% - 50px);
  object-fit: cover;
  border-radius: 5px;
}

/* === معرض الصور === */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}
.gallery img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
}
.gallery img:hover {
  transform: scale(1.05);
}

/* === صفحة الفاعلية === */
.event-single {
  max-width: 900px;
  margin: 30px auto;
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  line-height: 1.8;
  color: #333;
  font-size: 18px;
  direction: rtl;
  text-align: right;
}
.event-single img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
}
.event-single h1,
.event-single h2,
.event-single h3 {
  color: #004080;
  margin-top: 20px;
}
.event-single p {
  margin-bottom: 15px;
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  display: none;
  justify-content: center;
  align-items: center;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0,0,0,0.8);
  z-index: 1000;
}
.lightbox img {
  max-width: 90%;
  max-height: 80%;
}
.lightbox .close-btn {
  position: absolute;
  top: 20px;
  left: 30px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}
.lightbox .controls {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 15px;
}
.lightbox .controls button {
  padding: 10px 20px;
  font-size: 18px;
  background-color: white;
  border: none;
  cursor: pointer;
}

/* === الفوتر === */
footer {
  background: #004080;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

/* === Responsive === */
@media (max-width: 768px) {
  header, nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-boxed, .event-single {
    padding: 10px;
  }
  .slider-wrapper {
    flex-direction: column;
  }
  .sponsor, .custom-slider {
    width: 100%;
    height: auto;
  }
  .gallery img {
    width: 100%;
    height: auto;
  }
}
