:root {
  --brand-light: #3791b9;
  --brand-dark: #021982;
  --brand-light-rgb: 55, 145, 185;
  --brand-dark-rgb: 2, 25, 130;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
}

/* ===== Helpers ===== */
.text-brand-light { color: var(--brand-light) !important; }
.text-brand-dark { color: var(--brand-dark) !important; }
.bg-brand-light { background-color: var(--brand-light) !important; }
.bg-brand-dark { background-color: var(--brand-dark) !important; }

.gradient-brand {
  background-image: linear-gradient(90deg, var(--brand-light), var(--brand-dark));
}
.gradient-brand-text {
  background-image: linear-gradient(90deg, var(--brand-light), var(--brand-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bg-soft-light { background-color: rgba(var(--brand-light-rgb), .1); }
.bg-soft-light-2 { background-color: rgba(var(--brand-light-rgb), .2); }
.border-soft-light { border-color: rgba(var(--brand-light-rgb), .3) !important; }
.bg-soft-dark { background-color: rgba(var(--brand-dark-rgb), .1); }
.bg-soft-dark-2 { background-color: rgba(var(--brand-dark-rgb), .2); }
.border-soft-dark { border-color: rgba(var(--brand-dark-rgb), .3) !important; }

.rounded-4xl { border-radius: 1.75rem; }
.shadow-soft { box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.shadow-soft-lg { box-shadow: 0 20px 50px rgba(0,0,0,.15); }

.transition-all { transition: all .35s ease; }

/* ===== Navbar ===== */
#mainNav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1030;
  padding: 1rem 0;
  transition: all .3s ease;
  background: transparent;
}
#mainNav.scrolled {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}
#mainNav .nav-link {
  color: #fff;
  font-weight: 500;
  position: relative;
  margin: 0 .5rem;
  padding: .4rem .2rem !important;
}
#mainNav.scrolled .nav-link { color: #374151; }
#mainNav .nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--brand-light);
  transform: scaleX(0);
  transition: transform .2s ease;
}
#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after { transform: scaleX(1); }
#mainNav .nav-link:hover,
#mainNav .nav-link.active { color: var(--brand-light) !important; }
#mainNav .navbar-brand img { height: 64px; transition: all .3s ease; }
#mainNav .lang-btn { color: #fff; }
#mainNav.scrolled .lang-btn { color: #374151; }

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  background: url("../images/hero.jpg") center center / cover no-repeat;
  display: flex;
  align-items: center;
}
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.2);
}
.hero-section .hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-section h1 { font-weight: 700; color: rgba(255,255,255,.9); }
.hero-section h2 { color: rgba(255,255,255,.9); font-weight: 600; }
.hero-section .slogan { color: var(--brand-light); font-style: italic; font-weight: 500; }

/* ===== Feature / value / stat cards ===== */
.icon-tile {
  width: 64px; height: 64px;
  border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: #fff;
}
.icon-tile-sm { width: 56px; height: 56px; border-radius: .85rem; }
.hover-card { transition: all .4s ease; }
.hover-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,.12); }
.underline-grow {
  height: 4px; width: 48px; border-radius: 2px;
  background-image: linear-gradient(90deg, var(--brand-light), var(--brand-dark));
  transform: scaleX(0); transition: transform .4s ease;
}
.hover-card:hover .underline-grow { transform: scaleX(1); }

/* ===== Programs ===== */
.category-pill {
  border-radius: 999px;
  padding: .5rem 1.25rem;
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  transition: all .25s ease;
}
.category-pill:hover { background: #f3f4f6; }
.category-pill.active {
  background-image: linear-gradient(90deg, var(--brand-light), var(--brand-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(var(--brand-light-rgb), .35);
}
.program-card { overflow: hidden; transition: all .4s ease; }
.program-card:hover { transform: scale(1.03); box-shadow: 0 20px 40px rgba(0,0,0,.15); }
.program-card .program-img-wrap { height: 200px; overflow: hidden; background: #f3f4f6; }
.program-card .program-img-wrap img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.program-card:hover .program-img-wrap img { transform: scale(1.1); }
.btn-brand-gradient {
  background-image: linear-gradient(90deg, var(--brand-light), var(--brand-dark));
  color: #fff; border: none;
}
.btn-brand-gradient:hover { color: #fff; box-shadow: 0 12px 24px rgba(var(--brand-light-rgb), .35); }
.badge-upcoming {
  background-image: linear-gradient(90deg, var(--brand-light), var(--brand-dark));
  color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px;
}

/* ===== Stats ===== */
.stats-section { background: linear-gradient(135deg, #f9fafb, #fff, #f3f4f6); }
.stat-card { background: rgba(255,255,255,.65); backdrop-filter: blur(8px); border: 1px solid rgba(0,0,0,.06); }
.stat-number { font-size: 2.75rem; font-weight: 700; color: #111827; }

/* ===== Testimonials (Bootstrap Carousel) ===== */
.testimonial-card { background: #fff; border-radius: 1.25rem; box-shadow: 0 15px 35px rgba(0,0,0,.1); padding: 3rem 2rem; }
.testimonial-card blockquote { font-size: 1.15rem; color: #374151; }
.avatar-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #9333ea);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.25rem;
}
.carousel-control-prev, .carousel-control-next { width: 3rem; }
.carousel-control-prev-icon, .carousel-control-next-icon { filter: invert(1) grayscale(100); }
.testimonials-section .carousel-control-prev-icon,
.testimonials-section .carousel-control-next-icon {
  background-color: #fff; border-radius: 50%; padding: 10px; filter: none;
  background-size: 60%;
}

/* ===== Partners marquee ===== */
.partners-marquee-wrap { overflow: hidden; }
.partners-marquee {
  display: flex; align-items: center; gap: 4rem; white-space: nowrap;
  animation: marquee 30s linear infinite;
  width: max-content;
}
.partners-marquee img { height: 80px; max-width: 140px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.1)); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== FAQ ===== */
.faq-item .accordion-button {
  font-weight: 600; color: var(--brand-dark);
  background: #fff;
}
.faq-item .accordion-button:not(.collapsed) { background: rgba(var(--brand-light-rgb), .1); box-shadow: none; }
.faq-item .accordion-button:focus { box-shadow: 0 0 0 2px rgba(var(--brand-light-rgb), .4); }
.accordion-item { border: 1px solid rgba(var(--brand-light-rgb), .2); border-radius: 1rem !important; overflow: hidden; margin-bottom: 1rem; box-shadow: 0 8px 20px rgba(0,0,0,.05); }
.accordion-button::after { filter: none; }

/* ===== CTA section ===== */
.cta-section { background: var(--brand-light); }
.contact-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(var(--brand-dark-rgb), .2);
  border-radius: 1.5rem;
}
.contact-icon {
  width: 64px; height: 64px; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-light); color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--brand-dark-rgb), .1);
}
.contact-card:hover .contact-icon { background: var(--brand-dark); }

/* ===== Footer ===== */
footer.site-footer { background: #111827; color: #fff; }
footer.site-footer a { color: #d1d5db; text-decoration: none; }
footer.site-footer a:hover { color: #fff; }
.social-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: #1f2937; display: flex; align-items: center; justify-content: center;
  color: #fff; transition: all .3s ease;
}
.social-icon:hover { transform: scale(1.1); background: var(--brand-light); color: #fff; }

/* ===== Section badge pill ===== */
.section-badge {
  display: inline-flex; align-items: center;
  padding: .5rem 1rem; border-radius: 999px;
  font-size: .85rem; font-weight: 500;
}

@media (max-width: 768px) {
  .hero-section h1 { font-size: 2.25rem; }
  .stat-number { font-size: 2rem; }
}

/* ===== Arabic / RTL support ===== */
body.lang-ar {
  font-family: "Cairo", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
html[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: .5rem !important; }
html[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
html[dir="rtl"] #mainNav .nav-link::after { left: auto; right: 0; }
html[dir="rtl"] .carousel-control-prev-icon,
html[dir="rtl"] .carousel-control-next-icon { transform: scaleX(-1); }
html[dir="rtl"] .underline-grow { margin-right: 0; }
html[dir="rtl"] blockquote[dir="rtl"] { direction: rtl; }
html[dir="rtl"] .text-start { text-align: right !important; }
