/*
 * اسم الملف: style.css
 * الوصف: ملف التنسيقات الرئيسي للموقع
 * 
 * المحتويات:
 * 1. متغيرات الألوان (CSS Variables).
 * 2. إعدادات الخطوط والخلفية المائية (Watermark).
 * 3. أنيميشن الظهور (Scroll Reveal).
 * 4. تأثيرات الحركية (Hover Effects).
 * 5. تنسيقات التذييل (Footer).
 * 6. التصميم المتجاوب (Responsive Design) للهواتف والشاشات المختلفة.
 */

:root {
  --primary-color: #004085;
  --primary-rgb: 0, 64, 133;
  /* اللون الأزرق الأساسي للجامعة */
  --secondary-color: #ffffff;
  --bg-color: #f8f9fa;
  --text-color: #212529;
}

html {
  scroll-behavior: smooth;
  /* تمرير ناعم عند النقر على الروابط */
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  position: relative;
  overflow-x: hidden;
  padding-top: 80px; /* للتعويض عن الشريط العلوي الثابت */
}

/* FontAwesome Fix - Ensures correct font-family for both Free and Brands icons */
.fa, .fas, .fa-solid {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}
.far, .fa-regular {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400 !important;
}
.fab, .fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands {
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
}

/* خلفية مائية لشعار الجامعة في منتصف الصفحة */
body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40vw;
  height: 40vw;
  /* background: url('../img/logo.png') no-repeat center center; */
  background-size: contain;
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
}

/* أنيميشن الظهور التدريجي عند التمرير */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* خط تزييني تحت عناوين الأقسام */
.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary-color);
  margin: 15px auto;
}

/* تأثير الارتفاع البسيط عند تمرير الماوس */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@media (hover: hover) {
  .hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12) !important;
  }
}

/* تنسيقات تذييل الصفحة (Footer) */
footer {
  background: linear-gradient(135deg, #003366 0%, #004085 100%);
}

footer .hover-white {
  transition: all 0.3s ease;
  display: inline-block;
}

footer .hover-white:hover {
  color: #fff !important;
  transform: translateX(-5px);
  /* حركة لليسار قليلاً عند التمرير */
}

/* روابط التواصل الاجتماعي */
.social-links a {
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: #fff !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.bg-soft-blue {
  background-color: rgba(240, 247, 255, 0.5);
}

/* --- Premium News Slider --- */
.premium-news-slider {
  padding: 10px 0;
  margin-bottom: 60px !important;
}

.news-track {
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.news-item {
  width: 33.333333%;
  transition: transform 0.5s ease;
}

@media (max-width: 991.98px) {
  .news-item {
    width: 50% !important;
  }
}

@media (max-width: 767.98px) {
  .news-item {
    width: 100% !important;
  }
}

.carousel-nav-controls {
  z-index: 10;
  bottom: -60px;
}

.btn-white {
  background: white;
  border: none;
  width: 50px;
  height: 50px;
  transition: all 0.3s ease;
}

.btn-white:hover {
  background: var(--primary-color);
  color: white !important;
}

.btn-white:hover i {
  color: white !important;
}

/* --- تعديلات التصميم المتجاوب (Responsive) --- */

/* للشاشات المتوسطة (Tablets) */
@media (max-width: 991.98px) {
  .carousel-item img {
    height: 400px !important;
  }

  body::before {
    width: 70vw;
    height: 70vw;
  }
}

/* للشاشات الصغيرة (Mobile) */
@media (max-width: 767.98px) {
  .carousel-item img {
    height: 320px !important;
  }

  /* تحسينات واجهة الصلاحيات */
  .transition-all {
    transition: all 0.3s ease;
  }

  .hover-shadow-sm:hover {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
    background-color: #f8f9fa;
    border-color: #007bff !important;
  }

  .form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
  }

  .carousel-caption {
    padding: 1.25rem !important;
    margin-bottom: 2.5rem !important;
    width: 90%;
    left: 5%;
  }

  .carousel-caption h2 {
    font-size: 1.2rem;
  }

  .carousel-caption p {
    font-size: 0.85rem;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }
}

.border-5 {
  border-width: 5px !important;
}

.fs-5 {
  font-size: 1.1rem !important;
  /* تصغير الخط قليلاً بناءً على طلب المستخدم */
  line-height: 1.7 !important;
  text-align: justify;
}

/* تحسين شكل القوائم والنصوص الطويلة */
.lh-lg {
  line-height: 1.7 !important;
}

.text-justify {
  text-align: justify;
}

/* للشاشات الكبيرة جداً */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
