/* =========================================================
   متغيرات الهوية البصرية المستوحاة من علوم الطبيعة والحياة
   ========================================================= */
:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-200: #a7f3d0;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-900: #064e3b;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --amber-500: #f59e0b;
  --sky-600: #0284c7;
  --bg-page: #f4faf7;
  --surface: rgba(255, 255, 255, 0.88);
  --text-main: #0f2922;
  --text-muted: #4b685f;
  --border-soft: rgba(16, 185, 129, 0.18);
  --shadow-sm: 0 4px 16px rgba(6, 78, 59, 0.06);
  --shadow-md: 0 12px 32px rgba(6, 78, 59, 0.1);
  --shadow-lg: 0 20px 48px rgba(6, 78, 59, 0.14);
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

/* خلفية الكانفاس الحيوية المتحركة */
#bio-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 15% 15%, #e6f9f0 0%, #f4faf7 48%, #edf7f6 100%);
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* =========================================================
   شريط التنقل (Navbar)
   ========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald-50), var(--emerald-100));
  border: 1px solid var(--emerald-200);
  display: grid;
  place-items: center;
  animation: gentleFloat 4s ease-in-out infinite;
}

.brand-icon svg {
  width: 28px;
  height: 28px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--emerald-900);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--emerald-100);
  color: var(--emerald-900);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-teacher {
  background: linear-gradient(135deg, var(--emerald-600), var(--teal-600));
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-teacher:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.32);
}

.menu-toggle {
  display: none;
  background: var(--emerald-50);
  border: 1px solid var(--emerald-200);
  color: var(--emerald-900);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* =========================================================
   القسم الرئيسي (Hero Section)
   ========================================================= */
.hero {
  padding: 64px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}

.badge-ens {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--emerald-200);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--emerald-700);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseRing 2s infinite;
}

.hero h1 {
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1.28;
  color: var(--emerald-900);
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--emerald-600), var(--teal-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.en-name {
  display: inline-block;
  font-size: 0.48em;
  letter-spacing: 2px;
  background: var(--emerald-100);
  color: var(--emerald-900);
  padding: 3px 12px;
  border-radius: 8px;
  vertical-align: middle;
  margin-right: 6px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 26px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--emerald-600), var(--emerald-700));
  color: #fff;
  text-decoration: none;
  border: none;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(4, 120, 87, 0.24);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(4, 120, 87, 0.32);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: var(--emerald-900);
  text-decoration: none;
  border: 1px solid var(--emerald-200);
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: var(--emerald-50);
  border-color: var(--emerald-500);
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft);
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item strong {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--emerald-600);
  line-height: 1.1;
}

.stat-item span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--emerald-200);
}

/* =========================================================
   حلزون الـ ADN المتحرك والعناصر الخلوية في الواجهة
   ========================================================= */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bio-orb {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(209, 250, 229, 0.55) 70%, rgba(16, 185, 129, 0.15) 100%);
  border: 2px solid rgba(16, 185, 129, 0.28);
  box-shadow: var(--shadow-lg), inset 0 0 40px rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(13, 148, 136, 0.32);
  pointer-events: none;
}

.orbit-1 {
  inset: -18px;
  animation: spinSlow 24s linear infinite;
}

.orbit-2 {
  inset: 22px;
  animation: spinSlow 18s linear infinite reverse;
}

.organelle {
  position: absolute;
  border-radius: 50%;
}

.chloroplast {
  width: 22px;
  height: 14px;
  background: linear-gradient(135deg, #10b981, #047857);
  top: -7px;
  left: 50%;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.mitochondria {
  width: 20px;
  height: 12px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  bottom: -6px;
  right: 45%;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.dna-stage {
  display: flex;
  flex-direction: column;
  gap: 11px;
  width: 150px;
}

.dna-pair {
  position: relative;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dna-strand-left,
.dna-strand-right {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  z-index: 2;
}

.dna-strand-left {
  background: var(--emerald-600);
  box-shadow: 0 0 10px rgba(5, 150, 105, 0.5);
  animation: dnaLeft 2.8s ease-in-out infinite;
}

.dna-strand-right {
  background: var(--teal-500);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.5);
  animation: dnaRight 2.8s ease-in-out infinite;
}

.dna-bond {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, var(--emerald-500), var(--amber-500), var(--teal-500));
  opacity: 0.65;
  animation: dnaBondPulse 2.8s ease-in-out infinite;
}

.floating-tag {
  position: absolute;
  background: #fff;
  border: 1px solid var(--emerald-200);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--emerald-900);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.tag-1 {
  top: 14px;
  right: -24px;
  animation: gentleFloat 3.6s ease-in-out infinite;
}

.tag-2 {
  bottom: 24px;
  right: -28px;
  animation: gentleFloat 4.2s ease-in-out infinite 0.6s;
}

.tag-3 {
  top: 48%;
  left: -34px;
  animation: gentleFloat 3.9s ease-in-out infinite 1.1s;
}

/* =========================================================
   قسم المستويات الدراسية (1AS / 2AS / 3AS)
   ========================================================= */
.levels-section {
  padding: 40px 0 72px;
}

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 36px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--emerald-600);
  background: var(--emerald-100);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  font-weight: 900;
  color: var(--emerald-900);
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
}

/* بطاقات السنوات الثلاث */
.level-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.level-card {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: right;
  background: var(--surface);
  backdrop-filter: blur(10px);
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-sm);
}

.level-card:hover {
  transform: translateY(-4px);
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-md);
}

.level-card.active {
  background: linear-gradient(135deg, var(--emerald-900), #065f46);
  border-color: var(--emerald-600);
  color: #fff;
  box-shadow: 0 16px 34px rgba(6, 78, 59, 0.25);
}

.level-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--emerald-100);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.level-card.active .level-icon {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.06);
}

.level-info {
  flex: 1;
}

.level-code {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--emerald-100);
  color: var(--emerald-900);
  margin-bottom: 4px;
}

.level-card.active .level-code {
  background: var(--emerald-500);
  color: #fff;
}

.level-info h3 {
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.level-info p {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.level-card.active .level-info p {
  color: var(--emerald-100);
}

.level-arrow {
  font-size: 1.2rem;
  font-weight: 800;
  opacity: 0.5;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.level-card.active .level-arrow {
  opacity: 1;
  transform: translateX(-4px);
}

/* مساحة العمل الخاصة بالسنة المختارة */
.workspace-panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.workspace-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 22px;
}

.current-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--teal-600);
  background: #ccfbf1;
  padding: 3px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.workspace-title-box h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--emerald-900);
}

.search-box {
  position: relative;
  width: min(340px, 100%);
}

.search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 11px 40px 11px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--emerald-200);
  background: var(--bg-page);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--emerald-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

/* تبويبات الدروس / الملخصات / التمارين */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border-soft);
  background: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.22s ease;
}

.cat-tab:hover {
  border-color: var(--emerald-500);
  color: var(--emerald-900);
}

.cat-tab.active {
  background: var(--emerald-600);
  border-color: var(--emerald-600);
  color: #fff;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.24);
}

.count-pill {
  background: rgba(16, 185, 129, 0.14);
  color: var(--emerald-900);
  font-size: 0.78rem;
  padding: 1px 8px;
  border-radius: 999px;
}

.cat-tab.active .count-pill {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* بطاقات الدروس والملخصات والتمارين */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

.item-card {
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  animation: cardFadeIn 0.38s ease backwards;
}

.item-card:hover {
  transform: translateY(-5px);
  border-color: var(--emerald-500);
  box-shadow: var(--shadow-md);
}

.item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.type-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 8px;
}

.type-lesson {
  background: #d1fae5;
  color: #065f46;
}

.type-summary {
  background: #e0f2fe;
  color: #075985;
}

.type-exercise {
  background: #fef3c7;
  color: #92400e;
}

.unit-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

.item-card h4 {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--emerald-900);
  margin-bottom: 8px;
  line-height: 1.45;
}

.item-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--emerald-200);
}

.btn-read {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid var(--emerald-200);
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-read:hover {
  background: var(--emerald-600);
  color: #fff;
  border-color: var(--emerald-600);
}

.btn-delete {
  background: transparent;
  border: none;
  color: #dc2626;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.75;
}

.btn-delete:hover {
  opacity: 1;
  text-decoration: underline;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  background: var(--bg-page);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--emerald-200);
}

.empty-state span {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 10px;
}

/* =========================================================
   قسم التعريف بالأستاذة (About)
   ========================================================= */
.about-section {
  padding: 20px 0 80px;
}

.about-card {
  display: flex;
  align-items: center;
  gap: 32px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  border: 1px solid var(--emerald-200);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.about-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.avatar-ring {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald-500), var(--teal-600));
  display: grid;
  place-items: center;
  font-size: 3.3rem;
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
}

.ens-stamp {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--emerald-900);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
}

.about-text h2 {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--emerald-900);
  margin-bottom: 10px;
}

.about-text h2 small {
  font-size: 0.9rem;
  color: var(--teal-600);
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.about-badges span {
  background: #fff;
  border: 1px solid var(--emerald-200);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--emerald-900);
}

/* =========================================================
   الفوتر (Footer)
   ========================================================= */
.footer {
  background: var(--emerald-900);
  color: var(--emerald-100);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer p {
  font-size: 0.85rem;
  opacity: 0.82;
}

.back-top {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 16px;
  border-radius: 999px;
}

/* =========================================================
   النوافذ المنبثقة (Modals)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 78, 59, 0.55);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #fff;
  width: min(620px, 100%);
  max-height: 88vh;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPop 0.28s ease;
}

.modal-large {
  width: min(820px, 100%);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  background: var(--emerald-50);
  border-bottom: 1px solid var(--emerald-200);
}

.modal-meta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--emerald-700);
  margin-bottom: 4px;
}

.modal-header h3 {
  font-size: 1.28rem;
  font-weight: 900;
  color: var(--emerald-900);
}

.modal-close {
  background: #fff;
  border: 1px solid var(--emerald-200);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.modal-body {
  padding: 24px 26px;
  overflow-y: auto;
  line-height: 1.9;
}

.lesson-article {
  white-space: pre-line;
  font-size: 1.02rem;
  color: var(--text-main);
}

.solution-box {
  margin-top: 22px;
  border-top: 2px dashed var(--emerald-200);
  padding-top: 18px;
}

.solution-content {
  margin-top: 14px;
  background: #f0fdf4;
  border-right: 4px solid var(--emerald-600);
  padding: 16px 18px;
  border-radius: 12px;
  white-space: pre-line;
}

.hidden {
  display: none !important;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 26px;
  border-top: 1px solid var(--border-soft);
  background: #fafdfc;
}

/* حقول نموذج إضافة المحتوى */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--emerald-900);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--emerald-200);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--emerald-500);
}

/* =========================================================
   الحركات (Keyframes Animations)
   ========================================================= */
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes dnaLeft {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(124px) scale(0.82); }
}

@keyframes dnaRight {
  0%, 100% { transform: translateX(0) scale(0.82); }
  50% { transform: translateX(-124px) scale(1); }
}

@keyframes dnaBondPulse {
  0%, 100% { opacity: 0.75; transform: scaleX(1); }
  50% { opacity: 0.2; transform: scaleX(0.2); }
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   التجاوب مع الهواتف والأجهزة اللوحية (Responsive)
   ========================================================= */
@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-inline: auto;
  }
  .hero-cta {
    justify-content: center;
  }
  .level-cards {
    grid-template-columns: 1fr;
  }
  .about-card {
    flex-direction: column;
    text-align: center;
  }
  .about-badges {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--emerald-200);
  }
  .nav-links.open {
    display: flex;
  }
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }
  .bio-orb {
    width: 280px;
    height: 280px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}