/* ============================================
   ISLAMIC INSTITUTE WEBSITE - STYLE.CSS
   Ma'had Umar bin Al-Khattab
   ============================================ */

/* ============================================
   CSS VARIABLES & RESET
   ============================================ */
:root {
  /* Primary Colors */
  --primary-green: #0d4d2b;
  --primary-green-dark: #083d21;
  --primary-green-light: #1a6b3d;

  /* Gold Accents */
  --gold: #c9a227;
  --gold-light: #e0bc4c;
  --gold-dark: #9a7b1a;

  /* Navy & Blues */
  --navy: #1a2a4a;
  --navy-light: #2a3a5a;
  --navy-dark: #0f1a2a;

  /* Neutral Colors */
  --beige: #f5f1e8;
  --beige-dark: #e8e0d0;
  --cream: #fdfbf7;
  --white: #ffffff;
  --black: #1a1a1a;

  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-light: #6a6a6a;
  --text-on-dark: #f5f1e8;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  /* Font Families */
  --font-arabic: "Tajawal", "Amiri", sans-serif;
  --font-latin: "Poppins", sans-serif;

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal: 400;
  --z-tooltip: 500;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-arabic);
  background-color: var(--cream);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* RTL/LTR Support */
[dir="rtl"] body {
  font-family: var(--font-arabic);
}

[dir="ltr"] body {
  font-family: var(--font-latin);
}

/* ============================================
   ISLAMIC GEOMETRIC PATTERN OVERLAY
   ============================================ */
.islamic-pattern-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%230d4d2b' fill-opacity='1'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l28-28v2L54 40h-2zm4 0l24-24v2L58 40h-2zm4 0l20-20v2L62 40h-2zm4 0l16-16v2L66 40h-2zm4 0l12-12v2L70 40h-2zm4 0l8-8v2l-6 6h-2zm4 0l4-4v2l-2 2h-2zm0-40h2L40 40h-2L78 2zm-4 0h2L36 40h-2L74 2zm-4 0h2L32 40h-2L70 2zm-4 0h2L28 40h-2L66 2zm-4 0h2L24 40h-2L62 2zm-4 0h2L20 40h-2L58 2zm-4 0h2L16 40h-2L54 2zm-4 0h2L12 40h-2L50 2zm-4 0h2L8 40h-2L46 2zm-4 0h2L4 40h-2L42 2zm-4 0h2L0 40v-2L38 2zm-4 0h2L0 36v-2L34 2zm-4 0h2L0 32v-2L30 2zm-4 0h2L0 28v-2L26 2zm-4 0h2L0 24v-2L22 2zm-4 0h2L0 20v-2L18 2zm-4 0h2L0 16v-2L14 2zm-4 0h2L0 12v-2L10 2zm-4 0h2L0 8v-2L6 2zm-4 0h2L0 4v-2L2 2zM0 2v-2h2L0 2z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: var(--z-base);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  color: var(--white);
  padding: 16px;
  font-size: 1.1rem;
}

.btn-submit:hover {
  background: linear-gradient(135deg, var(--primary-green-light), var(--primary-green));
  transform: translateY(-2px);
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: var(--z-fixed);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-ar {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-green);
  line-height: 1.3;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--gold-dark);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu li a {
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-menu li a:hover {
  color: var(--primary-green);
  background: rgba(13, 77, 43, 0.08);
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--beige);
  padding: 6px 12px;
  border-radius: var(--radius-xl);
}

.lang-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  font-family: inherit;
}

.lang-btn.active {
  background: var(--primary-green);
  color: var(--white);
}

.lang-btn:hover:not(.active) {
  color: var(--primary-green);
}

.lang-divider {
  color: var(--text-light);
  opacity: 0.5;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-layers {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-facility-bg {
  position: absolute;
  inset: 0;
  background: url("/placeholder.svg?height=1080&width=1920") center / cover no-repeat;
  opacity: 0.25;
}

.hero-pattern-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23c9a227' fill-opacity='0.08'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(13, 77, 43, 0.85) 0%,
    rgba(13, 77, 43, 0.75) 50%,
    rgba(26, 42, 74, 0.85) 100%
  );
}

/* تعديل أنماط hero-content بعد حذف المربع الأبيض */
.hero-content {
  position: relative;
  z-index: var(--z-base);
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 900px;
}

/* إضافة أنماط شعار Hero */
.hero-logo {
  width: 650px;
  height: auto;
  margin: 0 auto 30px;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
  animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* تعديل لون العنوان للظهور على الخلفية الداكنة */
.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.2;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* تعديل لون العنوان الفرعي */
.hero-subtitle {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}

.divider-star {
  color: var(--gold-light);
  font-size: 1.5rem;
  padding: 0 20px;
}

.hero-divider::before,
.hero-divider::after {
  content: "";
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

/* تعديل لون الشعار */
.hero-slogan {
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* تعديل زر CTA */
.hero .btn-primary {
  padding: 16px 48px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: 2px solid var(--gold-light);
}

.hero .btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201, 162, 39, 0.5);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-base);
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--gold-light);
  border-radius: 20px;
  position: relative;
}

.mouse::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 2px;
  animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {
  0%,
  100% {
    opacity: 1;
    top: 8px;
  }
  50% {
    opacity: 0.3;
    top: 20px;
  }
  
  .hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;          /* المسافة بين الزرين */
  flex-wrap: wrap;    /* لو الشاشة صغيرة ينزل زر تحت الثاني */
  margin-top: 10px;
}

}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header.light .section-title,
.section-header.light .section-desc {
  color: var(--white);
}

.section-badge {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.15), rgba(201, 162, 39, 0.05));
  color: var(--gold-dark);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.section-header.light .section-badge {
  background: rgba(255, 255, 255, 0.15);
  color: var(--gold-light);
  border-color: rgba(255, 255, 255, 0.2);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 16px;
}

.title-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.ornament-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

[dir="ltr"] .ornament-line:first-child {
  background: linear-gradient(90deg, transparent, var(--gold));
}

[dir="ltr"] .ornament-line:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.ornament-star {
  color: var(--gold);
  font-size: 1.2rem;
}

.title-ornament.light .ornament-line {
  background: linear-gradient(90deg, transparent, var(--gold-light));
}

.title-ornament.light .ornament-star {
  color: var(--gold-light);
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.about-bg-layers {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.about-facility-bg {
  position: absolute;
  inset: 0;
  background: url("/placeholder.svg?height=800&width=1200") center / cover no-repeat;
  opacity: 0.08;
}

.about-pattern-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--cream), rgba(245, 241, 232, 0.95));
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
}

.image-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.image-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid var(--gold);
  border-radius: var(--radius-lg);
  z-index: 2;
  pointer-events: none;
}

.about-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.image-frame:hover .about-img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(13, 77, 43, 0.3));
  z-index: 1;
}

.floating-badge {
  position: absolute;
  bottom: -20px;
  right: 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--white);
  padding: 20px 30px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
  z-index: 3;
}

[dir="ltr"] .floating-badge {
  right: auto;
  left: 20px;
}

.badge-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.badge-text {
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 4px;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-card {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border-right: 4px solid var(--gold);
  transition: all var(--transition-normal);
}

[dir="ltr"] .about-card {
  border-right: none;
  border-left: 4px solid var(--gold);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(13, 77, 43, 0.1), rgba(13, 77, 43, 0.05));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary-green);
}

.about-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 12px;
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================
   ORGANIZATION STRUCTURE SECTION
   ============================================ */
.org-structure {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
  background: var(--cream);
}

.org-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(13, 77, 43, 0.03), rgba(26, 42, 74, 0.06));
}

.org-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23c9a227' fill-opacity='1'%3E%3Cpath d='M40 0L80 40 40 80 0 40zM40 10L10 40l30 30 30-30z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

.org-structure .container {
  position: relative;
  z-index: var(--z-base);
}

/* شبكة الأعضاء – باستخدام Flex بدلاً من Grid
   حتى يكون كل صف (المستوى الأول والثاني) في المنتصف تماماً */
.org-grid {
  display: flex;
  justify-content: center;  /* تمركز الكروت في منتصف الصفحة */
  align-items: flex-start;
  gap: 40px;                /* نفس المسافة بين جميع الكروت في كل المستويات */
  flex-wrap: wrap;          /* يدعم الاستجابة للشاشات الصغيرة */
}

/* مسافة عمودية بين المستوى الأول والثاني (حوالي سطرين) */
.org-level + .org-level {
  margin-top: 3rem;
}

/* بطاقة العضو */
.org-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px 20px 28px;
  text-align: center;
  border-top: 4px solid var(--gold);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  width: 260px;        /* عرض ثابت لكل الكروت */
  max-width: 100%;
}

.org-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* صورة العضو */
.org-photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-green);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.org-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* النص داخل البطاقة */
.org-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.org-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-green);
}

.org-role {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}
/* ============================================
   PROGRAMS SECTION
   ============================================ */
.programs {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.programs-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  z-index: 0;
}

.programs-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l28-28v2L54 40h-2zm4 0l24-24v2L58 40h-2zm4 0l20-20v2L62 40h-2zm4 0l16-16v2L66 40h-2zm4 0l12-12v2L70 40h-2zm4 0l8-8v2l-6 6h-2zm4 0l4-4v2l-2 2h-2z'/%3E%3C/g%3E%3C/svg%3E");
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.program-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.card-bg {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.program-card:hover .card-bg img {
  transform: scale(1.1);
}

.card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(13, 77, 43, 0.8));
}

.card-content {
  padding: 24px;
  text-align: center;
}

.card-icon-wrapper {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -55px auto 20px;
  position: relative;
  z-index: 2;
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
}

.card-icon-wrapper svg {
  width: 32px;
  height: 32px;
  color: var(--white);
}

.card-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 12px;
}

.card-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.program-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.feature-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(13, 77, 43, 0.08);
  color: var(--primary-green);
  font-size: 0.8rem;
  border-radius: var(--radius-xl);
}

/* توحيد حجم جميع بطاقات الهيكل التنظيمي */
.org-card {
    width: 350px !important;       /* نفس العرض لكل الكروت */
    min-height: 350px !important;  /* نفس الارتفاع لكل الكروت */
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    padding-bottom: 30px !important;
}

/* لضبط النصوص داخل الكرت حتى لا تتمدد البطاقة */
.org-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
}


/* ============================================
   STATISTICS SECTION
   ============================================ */
.statistics {
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

.stats-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  z-index: 0;
}

.stats-facility-bg {
  position: absolute;
  inset: 0;
  background: url("/placeholder.svg?height=600&width=1200") center / cover no-repeat;
  opacity: 0.1;
}

.stats-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23c9a227' fill-opacity='0.05'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
  z-index: var(--z-base);
}

.stat-item {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.stat-icon svg {
  width: 28px;
  height: 28px;
  color: var(--white);
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--gold-light);
  font-size: 1rem;
  font-weight: 500;
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery {
  position: relative;
  padding: 100px 0;
  background: var(--beige);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13, 77, 43, 0.9));
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay span {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ============================================
   NEWS SECTION
   ============================================ */
.news {
  position: relative;
  padding: 100px 0;
  background: var(--cream);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 30px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.news-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.news-card:hover .news-image img {
  transform: scale(1.1);
}

.news-category {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-xl);
}

[dir="ltr"] .news-category {
  right: auto;
  left: 16px;
}

.news-content {
  padding: 24px;
}

.news-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.news-date svg {
  width: 16px;
  height: 16px;
}

.news-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.5;
}

.news-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-green);
  font-weight: 600;
  font-size: 0.95rem;
  transition: gap var(--transition-fast);
}

.read-more:hover {
  gap: 12px;
}

.read-more svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

[dir="ltr"] .read-more svg {
  transform: rotate(180deg);
}

.read-more:hover svg {
  transform: translateX(-4px);
}

[dir="ltr"] .read-more:hover svg {
  transform: rotate(180deg) translateX(-4px);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
  z-index: 0;
}

.contact-facility-bg {
  position: absolute;
  inset: 0;
  background: url("img/islamic.jpg?height=800&width=1200") center / cover no-repeat;
  opacity: 0.1;
}

.contact-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40z'/%3E%3C/g%3E%3C/svg%3E");
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  position: relative;
  z-index: var(--z-base);
}

.contact-info {
  color: var(--white);
}

.contact-info h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.info-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
}

.info-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card-icon {
  width: 50px;
  height: 50px;
  background: var(--gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--white);
}

.info-card-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--gold-light);
}

.info-card-content p,
.info-card-content a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
}

.info-card-content a:hover {
  color: var(--gold-light);
}

.map-container {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 200px;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-form-wrapper {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.contact-form-wrapper h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 24px;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  padding: 14px 18px;
  border: 2px solid var(--beige-dark);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition-fast);
  background: var(--cream);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  background: var(--white);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.registration-button-wrapper {
  margin-top: 20px;
  text-align: center;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  padding: 60px 0 30px;
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%230d4d2b' fill-opacity='0.03'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0l28-28v2L54 40h-2zm4 0l24-24v2L58 40h-2zm4 0l20-20v2L62 40h-2zm4 0l16-16v2L66 40h-2zm4 0l12-12v2L70 40h-2zm4 0l8-8v2l-6 6h-2zm4 0l4-4v2l-2 2h-2z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: repeat;
  opacity: 0.25;
  z-index: 0;
}

.footer-pattern {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(13, 77, 43, 0.95), rgba(26, 42, 74, 0.95)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M30 0l30 30-30 30L0 30z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}


.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  position: relative;
  z-index: var(--z-base);
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
    width: 365px !important;
    height: auto !important;
}


.footer-logo-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.footer-logo-text span {
  font-size: 0.85rem;
  color: var(--gold-light);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.8;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--gold);
  transform: translateY(-3px);
}

.social-link svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

.footer-links h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--gold-light);
  padding-right: 8px;
}

[dir="ltr"] .footer-links a:hover {
  padding-right: 0;
  padding-left: 8px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  position: relative;
  z-index: var(--z-base);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--gold-light);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image-wrapper {
    max-width: 500px;
    margin: 0 auto;
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    opacity: 0;
    transition: all var(--transition-normal);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-menu li a {
    display: block;
    padding: 12px 20px;
    text-align: center;
  }

  .mobile-toggle {
    display: flex;
  }

  .lang-switcher {
    order: -1;
  }

  .hero-content {
    padding: 100px 20px 60px;
  }

  .hero-logo {
    width: 120px;
  }

  .programs-grid,
  .gallery-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .stat-item {
    padding: 20px 15px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .contact-form-wrapper {
    padding: 24px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .footer-logo {
    flex-direction: column;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .logo-text {
    display: none;
  }
}
