/* =======================
   التنسيقات العامة
======================= */
body {
  margin: 0;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background: #f5f7fa;
  color: #222;
  line-height: 1.7;
}

h2 {
  position: relative;
  display: inline-block;
  color: #004aad;
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 1.7rem;
  margin-top: 2rem;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -8px; /* مسافة تحت العنوان */
  left: 0;
  width: 100%;
  height: 6px; /* ارتفاع الخط */
  background: linear-gradient(
    to right,
    #004aad 0%,
    #004aad 40%,
    #a3c1ff 100%
  );
  transform: skew(-20deg);
  border-radius: 3px;
}



header {
  background-color: #004aad;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  flex-wrap: wrap;
  color: white;
  gap: 15px;
}

.header-logos {
  display: flex;
  align-items: center;
}

.header-logos img {
  height: 60px;
}


.f-logos {
  display: flex;
  justify-content: center; /* توسيط أفقي */
  align-items: center;     /* توسيط عمودي إذا كان فيه ارتفاع محدد */
  text-align: center;
}

.f-logos img {
  height: 100px;
}


nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav ul li {
  font-weight: bold;
}

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
  display: inline-block;
}

nav ul li a:hover,
nav ul li a.active,
nav ul li a:focus {
  background-color: #003177;
  text-decoration: none;
  outline: none;
}
nav ul li a:focus {
  outline: 2px solid #003177;
  outline-offset: 2px;
}

/* =======================
   المحتوى الرئيسي
======================= */
.main-content {
  width: 90vw;       /* 90% من عرض الشاشة */
  max-width: none;   /* إزالة الحد الأقصى */
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 400px;
  display: flex;     /* غيرت من block إلى flex */
  gap: 30px;         /* الآن gap فعال */
  flex-direction: column; /* لو تحتاج عمودي، ممكن تغير */
}

.content-container {
  position: relative; /* مهم لاحتواء العنصر المطلق */
  width: 100%;
  max-width: none;
  margin: 0 auto;
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.container-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 50px; /* حجم الصورة */
  height: 50px;
  object-fit: contain;
  pointer-events: none; /* الصورة غير قابلة للنقر */
}

.content-container, main {
  width: 100%;       /* يشغل كامل عرض .main-content */
  max-width: none;
  margin: 0 auto;
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.content-container h2, main h2 {
  color: #004aad;
  margin-bottom: 15px;
  font-weight: 700;
  font-size: 1.7rem;
  margin-top: 2rem;
}

.content-container p,
.content-container li {
  font-weight: 400;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.content-container ul {
  padding-right: 20px;
  margin-bottom: 20px;
  list-style: inside disc;
}

.content-container ul li {
  margin-bottom: 10px;
}

.content-container a {
  color: #004aad;
  text-decoration: underline;
  transition: color 0.3s;
}

.content-container a:hover {
  color: #002d75;
}

/* أقسام داخل الصفحة (مثل البطاقات) */
.sections-wrapper {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* للسماح بانتقال الأسطر */
  justify-content: center;
}
.section {
  position: relative;
  flex: 1 1 calc(25% - 20px);
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s;
  min-width: 280px;
  max-width: 100%;
}

/* الصورة العلوية اليمين */
.section-icon-top {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  object-fit: contain;
  pointer-events: none;
}

/* الصورة السفلية اليسار */
.section-icon-bottom {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 50px;
  height: 50px;
  object-fit: contain;
  pointer-events: none;
}

/* حجم الصور الصغيرة في الشاشات الصغيرة */
@media (max-width: 480px) {
  .section-icon-top,
  .section-icon-bottom {
    width: 40px;
    height: 40px;
  }
}

.section:hover {
  transform: translateY(-5px);
}

.section h2 {
  color: #004aad;
  margin-bottom: 15px;
}

.section a {
  color: inherit;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.section a:hover {
  text-decoration: underline;
}

/* ✅ استجابة الجوال: قسمين بالصف */
@media (max-width: 768px) {
  .section {
    flex: 1 1 calc(50% - 20px);
  }
}

/* ✅ استجابة الشاشات الصغيرة جداً */
@media (max-width: 480px) {
  .section {
    flex: 1 1 100%;
  }
}

/* تصميم أيقونات التبرع */
.donation-icons {
  display: flex;
  gap: 15px; /* مسافة بين الأيقونات */
  justify-content: center; /* توسيط الأيقونات أفقياً */
  flex-wrap: wrap; /* تسمح بالانتقال لسطر جديد على الشاشات الضيقة */
  margin-top: 15px;
}

.donation-icons a {
  background-color: #e5efff;
  color: #004aad;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s;
  text-align: center;

  /* العرض الأساسي */
  width: 160px;
  height: 55px;
}

/* في الشاشات الصغيرة: خلي الزرين يصفون بجانب بعض */
@media (max-width: 600px) {
  .donation-icons a {
    width: 48%;
    min-width: unset;
    max-width: unset;
  }
}

.donation-icons a:hover {
  background-color: #d2e5ff;
  color: #002d75;
}

.donation-icons a .fa, 
.donation-icons a .fas {
  font-size: 20px;
}

/* =======================
   معرض الصور والفيديوهات
======================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* صور كبيرة في الشاشات الكبيرة */
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.gallery img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
}

.gallery img:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* تجاوب الصور */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* صور متوسطة الحجم */
  }
  .gallery img {
    max-height: 280px;
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr; /* عمود واحد في الجوال */
  }
  .gallery img {
    max-height: 220px;
    border-radius: 12px;
  }
}

.videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 فيديوهات في الصف */
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* تجاوب الفيديوهات: 3 في الكبيرة، 2 في المتوسطة، 1 في الصغيرة */
@media (max-width: 992px) {
  .videos {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .videos {
    grid-template-columns: 1fr;
  }
}

/* باقي التنسيقات كما هي */
.video-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

.video-box button {
  padding: 8px 20px;
  background-color: #004aad;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s;
}

.video-box button:hover {
  background-color: #0063e0;
}

/* =======================
   الفوتر
======================= */
footer {
  background-color: #f0f0f0;
  padding: 40px 30px 10px;
  font-size: 0.95rem;
  color: #444;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.contact-info {
  max-width: 30%;
  min-width: 280px;
}

.contact-info h4 {
  margin-bottom: 10px;
  color: #004aad;
}

.contact-info p {
  margin: 5px 0;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.contact-info p i {
  margin-left: 8px;
  font-size: 10px;
  color: #004aad;
  min-width: 22px;
  text-align: center;
}

.social-media {
  max-width: 30%;
  min-width: 280px;
  text-align: center;
}

.social-media h4 {
  color: #004aad;
  margin-bottom: 10px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  font-size: 26px;
  flex-wrap: wrap;
}

.social-icons a {
  color: #004aad;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #002d75;
}

.map {
  max-width: 35%;
  min-width: 280px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  flex-grow: 1;
  height: 250px;
}

.map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: #666;
}

/* =======================
   تجاوب الهواتف
======================= */
@media (max-width: 768px) {
  .main-content {
    width: 95vw;
    padding: 20px;
    flex-direction: column;
  }
  nav ul {
    flex-direction: column;
    gap: 12px;
  }
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .contact-info, .map, .social-media {
    max-width: 100%;
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  }
  .contact-info, .map {
    height: 300px;
  }
}

@media (max-width: 600px) {
  header img {
    height: 45px;
  }
}

@media (max-width: 400px) {
  header img {
    height: 40px;
  }
  nav ul li a {
    padding: 5px 10px;
    font-size: 14px;
  }
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.news-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.news-card:hover {
  transform: translateY(-6px);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card-body {
  padding: 15px;
}

.news-card-body h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #004aad;
}

.news-card-body .date {
  font-size: 13px;
  color: #888;
  margin-top: 8px;
}

.news-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin-top: 30px;
}

.news-form label {
  font-weight: bold;
  color: #004aad;
}

.news-form input,
.news-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-family: inherit;
}

.news-form button {
  background-color: #004aad;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.news-form button:hover {
  background-color: #00337f;
}
/* شريط الأخبار المتحرك */
.news-ticker {
  width: 100%;
  background-color: #004aad;
  color: white;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  padding: 10px 0;
  font-weight: bold;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  direction: rtl;
  position: relative;
  border-radius: 8px;
  margin-bottom: 30px;
}

.news-ticker__content {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 20s linear infinite;
}

.news-ticker__content span {
  margin: 0 40px;
  font-size: 1.1rem;
  display: inline-block;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* باقي التنسيقات للصفحة الرئيسية */
/* استورد هنا تنسيقات sections-wrapper, section, donation-icons, وغيرها */

.sections-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.section {
  position: relative;
  flex: 1 1 calc(25% - 20px);
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s;
  min-width: 280px;
  max-width: 100%;
}

.section-icon-top {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  object-fit: contain;
  pointer-events: none;
}

.section-icon-bottom {
  position: absolute;
  bottom: 10px;
  left: 10px;
  width: 50px;
  height: 50px;
  object-fit: contain;
  pointer-events: none;
}

.section:hover {
  transform: translateY(-5px);
}

.section h2 {
  color: #004aad;
  margin-bottom: 15px;
}

.section a {
  color: inherit;
  text-decoration: none;
  display: block;
  cursor: pointer;
}

.section a:hover {
  text-decoration: underline;
}

.donation-icons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 15px;
}

.donation-icons a {
  background-color: #e5efff;
  color: #004aad;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s;
  width: 160px;
  height: 55px;
}

.donation-icons a:hover {
  background-color: #d2e5ff;
  color: #002d75;
}

.donation-icons a .fa, 
.donation-icons a .fas {
  font-size: 20px;
}

/* تجاوب */
@media (max-width: 768px) {
  .section {
    flex: 1 1 calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .section {
    flex: 1 1 100%;
  }
}

.news-ticker__content {
  display: inline-block;
  padding-left: 100%;
  animation: scroll-left 20s linear infinite;
}

.news-ticker__content a.news-link {
  margin: 0 40px;
  font-size: 1.1rem;
  display: inline-block;
  color: white;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.3s;
}

.news-ticker__content a.news-link:hover {
  color: #a3c1ff;
  text-decoration: underline;
}








.partners-section {
  padding: 50px 20px;
  background: #f0f4fa;
  text-align: center;
}

.partners-title {
  font-size: 28px;
  color: #004aad;
  margin-bottom: 30px;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.partners-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.partner-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 180px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.partner-card:hover {
  transform: scale(1.05);
}

.partner-card img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}



/* ✅ تكبير الصور عند الضغط (Lightbox) */
.lightbox {
  position: fixed;
  display: none;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}



.upload-container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  margin: 30px auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.upload-title {
  color: #004aad;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: bold;
}

.upload-form input[type="file"],
.upload-btn,
.record-btn,
.stop-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.upload-btn {
  background-color: #004aad;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.upload-btn:hover {
  background-color: #003380;
}

.record-btn,
.stop-btn {
  background-color: #f1f1f1;
  color: #333;
}

.audio-preview {
  width: 100%;
  margin-top: 15px;
}

.success-msg {
  color: green;
}

.error-msg {
  color: red;
}








  .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,150,0.2);
  }

  .card-icon {
    font-size: 48px;
    margin-bottom: 18px;
    color: #004aad;
  }

  .card-title {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #00296b;
  }

  .card-desc {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
    min-height: 60px;
  }

  .card-btn {
    background: #f1f1f1;
        color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
  }

  .card-btn:hover {
    background: #f2f2f2;
  }
  
  
  
   .upload-form {
    max-width: 400px;
    margin: 0 auto;
    direction: rtl;
    font-family: 'Arial', sans-serif;
  }

  .upload-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #004aad;
  }

  .input-group {
    position: relative;
    margin-bottom: 20px;
  }

  .input-group input {
    width: 100%;
    padding: 10px 40px 10px 12px; /* مساحة لليمين عشان الأيقونة */
    font-size: 16px;
    border: 1.5px solid #004aad;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s ease;
  }

  .input-group input:focus {
    border-color: #0066ff;
  }

  .input-group .icon {
    position: absolute;
    top: 50%;
    right: 12px; /* لأن الاتجاه RTL */
    transform: translateY(-50%);
    font-size: 20px;
    color: #004aad;
    pointer-events: none;
  }

  .upload-btn {
    background: linear-gradient(90deg, #004aad, #0066ff);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 17px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  .upload-btn:hover {
    background: linear-gradient(90deg, #003580, #0055cc);
  }

  /* الرسائل */
  .success-msg {
    color: green;
    font-weight: bold;
  }

  .error-msg {
    color: red;
    font-weight: bold;
  }
