/* ==================== PARROT CALM THEME ====================
   تصميم فاتح هادي مستوحى من ألوان اللوجو:
   كحلي (Navy) + برتقالي + أصفر + بنفسجي على خلفية ورقية دافئة
   كل أسماء الكلاسات زي style6.css بالظبط، فاستبدل الملف بس.
============================================================ */
:root {
  /* ---- Brand palette (from logo) ---- */
  --navy: #420e5a;
  --navy-deep: #420e5a;
  --orange: #f26a3d;
  --orange-text: #c4491b;      /* برتقالي أغمق للنصوص عشان الوضوح */
  --yellow: #fbb62b;
  --purple: #7a35a8;

  /* ---- Neutrals ---- */
  --paper: #f4f1f7;            /* خلفية الصفحة */
  --paper-2: #efece5;
  --surface: #ffffff;
  --ink: #0f2547;              /* النص الأساسي */
  --ink-soft: #4b5878;         /* النص الثانوي */
  --ink-mute: #7a859c;
  --line: #e5e0d7;

  /* ---- Legacy names (للتوافق مع أي inline style أو JS قديم) ---- */
  --bg-dark: var(--paper-2);
  --bg-deep: var(--paper);
  --bg-surface: var(--surface);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --primary-accent: var(--orange);
  --secondary-accent: var(--purple);
  --gradient-text: linear-gradient(to right, var(--navy), var(--purple));
  --gradient-aurora: radial-gradient(circle, rgba(251, 182, 43, 0.18), transparent 65%);
  --glass-bg: var(--surface);
  --glass-highlight: 1px solid var(--line);
  --glass-blur: none;
  --glass-border: var(--line);
  --glass-shadow: 0 10px 30px -12px rgba(14, 42, 90, 0.15);

  /* ---- Effects ---- */
  --shadow-sm: 0 1px 2px rgba(14, 42, 90, 0.04), 0 4px 14px -6px rgba(14, 42, 90, 0.08);
  --shadow-md: 0 2px 4px rgba(14, 42, 90, 0.04), 0 14px 32px -12px rgba(14, 42, 90, 0.16);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* ---- Layout ---- */
  --container-width: 1200px;
  --nav-height: 80px;
  --dock-height: 70px;
  --radius-lg: 20px;
  --dock-radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #c9c2b5 var(--paper);
  scrollbar-width: thin;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'Cairo', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

::selection {
  background: rgba(251, 182, 43, 0.4);
  color: var(--navy-deep);
}

:focus-visible {
  outline: 3px solid rgba(242, 106, 61, 0.45);
  outline-offset: 2px;
}

/* ==================== BACKGROUND (خفيف جدًا وثابت) ==================== */
.aurora-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 1;
  animation: none;
}

.aurora-container .blob-1 {
  top: -25%;
  left: -15%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(251, 182, 43, 0.20), transparent 65%);
}

.aurora-container .blob-2 {
  bottom: -25%;
  right: -15%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(122, 53, 168, 0.10), transparent 65%);
}

@media (max-width: 480px) {
  .aurora-container .blob-1,
  .aurora-container .blob-2 {
    width: 120vw;
    height: 120vw;
  }
}

/* إلغاء الضجيج والنجوم والشهب (كانت بتشتت العين) */
.noise-overlay,
.star-field {
  display: none !important;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 12px;
  background: var(--paper);
}

::-webkit-scrollbar-thumb {
  background: #cfc8bb;
  border-radius: 8px;
  border: 3px solid var(--paper);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

::-webkit-scrollbar-corner {
  background: var(--paper);
}

/* ==================== UTILITIES ==================== */
.fade-in {
  animation: riseIn 0.7s ease forwards;
  opacity: 0;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ==================== NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(247, 245, 241, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px -14px rgba(14, 42, 90, 0.25);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 44px;
  width: auto;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  inset-inline: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}

.nav-link:hover {
  color: var(--navy);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--navy);
  cursor: pointer;
}

.mobile-user-bar {
  display: none;
}

@media(max-width: 768px) {
  :root {
    --nav-height: auto;
  }

  .navbar {
    height: auto !important;
    display: flex;
    background: rgba(247, 245, 241, 0.97);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 0;
    transition: background 0.3s ease;
  }

  .navbar.scrolled {
    background: rgba(247, 245, 241, 0.92) !important;
    backdrop-filter: blur(12px);
  }

  .mobile-user-bar {
    display: flex;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(60, 14, 90, 0.03);
    border-top: 1px solid var(--line);
    border-bottom: none;
    width: 100%;
    min-height: 50px;
  }

  .user-capsule {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }

  .user-info {
    padding: 4px 0 !important;
  }

  .user-info span {
    font-size: 0.9rem !important;
  }

  .nav-container {
    height: 60px !important;
    padding: 0 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .logo img {
    height: 32px;
  }

  .logo span {
    font-size: 1.1rem;
  }

  .nav-links,
  .desktop-user-container {
    display: none !important;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--navy);
    cursor: pointer;
    z-index: 1001;
    pointer-events: auto;
  }
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(247, 245, 241, 0.98);
  backdrop-filter: blur(20px);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  padding: 40px 20px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: all 0.35s var(--ease);
  pointer-events: none;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.overlay-close {
  position: absolute;
  top: 30px;
  left: 30px;
  font-size: 2rem;
  color: var(--navy);
  cursor: pointer;
}

.overlay-content {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.overlay-logo {
  text-align: center;
  animation: fadeInDown 0.5s ease;
}

.overlay-logo h2 {
  margin-top: 15px;
  font-size: 1.8rem;
  color: var(--navy);
}

.overlay-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 320px;
}

.overlay-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 22px;
  background: var(--surface);
  color: var(--navy);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s var(--ease);
}

.overlay-link i {
  color: var(--orange);
  width: 24px;
}

.overlay-link:hover {
  border-color: var(--orange);
  transform: translateX(-4px);
  box-shadow: var(--shadow-md);
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media(min-width: 769px) {
  .nav-links {
    display: flex !important;
    position: static;
    flex-direction: row;
    background: transparent;
    padding: 0;
    width: auto;
    border: none;
    backdrop-filter: none;
  }

  .mobile-toggle {
    display: none !important;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== FLOATING DOCK (كحلي زي خلفية اللوجو) ==================== */
.floating-dock-container {
  position: fixed;
  top: 20px;
  inset-inline: 0;
  margin-inline: auto;
  width: fit-content;
  max-width: 90vw;
  z-index: 1100;
  display: flex;
  justify-content: center;
  min-width: 600px;
  pointer-events: none;
}

.floating-dock {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 1100;
  pointer-events: auto;

  background: rgba(86, 8, 105, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;

  padding: 5px 20px;
  gap: 20px;
  min-width: 500px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 14px 34px -10px rgba(14, 42, 90, 0.45);
  min-height: 60px;
  white-space: nowrap;

  opacity: 1;
  clip-path: inset(-40px -40px -40px -40px);
  transition: transform 0.5s var(--ease),
              clip-path 0.25s var(--ease),
              opacity 0.5s ease;
}

.floating-dock.is-hidden {
  transform: translateX(-50%) translateY(-60px);
  clip-path: inset(-40px -40px 100% -40px);
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 480px) {
  .floating-dock-container {
    bottom: 12px;
    width: 95vw;
    min-width: auto;
  }

  .floating-dock {
    padding: 8px 12px;
    gap: 8px;
    border-radius: 20px;
    min-width: 0;
    max-width: 95vw;
  }

  .dock-item span {
    font-size: 0.6rem;
    display: block;
  }

  .dock-item i {
    font-size: 1.2rem;
  }
}

.dock-big-btn {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  gap: 12px;
  transition: background 0.25s ease;
  padding: 10px;
  border-radius: 18px;
}

.dock-big-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dock-big-btn i {
  font-size: 1.4rem;
  color: var(--yellow);
}

.dock-login-btn {
  width: 100%;
  padding: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  border-radius: 12px;
  transition: color 0.25s ease, transform 0.25s var(--ease);
  flex: 1;
}

.dock-item:hover {
  color: var(--yellow);
  transform: translateY(-3px);
}

.dock-item i {
  font-size: 1.4rem;
  margin-bottom: 4px;
  transition: transform 0.25s ease, color 0.25s ease;
  color: inherit;
}

.dock-item:hover i {
  color: var(--yellow);
  transform: scale(1.12);
}

.dock-item span {
  font-size: 0.7rem;
  font-weight: 600;
}

/* ==================== USER PROFILE ==================== */
.user-capsule {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  transition: background 0.25s ease, transform 0.25s ease;
  background: transparent;
}

.user-info:hover {
  background: rgba(14, 42, 90, 0.06);
}

.user-info img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--line);
  transition: border-color 0.25s ease;
}

.user-info:hover img {
  border-color: var(--orange);
}

.user-info span {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  transition: color 0.25s ease;
}

.user-info:hover span {
  color: var(--orange-text);
}

/* لو كبسولة اليوزر جوه الدوك الكحلي */
.floating-dock .user-info span {
  color: #fff;
}

.floating-dock .user-info:hover {
  background: rgba(255, 255, 255, 0.1);
}

.floating-dock .user-info:hover span {
  color: var(--yellow);
}

.floating-dock .user-info img {
  border-color: rgba(255, 255, 255, 0.25);
}

.logout-btn {
  position: absolute;
  top: 100%;
  margin-top: 10px;
  background: #e5484d;
  color: #fff;
  padding: 8px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.25s var(--ease);
  white-space: nowrap;
  box-shadow: 0 10px 22px -10px rgba(229, 72, 77, 0.55);
  z-index: 2000;
}

.user-capsule.active .logout-btn {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.logout-btn:hover {
  background: #d23a3f;
}

/* ==================== HERO ==================== */
.hero {
  min-height: auto;            /* شيلنا الطول الإجباري */
  padding: 110px 0 20px;       /* فوق: بعد النافبار | تحت: المسافة قبل "الخدمات التعليمية" */
  display: flex;
  align-items: flex-start;     /* المحتوى يبدأ من فوق بدل النص */
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  z-index: -1;
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  background: rgba(251, 182, 43, 0.28);
}

.orb-2 {
  bottom: -10%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: rgba(122, 53, 168, 0.14);
}

.hero-content {
  max-width: 900px;
  padding: 1rem 2rem;          /* كان 2rem */
  z-index: 10;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 1.6rem;
  color: var(--navy);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.hero p {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  border: 1px solid var(--navy);
  box-shadow: 0 8px 20px -10px rgba(14, 42, 90, 0.6);
}

.btn-primary:hover {
  background: #163872;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(14, 42, 90, 0.55);
}

.btn-glass {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
}

.btn-glass:hover {
  border-color: var(--orange);
  color: var(--orange-text);
  transform: translateY(-2px);
}

/* ==================== CARDS & GRID ==================== */
.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 3rem;
  color: var(--navy);
}

.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
}

.grid,
.grid-4 {
  grid-template-columns: 1fr !important;
  margin-right: auto !important;
  margin-left: auto !important;
  max-width: 300px !important;
  align-self: flex-start;
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 30px;
  min-height: auto;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 106, 61, 0.45);
  box-shadow: var(--shadow-md);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--orange);
  transition: transform 0.3s ease;
}

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

.card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--navy);
}

.card p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin-bottom: 22px;
  flex-grow: 0;
}

.spotlight-card {
  grid-column: span 1 !important;
}

.card-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.card-decor .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.18;
}

.card-decor .blob-1 {
  top: -30px;
  right: -30px;
  width: 150px;
  height: 150px;
  background: var(--yellow);
}

.card-decor .blob-2 {
  bottom: -30px;
  left: -30px;
  width: 150px;
  height: 150px;
  background: var(--purple);
}

@media (min-width: 900px) {
  .spotlight-card {
    grid-column: span 2;
  }
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--yellow);
  color: var(--navy-deep);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
}

.card .btn {
  width: 100%;
  margin-top: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--navy);
  box-shadow: none;
}

.card .btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ==================== FEATURES ==================== */
.features {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 80px 0;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  border-color: rgba(122, 53, 168, 0.3);
  box-shadow: var(--shadow-md);
}

.feature:nth-child(even) {
  direction: ltr;
}

.feature:nth-child(even) .text {
  direction: rtl;
}

.feature img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 10px 26px -12px rgba(14, 42, 90, 0.3);
  transition: transform 0.4s ease;
}

.feature:hover img {
  transform: scale(1.02);
}

.feature .text h2 {
  font-size: 1.9rem;
  margin-bottom: 14px;
  color: var(--navy);
}

.feature .text p {
  color: var(--ink-soft);
  font-size: 1.08rem;
}

@media (max-width: 768px) {
  .feature {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px;
  }

  .feature:nth-child(even) {
    direction: rtl;
  }
}

/* ==================== FAQ ==================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(242, 106, 61, 0.45);
}

.faq-item summary {
  padding: 18px 22px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  position: relative;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  color: var(--orange);
  font-size: 1.5rem;
  transition: transform 0.3s var(--ease);
  line-height: 1;
}

.faq-item details[open] summary::after {
  transform: rotate(45deg);
}

.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-out;
}

.faq-item details[open] + .faq-content,
.faq-item details[open] .faq-content {
  grid-template-rows: 1fr;
}

.faq-content p {
  min-height: 0;
  overflow: hidden;
  padding: 0 22px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.3s ease-out, padding 0.3s ease;
}

.faq-item details[open] .faq-content p {
  opacity: 1;
  padding-bottom: 20px;
}

.faq-item p {
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ==================== FOOTER (كحلي يقفل الصفحة) ==================== */
footer {
  text-align: center;
  padding: 64px 0 48px;
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--orange), var(--yellow), var(--purple)) 1;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-column h3 {
  color: #fff;
  margin-bottom: 22px;
  font-size: 1.15rem;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 12px;
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--yellow);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.social-links a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s, color 0.25s;
}

.social-links a:hover {
  background: var(--yellow);
  color: var(--navy-deep);
  transform: translateY(-3px);
}

/* ==================== RESTRICTION CLASSES ==================== */
.restricted-card {
  position: relative;
  opacity: 0.7;
  pointer-events: none;
}

.restricted-card::after {
  content: "غير متاح 🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 42, 90, 0.88);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: bold;
  z-index: 20;
  white-space: nowrap;
}

.restricted-option {
  pointer-events: none;
  opacity: 0.5;
  position: relative;
}

.restricted {
  background: var(--yellow);
  color: var(--navy-deep);
  padding: 10px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
}

.notification-bar {
  display: none !important;
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 69, 0.5);
  backdrop-filter: blur(6px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--surface);
  color: var(--ink);
  padding: 40px;
  border-radius: 24px;
  text-align: center;
  max-width: 800px;
  width: 95%;
  position: relative;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(10, 31, 69, 0.45);
}

.close-modal {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 2rem;
  cursor: pointer;
  color: var(--ink-mute);
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--navy);
}

.test-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.test-option {
  background: var(--paper);
  color: var(--navy);
  font-weight: 700;
  padding: 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: 1px solid var(--line);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.test-option:hover {
  background: var(--surface);
  border-color: var(--orange);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.test-icon img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 12px;
  object-fit: contain;
  padding: 6px;
}

@media (max-width: 600px) {
  .test-options {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .test-option {
    flex-direction: row;
    justify-content: flex-start;
    padding: 12px;
    gap: 15px;
    text-align: right;
  }

  .test-icon img {
    width: 50px;
    height: 50px;
    margin-bottom: 0;
  }

  .test-option div {
    text-align: right;
  }
}

/* ==================== PDF LIST & CARDS ==================== */
.pdf-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
  padding: 24px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.pdf-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
  height: 100%;
  opacity: 0;
  transform: translateY(16px);
  animation: pdfFadeUp 0.6s var(--ease) forwards;
  transition: transform 0.3s var(--ease),
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.pdf-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
      rgba(251, 182, 43, 0.12),
      transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.pdf-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange), var(--yellow), transparent);
  border-radius: 3px;
  opacity: 0;
  transition: opacity 0.3s ease, left 0.3s ease, right 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.pdf-card:hover {
  transform: translateY(-4px);
  border-color: rgba(242, 106, 61, 0.4);
  box-shadow: var(--shadow-md);
}

.pdf-card:hover::before {
  opacity: 1;
}

.pdf-card:hover::after {
  opacity: 1;
  left: 10%;
  right: 10%;
}

.pdf-icon-wrapper {
  width: 56px;
  height: 56px;
  background: rgba(122, 53, 168, 0.09);
  border: 1px solid rgba(122, 53, 168, 0.18);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.6rem;
  color: var(--purple);
  position: relative;
  z-index: 1;
  transition: all 0.3s var(--ease);
}

.pdf-card:hover .pdf-icon-wrapper {
  background: rgba(122, 53, 168, 0.15);
  transform: scale(1.05);
}

.pdf-card h3 {
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.pdf-meta {
  font-size: 0.82rem;
  color: var(--ink-mute);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

.pdf-meta span::after {
  content: "•";
  margin-left: 8px;
  opacity: 0.5;
}

.pdf-meta span:last-child::after {
  content: "";
}

.pdf-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.btn-action {
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-view {
  background: var(--navy);
  color: #fff;
  border: none;
}

.btn-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-view:hover {
  background: #163872;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px rgba(14, 42, 90, 0.6);
}

.btn-view:hover::before {
  opacity: 1;
}

.btn-view:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-download {
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  width: 44px;
  padding: 0;
  border-radius: 12px;
}

.btn-download:hover {
  border-color: var(--orange);
  color: var(--orange-text);
  background: rgba(242, 106, 61, 0.07);
  transform: translateY(-2px);
}

.btn-download:active {
  transform: translateY(0);
}

@keyframes pdfFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .pdf-list {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 0;
  }

  .pdf-card {
    padding: 20px 18px 18px;
    border-radius: 18px;
  }

  .pdf-icon-wrapper {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .pdf-card h3 {
    font-size: 1rem;
  }

  .pdf-actions {
    grid-template-columns: 1fr 1fr;
  }

  .btn-download {
    width: auto;
    padding: 10px;
  }
}

/* ==================== ROTATING CARD / POPUP ==================== */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(6px);
  background: rgba(10, 31, 69, 0.55);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

.popup {
  background: transparent;
  width: 90%;
  max-width: 450px;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.rotator-container {
  perspective: 1500px;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.rotating-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 500px;
  transform-style: preserve-3d;
  cursor: pointer;
  transform: rotateY(180deg);
  transition: transform 1s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.rotating-card .card-img {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  box-shadow: 0 25px 50px -14px rgba(10, 31, 69, 0.5);
  background-size: cover;
  background-position: center;
  border: 3px solid var(--yellow);
}

.rotating-card .card-img-front {
  transform: rotateY(0deg);
  background-color: var(--surface);
}

.rotating-card .card-img-back {
  transform: rotateY(180deg);
  background-image: url('images/card-back.png');
  background-size: cover;
  background-color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.spin-animation {
  animation: rotateAnimation 3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes rotateAnimation {
  0% { transform: rotateY(180deg); }
  100% { transform: rotateY(1800deg); }
}

.blur-animation {
  animation: blurEffect 2s ease-out forwards;
}

@keyframes blurEffect {
  0% { filter: blur(20px); }
  70% { filter: blur(5px); }
  100% { filter: blur(0); }
}

/* ==================== VIDEO POPUP ==================== */
.video-popup {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(10, 31, 69, 0.6);
  backdrop-filter: blur(5px);
}

.video-popup-content {
  position: relative;
  background-color: var(--surface);
  margin: 10% auto;
  padding: 20px;
  border: 1px solid var(--line);
  width: 80%;
  max-width: 800px;
  border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(10, 31, 69, 0.5);
  text-align: center;
}

.video-popup-close {
  color: var(--ink-mute);
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 35px;
  font-weight: bold;
}

.video-popup-close:hover,
.video-popup-close:focus {
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
}

.video-popup-content iframe {
  width: 100%;
  min-height: 400px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .video-popup-content {
    width: 95%;
    margin: 20% auto;
    padding: 10px;
  }

  .video-popup-content iframe {
    min-height: 300px;
  }
}

/* ==================== SEARCH ==================== */
.search-container {
  position: relative;
  margin: 2rem auto;
  max-width: 500px;
}

#searchInput {
  width: 100%;
  padding: 14px 22px 14px 52px;
  border-radius: 50px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

#searchInput::placeholder {
  color: var(--ink-mute);
}

#searchInput:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 106, 61, 0.14);
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--ink-mute);
  font-size: 1.2rem;
  pointer-events: none;
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== تصغير مساحة الهيرو ===== */
.hero {
  min-height: 0 !important;
  height: auto !important;
  padding: 100px 0 10px !important;
  margin-bottom: 120px !important;
  margin-top: 120px !important;
  align-items: flex-start !important;
}

.hero-content {
  padding: 1rem 2rem !important;
  margin: 0 !important;
}

.hero h1 {
  margin-bottom: 1rem !important;
}

.hero p {
  margin-bottom: 1.5rem !important;
}

/* المسافة اللي بعد الهيرو مباشرة */
.hero + * {
  margin-top: 0 !important;
  padding-top: 10px !important;
}

/* ===== الكروت: مربعات جنب بعض ===== */
.grid,
.grid-4 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;   /* 3 في الصف */
  gap: 24px !important;
  max-width: 1100px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 120px !important;
  align-items: stretch;
}

.grid .card,
.grid-4 .card {
  aspect-ratio: 1 / 1;              /* مربع */
  min-height: min-content;          /* لو النص طويل يكبر شوية بدل ما يتقص */
  margin-bottom: 0;
  justify-content: center;          /* المحتوى في نص المربع */
  padding: 24px 22px;
}

.grid .card .btn,
.grid-4 .card .btn {
  margin-top: 8px;                  /* الزرار يقرب من النص بدل ما ينزل لآخر الكارت */
}

.spotlight-card {
  grid-column: span 1 !important;   /* مفيش كارت يفرد على عمودين */
}

/* تابلت: 2 في الصف */
@media (max-width: 1024px) {
  .grid,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* موبايل: واحد في الصف */
@media (max-width: 600px) {
  .grid,
  .grid-4 {
    grid-template-columns: 1fr !important;
  }
}