/* ======================
   Modern Theme Variables (V4.0 - Final Unified)
====================== */
:root {
  --primary: #1E88E5;     /* أزرق المدرسة الأساسي */
  --primary-dark: #1565C0;
  --secondary: #43A047;   /* أخضر (للنجاح/التميز) */
  --accent: #FBC02D;      /* أصفر (للتنبيه/الزر الجذاب) */
  --bg-light: #F8FAFC;    /* خلفية فاتحة موحدة */
  --text-main: #1E293B;   /* نص داكن أساسي */
  --text-muted: #64748B;  /* نص ثانوي/مخفف */
  --white: #ffffff;
  --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.15);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ======================
   Reset & Base
====================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

body {
  direction: rtl;
  background: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { text-decoration: none; color: var(--primary); }
a:hover { color: var(--primary-dark); }

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

section { 
  /* تم توحيد وتقليل المسافة بين الأقسام */
  padding: 70px 0; 
}

/* عنوان القسم الموحد والموسّط */
.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 32px;
  color: var(--primary-dark);
  font-weight: 700;
  position: relative;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ======================
   Buttons & Links
====================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  gap: 8px;
}
.btn-lg { padding: 14px 30px; font-size: 16px; }
.btn-primary { background: var(--primary); color: var(--white); box-shadow: 0 4px 14px rgba(30, 136, 229, 0.3); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4); }
.btn-yellow { background: var(--accent); color: var(--text-main); box-shadow: 0 4px 14px rgba(251,192,45,0.3); }
.btn-yellow:hover { background: #F9A825; color: var(--text-main); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); }

/* ======================
   Header & Nav
====================== */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 15px 0;
  border-bottom: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 45px; }
.logo h1 { font-size: 22px; color: var(--primary); font-weight: 700; }

nav { display: flex; gap: 25px; margin: 0 20px; }

nav a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 500;
  padding: 5px 0;
  position: relative;
  transition: var(--transition);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  right: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav a:hover::after { width: 100%; }
nav a:hover { color: var(--primary-dark); }

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--primary);
}

/* ======================
   Hero Section (بناءً على طلبك)
====================== */
.hero {
  padding: 100px 0; /* تقليل البادينغ قليلاً */
  background-attachment: fixed;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 50px 70px;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    /* تراكب أسود خفيف جداً */
    background: rgba(0,0,0,0.45); 
    z-index: 1;
}
.hero .container { position: relative; z-index: 2; }

/* إذا كانت الصورة داخل الـ container يجب تقليل المارجن السفلي */
.hero .container > img {
    margin: 0 auto 20px auto; /* توسيط الصورة وتقليل المسافة السفلية */
    max-width: 250px;
}

.hero h1 { 
    /* تصغير حجم الخط الرئيسي قليلاً */
    font-size: clamp(2rem, 4.5vw, 3.5rem); 
    margin-bottom: 25px; 
    text-shadow: 2px 2px 5px rgba(0,0,0,0.4); 
}
.hero h2 { font-size: clamp(1.4rem, 3vw, 2.5rem); margin-bottom: 25px; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }

/* ======================
   About Section (من نحن)
====================== */
.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 32px;
  color: var(--primary-dark);
  font-weight: 700;
  position: relative;
}
.about { background-color: var(--white); } 

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-main);
}

.contact-info-item {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
    font-size: 15px;
    color: var(--text-main);
}
.contact-info-item span:first-child { color: var(--primary); font-size: 18px; }

.stats-box {
  background: var(--bg-light);
  padding: 30px;
  border-radius: var(--radius);
  border-right: 5px solid var(--primary);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.stats-box:hover { box-shadow: var(--shadow-lg); }

.stats-box h1 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: 700;
}
.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  font-weight: 600;
}
.stat-value {
  font-weight: 800;
  color: var(--secondary);
  font-size: 1.1em;
}

/* ======================
   News Section (Posts)
====================== */
#posts { background: var(--bg-light); }

.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card-box {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.news-card-box:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.news-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-content { padding: 20px; }

.news-content h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: 600;
    min-height: 50px;
    overflow: hidden;
}

.news-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-bottom: 15px;
}

.read-more {
  display: inline-block;
  color: var(--primary);
  font-weight: 600;
}

/* ======================
   Gallery & Staff & Events (Cards)
====================== */
#gallery, #staff, #events { background-color: var(--white); } 

.gallery, .staff-grid, .events-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.gallery-item, .staff-card, .event-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid var(--accent);
     text-align: center;
}
.gallery-item:hover, .staff-card:hover, .event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img, .staff-card img, .event-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item-content, .staff-card-content, .event-content { padding: 20px; text-align: center; }

.staff-card-content h4 { color: var(--primary-dark); font-size: 18px; margin-bottom: 5px; }
.staff-card-content .position { color: var(--secondary); font-weight: 600; font-size: 15px; }

.event-content h4 { color: var(--primary-dark); font-size: 20px; margin-bottom: 10px; }
.event-content p { font-size: 15px; color: var(--text-muted); }

.event-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--primary-dark);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* ======================
   Testimonials & Forms
====================== */
.testimonials { 
    background: var(--bg-light); 
    /* تقليل المسافة السفلية (بما أن زر التقييم يتبع هذا القسم) */
    padding: 70px 0 40px 0; 
     text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    border-left: 5px solid var(--secondary);
    box-shadow: var(--shadow-md);
    position: relative;
    font-style: italic;
    color: var(--text-muted);
}
.testimonial-card p { margin-bottom: 15px; }

.star { color: var(--accent); font-size: 1.2rem; }
.testimonial-author { font-weight: 700; color: var(--primary-dark); margin-top: 5px; }
.testimonial-role { font-size: 0.9em; color: var(--text-muted); }

/* ======================
   Forms (Shared Style)
====================== */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-dark);
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 5px rgba(30,136,229,0.2);
}
.testimonial-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* ======================
   Modal (Pop-up Box) Styles
====================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    padding: 20px 0;
}
.modal-content {
    background-color: var(--white);
    margin: 3% auto;
    padding: 30px;
    width: 95%;
    max-width: 1000px; 
    border-radius: var(--radius);
    position: relative;
    box-shadow: var(--shadow-lg);
    animation-name: animatetop;
    animation-duration: 0.4s;
}
@keyframes animatetop {
    from {top: -500px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-btn {
    color: var(--text-muted);
    float: left;
    font-size: 36px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
    margin-bottom: 10px;
}
.close-btn:hover, .close-btn:focus { color: var(--primary); }

/* ======================
   Contact Modal Layout (الخريطة والنموذج - بطاقات متساوية 1fr 1fr)
====================== */
/* ======================
   Contact Modal Layout (لتقسيم الشاشة لعمودين)
====================== */
.contact-layout {
    display: grid;
    /* جعل العمودين متساويين في الحجم (1fr 1fr) */
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
    margin-top: 20px;
    align-items: start; /* لبدء المحتوى من الأعلى */
}

/* حاوية العمود الأول (تحتوي على المعلومات والخريطة) */
.contact-map-info-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* تنسيق النموذج في العمود الثاني */
.contact-form {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    /* لملء الارتفاع المتاح بجانب العمود الأول */
    height: 100%; 
}
.contact-form h4 {
    color: var(--primary-dark);
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: 700;
}

/* تنسيق بطاقة الخريطة والمعلومات (البطاقة الزرقاء) */
.contact-info-box {
    background: var(--primary); /* جعلها بنفس لون الهيدر القديم (الأزرق) */
    color: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.contact-info-box h4 { /* معلومات الاتصال */
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}
.contact-info-box h5 { /* العناوين الفرعية */
    margin-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}
/* تنسيق الخريطة */
.contact-map-card {
    padding: 15px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.contact-map-card h4 {
    color: var(--primary-dark);
    font-size: 20px;
    margin-bottom: 15px;
}
.contact-map-card iframe {
    width: 100%;
    /* ارتفاع ثابت لضمان التناسق */
    height: 250px; 
    border-radius: var(--radius);
}

/* ======================
   Responsive Design (لشاشات الجوال)
====================== */
@media (max-width: 1050px) {
    .contact-layout {
        /* عمود واحد على الشاشات الأصغر */
        grid-template-columns: 1fr; 
    }
    /* ... باقي التعديلات ... */
}
/* ======================
   Responsive Design
====================== */
@media (max-width: 1050px) {
    .contact-layout {
        grid-template-columns: 1fr; /* عمود واحد للمودال */
    }
    .modal-content {
        max-width: 600px; 
        margin: 5% auto;
    }
    /* على الشاشات الصغيرة، الخريطة والنموذج والمعلومات تصبح عمودية */
    .contact-map-card, .contact-info-box, .contact-form {
        margin-bottom: 20px;
    }
    .contact-form-card {
        padding: 0; /* إزالة حشو البطاقة الخارجية والاعتماد على العناصر الداخلية */
        box-shadow: none;
        background: transparent;
    }
}

@media (max-width: 992px) {
  .auth-buttons { display: none; } 
  header .container { justify-content: space-between; }
  
  nav {
    position: fixed;
    top: 77px; 
    right: -250px;
    width: 250px;
    height: calc(100vh - 77px);
    background: var(--white);
    flex-direction: column;
    padding: 30px 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: 0.4s right ease;
    gap: 15px;
  }
  nav a { border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
  nav.active { right: 0; }
  .menu-toggle { display: block; }

  .about-content { 
      grid-template-columns: 1fr; 
      gap: 30px;
  }
  .about-text { order: 2; }
  .stats-box { order: 1; }
}

@media (max-width: 576px) {
  section { padding: 40px 0; } /* تقليل المسافة جداً على الجوال */
  .hero { border-radius: 0 0 40px 40px; padding: 60px 0; }
  .btn { width: 100%; }
}
/* =========================
   Footer Styles
========================= */
/* =========================
   Footer Styles with Arabic Fonts
========================= */
footer {
    background-color: #000000; /* خلفية سوداء */
    color: #FFFFFF; /* نص أبيض افتراضي */
    padding: 40px 20px;
    font-family: 'Cairo', Arial, sans-serif; /* خط عربي جميل */
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-section {
    flex: 1 1 200px;
}

/* العناوين واضحة وجميلة */
footer h5 {
    color:  orange !important;
    font-size: 20px;
    font-weight: 700; /* غامق */
    margin-bottom: 15px;
    line-height: 1.3;
    opacity: 1 !important;
}

/* نصوص الفقرة والقوائم */
footer p,
footer ul li {
    color: #FFFFFF;
    font-size: 15px;
    line-height: 1.6;
    opacity: 1 !important;
}

/* روابط الفوتر */
footer a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #FBC02D;
}

/* الجزء السفلي من الفوتر */
.footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: #AAAAAA;
    opacity: 1 !important;
}

/* متجاوب */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
}


