/* ====== إعدادات عامة ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #facc15;
  --dark: #0b1120;
  --bg: #0f172a;
  --card-bg: #020617;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.65);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1d3557, #020617 55%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;   /* ← هذا يمنع السحب يمين/يسار */
}

/* ====== شريط التصفح ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to right, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none !important;
  border-radius: 0;
  overflow: visible;
  box-shadow: none !important;
}

.logo-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  background: none !important;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text span:first-child {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.logo-text span:last-child {
  font-size: 0.7rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-links a:hover {
  color: #e5e7eb;
}

.nav-links a.active {
  color: #e5e7eb;
  background: rgba(37, 99, 235, 0.2);
}

/* زر صغير في الناف */
.nav-cta {
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.8);
  background: radial-gradient(circle at top left, #4f46e5, #0f172a);
  color: white !important;
  font-size: 0.8rem;
  box-shadow: 0 0 18px rgba(129, 140, 248, 0.6);
}

/* ====== محتوى عام ====== */
.page {
  max-width: 1100px;
  margin: 1.8rem auto 2.8rem;
  padding: 0 1.5rem;
}

/* ====== Hero في الـ Home ====== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2.2rem;
  align-items: center;
}

.hero-left-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 0.6rem;
  background: rgba(15, 23, 42, 0.95);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.9);
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.05;
  margin-bottom: 0.6rem;
}

.hero h1 span {
  background: linear-gradient(to right, #60a5fa, #a855f7, #facc15);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: var(--muted);
  max-width: 500px;
  font-size: 0.98rem;
  margin-bottom: 1.1rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.badge {
  font-size: 0.68rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.btn-primary {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: none;
  outline: none;
  background: radial-gradient(circle at top left, var(--primary-light), var(--primary));
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-secondary {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 0.85rem;
  text-decoration: none;
}

/* صورة الفريق */
.hero-image-wrapper {
  position: relative;
}

.hero-card {
  border-radius: 26px;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(59, 130, 246, 0.4), rgba(15, 23, 42, 0.98));
  padding: 0.9rem;
  box-shadow: var(--shadow-soft);
}

.hero-card img {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
}

/* ====== عناوين الأقسام ====== */
.section-header {
  margin: 2.5rem 0 1.5rem;
}

.section-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 0.3rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ====== كروت عامة ====== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.card p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.card-tag {
  display: inline-flex;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* ====== Gallery ====== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.gallery-item {
  background: rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.7);
  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background-color: #1F4471;
  display: block;
}

.gallery-body {
  padding: 0.75rem 0.9rem 0.9rem;
}

.gallery-body h3 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.gallery-body p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

/* زر link تحت الصورة */
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.2);
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.7);
  text-decoration: none;
  font-size: 0.78rem;
}

/* ====== جدول بسيط للـ Schedule ====== */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.6rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.schedule-table thead {
  background: rgba(30, 64, 175, 0.9);
}

.schedule-table th,
.schedule-table td {
  padding: 0.6rem 0.7rem;
  text-align: left;
}

.schedule-table th {
  font-weight: 600;
}

.schedule-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.95);
}

.schedule-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.9);
}

/* ====== Contact form ====== */
.form {
  display: grid;
  gap: 0.75rem;
  max-width: 450px;
  margin-top: 0.8rem;
}

.form label {
  font-size: 0.8rem;
  color: var(--muted);
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 0.85rem;
}

.form textarea {
  min-height: 110px;
  resize: vertical;
}

/* ====== Footer ====== */
.footer {
  border-top: 1px solid rgba(51, 65, 85, 0.8);
  padding: 1.1rem 1.5rem 1.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ====== Responsive ====== */
@media (max-width: 768px) {

  /* ترتيب الهيرو والصورة زي ما اتفقنا */
  .hero {
    display: flex;
    flex-direction: column;
  }

  .hero-image-wrapper {
    width: 100%;
    order: 10;
    margin-top: 1.4rem;
  }

  /* خلي الناف تصير عمودية شوي على الموبايل */
  .nav-inner {
    flex-direction: column;
    gap: 0.4rem;
    align-items: stretch;
  }

  /* الروابط: صفين / أعمدة */
  .nav-links {
    display: flex;
    flex-wrap: wrap;      /* يسمح بأكثر من سطر */
    width: 100%;
    gap: 0.35rem 0.75rem;
    font-size: 0.85rem;
  }

  /* كل لينك يأخذ تقريباً نصف السطر (عمودين) */
  .nav-links a {
    flex: 0 0 48%;
    text-align: left;
  }

  /* ----- ترتيب خاص للموبايل فقط ----- */
  /* الصف الأول */
  .nav-links a:nth-child(1) { order: 1; } /* Home */
  .nav-links a:nth-child(2) { order: 3; } /* About */

  /* الصف الثاني: تحتهم مباشرة */
  .nav-links a:nth-child(6) { order: 2; } /* Details تحت Home */
  .nav-links a:nth-child(7) { order: 4; } /* Register تحت About */

  /* الباقي ينزلوا بعدهم */
  .nav-links a:nth-child(3) { order: 5; } /* Committees */
  .nav-links a:nth-child(4) { order: 6; } /* Gallery */
  .nav-links a:nth-child(5) { order: 7; } /* Schedule */

  /* زر Register (nav-cta) يكون في النص */
  .nav-cta {
    justify-content: center;
  }

  .page {
    padding: 0 1rem;
  }
}
