/* مدرسة الإرشاد - التصميم الرئيسي */

/* ============================================
   تم نقل CSS Variables إلى tokens.css
   لضمان Single Source of Truth
   ============================================ */

/* ============================================
   تم نقل Body & Reset Styles إلى base.css
   ============================================ */

/* ============================================
   تم نقل Animations (fade-in, scale-in, slide-in) إلى base.css
   ============================================ */

/* ===== تصميم قسم معلومات المدرسة الجديد ===== */

/* School Info Header */
.school-info-header {
  text-align: center;
  margin-bottom: 4rem;
  padding-top: 3rem;
  position: relative;
}

.info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 25px;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
  min-width: 180px;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.4);
}

.info-badge i {
  font-size: 1.1rem;
  color: var(--text-white);
}

.info-badge span {
  color: var(--text-white);
}

.school-info-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.school-info-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* School Info Grid */
.school-info-grid {
  margin-bottom: 4rem;
  overflow: visible;
  /* ⚡ Fix: Allow hover effects to breathe */
}

/* Primary Info Cards */
.primary-info-card {
  background: var(--surface-0);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 40px rgba(var(--black-rgb), 0.08);
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.primary-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
}

/* تم إلغاء تأثير hover للبطاقات الرئيسية */
.primary-info-card:hover {
  transform: none !important;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-white);
  flex-shrink: 0;
}

.card-icon.location {
  background: var(--danger-color);
}

.card-icon.education {
  background: var(--info-color);
}

/* إزالة الظلال من أيقونات البطاقات الرئيسية في قسم About */
.primary-info-card .card-icon {
  box-shadow: none !important;
}

.primary-info-card .card-icon::before {
  display: none;
}

.card-title h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 600;
}

.card-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Location Details */
.location-details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(var(--primary-color-rgb), 0.1);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 500;
}

.detail-item i {
  font-size: 0.8rem;
}

/* Education Stats */
.education-stats {
  display: flex;
  gap: 1rem;
}

.stat-box {
  background: rgba(var(--primary-color-rgb), 0.1);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Secondary Info Cards */
.secondary-info-card {
  background: var(--surface-0);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 30px rgba(var(--black-rgb), 0.06);
  border: 1px solid rgba(var(--primary-color-rgb), 0.08);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  position: relative;
}

/* تم إلغاء تأثير hover للبطاقات الثانوية */
.secondary-info-card:hover {
  transform: none !important;
}

.card-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.2rem;
  color: var(--text-white);
}

.card-icon-wrapper.modern {
  background: var(--subject-english-1);
}

.card-icon-wrapper.staff {
  background: var(--subject-science-1);
}

.card-icon-wrapper.social {
  background: var(--subject-digital-1);
}

.secondary-info-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.secondary-info-card p {
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Establishment Year */
.establishment-year {
  background: rgba(var(--secondary-color-rgb), 0.1);
  padding: 0.75rem;
  border-radius: 10px;
  margin-top: 1rem;
}

.establishment-year .year {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--subject-english-1);
  margin-bottom: 0.25rem;
}

.establishment-year .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Staff Count */
.staff-count {
  background: rgba(var(--primary-color-rgb), 0.1);
  padding: 0.75rem;
  border-radius: 10px;
  margin-top: 1rem;
}

.staff-count .count {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--subject-science-1);
  margin-bottom: 0.25rem;
}

.staff-count .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Social Metrics */
.social-metrics {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

.metric {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(var(--subject-digital-1-rgb), 0.1);
  padding: 0.5rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--subject-digital-1);
  font-weight: 500;
}

/* Activities Showcase */
.activities-showcase {
  margin-bottom: 3rem;
}

.activities-card {
  background: rgba(var(--primary-color-rgb), 0.05);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
  position: relative;
  overflow: hidden;
}

.activities-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.activities-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.activities-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-white);
  flex-shrink: 0;
}

.activities-title h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.activities-title p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.activities-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Activity Highlights */
.activity-highlights {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-0);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(var(--black-rgb), 0.05);
  flex: 1;
  min-width: 200px;
}

.highlight-item i {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.highlight-item span {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
}

/* Activity Tags */
.activity-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.4);
}

/* Responsive Design */
@media (max-width: 991px) {
  /* قسم «من نحن» في الرئيسية — تقليل الفراغ الرأسي تحت/فوق الشارة والعنوان */
  #home .about-us-section .school-info-header {
    padding-top: clamp(0.5rem, 2vw, 1rem);
    margin-bottom: clamp(1.25rem, 4vw, 2rem);
  }

  #home .about-us-section .school-info-grid {
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  }

  /* بطاقتا الموقع/التابعية والمرحلة — محاذاة وسط مثل secondary-info-card (محددة بـ #home لتجنب تعارض .card-header في الإدارة) */
  #home .primary-info-card {
    text-align: center;
  }

  #home .primary-info-card .card-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
  }

  #home .primary-info-card .card-title {
    width: 100%;
  }

  #home .primary-info-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #home .primary-info-card .card-content > p {
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
    text-align: center;
  }

  #home .primary-info-card .location-details {
    justify-content: center;
    width: 100%;
  }

  #home .primary-info-card .education-stats {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 20rem;
    margin-inline: auto;
  }

  #home .primary-info-card .stat-box {
    width: 100%;
    max-width: 18rem;
  }
}

@media (max-width: 768px) {
  .school-info-header h2 {
    font-size: 2rem;
  }

  .activity-highlights {
    flex-direction: column;
  }

  .highlight-item {
    min-width: auto;
  }

  .social-metrics {
    flex-direction: column;
    align-items: center;
  }
}

/* تأثيرات hover للبطاقات */
.abt-col {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.abt-col:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(var(--black-rgb), 0.15);
}

.info-card {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.info-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(var(--black-rgb), 0.15);
}

/* ===== تصميم الأزرار المحسن والموحد ===== */

/* الأزرار الأساسية */
.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  letter-spacing: 0.3px;
  z-index: 1;
}

/* الزر الأساسي */
.hero-btn.primary {
  background: var(--primary-color);
  color: var(--text-white);
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
}

.hero-btn.primary:hover {
  background: var(--secondary-color);
  color: var(--text-white);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(var(--primary-color-rgb), 0.4);
}

/* الزر الثانوي */
.hero-btn.secondary {
  background: rgba(var(--white-rgb), 0.1);
  color: var(--text-white);
  border: 2px solid rgba(var(--white-rgb), 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hero-btn.secondary:hover {
  background: rgba(var(--white-rgb), 0.2);
  color: var(--text-white);
  border-color: rgba(var(--white-rgb), 0.5);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(var(--white-rgb), 0.2);
}

/* تأثير اللمعان */
.hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.2), transparent);
  transition: left 0.5s;
  z-index: -1;
}

.hero-btn:hover::before {
  left: 100%;
}

/* تحسينات إضافية للأزرار */
.hero-btn * {
  position: relative;
  z-index: 2;
}

/* Icon inherits parent color - specificity is sufficient */
.hero-btn i {
  color: inherit;
}

/* أزرار المكتبة */
/* Library button - white text on colored background */
.library-btn {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(var(--primary-color-rgb), 0.3);
}

.library-btn:hover {
  background: var(--secondary-color);
  color: var(--text-white);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(var(--primary-color-rgb), 0.4);
}

.library-btn i {
  color: var(--text-white);
}

/* تأثيرات hover للبطاقات والعناصر التفاعلية فقط */
.abt-col[data-scroll-element]:hover,
.info-card[data-scroll-element]:hover,
/* Hover effects for scroll-animated cards */
.feature-card[data-scroll-element]:hover,
.care-card[data-scroll-element]:hover {
  transform: translateY(-3px) scale(1.02);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 10px 25px rgba(var(--black-rgb), 0.1);
}

/* تأثيرات خاصة للصور عند hover */
.masonary li[data-scroll-element]:hover,
.abt-img ul li[data-scroll-element]:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(var(--black-rgb), 0.15);
}

/* النصوص تبقى طبيعية بدون تأثيرات hover */
h1[data-scroll-element],
h2[data-scroll-element],
h3[data-scroll-element],
h4[data-scroll-element],
h5[data-scroll-element],
h6[data-scroll-element],
p[data-scroll-element],
.banner-text h2[data-scroll-element],
.banner-text p[data-scroll-element],
/* Section titles should not have pointer cursor */
.section-title h2[data-scroll-element],
.section-title p[data-scroll-element] {
  cursor: default;
}

h1[data-scroll-element]:hover,
h2[data-scroll-element]:hover,
h3[data-scroll-element]:hover,
h4[data-scroll-element]:hover,
h5[data-scroll-element]:hover,
h6[data-scroll-element]:hover,
p[data-scroll-element]:hover,
.banner-text h2[data-scroll-element]:hover,
.banner-text p[data-scroll-element]:hover,
/* Disable hover effects on section titles */
.section-title h2[data-scroll-element]:hover,
.section-title p[data-scroll-element]:hover {
  transform: none;
  box-shadow: none;
}

/* تأثيرات hover للصور */
.masonary li,
.abt-img ul li {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.masonary li:hover,
.abt-img ul li:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(var(--black-rgb), 0.2);
  z-index: 10;
}

.masonary li img,
.abt-img ul li img {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.masonary li:hover img,
.abt-img ul li:hover img {
  transform: scale(1.1);
  filter: brightness(1.1) contrast(1.1);
}

/* Footer is static - no scroll animations */
footer {
  opacity: 1;
  transform: none;
}

/* الثيمات القديمة تم حذفها - استخدم الثيمات الجديدة في نهاية الملف */

/* إعادة تعيين الأساسيات */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* خلفية الصفحات (ما عدا الرئيسية) - تعتمد على متغيرات الثيم */
body:not(.index-page) {
  background-color: var(--bg-color);
}

#main-content {
  margin-top: 0;
  padding-top: 0;
}

/* الحاوي الرئيسي */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header styles moved to assets/css/main_page_css/header.css */


/* الأقسام الرئيسية */
.page-section {
  padding: 120px 0 50px;
  /* زيادة padding-top لتجنب الهيدر */
  display: none;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* لا نفرض ارتفاع شاشة على قسم الرئيسية — يتكدس مع هيرو full-viewport ويُحدث فراغاً رأسياً */
.page-section:not(#home) {
  min-height: 100vh;
}

#home.page-section {
  min-height: 0 !important;
  padding: 0 !important;
}

.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Non-index pages should show sections immediately */
body:not(.index-page) .page-section {
  display: block;
  opacity: 1;
  transform: translateY(0);
  padding-top: 120px;
  /* إضافة padding للصفحات المنفصلة */
}

@keyframes sectionSlideIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   تم نقل Hero Section إلى main_page_css/hero.css
   ============================================ */

/* ============================================
   تم نقل Features Section إلى main_page_css/features.css
   ============================================ */

/* ===== Enhanced Features Section ===== */
.features {
  padding: 80px 0;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(var(--primary-color-rgb), 0.12) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(var(--secondary-color-rgb), 0.1) 0%, transparent 50%),
    radial-gradient(circle at 10% 10%, rgba(var(--primary-color-rgb), 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(var(--secondary-color-rgb), 0.05) 0%, transparent 40%),
    linear-gradient(135deg, var(--surface-0) 0%, var(--neutral-50) 30%, var(--neutral-200) 70%, var(--neutral-300) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 15%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(var(--primary-color-rgb), 0.04) 0%, transparent 60%);
  border-radius: 50%;
  z-index: 1;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 20%;
  left: 8%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(var(--secondary-color-rgb), 0.04) 0%, transparent 60%);
  border-radius: 50%;
  z-index: 1;
  animation: float 6s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) scale(1);
    opacity: 0.7;
  }

  50% {
    transform: translateY(-20px) scale(1.1);
    opacity: 1;
  }
}

/* ===== Hero Entrance Animations ===== */
@keyframes heroFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(60px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroSlideInRight {
  0% {
    opacity: 0;
    transform: translateX(80px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-80px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroScaleIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroRotateIn {
  0% {
    opacity: 0;
    transform: rotate(-10deg) scale(0.8);
  }

  100% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

@keyframes heroGlow {
  0% {
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.1);
  }

  50% {
    box-shadow: 0 0 40px rgba(var(--primary-color-rgb), 0.3);
  }

  100% {
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.1);
  }
}

@keyframes heroTextReveal {
  0% {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroStatsCounter {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes heroShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* Hero Animation Classes */
.hero-entrance-animation .hero-badge {
  opacity: 0;
  animation: heroFadeInUp 1s ease-out 0.2s both;
}

.hero-entrance-animation .hero-title {
  opacity: 0;
  animation: heroTextReveal 1.2s ease-out 0.4s both;
}

.hero-entrance-animation .hero-description {
  opacity: 0;
  animation: heroFadeInUp 1s ease-out 0.6s both;
}

.hero-entrance-animation .hero-stats {
  opacity: 0;
  animation: heroSlideInLeft 1s ease-out 0.8s both;
}

.hero-entrance-animation .hero-stats .stat:nth-child(1) {
  opacity: 0;
  animation: heroStatsCounter 0.8s ease-out 1s both;
}

.hero-entrance-animation .hero-stats .stat:nth-child(2) {
  opacity: 0;
  animation: heroStatsCounter 0.8s ease-out 1.2s both;
}

.hero-entrance-animation .hero-stats .stat:nth-child(3) {
  opacity: 0;
  animation: heroStatsCounter 0.8s ease-out 1.4s both;
}

.hero-entrance-animation .hero-actions {
  opacity: 0;
  animation: heroFadeInUp 1s ease-out 1s both;
}

.hero-entrance-animation .hero-actions .btn-primary {
  opacity: 0;
  animation: heroScaleIn 0.8s ease-out 1.2s both;
}

.hero-entrance-animation .hero-actions .btn-secondary {
  opacity: 0;
  animation: heroScaleIn 0.8s ease-out 1.4s both;
}

.hero-entrance-animation .hero-visual {
  opacity: 0;
  animation: heroSlideInRight 1.2s ease-out 0.6s both;
}

.hero-entrance-animation .hero-image {
  opacity: 0;
  animation: heroRotateIn 1.5s ease-out 0.8s both, heroGlow 3s ease-in-out 2s infinite;
}

/* Enhanced shimmer effect for hero title */
.hero-entrance-animation .hero-title .highlight {
  background: var(--primary-color);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: heroShimmer 3s ease-in-out 1.5s infinite;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

.hero-text {
  padding-right: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* #home .hero-badge - تم نقله إلى hero.css لتجنب التعارض */

#home .hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

#home .hero-title .highlight,
.banner-text h2 .highlight {
  background: linear-gradient(90deg, var(--primary-grad), var(--secondary-grad));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px var(--accent-shadow));
  -webkit-filter: drop-shadow(0 2px 8px var(--accent-shadow));
  position: relative;
}

#home .hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  background: rgba(var(--white-rgb), 0.7);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  border: 1px solid rgba(var(--white-rgb), 0.2);
  box-shadow: 0 8px 32px rgba(var(--black-rgb), 0.06);
}

.stat {
  text-align: center;
  position: relative;
  padding: 1rem 0.5rem;
  transition: all 0.3s ease;
}

.stat::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.stat:hover::after {
  width: 60%;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.3;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  padding: 14px 28px;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-white);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  position: relative;
  width: 400px;
  height: 450px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 25px 50px rgba(var(--black-rgb), 0.08),
    0 0 0 1px rgba(var(--white-rgb), 0.3);
  background: rgba(var(--white-rgb), 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--white-rgb), 0.2);
  padding: 15px;
  transform: rotate(-2deg);
  transition: all 0.4s ease;
  cursor: pointer;
}

.hero-image:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow:
    0 35px 70px rgba(var(--black-rgb), 0.12),
    0 0 0 1px rgba(var(--white-rgb), 0.4);
  background: rgba(var(--white-rgb), 0.3);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--white-rgb), 0.1);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.3s ease;
  color: var(--primary-color);
  border-radius: 16px;
}

.hero-image:hover .image-overlay {
  opacity: 1;
}

.image-overlay i {
  font-size: 2.5rem;
  transition: transform 0.3s ease;
}

.hero-image:hover .image-overlay i {
  transform: scale(1.1);
}

/* Image Modal Styles */
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--black-rgb), 0.9);
  backdrop-filter: blur(20px);
  cursor: pointer;
}

.modal-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  z-index: 2;
}

.modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(var(--white-rgb), 0.1);
  border: 2px solid rgba(var(--white-rgb), 0.3);
  color: var(--text-white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  z-index: 3;
}

.modal-close:hover {
  background: rgba(var(--white-rgb), 0.2);
  transform: scale(1.1) rotate(90deg);
}

.modal-image-wrapper {
  max-width: 90%;
  max-height: 80%;
  position: relative;
  animation: modalImageIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 25px 80px rgba(var(--black-rgb), 0.3);
}

.modal-info {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--text-white);
  z-index: 3;
}

.modal-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.modal-info p {
  font-size: 0.9rem;
  opacity: 0.8;
}

@keyframes modalImageIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(50px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* Responsive Design for Hero Section */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-text {
    padding-right: 0;
    order: 2;
  }

  .hero-visual {
    order: 1;
  }

  #home .hero-title {
    font-size: 2.5rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem 1rem;
  }

  .hero-image {
    width: 300px;
    height: 350px;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #home .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .hero-image {
    width: 250px;
    height: 300px;
  }
}

/* backdrop-filter for hero buttons - border-color removed to prevent conflicts */
.hero-btn {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats .stat-item {
  text-align: center;
  background: rgba(var(--white-rgb), 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--white-rgb), 0.2);
  border-radius: 20px;
  padding: 30px 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-stats .stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.hero-stats .stat-item:hover::before {
  transform: scaleX(1);
}

.hero-stats .stat-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  transition: all 0.3s ease;
}

.hero-stats .stat-icon i {
  font-size: 1.5rem;
  color: var(--text-white);
}

.hero-stats .stat-item:hover {
  background: rgba(var(--white-rgb), 0.15);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(var(--black-rgb), 0.1);
}

.hero-stats .stat-number {
  display: block;
  font-size: 2.8rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--surface-0), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stats .stat-label {
  font-size: 0.95rem;
  opacity: 0.9;
  font-weight: 500;
  line-height: 1.4;
}

/* Hero Trust Indicators */
.hero-trust-indicators {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--white-rgb), 0.08);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(var(--white-rgb), 0.1);
  transition: all 0.3s ease;
  opacity: 0.9;
}

.trust-item:hover {
  background: rgba(var(--white-rgb), 0.15);
  transform: translateY(-2px);
  opacity: 1;
}

.trust-item i {
  font-size: 1rem;
  color: var(--secondary-color);
}

/* ═══════════════════════════════════════════════════════════
   LEGACY ANIMATION SYSTEM (matches old system exactly)
   Used by: .fade-in, .scale-in, .slide-in-left, .slide-in-right
   Triggered by: adding .animate class
   ═══════════════════════════════════════════════════════════ */

/* Base states - elements start hidden */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in {
  opacity: 0;
  transform: translateY(50px) scale(0.8);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animated states - elements become visible */
.fade-in.animate {
  opacity: 1;
  transform: translateY(0);
}

.scale-in.animate {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.slide-in-left.animate {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right.animate {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays for sequential animations */
.stagger-1 {
  transition-delay: 0.1s;
}

.stagger-2 {
  transition-delay: 0.2s;
}

.stagger-3 {
  transition-delay: 0.3s;
}

.stagger-4 {
  transition-delay: 0.4s;
}

.stagger-5 {
  transition-delay: 0.5s;
}

.stagger-6 {
  transition-delay: 0.6s;
}

/* Gallery tuning: faster stagger for 10+ items (scoped only to gallery) */
#gallery-grid .stagger-1 {
  transition-delay: 0.05s;
}

#gallery-grid .stagger-2 {
  transition-delay: 0.10s;
}

#gallery-grid .stagger-3 {
  transition-delay: 0.15s;
}

#gallery-grid .stagger-4 {
  transition-delay: 0.20s;
}

#gallery-grid .stagger-5 {
  transition-delay: 0.25s;
}

#gallery-grid .stagger-6 {
  transition-delay: 0.30s;
}

/* Performance optimization */
.fade-in,
.scale-in,
.slide-in-left,
.slide-in-right {
  will-change: opacity, transform;
  backface-visibility: hidden;
}

/* Enhanced Animations */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-30px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(30px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Enhanced Features Section ===== */
.features {
  padding: 80px 0;
  background: var(--surface-0);
  position: relative;
  z-index: 10;
  margin-top: 0;
  padding-top: 80px;
  box-shadow: 0 -10px 30px rgba(var(--black-rgb), 0.1);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-color);
  margin-bottom: 20px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

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

.feature-card {
  background: var(--surface-0);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(var(--black-rgb), 0.08);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--black-rgb), 0.05);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 70px rgba(var(--black-rgb), 0.15);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
  font-size: 2rem;
  color: var(--surface-0);
}

.feature-card h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}

/* ===== Statistics Section ===== */
.statistics {
  padding: 80px 0;
  background: var(--primary-color);
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}

.statistics::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.statistics .section-header {
  position: relative;
  z-index: 2;
}

.statistics .section-title {
  color: var(--text-white);
}

.statistics .section-title::after {
  background: linear-gradient(90deg, rgba(var(--white-rgb), 1), rgba(var(--white-rgb), 0.7));
}

.statistics .section-subtitle {
  color: rgba(var(--white-rgb), 0.9);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.stat-card {
  background: rgba(var(--white-rgb), 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--white-rgb), 0.2);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, rgba(var(--white-rgb), 1), rgba(var(--white-rgb), 0.7));
}

.stat-card:hover {
  transform: translateY(-5px);
  background: rgba(var(--white-rgb), 0.15);
  box-shadow: 0 20px 60px rgba(var(--black-rgb), 0.2);
}

.stat-icon {
  width: 70px;
  height: 70px;
  background: rgba(var(--white-rgb), 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
}

.stat-icon i {
  font-size: 1.8rem;
  color: var(--text-white);
}

.stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 500;
}


/* ===== Modal Styles ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      rgba(var(--white-rgb), 0.3) 0%,
      rgba(var(--white-rgb), 0.4) 50%,
      rgba(var(--black-rgb), 0.35) 100%);
  backdrop-filter: blur(20px) brightness(1.15) saturate(1.3);
  animation: modalFadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--surface-0);
  margin: 3vh auto;
  border-radius: 25px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 80px rgba(var(--black-rgb), 0.3);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 2rem;
  font-weight: bold;
  color: rgba(var(--white-rgb), 0.8);
  cursor: pointer;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--black-rgb), 0.2);
  transition: all 0.3s ease;
}

.modal-close-btn:hover {
  background: rgba(var(--black-rgb), 0.4);
  color: var(--text-white);
  transform: rotate(90deg);
}

/* ===== School Family/Facilities Section ===== */
#facilities {
  background: var(--neutral-100);
  position: relative;
  overflow: hidden;
}

#facilities::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="facilities-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="2" fill="%23dee2e6" opacity="0.4"/><circle cx="5" cy="5" r="1" fill="%23adb5bd" opacity="0.3"/><circle cx="25" cy="25" r="1.5" fill="%23ced4da" opacity="0.35"/></pattern></defs><rect width="100" height="100" fill="url(%23facilities-pattern)"/></svg>');
  opacity: 0.6;
  z-index: 1;
}

#facilities .container {
  position: relative;
  z-index: 2;
}

/* Enhanced Family Stats Styling */
.family-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  position: relative;
  z-index: 2;
}

.family-stats .stat-item {
  background: var(--surface-0);
  padding: 2.5rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 50px rgba(var(--black-rgb), 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--black-rgb), 0.05);
}

.family-stats .stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.family-stats .stat-item:hover::before {
  transform: scaleX(1);
}

.family-stats .stat-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 70px rgba(var(--black-rgb), 0.15);
}

.family-stats .stat-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(var(--primary-color-rgb), 0.3);
}

.family-stats .stat-item:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 40px rgba(var(--primary-color-rgb), 0.4);
}

.family-stats .stat-icon i {
  font-size: 1.8rem;
  color: var(--text-white);
}

.family-stats .stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.family-stats .stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.family-stats .stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Responsive Design for Facilities Section */
@media (max-width: 768px) {
  #facilities {
    padding: 60px 0;
  }

  .family-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
  }

  .family-stats .stat-item {
    padding: 2rem;
  }

  .family-stats .stat-icon {
    width: 60px;
    height: 60px;
  }

  .family-stats .stat-icon i {
    font-size: 1.5rem;
  }

  .family-stats .stat-number {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .family-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .family-stats .stat-item {
    padding: 1.5rem;
  }

  .family-stats .stat-number {
    font-size: 1.8rem;
  }
}

/* ===== Top Students Section ===== */
#top-students {
  background: transparent;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

#top-students::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
}

#top-students .container {
  position: relative;
  z-index: 2;
}

#top-students h2 {
  color: var(--text-primary);
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}

#top-students h2::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

#top-students .page-intro {
  color: var(--text-secondary);
  font-size: 1.2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
  line-height: 1.8;
}

/* Enhanced Students Grid - Force grid layout */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 200px;
}

/* Modern Student Cards */
.student-card {
  background: var(--surface-0);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(var(--black-rgb), 0.08);
  border-top: 4px solid var(--primary-color);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    border-top 0.3s ease,
    background 0.3s ease,
    opacity 0.6s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  /* Ensure card is visible and positioned correctly */
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: gentleFloat 6s ease-in-out infinite;
  display: flex;
  flex-direction: column;
  visibility: visible;
}

/* تأثير الخلفية العلوية */
.student-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--secondary-color-rgb), 0.05));
  border-radius: 20px 20px 0 0;
  z-index: -1;
}



/* Card enter animation state */
.student-card.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: gentleFloat 6s ease-in-out infinite;
}



/* Student Photo Container */
.student-photo-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 15px auto;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: 0 8px 25px rgba(var(--black-rgb), 0.15);
  z-index: 2;
  transition: all 0.3s ease;
}

.student-rank-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary-color);
  color: var(--text-white);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  border: 3px solid var(--surface-0);
  box-shadow: 0 4px 15px rgba(var(--black-rgb), 0.2);
  z-index: 3;
}


.student-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-0);
}


.student-photo-container.no-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-white);
  font-weight: 700;
}

/* Student Info */
.student-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
  position: relative;
}

.student-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.student-class-badge {
  background: rgba(var(--primary-color-rgb), 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(var(--primary-color-rgb), 0.2);
}

.student-specialty-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary-color);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(var(--black-rgb), 0.1);
}

.student-specialty-tag i {
  font-size: 0.9rem;
}

.student-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  line-height: 1.3;
  margin: 0;
}

/* Student Info Section */
.student-info {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.05), rgba(var(--secondary-color-rgb), 0.03));
  border-radius: 15px;
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.student-class {
  font-size: 0.9rem;
  color: var(--text-white);
  font-weight: 600;
  margin: 5px 0 15px 0;
  padding: 6px 14px;
  background: rgba(var(--black-rgb), 0.05);
  border: 1px solid rgba(var(--black-rgb), 0.1);
  border-radius: 25px;
  display: inline-block;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.student-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 20px 0;
  font-style: italic;
  text-align: center;
}

/* Medals Section */
.student-medals-section {
  margin-top: 15px;
}

.medals-title {
  font-size: 0.9rem;
  color: var(--text-color);
  font-weight: 600;
  margin: 0 0 15px 0;
  text-align: center;
  position: relative;
}

.medals-title::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

.student-achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.05), rgba(var(--secondary-color-rgb), 0.03));
  border-radius: 20px;
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
  position: relative;
  overflow: hidden;
}

.student-achievements-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 20px 20px 0 0;
}

/* Unique Achievement Badges System - نظام الأوسمة الفريدة */
.star-badge {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin: 5px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.star-badge i {
  color: var(--gold);
  font-size: 28px;
  transition: all 0.3s ease;
}

/* Academic Excellence Badge - وسام التفوق الدراسي */
.star-badge.academic i {
  font-family: "Font Awesome 5 Free";
}

.star-badge.academic i::before {
  content: "\f19d";
  /* fa-graduation-cap */
}

/* Good Behavior Badge - وسام السلوك المثالي */
.star-badge.behavior i {
  font-family: "Font Awesome 5 Free";
}

.star-badge.behavior i::before {
  content: "\f004";
  /* fa-heart */
}

/* Creativity Badge - وسام الإبداع والتميز */
.star-badge.creativity i {
  font-family: "Font Awesome 5 Free";
}

.star-badge.creativity i::before {
  content: "\f0eb";
  /* fa-lightbulb */
}

.star-badge:hover {
  transform: scale(1.1);
}

.star-badge:hover i {
  opacity: 0.8;
}

/* Star Tooltip */
/* Stars Container - حاوية النجوم */
.student-stars-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 15px;
  padding: 0;
  border: none;
  background: none;
}

/* Creative Search & Filter System - نظام البحث والتصفية الإبداعي */
.students-search-container {
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.05), rgba(var(--secondary-color-rgb), 0.03));
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--primary-color-rgb), 0.1);
}

.search-header {
  text-align: center;
  margin-bottom: 25px;
}

.search-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 8px;
}

.search-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Grade Selector - محدد الصفوف */
.grade-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.grade-btn {
  padding: 12px 20px;
  background: var(--surface-0);
  border: 2px solid rgba(var(--primary-color-rgb), 0.2);
  border-radius: 15px;
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
  text-align: center;
}

.grade-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.15);
}

.grade-btn.active {
  background: var(--primary-color);
  color: var(--text-white);
  border-color: var(--primary-color);
}

/* Section Selector - محدد الشعب */
.section-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.section-btn {
  width: 45px;
  height: 45px;
  background: var(--surface-0);
  border: 2px solid rgba(var(--secondary-color-rgb), 0.2);
  border-radius: 50%;
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(var(--secondary-color-rgb), 0.2);
}

.section-btn.active {
  background: var(--secondary-color);
  color: var(--text-white);
  border-color: var(--secondary-color);
}

/* Search Input - حقل البحث */
.student-search-input {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 15px 20px;
  border: 2px solid rgba(var(--primary-color-rgb), 0.2);
  border-radius: 25px;
  font-size: 1rem;
  background: var(--surface-0);
  transition: all 0.3s ease;
}

.student-search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

/* Load More Button - زر عرض المزيد */
.load-more-container {
  text-align: center;
  margin: 40px 0;
}

.load-more-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(var(--primary-color-rgb), 0.3);
}

.load-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.2), transparent);
  transition: left 0.5s;
}

.load-more-btn:hover::before {
  left: 100%;
}

/* Loading Animation - تأثير التحميل */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(var(--white-rgb), 0.3);
  border-radius: 50%;
  border-top-color: var(--text-white);
  animation: spin 1s ease-in-out infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Creative Grid Layout - تخطيط الشبكة الإبداعي */
.students-creative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

/* Student Card Styles - أنماط بطاقات الطلاب */
.student-card {
  background: rgba(var(--white-rgb), 0.95);
  border-radius: 25px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(var(--black-rgb), 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(var(--white-rgb), 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.student-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}



/* Student Image Container */
.student-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px;
  position: relative;
}

.student-image-circle {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  box-shadow: 0 8px 25px rgba(var(--black-rgb), 0.15);
  transition: all 0.3s ease;
}

.student-image-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--black-rgb), 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.image-overlay i {
  color: var(--text-white);
  font-size: 1.5rem;
}


/* Student Badges */
.student-badge-container {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  justify-content: center;
}

.student-grade-badge,
.student-section-badge {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.student-section-badge {
  background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
}


.student-info {
  padding: 20px;
  text-align: center;
}

.student-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 15px;
}

.student-achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--gold), var(--ejada-gold-3));
  color: var(--gold-brown);
  padding: 8px 15px;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 15px;
  box-shadow: 0 4px 15px rgba(var(--gold-rgb), 0.3);
  transition: transform 0.3s ease;
}

.student-achievement-badge i {
  font-size: 1rem;
}


.student-description {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.student-stars {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
  justify-content: center;
}

.student-stars i {
  color: var(--gold);
  font-size: 1.2rem;
  text-shadow: 0 2px 4px rgba(var(--gold-rgb), 0.3);
  transition: transform 0.3s ease;
}


.student-subjects-section {
  margin-top: 20px;
}

.subjects-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 10px;
  text-align: center;
}

.student-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.subject-tag {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.subject-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(var(--black-rgb), 0.2);
}

/* Modal Styles - أنماط النافذة المنبثقة */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--black-rgb), 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.modal-show {
  opacity: 1;
}

.modal-content {
  background: linear-gradient(135deg, rgba(var(--white-rgb), 0.95), rgba(var(--white-rgb), 0.9));
  margin: 3% auto;
  padding: 0;
  border-radius: 25px;
  width: 95%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(var(--black-rgb), 0.3);
  position: relative;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(var(--white-rgb), 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.modal-show .modal-content {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2rem;
  font-weight: bold;
  color: var(--text-light);
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(var(--white-rgb), 0.1);
}

.modal-close-btn:hover {
  color: var(--primary-color);
  background: rgba(var(--white-rgb), 0.2);
  transform: scale(1.1);
}

/* Modal Student Header */
.modal-student-header {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  border-radius: 25px 25px 0 0;
}

.modal-student-image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.modal-student-image-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(var(--white-rgb), 0.3);
  box-shadow: 0 10px 30px rgba(var(--black-rgb), 0.3);
}

.modal-student-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-student-badges {
  display: flex;
  gap: 10px;
}

.modal-grade-badge,
.modal-section-badge {
  background: rgba(var(--white-rgb), 0.2);
  color: var(--text-white);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.modal-student-info {
  flex: 1;
}

.modal-student-name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
}

.modal-achievement-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(var(--gold-rgb), 0.2);
  color: var(--gold);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(var(--gold-rgb), 0.3);
}

.modal-student-stars {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stars-label {
  font-size: 1rem;
  font-weight: 600;
}

.modal-student-stars i {
  color: var(--gold);
  font-size: 1.3rem;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
}

/* Remove old modal styles that conflict */

.modal-student-grade {
  margin: 0 0 10px 0;
  opacity: 0.9;
}

.modal-student-stars {
  display: flex;
  gap: 3px;
}

.modal-student-stars i {
  color: var(--gold);
  font-size: 1rem;
}

.modal-student-body {
  padding: 30px;
}

.modal-achievement,
.modal-description,
.modal-subjects {
  margin-bottom: 25px;
}

.modal-achievement h4,
.modal-description h4,
.modal-subjects h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.subjects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Staggered Animation - تأثير متدرج */
.student-card.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design - التصميم المتجاوب */
@media (max-width: 768px) {
  .students-search-container {
    padding: 20px;
    margin-bottom: 20px;
  }

  .search-title {
    font-size: 1.2rem;
  }

  .grade-selector {
    gap: 10px;
  }

  .grade-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
    min-width: 70px;
  }

  .section-selector {
    gap: 8px;
  }

  .section-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }

  .student-search-input {
    padding: 12px 18px;
    font-size: 0.9rem;
  }

  .students-creative-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .student-card {
    max-width: 100%;
  }

  .student-image {
    height: 180px;
  }

  .student-grade-badge {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .student-info {
    padding: 15px;
  }

  .student-name {
    font-size: 1.1rem;
  }

  .load-more-btn {
    padding: 12px 25px;
    font-size: 0.9rem;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .modal-student-header {
    padding: 20px;
    flex-direction: column;
    text-align: center;
  }

  .modal-student-image {
    margin: 0 0 15px 0;
  }

  .modal-student-body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .grade-selector {
    flex-direction: column;
    align-items: center;
  }

  .grade-btn {
    width: 200px;
  }

  .section-selector {
    justify-content: center;
    max-width: 300px;
    margin: 0 auto 20px;
  }

  .section-btn {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }

  .student-search-input {
    max-width: 100%;
  }

  .results-counter {
    font-size: 0.8rem;
  }
}

/* Results Counter - عداد النتائج */
.results-counter {
  text-align: center;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.results-highlight {
  color: var(--primary-color);
  font-weight: 600;
}

.star-tooltip {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(var(--black-rgb), 0.9);
  color: var(--text-white);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.star-badge:hover .star-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-3px);
}

.medal-item:nth-child(5) .medal-front {
  background: radial-gradient(circle at 30% 30%, var(--info-color), var(--subject-math-2), var(--subject-math-2));
  border-color: var(--subject-math-2);
}

.medal-item:nth-child(6) .medal-front {
  background: radial-gradient(circle at 30% 30%, var(--subject-science-1), var(--subject-science-2), var(--subject-science-2));
  border-color: var(--subject-science-2);
}

.achievement-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  background: rgba(var(--secondary-color-rgb), 0.1);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-color);
  border: 3px dashed rgba(var(--secondary-color-rgb), 0.4);
  text-align: center;
  line-height: 1.1;
  margin: 0 auto;
  transition: all 0.3s ease;
}

.achievement-more:hover {
  transform: scale(1.05);
  background: rgba(var(--secondary-color-rgb), 0.15);
}

.student-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(var(--black-rgb), 0.1);
}

.student-gpa-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary-color);
  color: var(--text-white);
  padding: 10px 15px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(var(--black-rgb), 0.1);
}

.student-gpa-modern i {
  color: var(--gold);
  font-size: 1rem;
}

.gpa-value {
  font-weight: 700;
  font-size: 1rem;
}

.gpa-label {
  font-size: 0.8rem;
  opacity: 0.9;
}

.view-details-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--primary-color-rgb), 0.1);
  color: var(--primary-color);
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.view-details-btn:hover {
  background: var(--primary-color);
  color: var(--text-white);
  transform: translateX(-3px);
}

.view-details-btn i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.view-details-btn:hover i {
  transform: translateX(-2px);
}

.view-detail.student-rank {
  position: absolute;
  bottom: 10px;
  right: 15px;
  background: var(--subject-arts-1);
  color: var(--text-white);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(var(--danger-color-rgb), 0.4);
}


.student-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.1);
}

.student-grade {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 1rem;
  background: rgba(var(--primary-color-rgb), 0.1);
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
}

.student-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.achievement-badge {
  background: var(--gold);
  color: var(--gold-dark);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(var(--gold-rgb), 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.achievement-badge::before {
  content: '⭐';
  margin-right: 4px;
}

.achievement-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(var(--gold-rgb), 0.4);
}

/* Student Stats */
.student-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-item {
  background: rgba(var(--primary-color-rgb), 0.1);
  padding: 1rem;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(var(--primary-color-rgb), 0.15);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary-color);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 4px;
}

/* Enhanced Modal Styling */
#student-modal .modal-content {
  background: var(--surface-0);
  border: 1px solid rgba(var(--black-rgb), 0.1);
  box-shadow: 0 25px 60px rgba(var(--black-rgb), 0.15);
}

/* Responsive Design for Top Students */
@media (max-width: 768px) {
  #top-students {
    padding: 80px 0 60px;
  }

  #top-students h2 {
    font-size: 2.5rem;
  }

  #top-students .page-intro {
    font-size: 1.1rem;
    margin-bottom: 3rem;
  }

  .students-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
  }

  .student-card {
    padding: 1.5rem;
  }

  .student-photo-container {
    width: 100px;
    height: 100px;
  }

  .student-name {
    font-size: 1.3rem;
  }

  .student-stats {
    gap: 0.8rem;
  }

  .stat-item {
    padding: 0.8rem;
  }
}

@media (max-width: 480px) {
  #top-students h2 {
    font-size: 2rem;
  }

  #top-students .page-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .students-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 10px 0;
  }

  .student-card {
    padding: 1.2rem;
    margin: 0;
  }

  .student-photo-container {
    width: 90px;
    height: 90px;
  }

  .student-name {
    font-size: 1.2rem;
  }

  .achievement-badge {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .student-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ===== Contact Section ===== */
/* ملاحظة: جميع أنماط صفحة التواصل موجودة في contact-elegant.css و contact-form.css */
/* تم حذف الكود الميت من هنا لتجنب التعارضات */

/* Footer styles moved to assets/css/main_page_css/footer.css */

/* ============================================
   تم نقل Library Showcase Section إلى main_page_css/library-showcase.css
   ============================================ */

.library-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="library-books" width="40" height="40" patternUnits="userSpaceOnUse"><rect x="12" y="10" width="8" height="12" rx="1" fill="%234a90e2" opacity="0.05"/><rect x="21" y="8" width="8" height="14" rx="1" fill="%234a90e2" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23library-books)"/></svg>');
  z-index: 1;
}

.library-showcase .container {
  position: relative;
  z-index: 2;
}

.library-showcase .library-content {
  position: relative;
  z-index: 2;
  /* إزالة الصندوق الكبير */
  background: none;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  min-height: auto;
}

.library-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

.library-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(var(--black-rgb), 0.15);
  transition: transform 0.3s ease;
}

.library-image:hover {
  transform: translateY(-10px);
}

.library-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
}

.library-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  z-index: 10;
  transition: all 0.3s ease;
}

.library-badge:hover {
  transform: translateY(-2px) scale(1.05);
}

.library-info h3 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
  transition: all 0.3s ease;
  transform: translateZ(0);
}

.library-info p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.library-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: var(--surface-0);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(var(--black-rgb), 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(var(--black-rgb), 0.05);
}

.feature-item:hover {
  transform: translateX(-10px);
  box-shadow: 0 10px 30px rgba(var(--black-rgb), 0.12);
  border-color: var(--primary-color);
}

.feature-item .stat-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.feature-item span {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.library-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(var(--primary-color-rgb), 0.3);
  position: relative;
  overflow: hidden;
}

.library-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.2), transparent);
  transition: left 0.5s;
}

.library-btn:hover::before {
  left: 100%;
}

.library-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(var(--primary-color-rgb), 0.4);
}

.library-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.library-btn:hover i {
  transform: translateX(-5px);
}

.library-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.library-stats .stat-item {
  background: var(--surface-0);
  padding: 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(var(--black-rgb), 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(var(--black-rgb), 0.05);
}

.library-stats .stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.library-stats .stat-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 60px rgba(var(--black-rgb), 0.15);
}

.library-stats .stat-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: transform 0.3s ease;
}

.library-stats .stat-item:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
}

.library-stats .stat-icon i {
  font-size: 1.8rem;
  color: var(--text-white);
}

.library-stats .stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.library-stats .stat-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  line-height: 1;
}

.library-stats .stat-label {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== Gallery Preview Section ===== */
.gallery-preview {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--surface-0) 0%, var(--neutral-100) 100%);
  position: relative;
  /* visible عمودياً حتى لا يُقصّ عنوان المجلة (gradient + حروف عربية) */
  overflow-x: clip;
  overflow-y: visible;
}

.gallery-preview::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="gallery-dots" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="2" fill="%23e9ecef" opacity="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23gallery-dots)"/></svg>');
  opacity: 0.4;
  z-index: 1;
}

.gallery-preview .container {
  position: relative;
  z-index: 2;
}

.gallery-preview .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.gallery-preview .gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(var(--black-rgb), 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--surface-0);
  cursor: pointer;
}

.gallery-preview .gallery-item:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 25px 80px rgba(var(--black-rgb), 0.2);
}

.gallery-preview .gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-preview .gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-preview .gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(var(--black-rgb), 0.8));
  color: var(--text-white);
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-preview .gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-preview .gallery-overlay h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-white);
}

.gallery-preview .gallery-overlay p {
  font-size: 0.95rem;
  opacity: 0.9;
  line-height: 1.5;
  margin: 0;
}

.gallery-actions {
  text-align: center;
  margin-top: 2rem;
}

.gallery-actions .hero-btn {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 15px 35px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
}

.gallery-actions .hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.2), transparent);
  transition: left 0.5s;
  z-index: 0;
}

.gallery-actions .hero-btn:hover::before {
  left: 100%;
}

.gallery-actions .hero-btn:hover {
  background: var(--secondary-color);
  color: var(--text-white);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(var(--primary-color-rgb), 0.4);
}

/* Enhanced Gallery Item Animations */
.gallery-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(var(--white-rgb), 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.gallery-item:hover::after {
  transform: translateX(100%);
}



/* Responsive Design for Gallery Preview — محدد بـ .gallery-preview حتى لا يتسرّب لمعرض الصفحة الرئيسية */
@media (max-width: 768px) {
  .gallery-preview {
    padding: 60px 0;
  }

  .gallery-preview .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .gallery-preview .gallery-item img {
    height: 200px;
  }

  .gallery-preview .gallery-overlay {
    padding: 1.5rem 1rem 1rem;
  }

  .gallery-preview .gallery-overlay h4 {
    font-size: 1.1rem;
  }

  .gallery-preview .gallery-overlay p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .gallery-preview .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-preview .gallery-item {
    margin: 0 10px;
  }

  .gallery-preview .gallery-item img {
    height: 180px;
  }

  .gallery-actions .hero-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

/* ============================================
   تم نقل Student Care Section إلى main_page_css/student-care.css
   ============================================ */

.student-care::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="care-hearts" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M20 30c-5-10-20-10-20 0 0 10 20 20 20 20s20-10 20-20c0-10-15-10-20 0z" fill="%23ff6b6b" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23care-hearts)"/></svg>');
  z-index: 1;
}

.student-care .container {
  position: relative;
  z-index: 2;
}

.care-content {
  margin-top: 3rem;
}

.care-main {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.care-image {
  position: relative;
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(var(--black-rgb), 0.15);
  transition: all 0.4s ease;
}

.care-image:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 80px rgba(var(--black-rgb), 0.2);
}

.care-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.care-image:hover img {
  transform: scale(1.05);
}

.care-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  background: linear-gradient(135deg, var(--danger-color), var(--danger-color-hover));
  color: var(--text-white);
  padding: 10px 18px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 6px 20px rgba(var(--danger-color-rgb), 0.3), 0 3px 10px rgba(var(--black-rgb), 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(var(--white-rgb), 0.4);
  z-index: 10;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
  transition: all 0.3s ease;
  transform: translateZ(0);
}

.care-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(var(--danger-color-rgb), 0.4), 0 4px 12px rgba(var(--black-rgb), 0.2);
}

.care-badge i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.care-badge:hover i {
  transform: scale(1.1);
}


.care-info h3 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.care-info>p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.care-policies {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.policy-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface-0);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(var(--black-rgb), 0.08);
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.policy-item:nth-child(1) {
  border-left-color: var(--subject-arts-1);
}

.policy-item:nth-child(2) {
  border-left-color: var(--subject-music-1);
}

.policy-item:nth-child(3) {
  border-left-color: var(--info-color);
}

.policy-item:hover {
  transform: translateX(10px);
  box-shadow: 0 15px 40px rgba(var(--black-rgb), 0.12);
}

.policy-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--text-white);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.policy-item:nth-child(1) .policy-icon {
  background: linear-gradient(135deg, var(--subject-arts-1), var(--subject-arts-2));
}

.policy-item:nth-child(2) .policy-icon {
  background: linear-gradient(135deg, var(--subject-music-1), var(--subject-music-2));
}

.policy-item:nth-child(3) .policy-icon {
  background: linear-gradient(135deg, var(--info-color), var(--subject-math-1));
}

.policy-item:hover .policy-icon {
  transform: rotate(360deg) scale(1.1);
}

.policy-content h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.policy-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* Enhanced Care Section Animations */
.care-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(var(--white-rgb), 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}

.care-image:hover::after {
  transform: translateX(100%);
}

/* Responsive Design for Student Care */
@media (max-width: 768px) {
  .student-care {
    padding: 60px 0;
  }

  .care-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .care-image {
    order: -1;
  }

  .care-image img {
    height: 300px;
  }

  .care-info h3 {
    font-size: 1.8rem;
  }

  .care-info>p {
    font-size: 1rem;
  }

  .policy-item {
    padding: 1.2rem;
    gap: 1rem;
  }

  .policy-icon {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .policy-content h4 {
    font-size: 1.1rem;
  }

  .policy-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .care-policies {
    gap: 1rem;
  }

  .policy-item {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
    gap: 0.8rem;
  }

  .policy-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    margin: 0 auto;
  }

  .care-badge {
    padding: 10px 15px;
    font-size: 0.8rem;
  }
}

/* ============================================
   تم نقل Testimonials Section إلى main_page_css/testimonials.css
   ============================================ */

/* Rating Showcase */
.rating-showcase {
  margin-bottom: 4rem;
}

.main-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  background: var(--surface-0);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(var(--black-rgb), 0.1);
  margin-bottom: 3rem;
}

/* Rating Responsive Design */
@media (max-width: 768px) {
  .main-rating {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1.5rem;
    text-align: center;
  }

  .rating-badge {
    min-width: auto;
  }

  .rating-stars i {
    font-size: 1.5rem;
  }

  .rating-score {
    font-size: 3rem;
  }

  .rating-info {
    max-width: 100%;
  }

  .rating-info h3 {
    font-size: 1.8rem;
  }

  .rating-info p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .main-rating {
    padding: 1.5rem 1rem;
    gap: 1.5rem;
  }

  .rating-stars i {
    font-size: 1.2rem;
  }

  .rating-score {
    font-size: 2.5rem;
  }

  .rating-text {
    font-size: 1rem;
  }

  .rating-info h3 {
    font-size: 1.5rem;
  }

  .rating-info p {
    font-size: 0.9rem;
  }
}

.rating-badge {
  text-align: center;
  min-width: 200px;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.rating-stars i {
  font-size: 2rem;
  color: var(--gold);
  filter: drop-shadow(0 2px 4px rgba(var(--black-rgb), 0.2));
}

.rating-score {
  font-size: 4rem;
  font-weight: 900;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.rating-text {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.rating-info {
  flex: 1;
  max-width: 600px;
}

.rating-info h3 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.rating-info p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.ministry-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(var(--black-rgb), 0.2);
}

.ministry-badge i {
  font-size: 1.1rem;
}

/* Rating Highlights */
.rating-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .rating-highlights {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .highlight-item {
    padding: 1.5rem;
  }

  .highlight-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
  }

  .highlight-icon i {
    font-size: 1.2rem;
  }

  .highlight-content h4 {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .rating-highlights {
    gap: 1rem;
  }

  .highlight-item {
    padding: 1rem;
  }

  .highlight-icon {
    width: 40px;
    height: 40px;
  }

  .highlight-icon i {
    font-size: 1rem;
  }
}

.highlight-item {
  background: var(--surface-0);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(var(--black-rgb), 0.08);
  transition: all 0.3s ease;
}

.highlight-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(var(--black-rgb), 0.12);
}

.highlight-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.highlight-icon i {
  font-size: 1.5rem;
  color: var(--text-white);
}

.highlight-content h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.highlight-rating {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.rating-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  min-width: 60px;
}

.rating-bar {
  flex: 1;
  height: 8px;
  background: var(--neutral-200);
  border-radius: 4px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 4px;
  animation: fillBar 2s ease-out;
}

@keyframes fillBar {
  from {
    width: 0%;
  }

  to {
    width: 100%;
  }
}

/* ============================================
   تم نقل Testimonials Section (dup 2) إلى main_page_css/testimonials.css
   ============================================ */

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="testimonial-quotes" width="50" height="50" patternUnits="userSpaceOnUse"><text x="25" y="35" font-family="serif" font-size="30" fill="%23e9ecef" opacity="0.3" text-anchor="middle">"</text></pattern></defs><rect width="100" height="100" fill="url(%23testimonial-quotes)"/></svg>');
  z-index: 1;
}

.testimonials .container {
  position: relative;
  z-index: 2;
}

.testimonials .section-title {
  color: var(--text-primary);
  font-size: 2.5rem;
}

.testimonials .section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2.5rem;
  margin-top: 4rem;
  margin-bottom: 3rem;
}

.testimonial-card {
  background: var(--surface-0);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 15px 50px rgba(var(--black-rgb), 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid rgba(var(--black-rgb), 0.05);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 30px;
  font-size: 6rem;
  font-family: serif;
  color: var(--primary-color);
  opacity: 0.2;
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 80px rgba(var(--black-rgb), 0.15);
}

.testimonial-content {
  margin-bottom: 2rem;
}

.testimonial-rating {
  display: flex;
  gap: 5px;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.testimonial-rating i {
  color: var(--gold);
  font-size: 1.3rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(var(--gold-rgb), 0.3));
}

.testimonial-card:hover .testimonial-rating i {
  transform: scale(1.2) rotate(360deg);
  animation: starTwinkle 0.6s ease;
}

@keyframes starTwinkle {

  0%,
  100% {
    transform: scale(1.2);
  }

  50% {
    transform: scale(1.4);
  }
}

.testimonial-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  position: relative;
  padding: 0 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(var(--primary-color-rgb), 0.1);
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(var(--primary-color-rgb), 0.3);
  transition: all 0.3s ease;
}

.testimonial-card:hover .author-avatar {
  transform: scale(1.1) rotate(360deg);
}

.author-info {
  text-align: center;
}

.author-info h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.author-info span {
  font-size: 0.95rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.testimonials-actions {
  text-align: center;
  margin-top: 3rem;
}

.testimonials-actions .hero-btn {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 15px 35px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
}

.testimonials-actions .hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.2), transparent);
  transition: left 0.5s;
  z-index: 0;
}

.testimonials-actions .hero-btn:hover::before {
  left: 100%;
}

.testimonials-actions .hero-btn:hover {
  background: var(--secondary-color);
  color: var(--text-white);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(var(--primary-color-rgb), 0.4);
}

/* Enhanced Testimonial Animations */
.testimonial-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(var(--white-rgb), 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  border-radius: 25px;
}

.testimonial-card:hover::after {
  transform: translateX(100%);
}

/* Floating Animation for Cards */
@keyframes shimmer {

  0%,
  100% {
    background-position: -200% 0;
    opacity: 0.3;
  }

  50% {
    background-position: 200% 0;
    opacity: 0.8;
  }
}

.testimonial-card:nth-child(odd) {
  animation: shimmer 6s ease-in-out infinite;
}

.testimonial-card:nth-child(even) {
  animation: float 6s ease-in-out infinite reverse;
}


/* Responsive Design for Testimonials */
@media (max-width: 768px) {
  .testimonials {
    padding: 80px 0;
  }

  .testimonials .section-title {
    font-size: 2.2rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
  }

  .testimonial-card {
    padding: 2rem;
    margin: 0 10px;
  }

  .testimonial-content p {
    font-size: 1rem;
  }

  .author-avatar {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .author-info h4 {
    font-size: 1.1rem;
  }

  .author-info span {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .testimonials {
    padding: 60px 0;
  }

  .testimonials .section-title {
    font-size: 1.8rem;
  }

  .testimonials .section-subtitle {
    font-size: 1rem;
  }

  .testimonial-card {
    padding: 1.5rem;
  }

  .testimonial-card::before {
    font-size: 4rem;
    top: -5px;
    left: 20px;
  }

  .testimonial-rating i {
    font-size: 1.1rem;
  }

  .testimonial-content p {
    font-size: 0.95rem;
    padding: 0 0.5rem;
  }

  .testimonials-actions .hero-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

/* ===== News Section ===== */
.news {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--neutral-200) 0%, var(--neutral-100) 100%);
  position: relative;
  overflow: hidden;
}

.news::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="news-pattern" width="30" height="30" patternUnits="userSpaceOnUse"><rect x="12" y="5" width="6" height="8" fill="%23dee2e6" opacity="0.3"/><rect x="12" y="15" width="6" height="2" fill="%23dee2e6" opacity="0.3"/><rect x="12" y="19" width="6" height="2" fill="%23dee2e6" opacity="0.3"/><rect x="12" y="23" width="6" height="2" fill="%23dee2e6" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23news-pattern)"/></svg>');
  z-index: 1;
}

.news .container {
  position: relative;
  z-index: 2;
}

.news-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.news-card {
  background: var(--surface-0);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(var(--black-rgb), 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.news-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 80px rgba(var(--black-rgb), 0.15);
}

.news-card.featured {
  grid-row: span 2;
}

.news-image {
  position: relative;
  overflow: hidden;
}

.news-card.featured .news-image {
  height: 300px;
}

.news-card:not(.featured) .news-image {
  height: 200px;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.1);
}

.news-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, var(--accent-color), var(--subject-english-2));
  color: var(--text-white);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(var(--accent-color-rgb), 0.3), 0 3px 10px rgba(var(--black-rgb), 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(var(--white-rgb), 0.4);
  z-index: 10;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
  transition: all 0.3s ease;
  transform: translateZ(0);
}

.news-badge:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(var(--accent-color-rgb), 0.4), 0 4px 12px rgba(var(--black-rgb), 0.2);
}

.news-content {
  padding: 1.5rem;
}

.news-card.featured .news-content {
  padding: 2rem;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.news-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-date::before {
  content: '📅';
  font-size: 0.8rem;
}

.student-grade-badge {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.news-category {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-white);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

.news-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.news-card.featured .news-content h3 {
  font-size: 1.6rem;
}

.news-card:hover .news-content h3 {
  color: var(--primary-color);
}

.news-content p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.news-card.featured .news-content p {
  font-size: 1rem;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.read-more::after {
  content: '←';
  transition: transform 0.3s ease;
}

.read-more:hover {
  color: var(--secondary-color);
}

.read-more:hover::after {
  transform: translateX(-5px);
}

.news-actions {
  text-align: center;
  margin-top: 2rem;
}

.news-actions .hero-btn {
  background: var(--primary-color);
  color: var(--text-white);
  padding: 15px 35px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
}

.news-actions .hero-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.2), transparent);
  transition: left 0.5s;
  z-index: 0;
}

.news-actions .hero-btn:hover::before {
  left: 100%;
}

.news-actions .hero-btn:hover {
  background: var(--secondary-color);
  color: var(--text-white);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(var(--primary-color-rgb), 0.4);
}

/* Enhanced News Animations */
.news-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(var(--white-rgb), 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
  border-radius: 20px;
}

.news-card:hover::after {
  transform: translateX(100%);
}

/* News Card Hover Effects */
.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  border-radius: 20px;
}

/* Responsive Design for News */
@media (max-width: 768px) {
  .news {
    padding: 60px 0;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .news-card.featured {
    grid-row: span 1;
  }

  .news-card.featured .news-image,
  .news-card:not(.featured) .news-image {
    height: 200px;
  }

  .news-content,
  .news-card.featured .news-content {
    padding: 1.5rem;
  }

  .news-content h3,
  .news-card.featured .news-content h3 {
    font-size: 1.2rem;
  }

  .news-content p,
  .news-card.featured .news-content p {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .news-grid {
    gap: 1rem;
    margin: 2rem 10px;
  }

  .news-card {
    margin: 0;
  }

  .news-content {
    padding: 1.2rem;
  }

  .news-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .news-badge {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  .news-actions .hero-btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
}


/* Responsive Design for Library Showcase */
@media (max-width: 768px) {
  .library-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .library-image {
    order: -1;
  }

  .library-info h3 {
    font-size: 1.8rem;
  }

  .library-stats {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-item:hover {
    transform: translateY(-5px);
  }
}

@media (max-width: 480px) {
  .library-showcase {
    padding: 60px 0;
  }

  .library-info h3 {
    font-size: 1.6rem;
  }

  .library-info p {
    font-size: 1rem;
  }

  .library-stats .stat-item {
    padding: 1.5rem;
  }

  .library-stats .stat-number {
    font-size: 2rem;
  }
}

/* ============================================
   تم نقل CTA Section إلى main_page_css/cta.css
   ============================================ */

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="ctaPattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="%23dee2e6" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23ctaPattern)"/></svg>');
  opacity: 0.5;
}

.cta-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 2;
}

.cta-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 20px;
  position: relative;
}

.cta-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.cta-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.cta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.cta-card {
  background: rgba(var(--white-rgb), 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 25px 20px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(var(--black-rgb), 0.08);
  border: 1px solid rgba(var(--white-rgb), 0.2);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: all 0.3s ease;
}

.cta-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(var(--black-rgb), 0.12);
  border-color: var(--primary-color);
  background: rgba(var(--white-rgb), 0.98);
  backdrop-filter: blur(15px);
}

.cta-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.2);
  flex-shrink: 0;
}

.cta-card:hover .cta-icon {
  transform: scale(1.15) rotate(8deg);
  box-shadow: 0 8px 25px rgba(var(--primary-color-rgb), 0.3);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.cta-icon i {
  font-size: 1.6rem;
  color: var(--text-white);
  z-index: 1;
  position: relative;
}

/* CTA content layout */
.cta-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
  position: relative;
  visibility: visible;
  opacity: 1;
}

.cta-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  transition: all 0.3s ease;
  line-height: 1.3;
}

.cta-card:hover .cta-content h3 {
  color: var(--primary-color);
  transform: translateX(5px);
}

.cta-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 15px;
  flex: 1;
  transition: all 0.3s ease;
}

.cta-card:hover .cta-content p {
  color: var(--text-primary);
  transform: translateX(3px);
}

.cta-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-bottom: 15px;
  margin-top: auto;
}

.cta-stats .stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  transition: all 0.3s ease;
}

.cta-card:hover .cta-stats .stat-number {
  transform: scale(1.05);
  color: var(--secondary-color);
}

.cta-stats .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-card:hover .cta-stats .stat-label {
  color: var(--text-primary);
  transform: translateX(3px);
}

.cta-arrow {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0.8;
  box-shadow: 0 2px 8px rgba(var(--primary-color-rgb), 0.2);
}

.cta-card:hover .cta-arrow {
  transform: translateX(-5px) scale(1.1);
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  opacity: 1;
  box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
}

.cta-arrow i {
  font-size: 0.9rem;
  color: var(--text-white);
  transition: all 0.3s ease;
}

.cta-card:hover .cta-arrow i {
  transform: scale(1.1) rotate(5deg);
}

/* Responsive Design for CTA */
@media (max-width: 1024px) {
  .cta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  /* متوافق مع cta.css — مساحة لزر العودة للأعلى على الهاتف */
  .cta-section {
    padding: 60px 0 calc(9.25rem + env(safe-area-inset-bottom, 0px));
  }

  .cta-title {
    font-size: 2.2rem;
  }

  .cta-subtitle {
    font-size: 1.1rem;
  }

  .cta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .cta-card {
    padding: 25px 20px;
  }

  .cta-icon {
    width: 60px;
    height: 60px;
  }

  .cta-icon i {
    font-size: 1.5rem;
  }

  .cta-content h3 {
    font-size: 1.2rem;
  }

  .cta-content p {
    font-size: 0.9rem;
  }

  .cta-stats .stat-number {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .cta-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .cta-card {
    padding: 25px 20px;
  }

  .cta-content h3 {
    font-size: 1.3rem;
  }

  .cta-content p {
    font-size: 0.95rem;
  }

  .cta-stats .stat-number {
    font-size: 1.8rem;
  }
}

/* ===== Back to Top Button - Redesigned ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  will-change: opacity, visibility;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
  0% {
    transform: translateX(-50%) scale(0.3);
    opacity: 0;
  }

  50% {
    transform: translateX(-50%) scale(1.05);
  }

  70% {
    transform: translateX(-50%) scale(0.9);
  }

  100% {
    transform: translateX(-50%) scale(1);
    opacity: 1;
  }
}

.back-to-top-content {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50px;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 40px rgba(var(--primary-color-rgb), 0.4);
  border: 2px solid rgba(var(--white-rgb), 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.back-to-top-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--white-rgb), 0.3), transparent);
  transition: left 0.6s ease;
}

.back-to-top:hover .back-to-top-content::before {
  left: 100%;
}

.back-to-top:hover .back-to-top-content {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(var(--primary-color-rgb), 0.6);
  border-color: rgba(var(--white-rgb), 0.4);
}

.back-to-top-icon {
  width: 40px;
  height: 40px;
  background: rgba(var(--white-rgb), 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.back-to-top:hover .back-to-top-icon {
  transform: scale(1.05);
  background: rgba(var(--white-rgb), 0.3);
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-8px);
  }
}

.back-to-top-icon i {
  font-size: 1.2rem;
  color: var(--text-white);
  transition: all 0.3s ease;
}

.back-to-top:hover .back-to-top-icon i {
  transform: translateY(-2px);
  text-shadow: 0 4px 8px rgba(var(--black-rgb), 0.3);
}

.back-to-top.launching .back-to-top-icon {
  animation: rocketLaunch 1s ease-out forwards;
}

@keyframes rocketLaunch {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }

  30% {
    transform: translateY(-10px) rotate(-5deg) scale(1.1);
  }

  60% {
    transform: translateY(-30px) rotate(5deg) scale(1.2);
  }

  100% {
    transform: translateY(-50px) rotate(0deg) scale(1.3);
    opacity: 0.7;
  }
}

.back-to-top-text {
  display: flex;
  flex-direction: column;
  color: var(--text-white);
  text-align: right;
}

.main-text {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(var(--black-rgb), 0.3);
}

.sub-text {
  font-size: 0.8rem;
  opacity: 0.9;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(var(--black-rgb), 0.3);
}

/* Enhanced Pulse Effect with Multiple Rings */
.back-to-top::before,
.back-to-top::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50px;
  border: 2px solid var(--primary-color);
  pointer-events: none;
  z-index: -1;
}

.back-to-top::before {
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  animation: pulseRing1 2.5s ease-out infinite;
}

.back-to-top::after {
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  animation: pulseRing2 2.5s ease-out infinite 0.8s;
}

@keyframes pulseRing1 {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
    border-width: 3px;
  }

  25% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.6;
    border-width: 2px;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.4;
    border-width: 1px;
  }

  75% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.2;
    border-width: 1px;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
    border-width: 0px;
  }
}

@keyframes pulseRing2 {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
    border-width: 2px;
    border-color: var(--secondary-color);
  }

  30% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.5;
    border-width: 2px;
  }

  60% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0.3;
    border-width: 1px;
  }

  85% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0.1;
    border-width: 1px;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
    border-width: 0px;
  }
}

.back-to-top:hover::before {
  animation: pulseRingHover1 1.5s ease-out infinite;
}

.back-to-top:hover::after {
  animation: pulseRingHover2 1.5s ease-out infinite 0.3s;
}

@keyframes pulseRingHover1 {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    border-width: 3px;
    border-color: var(--primary-color);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0.6;
    border-width: 2px;
  }

  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
    border-width: 0px;
  }
}

@keyframes pulseRingHover2 {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
    border-width: 2px;
    border-color: var(--secondary-color);
  }

  50% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0.4;
    border-width: 1px;
  }

  100% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
    border-width: 0px;
  }
}

/* Responsive Design for Back to Top */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 80px;
  }

  .back-to-top-content {
    padding: 12px 20px;
    gap: 10px;
  }

  .back-to-top-icon {
    width: 35px;
    height: 35px;
  }

  .back-to-top-icon i {
    font-size: 1rem;
  }

  .main-text {
    font-size: 0.9rem;
  }

  .sub-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 60px;
  }

  .back-to-top-content {
    padding: 10px 15px;
    gap: 8px;
  }

  .back-to-top-icon {
    width: 30px;
    height: 30px;
  }

  .back-to-top-icon i {
    font-size: 0.9rem;
  }

  .main-text {
    font-size: 0.8rem;
  }

  .sub-text {
    font-size: 0.7rem;
  }
}

/* Header responsive styles moved to assets/css/main_page_css/header.css */

@media (max-width: 1024px) {
  .hero-content {
    max-width: 900px;
    padding: 80px 40px;
  }

  .hero-title .title-highlight {
    font-size: 4rem;
  }

  .hero-features {
    gap: 1.5rem;
  }

  .feature-highlight {
    padding: 15px 25px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {

  /* Hero Mobile Styles */
  .hero-content {
    padding: 60px 30px;
    max-width: 100%;
  }

  /* #home .hero-badge - في hero.css */

  #home .hero-title .title-main {
    font-size: 1.8rem;
  }

  #home .hero-title .title-highlight {
    font-size: 3rem;
  }

  #home .hero-title .title-tagline {
    font-size: 1.2rem;
  }

  #home .hero-subtitle {
    font-size: 1.1rem;
    max-width: 100%;
  }

  .hero-features {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }

  .feature-highlight {
    padding: 12px 20px;
    font-size: 0.95rem;
    min-width: 200px;
  }
}

@media (max-width: 480px) {

  /* Hero Small Mobile Styles */
  .hero-content {
    padding: 40px 20px;
  }

  /* #home .hero-badge - في hero.css */

  #home .hero-title .title-main {
    font-size: 1.5rem;
  }

  #home .hero-title .title-highlight {
    font-size: 2.5rem;
  }

  #home .hero-title .title-tagline {
    font-size: 1rem;
  }

  #home .hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
  }

  .feature-highlight {
    padding: 10px 15px;
    font-size: 0.9rem;
    gap: 8px;
    min-width: 180px;
  }

  .feature-highlight i {
    font-size: 1.1rem;
  }
}

/* ===== تأثيرات بسيطة ===== */

/* تأثير تمرير سلس ومحسن للصفحة */
html {
  /* scroll-behavior: smooth; <-- DISABLED for App-like feel */
  scroll-padding-top: 80px;
}

html,
body {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

/* تحسين الأداء للتحريك */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fade-in-up,
.fade-in-left,
.fade-in-right,
.scale-in,
.slide-in-bottom {
  will-change: transform, opacity;
}

/* تأثير انتقال الصفحات */
.page-transition {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
  opacity: 1;
  transform: translateY(0);
}

/* تأثير الهيدر عند التمرير */
.elegant-header {
  transition: all 0.3s ease;
}

/* Scrolled header state - higher specificity with class */
.elegant-header.scrolled {
  background: rgba(var(--white-rgb), 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(var(--black-rgb), 0.1);
}

/* تأثيرات الأزرار */
.nav-link,
.action-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
  transform: translateY(-2px);
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(var(--black-rgb), 0.15);
}

/* ===== تحسينات الموبايل للصفحة الرئيسية ===== */
@media (max-width: 576px) {

  /* إصلاح محدد للحاويات الرئيسية فقط */
  .wrapper {
    max-width: 100%;
    overflow: hidden;
  }

  /* تحسين قسم الترحيب */
  .about-us-section {
    padding-block: clamp(1rem, 3vw, 1.5rem);
    padding-inline: 0;
    overflow: hidden;
    width: 100%;
  }

  #home .about-us-section .school-info-header {
    padding-top: 0.35rem;
    margin-bottom: 1.25rem;
  }

  .about-us-section .container {
    padding: 0 1rem;
    max-width: 100%;
  }

  .section-header h2 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  .section-header p {
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
  }

  /* تحسين قسم المميزات */
  .features {
    padding: 3rem 0;
  }

  .features .container {
    padding: 0 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card {
    text-align: center;
    padding: 1.5rem;
    margin: 0 auto;
    max-width: 300px;
  }

  .feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  .feature-card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* تحسين قسم الأنشطة */
  .activities-section {
    padding: 3rem 0;
  }

  .activities-section .container {
    padding: 0 1rem;
  }

  .activities-section .activities-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .activities-section .activity-card {
    margin: 0 auto;
    max-width: 300px;
    text-align: center;
  }

  .activities-section .activity-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .activities-section .activity-card p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  /* تحسين المعرض */
  .abt-img .masonary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 1rem;
    max-width: 100%;
    overflow: hidden;
  }

  /* Responsive masonry - media query provides specificity */
  .abt-img .masonary li {
    width: 100%;
    margin: 0;
    max-width: 100%;
  }

  .abt-img .masonary li img {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  /* تحسين الفوتر */
  .main-footer {
    padding: 2rem 0 1rem;
  }

  .main-footer .container {
    padding: 0 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .footer-section p,
  .footer-section a {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
  }

  .footer-bottom p {
    font-size: 0.8rem;
  }

  /* تحسين الإحصائيات */
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }

  .stat-card {
    text-align: center;
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  /* تحسين النصوص العامة */
  .abt-text h2 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 1rem;
  }

  .abt-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 1rem;
  }

  /* تحسين الأزرار */
  .btn,
  .hero-btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  /* قواعد محددة لمنع horizontal scroll */
  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  /* إصلاح العناصر المطلقة فقط */
  .main-floating-circle-1,
  .main-floating-circle-2,
  .main-floating-circle-3,
  .main-floating-circle-4,
  .main-floating-circle-5 {
    max-width: 50px;
    max-height: 50px;
  }
}

/* ===== Keyframes للتأثيرات الأساسية ===== */