/* === القواعد العامة والخطوط === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Cairo', sans-serif;
}
body.background {
  min-height: 100vh;
  background: linear-gradient(
      180deg,
      rgba(0, 40, 85, 0.7) 0%,
      rgba(2, 117, 216, 0.85) 70%,
      rgba(0, 20, 50, 0.85) 100%
    ),
    url('assets/background.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #f0f0f5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* === روابط عامة === */
a {
  text-decoration: none;
  color: #a4d7ff;
  transition: color 0.3s ease;
}
a:hover {
  color: #fff;
}

/* === شريط الأخبار === */
.news-ticker {
  background-color: rgba(10, 75, 140, 0.95);
  color: #d0eaff;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  box-shadow: 0 3px 10px rgba(2, 117, 216, 0.7);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  z-index: 10;
}

/* === الهيدر === */
header {
  background: rgba(8, 44, 85, 0.85);
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
  border-radius: 0 0 20px 20px;
  transition: padding 0.3s ease, box-shadow 0.3s ease;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* === لوجو وشعار === */
.logo {
  display: flex;
  align-items: center;
  gap: 1.3rem;
  flex: 1 1 auto;
}
.logo img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 140, 255, 0.7);
  transition: transform 0.3s ease;
}
.logo img:hover {
  transform: scale(1.08) rotate(4deg);
}
.logo h1 {
  font-weight: 900;
  font-size: 1.8rem;
  color: #dbe9ff;
  text-shadow: 0 0 15px rgba(30, 90, 160, 0.8);
  white-space: nowrap;
}
.logo p {
  font-weight: 400;
  font-size: 0.9rem;
  color: #c2d8f9;
  margin-top: 4px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* === القائمة === */
nav {
  flex: 1 1 100%;
  margin-top: 0.8rem;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 2.8rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0;
}
nav ul li a {
  font-weight: 600;
  font-size: 1.1rem;
  padding: 0.2rem 0.5rem;
  border-radius: 7px;
  color: #a3caff;
  transition: all 0.3s ease;
}
nav ul li a:hover,
nav ul li a.active {
  color: #fff;
  box-shadow: inset 0 -4px 0 #1a90ff;
}

/* === البانر الرئيسي === */
.hero {
  background: rgba(8, 35, 80, 0.5);
  padding: 2rem;
  border-radius: 25px;
  box-shadow: 0 0 40px rgba(30, 90, 160, 0.9);
  margin: 2rem 1rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.org-banner {
  flex: 1 1 400px;
  text-align: center;
}
.org-banner img {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
}

/* === العبارات المتغيرة === */
.animated-phrases-container {
  margin-top: 1rem;
  overflow: hidden;
  height: 2.5em;
  position: relative;
}
.animated-phrases span {
  display: none;
  font-size: 1.2em;
  color: #fff;
}
.animated-phrases span.active {
  display: block;
  animation: fadeIn 1s ease-in-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === الإحصائيات (بالإنجليزية ولانهائية) === */
.stats {
  display: flex;
  justify-content: space-around;
  margin: 3rem auto 4rem;
  max-width: 900px;
  background: rgba(15, 55, 110, 0.6);
  padding: 1.5rem 2rem;
  border-radius: 25px;
  box-shadow: 0 0 25px rgba(30, 90, 160, 0.8);
  color: #c9e1ff;
  gap: 1rem;
  flex-wrap: wrap;
  direction: ltr;
  unicode-bidi: isolate;
  font-feature-settings: "lnum";
}
.stat-box {
  flex: 1 1 200px;
  text-align: center;
  padding: 0.8rem 1rem;
  border-radius: 20px;
  background: rgba(40, 95, 170, 0.4);
  box-shadow: 0 4px 18px rgba(0, 85, 170, 0.5);
  transition: background-color 0.3s ease;
  margin: 0.5rem;
}
.stat-box:hover {
  background: rgba(40, 120, 210, 0.7);
  color: #e3f0ff;
  box-shadow: 0 6px 25px rgba(40, 120, 210, 0.9);
}
.stat-box h3 {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
  text-shadow: 0 0 8px #99c8ff;
}
.stat-box p {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

/* === البطاقات === */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  max-width: 1150px;
  margin: 0 auto 5rem;
  padding: 0 1rem;
}
.card {
  background: rgba(25, 70, 140, 0.6);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 75, 170, 0.7);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 14px 45px rgba(0, 110, 255, 0.9);
}
.card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #0a2550;
  padding: 1rem;
}
.card-body {
  padding: 1.2rem 1rem;
  color: #cce6ff;
  text-align: center;
}
.card-body h4 {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  text-shadow: 0 0 7px #71aaff;
}
.card-body a {
  display: inline-block;
  color: #86bfff;
  font-weight: 600;
  border: 2px solid #65aaff;
  padding: 0.25rem 1rem;
  border-radius: 30px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.card-body a:hover {
  background-color: #2a69ff;
  color: #fff;
}

/* === الفوتر === */
footer {
  background: rgba(8, 40, 85, 0.9);
  color: #c1d9f7;
  padding: 3rem 2rem 2rem;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  box-shadow: inset 0 15px 20px rgba(255, 255, 255, 0.1);
}

/* === استجابة الشاشات === */
@media (max-width: 950px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
  }
  nav ul {
    gap: 1.2rem;
    justify-content: center;
  }
}
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 1.5rem;
  }
  .org-banner,
  .hero-video {
    flex: 1 1 100%;
  }
}
@media (max-width: 480px) {
  nav ul {
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
  }
  nav ul li a {
    font-size: 0.85rem;
    padding: 0.2rem 0.4rem;
  }
}

.hero-image-section {
  width: 100%;
  max-width: 1200px;
  margin: 30px auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}