/* ========== assets/css/style.css ========== */
:root {
  --primary-dark: #0a2b3e;
  --primary-gold: #c9a03d;
  --primary-red-accent: #9e2a2a;
  --light-bg: #f4f7fc;
  --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
}

body {
  font-family: 'Inter', 'Cairo', sans-serif;
  background-color: var(--light-bg);
  color: #1e2a3a;
  direction: ltr;
}

.navbar {
  background: linear-gradient(135deg, #0a2b3e 0%, #0f3b4f 100%);
  border-bottom: 3px solid var(--primary-gold);
  padding: 0.8rem 0;
}

.logo-img {
  height: 55px;
  width: auto;
  border-radius: 10px;
  background: white;
  padding: 4px;
  object-fit: contain;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.arabic-title {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  line-height: 1.2;
  color: white;
}

.eng-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: #e2e8f0;
}

.navbar-nav .nav-link {
  font-weight: 600;
  margin: 0 0.2rem;
  padding: 0.6rem 1rem;
  border-radius: 40px;
  transition: all 0.2s ease;
  color: #f1f5f9;
}

.navbar-nav .nav-link i {
  margin-right: 6px;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
  background-color: rgba(201, 160, 61, 0.2);
  color: var(--primary-gold);
  transform: translateY(-1px);
}

.hero-section {
  background: linear-gradient(rgba(10,43,62,0.85), rgba(10,43,62,0.85)), url('https://images.unsplash.com/photo-1581091226033-d5c48150dbaa?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
  background-size: cover;
  background-position: center 30%;
  padding: 4rem 0;
  color: white;
  border-radius: 0 0 30px 30px;
  margin-bottom: 2rem;
}

.card {
  border: none;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  margin-bottom: 1.5rem;
  height: 100%;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
}

.card-header-custom {
  background: var(--primary-dark);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 700;
}

.section-title {
  border-right: 6px solid var(--primary-gold);
  padding-right: 15px;
  margin-bottom: 2rem;
  font-weight: 800;
  font-size: 1.8rem;
  color: #0a2b3e;
}

.btn-outline-gold {
  border: 2px solid var(--primary-gold);
  color: var(--primary-gold);
  background: transparent;
  border-radius: 40px;
  font-weight: 600;
}

.btn-outline-gold:hover {
  background: var(--primary-gold);
  color: #0a2b3e;
}

.faculty-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: 0.3s;
}

.faculty-card:hover img {
  transform: scale(1.02);
}

.footer {
  background: #0a1c28;
  color: #ccc;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid #2d4a5f;
}

.footer a {
  color: var(--primary-gold);
  text-decoration: none;
}

.badge-type {
  background: #1e4a6b;
  color: white;
  border-radius: 30px;
  padding: 0.4rem 1rem;
  font-size: 0.7rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .hero-section { padding: 2rem 0; text-align: center; }
  .section-title { font-size: 1.5rem; }
  .logo-img { height: 45px; }
  .arabic-title { font-size: 1rem; }
}

/* ========== Dynamic RTL/LTR based on language class ========== */
body.lang-ar {
  text-align: right;
  direction: rtl;
}

body.lang-en {
  text-align: left;
  direction: ltr;
}

/* ضبط أيقونات القائمة حسب الاتجاه */
body.lang-ar .navbar-nav .nav-link i {
  margin-left: 6px;
  margin-right: 0;
}

body.lang-en .navbar-nav .nav-link i {
  margin-right: 6px;
  margin-left: 0;
}

/* تنسيق عنوان القسم مع border حسب اللغة */
body.lang-ar .section-title {
  border-right: 6px solid var(--primary-gold);
  border-left: none;
  padding-right: 15px;
  padding-left: 0;
}

body.lang-en .section-title {
  border-left: 6px solid var(--primary-gold);
  border-right: none;
  padding-left: 15px;
  padding-right: 0;
}

/* محاذاة النصوص داخل البطاقات والعناصر العامة */
body.lang-ar .card-text,
body.lang-ar .card-title,
body.lang-ar p,
body.lang-ar h1, body.lang-ar h2, body.lang-ar h3, body.lang-ar h4, body.lang-ar h5, body.lang-ar h6 {
  text-align: right;
}

body.lang-en .card-text,
body.lang-en .card-title,
body.lang-en p,
body.lang-en h1, body.lang-en h2, body.lang-en h3, body.lang-en h4, body.lang-en h5, body.lang-en h6 {
  text-align: left;
}

/* تذييل الصفحة: أيقونات التواصل الاجتماعي */
body.lang-ar .footer .text-md-end {
  text-align: left !important; /* في RTL تبقى الأيقونات جهة اليسار */
}

body.lang-en .footer .text-md-end {
  text-align: right !important; /* في LTR تكون جهة اليمين */
}

@media (max-width: 768px) {
  body.lang-ar .footer .text-md-end,
  body.lang-en .footer .text-md-end {
    text-align: center !important;
  }
}
/* ========== تصحيح محاذاة قسم الأخبار في الوضع العربي ========== */
body.lang-ar .news-section .row,
body.lang-ar .news-section .col-md-4 {
  text-align: right;
}

/* التأكد من أن البطاقات تبدأ من اليمين في RTL */
body.lang-ar .news-section .row {
  direction: rtl;
}

/* محاذاة النصوص داخل بطاقات الأخبار */
body.lang-ar .news-section .card-body {
  text-align: right;
}

/* إعادة ضبط أيقونة السهم في زر "تفاصيل أكثر" للعربية */
body.lang-ar .btn-outline-gold i.fa-arrow-left {
  transform: rotate(0deg); /* السهم الأيسر يبقى عادي في RTL */
}

/* تحسين عام للمسافات */
body.lang-ar .news-section .card {
  margin-right: 0;
  margin-left: auto;
}