/* ===========================
   CSS Variables & Reset
   =========================== */
/* Hide body until i18n translations are applied — prevents Arabic flash on navigation */
html.i18n-loading body { visibility: hidden; }

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

:root {
  --primary:    #002d57;
  --secondary:  #0077b6;
  --accent:     #48cae4;
  --bg:         #f0f5fc;
  --text:       #1a1a2e;
  --white:      #ffffff;
  --shadow:     0 4px 16px rgba(0,0,0,0.10);
  --radius:     12px;
  --transition: 0.25s ease;

  /* Hero depth tokens */
  --hero-base:  #000d1c;
  --hero-mid:   #002050;
  --hero-deep:  #00396e;

  /* Text hierarchy — use these instead of hardcoded grays */
  --text-muted:   #3d4a5a;   /* card body, lists — AA on white: 8.5:1 */
  --text-subtle:  #4a5f75;   /* subtitles, secondary — AA on white: 6.8:1 */
  --text-faint:   #5f7a95;   /* hints, captions — AA on white: 5.1:1 */
  --text-heading: var(--primary);

  /* Skill-level border colors */
  --level-beginner: #2e7d32;   /* darkened for AA contrast */
  --level-advanced: #6a1b9a;

  /* Semantic error/drawback color */
  --error-text: #c0392b;
}

:focus-visible {
  outline: 3px solid rgba(72, 202, 228, 0.8);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Tajawal', sans-serif;
  background:
    radial-gradient(ellipse 75% 35% at 50% 0%,   rgba(0, 45, 87, 0.07)  0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 100% 60%,  rgba(0, 119, 182, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 0%   80%,  rgba(72, 202, 228, 0.05) 0%, transparent 55%),
    linear-gradient(170deg, #edf4fc 0%, var(--bg) 45%, #eef3fb 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Font switching by language */
:lang(ar) { font-family: 'Tajawal', sans-serif; }
:lang(en) { font-family: 'Inter', 'Tajawal', sans-serif; }

html.modal-open,
body.modal-open {
  overflow: hidden;
}

body.modal-open {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
  top: var(--scroll-lock-top, 0px);
  padding-inline-end: var(--scrollbar-compensation, 0px);
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===========================
   Header
   =========================== */
header {
  background: rgba(0, 20, 50, 0.72);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(72, 202, 228, 0.18);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Right side: logo + site title */
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-brand-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.header-brand img {
  height: 48px;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
}

/* Left side: nav */
.header-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-nav a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--white);
  transition: background var(--transition);
}

.header-nav a:hover {
  background: rgba(0, 119, 182, 0.55);
}

.header-nav a.active {
  background: var(--secondary);
  box-shadow: 0 2px 10px rgba(0,119,182,0.45);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===========================
   Footer
   =========================== */
footer {
  background: var(--primary);
  color: var(--white);
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.footer-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 0.75rem;
}

.footer-brand-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.footer-tagline {
  font-size: 0.87rem;
  opacity: 0.65;
  line-height: 1.65;
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.5;
  margin-bottom: 1rem;
}

[lang="en"] .footer-col-title {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  font-size: 0.92rem;
  opacity: 0.78;
  transition: opacity 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--accent);
}

.footer-org-logos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-org-logos a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  opacity: 0.78;
  transition: opacity 0.2s ease;
}

.footer-org-logos a:hover {
  opacity: 1;
}

.footer-org-logos img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  background: rgba(255,255,255,0.12);
  border-radius: 9px;
  padding: 3px;
  display: block;
  flex-shrink: 0;
}

.footer-org-logos span {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.5;
}

/* ===========================
   Main content wrapper
   =========================== */
main {
  flex: 1;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  background:
    /* Top veil — keeps header zone deeply readable */
    linear-gradient(to bottom, rgba(0, 5, 20, 0.62) 0%, transparent 30%),
    /* Top-right large ring arc (CSS-only ring via radial-gradient gap) */
    radial-gradient(circle at 108% -14%,
      transparent              27%,
      rgba(72, 202, 228, 0.16) 28%,
      rgba(72, 202, 228, 0.07) 30%,
      transparent              31%
    ),
    /* Bottom-left ambient glow */
    radial-gradient(ellipse 65% 70% at 8% 92%,  rgba(0, 119, 182, 0.38) 0%, transparent 65%),
    /* Right-center cyan accent */
    radial-gradient(ellipse 55% 60% at 88% 38%,  rgba(72, 202, 228, 0.20) 0%, transparent 60%),
    /* Top-right energy spark */
    radial-gradient(circle at 78% 6%,            rgba(0, 168, 232, 0.24) 0%, transparent 38%),
    /* Deep gradient base */
    linear-gradient(148deg, var(--hero-base) 0%, var(--hero-mid) 38%, var(--hero-deep) 68%, #005a9e 100%);
  color: var(--white);
  text-align: center;
  padding: 5.5rem 1.5rem 4.2rem;
  position: relative;
  overflow: hidden;
}

/* Dual concentric ring system — radar/sonar interference pattern */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    /* Primary rings — focal point lower-right */
    repeating-radial-gradient(
      circle at 75% 68%,
      transparent          0px,
      transparent          72px,
      rgba(72, 202, 228, 0.10) 73px,
      rgba(72, 202, 228, 0.04) 76px,
      transparent          77px
    ),
    /* Secondary rings — upper-left offset, creates crossing interference */
    repeating-radial-gradient(
      circle at 16% 20%,
      transparent              0px,
      transparent              104px,
      rgba(0, 150, 210, 0.065) 105px,
      rgba(0, 150, 210, 0.025) 108px,
      transparent              109px
    );
  pointer-events: none;
  z-index: 0;
}

/* Large glowing ring arc — enters from bottom-left like a sensor sweep */
.hero::after {
  content: "";
  position: absolute;
  width: 660px;
  height: 660px;
  border-radius: 50%;
  border: 1.5px solid rgba(72, 202, 228, 0.22);
  box-shadow:
    0 0 0 1px  rgba(72, 202, 228, 0.08),
    0 0 28px   rgba(72, 202, 228, 0.14),
    0 0 80px   rgba(72, 202, 228, 0.07),
    inset 0 0 36px rgba(72, 202, 228, 0.07);
  bottom: -500px;
  left:   -160px;
  pointer-events: none;
  z-index: 0;
}

.hero-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.35rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.30);
}

.hero p {
  font-size: 1.12rem;
  font-weight: 500;
  max-width: 760px;
  margin: 0 auto 0.9rem;
  opacity: 0.94;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.hero-sub {
  font-size: 1rem;
  font-weight: 400;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  opacity: 0.82;
  line-height: 1.75;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-stats {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  transition: background 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.hero-stat:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.hero-stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-stat span {
  font-size: 0.84rem;
  opacity: 0.9;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-block;
  background: var(--secondary);
  color: var(--white);
  padding: 0.7rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Tajawal', sans-serif;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition),
              color var(--transition), box-shadow var(--transition);
}

.btn:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 119, 182, 0.28);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
  font-weight: 700;
}

.btn-outline:hover {
  background: var(--secondary);
  color: var(--white);
}

.hero .btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  backdrop-filter: blur(6px);
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.hero .btn-outline:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* ===========================
   Cards Grid
   =========================== */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-subtle);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 760px;
  margin: 0 auto 1.8rem;
}

.section-compact {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.highlight-strip {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 10px;
  background: linear-gradient(90deg, #e8f7fc, #f4f9ff);
  border: 1px solid #cbe8f3;
  color: var(--text-muted);
  padding: 0.9rem 1.1rem;
  line-height: 1.75;
  font-size: 0.96rem;
}

.highlight-strip span {
  color: var(--text-heading);
  font-weight: 800;
  margin-inline-end: 0.35rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  will-change: transform;
}

.card-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, #e8f5ff 0%, #d0eaff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  margin: 0 auto;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 10px rgba(0,119,182,0.12);
}

.card:hover .card-icon {
  transform: scale(1.1) rotate(-4deg);
  box-shadow: 0 6px 18px rgba(0,119,182,0.22);
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card a {
  margin-top: auto;
}

/* ===========================
   Robot Catalog Cards
   =========================== */
.robot-img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.price-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.25rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 0.25rem;
}

.level-badge {
  display: inline-block;
  background: var(--secondary);
  color: var(--white);
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.features-list {
  list-style: none;
  text-align: start;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.9;
}

.features-list li::before {
  content: "✓ ";
  color: var(--secondary);
  font-weight: 700;
}

/* ===========================
   Robot Card — Drawbacks & Uses
   =========================== */
.drawbacks-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--error-text);
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
  text-align: start;
}

.drawbacks-list {
  list-style: none;
  text-align: start;
  font-size: 0.88rem;
  color: var(--text-faint);
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.drawbacks-list li::before {
  content: "✗ ";
  color: var(--error-text);
  font-weight: 700;
}

.uses-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: start;
  margin-top: 0.25rem;
}

html.dark .drawbacks-list    { color: var(--text-muted); }
html.dark .uses-text         { color: var(--text-muted); }

/* Robot card level accent borders — keyed on semantic data-level-key */
.card[data-level-key="beginner"]      { border-top: 3px solid var(--level-beginner); }
.card[data-level-key="beginner-mid"]  { border-top: 3px solid var(--accent); }
.card[data-level-key="intermediate"]  { border-top: 3px solid var(--secondary); }
.card[data-level-key="advanced"]      { border-top: 3px solid var(--level-advanced); }

/* Level badge icons — visual indicator alongside translated text */
.card[data-level-key="beginner"] .level-badge::before,
.card[data-level-key="beginner-mid"] .level-badge::before { content: "🌱 "; }
.card[data-level-key="intermediate"] .level-badge::before { content: "📈 "; }
.card[data-level-key="advanced"] .level-badge::before     { content: "🚀 "; }

/* ===========================
   Page Header Banner
   =========================== */
.page-hero {
  background:
    /* Top veil for header readability */
    linear-gradient(to bottom, rgba(0, 5, 20, 0.55) 0%, transparent 32%),
    /* Accent glow right */
    radial-gradient(ellipse 50% 90% at 95% 50%, rgba(72, 202, 228, 0.18) 0%, transparent 65%),
    /* Depth base */
    linear-gradient(135deg, var(--hero-base) 0%, var(--hero-mid) 45%, var(--secondary) 100%);
  color: var(--white);
  text-align: center;
  padding: 3.2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Concentric ring system — single focal point, scaled for compact hero */
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-radial-gradient(
      circle at 80% 60%,
      transparent              0px,
      transparent              58px,
      rgba(72, 202, 228, 0.10) 59px,
      rgba(72, 202, 228, 0.04) 62px,
      transparent              63px
    ),
    repeating-radial-gradient(
      circle at 10% 30%,
      transparent              0px,
      transparent              84px,
      rgba(0, 150, 210, 0.06)  85px,
      rgba(0, 150, 210, 0.02)  88px,
      transparent              89px
    );
  pointer-events: none;
  z-index: 0;
}

/* Glowing ring arc from bottom-left */
.page-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1.5px solid rgba(72, 202, 228, 0.20);
  box-shadow:
    0 0 22px  rgba(72, 202, 228, 0.12),
    0 0 60px  rgba(72, 202, 228, 0.06),
    inset 0 0 22px rgba(72, 202, 228, 0.07);
  bottom: -340px;
  left:   -100px;
  pointer-events: none;
  z-index: 0;
}

.page-hero h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.page-hero p {
  font-size: 1rem;
  opacity: 0.90;
  margin-top: 0.5rem;
  position: relative;
  z-index: 1;
}

/* ===========================
   Quiz
   =========================== */
.quiz-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.quiz-step {
  display: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.quiz-step.active {
  display: block;
}

.quiz-step h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
  text-align: center;
}

.quiz-options {
  display: grid;
  gap: 0.75rem;
}

.quiz-option {
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
  text-align: start;
  transition: border-color var(--transition), background var(--transition);
  color: var(--text);
  font-weight: 600;
}

.quiz-option:hover {
  border-color: var(--accent);
  background: #e8f8fc;
}

.quiz-option.selected {
  border-color: var(--secondary);
  background: #e3f2fd;
  box-shadow: inset 0 0 0 1px var(--secondary);
}

.quiz-progress {
  text-align: center;
  color: var(--secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.quiz-result {
  display: none;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
}

.quiz-result.active { display: block; }

.quiz-result h2 {
  color: var(--text-heading);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.result-robot-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--secondary);
  margin: 0.75rem 0;
}

.result-img {
  height: 180px;
  width: 100%;
  object-fit: contain;
  background: var(--white);
  border-radius: 8px;
  margin: 0.5rem 0;
}

.result-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* ===========================
   Scroll Reveal
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.quiz-restart {
  background: none;
  border: none;
  color: var(--secondary);
  font-family: 'Tajawal', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 0.75rem;
}

/* Quiz step enter animation */
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.quiz-step.active,
.quiz-result.active {
  animation: stepIn 0.32s ease forwards;
}

/* ===========================
   Comparison Table
   =========================== */
.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

thead {
  background: var(--primary);
  color: var(--white);
}

thead th {
  padding: 0.85rem 1rem;
  text-align: start;
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: #f0f4f8;
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
}

/* ===========================
   FAQ Accordion
   =========================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  border-inline-start: 3px solid transparent;
  padding: 1.1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-heading);
  text-align: start;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.faq-question:hover {
  background: #f0f4f8;
  border-inline-start-color: var(--accent);
}

.faq-arrow {
  font-style: normal;
  font-size: 0.85rem;
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-inline-start: 0.5rem;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-item.open .faq-question {
  border-inline-start-color: var(--secondary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.25s ease;
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.75;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.1rem;
}

/* ===========================
   Chatbot Section — redesigned
   =========================== */
.chatbot-section {
  padding-top: 0;
}

.chatbot-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 45, 87, 0.10);
  border: 1px solid #e0eaf5;
  overflow: hidden;
}

/* Card header */
.chatbot-card-header {
  background: linear-gradient(135deg, var(--primary) 0%, #014a8f 55%, var(--secondary) 100%);
  color: var(--white);
  padding: 2.25rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.chatbot-card-header::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(72, 202, 228, 0.13);
  top: -140px;
  right: -80px;
  pointer-events: none;
}

.chatbot-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.chatbot-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  50%       { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

.chatbot-card-header h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
}

.chatbot-card-subtitle {
  font-size: 0.97rem;
  line-height: 1.75;
  opacity: 0.88;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Guide steps */
.chatbot-guide {
  padding: 1.5rem 2rem;
  background: #f7faff;
  border-bottom: 1px solid #e8f0f9;
}

.chatbot-guide-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.chatbot-guide-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chatbot-guide-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.94rem;
  color: var(--text-subtle);
  line-height: 1.5;
  flex-wrap: wrap;
}

.chatbot-guide-list li::before {
  content: none;
}

.guide-num {
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guide-tag {
  display: inline-block;
  background: #ddeeff;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}

/* Suggested chips */
.chatbot-suggestions {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e8f0f9;
}

.chatbot-suggestions-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-faint);
  margin-bottom: 0.9rem;
}

[lang="en"] .chatbot-suggestions-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chatbot-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chatbot-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f0f7ff;
  border: 1.5px solid #c2daf5;
  color: var(--text-heading);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease,
              transform 0.15s ease, box-shadow 0.2s ease;
  text-align: start;
  line-height: 1.4;
  position: relative;
}

.chatbot-chip:hover {
  background: #dbeeff;
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 119, 182, 0.18);
}

.chatbot-chip:active {
  transform: translateY(0);
  background: #c5e0f7;
  box-shadow: none;
}

.chatbot-chip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.chatbot-chip.chip-loading {
  opacity: 0.6;
  cursor: wait;
  pointer-events: none;
}

.chip-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* Open button */
.chatbot-open-btn-wrap {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.chatbot-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 0.9rem 2.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 119, 182, 0.3);
}

.chatbot-open-btn:hover {
  background: #005fa3;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 45, 87, 0.28);
}

.chatbot-open-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 45, 87, 0.2);
}

.chatbot-open-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.chatbot-btn-icon {
  font-size: 1.15rem;
}

.chatbot-hint {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* Toast notification */
.chip-toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1a2e45;
  color: var(--white);
  padding: 0.8rem 1.4rem;
  border-radius: 10px;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  white-space: nowrap;
  max-width: calc(100vw - 2rem);
  text-align: center;
}

.chip-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .chatbot-card-header { padding: 1.75rem 1.25rem 1.5rem; }
  .chatbot-guide,
  .chatbot-suggestions,
  .chatbot-open-btn-wrap { padding: 1.25rem; }
  .chatbot-chips-row { gap: 0.5rem; }
  .chatbot-chip { font-size: 0.84rem; padding: 0.5rem 0.9rem; }
  .chip-toast { white-space: normal; width: calc(100vw - 2rem); }
}

/* ===========================
   Compare Checkbox
   =========================== */
.compare-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  margin-top: 0.75rem;
  user-select: none;
}

.compare-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--secondary);
  cursor: pointer;
  flex-shrink: 0;
}

/* ===========================
   Floating Compare Button
   =========================== */
.compare-float {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
  z-index: 900;
  background: var(--secondary);
  color: var(--white);
  font-family: 'Tajawal', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,119,182,0.45);
  transition: background var(--transition), opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap;
}

.compare-float.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.compare-float:hover:not(:disabled) {
  background: var(--accent);
  color: var(--primary);
  transform: translateX(-50%) translateY(-3px);
}

.compare-float:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ===========================
   Comparison Modal (native <dialog>)
   =========================== */
.compare-modal {
  border: none;
  padding: 1rem;
  background: transparent;
  width: calc(100% - 2rem);
  max-width: 980px;
  max-height: 90vh;
  border-radius: 0;
  overflow: visible;
}

.compare-modal[open] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  animation: compareDialogFadeIn 0.2s ease;
}

.compare-modal[open] .compare-modal-inner {
  animation: comparePanelIn 0.25s ease;
}

.compare-modal.is-closing .compare-modal-inner {
  animation: comparePanelOut 0.18s ease forwards;
}

.compare-modal::backdrop {
  background: rgba(4, 16, 38, 0.7);
  backdrop-filter: blur(6px);
}

.compare-modal-inner {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  border: 1px solid #d8e6f5;
  overflow: hidden;
}

.compare-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary) 0%, #014a8f 55%, var(--secondary) 100%);
  color: var(--white);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.compare-modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}

.compare-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.compare-clear {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 24, 52, 0.55);
  color: #ffffff;
  font-family: 'Tajawal', sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), opacity var(--transition);
}

.compare-clear:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.6);
}

.compare-clear:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.compare-close {
  background: rgba(0, 28, 60, 0.55);
  border: 2px solid rgba(72, 202, 228, 0.72);
  color: #ffffff;
  font-size: 1.45rem;
  cursor: pointer;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.compare-close:hover {
  background: rgba(255,255,255,0.2);
  border-color: #ffffff;
  transform: translateY(-1px);
}

.compare-table-wrapper {
  overflow: auto;
  flex: 1;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  text-align: center;
}

.compare-table thead {
  background: var(--primary);
  color: var(--white);
  position: sticky;
  top: 0;
}

.compare-table thead th {
  padding: 0.9rem 1rem;
  font-weight: 700;
  border-inline-start: 1px solid rgba(255,255,255,0.15);
  white-space: nowrap;
}

.best-value-badge {
  display: inline-block;
  margin-inline-start: 0.4rem;
  background: #ffe082;
  color: #4d3a00;
  border: 1px solid #ffd24d;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.12rem 0.5rem;
  vertical-align: middle;
}

.compare-table thead th:first-child {
  border-inline-start: none;
}

.compare-table tbody tr:nth-child(odd) {
  background: var(--white);
}

.compare-table tbody tr:nth-child(even) {
  background: #eef4fa;
}

.compare-table tbody td {
  padding: 0.85rem 1rem;
  border: 1px solid #dde5ee;
  vertical-align: middle;
}

.compare-row-label {
  font-weight: 700;
  color: var(--text-heading);
  background: #dde8f5 !important;
  white-space: nowrap;
  text-align: start;
  padding-inline-start: 1.1rem !important;
}

.compare-robot-img {
  height: 110px;
  width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.compare-mobile-list {
  display: none;
  padding: 1rem;
  overflow: auto;
}

.compare-mobile-card {
  background: #f8fbff;
  border: 1px solid #d9e8f6;
  border-radius: 14px;
  padding: 0.95rem;
  box-shadow: 0 8px 22px rgba(0, 45, 87, 0.1);
}

.compare-mobile-card + .compare-mobile-card {
  margin-top: 0.9rem;
}

.compare-mobile-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.7rem;
}

.compare-mobile-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.compare-mobile-img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid #deebf8;
  flex-shrink: 0;
}

.compare-mobile-title {
  margin: 0;
  color: var(--text-heading);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.best-value-badge--mobile {
  margin-inline-start: 0;
}

.compare-mobile-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}

.compare-mobile-meta-item {
  background: #eef6ff;
  border: 1px solid #d7e9fb;
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  text-align: start;
}

.compare-mobile-meta-item strong {
  display: block;
  font-size: 0.77rem;
  color: #496582;
  margin-bottom: 0.2rem;
}

.compare-mobile-meta-item span {
  font-size: 0.87rem;
  color: var(--text-heading);
  font-weight: 700;
}

.compare-mobile-feature-title {
  font-size: 0.83rem;
  color: #4d6984;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.compare-mobile-features {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: start;
}

.compare-mobile-features li {
  color: #2f4b67;
  font-size: 0.87rem;
  line-height: 1.7;
}

.compare-mobile-features li::before {
  content: "✓ ";
  color: var(--secondary);
  font-weight: 700;
}

/* ===========================
   About Hero
   =========================== */
.about-hero {
  background: linear-gradient(150deg, var(--primary) 0%, #014a8f 50%, var(--secondary) 100%);
  color: var(--white);
  text-align: center;
  padding: 4rem 1.5rem 3.5rem;
}

.about-hero-logo-wrap {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  box-shadow: 0 0 40px rgba(72, 202, 228, 0.25);
}

.about-hero-logo-wrap img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.about-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.about-hero p {
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto;
  opacity: 0.88;
  line-height: 1.8;
  font-weight: 400;
}

/* ===========================
   About Section Wrapper
   =========================== */
.about-section {
  padding-bottom: 2rem;
}

/* ===========================
   Team Grid
   =========================== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.member-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.25rem 1.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.member-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,45,87,0.14);
}

.member-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 auto 1.1rem;
  box-shadow: 0 4px 14px rgba(0,119,182,0.30);
}

.member-avatar-placeholder {
  background: #d8e4ef !important;
  color: #35506b !important;
  box-shadow: none !important;
  font-size: 1.6rem;
}

.member-placeholder {
  opacity: 0.65;
}

.member-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.3rem;
}

.member-role {
  font-size: 0.88rem;
  color: var(--secondary);
  font-weight: 500;
}

/* ===========================
   Team Banner
   =========================== */
.team-banner {
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(135deg, #eef6ff 0%, #f4f9ff 60%, #e8f5fb 100%);
  border: 1px solid #c8dff5;
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 4px 28px rgba(0, 80, 160, 0.08);
  position: relative;
  overflow: hidden;
}

.team-banner::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72,202,228,0.10) 0%, transparent 70%);
  top: -120px;
  inset-inline-end: -80px;
  pointer-events: none;
}

.team-banner-icon {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,119,182,0.20));
}

.team-banner-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-heading);
  margin: 0;
}

.team-banner-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border-radius: 2px;
  margin: 0.4rem auto 0;
}

.team-banner-desc {
  font-size: 1.05rem;
  color: var(--text-subtle);
  line-height: 1.85;
  max-width: 580px;
  margin: 0;
}

html.dark .team-banner {
  background: linear-gradient(135deg, #0e1e30 0%, #112030 60%, #0d1e2e 100%);
  border-color: #1e3555;
  box-shadow: 0 4px 28px rgba(0,0,0,0.35);
}

@media (max-width: 600px) {
  .team-banner {
    padding: 2.5rem 1.5rem;
    border-radius: 18px;
  }
  .team-banner-title { font-size: 1.45rem; }
  .team-banner-desc  { font-size: 0.97rem; }
}

/* ===========================
   About Divider
   =========================== */
.about-divider {
  height: 3px;
  background: linear-gradient(to left, transparent, var(--accent), transparent);
  margin: 0 10%;
  border-radius: 2px;
}

/* ===========================
   Org Sections (Club & AOU)
   =========================== */
.org-section {
  padding: 4rem 1.5rem;
}

.org-section--light {
  background: var(--white);
}

.org-section--accent {
  background: #eef5fb;
}

.org-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.org-inner--reverse {
  flex-direction: row-reverse;
}

.org-logo-wrap {
  flex-shrink: 0;
}

.org-logo-frame {
  width: 180px;
  height: 180px;
  border-radius: 24px;
  background: var(--bg);
  border: 2px solid #d8e8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 6px 24px rgba(0,45,87,0.10);
}

.org-logo-frame--light {
  background: var(--white);
  border-color: #c8ddf0;
}

.org-logo-frame img {
  max-width: 140px;
  max-height: 140px;
  object-fit: contain;
}

.org-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary);
  background: #ddeeff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

[lang="en"] .org-tag {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.org-tag--light {
  background: rgba(0,119,182,0.12);
}

.org-text h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 0.9rem;
  line-height: 1.3;
}

.org-text p {
  font-size: 0.97rem;
  color: var(--text-subtle);
  line-height: 1.85;
  margin-bottom: 0.65rem;
}

.org-text p:last-child {
  margin-bottom: 0;
}

/* ===========================
   Responsive — Mobile
   =========================== */
@media (max-width: 1024px) {
  .compare-table-wrapper {
    display: none !important;
  }

  .compare-mobile-list {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .hero {
    padding: 4.5rem 1rem 3rem;
  }

  .hero::after {
    width: 380px;
    height: 380px;
    bottom: -300px;
    left: -100px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--primary);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  .header-nav.open {
    display: block;
  }

  .header-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }

  .header-nav a {
    padding: 0.6rem 0.75rem;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.85rem;
  }

  thead th, tbody td {
    padding: 0.6rem 0.75rem;
  }

  .org-inner,
  .org-inner--reverse {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .org-logo-frame {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }

  .org-tag {
    display: block;
    width: fit-content;
    margin: 0 auto 0.75rem;
  }

  .about-hero-logo-wrap {
    width: 120px;
    height: 120px;
  }

  .about-hero-logo-wrap img {
    width: 88px;
    height: 88px;
  }

  .about-hero h1 {
    font-size: 1.7rem;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem 1.5rem;
  }

  .footer-org-logos {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .compare-modal {
    width: 100%;
    max-width: none;
    padding: 0.5rem;
    max-height: 100vh;
  }

  .compare-modal-inner {
    max-height: calc(100vh - 1rem);
    border-radius: 14px;
  }

  .compare-modal-header {
    padding: 0.8rem 0.9rem;
  }

  .compare-modal-header h2 {
    font-size: 1.02rem;
  }

  .compare-modal-actions {
    gap: 0.4rem;
  }

  .compare-clear {
    font-size: 0.77rem;
    padding: 0.3rem 0.65rem;
  }

  .compare-close {
    width: 36px;
    height: 36px;
    font-size: 1.22rem;
  }

  .compare-table-wrapper {
    display: none;
  }

  .compare-mobile-list {
    display: block;
  }
}

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

@keyframes comparePanelIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes comparePanelOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   Skip to Content Link
   =========================== */
.skip-link {
  position: absolute;
  top: -100%;
  inset-inline-start: 1rem;
  background: var(--secondary);
  color: var(--white);
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 9999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ===========================
   Language Switcher
   =========================== */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.lang-btn--ar { font-family: 'Tajawal', sans-serif; }
.lang-btn--en { font-family: 'Inter', sans-serif; }

/* Active state driven by <html lang> — no JS needed */
[lang="ar"] .lang-btn--ar,
[lang="en"] .lang-btn--en {
  color: var(--white);
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
}

.lang-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  pointer-events: none;
  user-select: none;
}

/* ===========================
   Direction-aware Browse Arrow
   =========================== */
.btn-arrow::after {
  content: ' \2192'; /* → */
}

[dir="rtl"] .btn-arrow::after {
  content: ' \2190'; /* ← */
}

/* ===========================
   Quiz font family fix
   =========================== */
.quiz-restart {
  font-family: inherit;
}

.compare-clear,
.compare-float {
  font-family: inherit;
}

/* ===========================
   Mobile: lang switch layout
   =========================== */
@media (max-width: 768px) {
  .lang-switch {
    margin-inline-end: 0.25rem;
  }
}

/* ===========================
   Mobile header: small screens (≤480px)
   Prevents site-title / lang-switch overlap
   =========================== */
@media (max-width: 480px) {
  .header-inner {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }

  .header-brand img {
    height: 36px;
  }

  .site-title {
    font-size: 0.95rem;
  }

  .lang-btn {
    padding: 0.45rem 0.55rem;
    font-size: 0.78rem;
  }
}

/* ===========================
   Phase 4 — Premium UI/UX
   =========================== */

/* 4.1 — Buttons: bilingual font rendering */
.btn {
  font-family: inherit;
}

/* 4.2 — Nav: hover underline slide-in (direction-agnostic scale from center) */
.header-nav a {
  position: relative;
}

.header-nav a::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 52%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.22s ease;
  pointer-events: none;
}

.header-nav a:hover::after,
.header-nav a.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* 4.3 — Mobile nav: smooth entrance */
@keyframes mobileNavIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .header-nav.open {
    animation: mobileNavIn 0.22s ease forwards;
  }
}

/* 4.4 — Hero: staggered entrance animations */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge              { animation: heroFadeUp 0.5s  0.05s both cubic-bezier(0.22,0.61,0.36,1); }
.hero h1                 { animation: heroFadeUp 0.55s 0.15s both cubic-bezier(0.22,0.61,0.36,1); }
.hero > p:not(.hero-sub) { animation: heroFadeUp 0.5s  0.28s both cubic-bezier(0.22,0.61,0.36,1); }
.hero .hero-sub          { animation: heroFadeUp 0.5s  0.38s both cubic-bezier(0.22,0.61,0.36,1); }
.hero .hero-actions      { animation: heroFadeUp 0.5s  0.48s both cubic-bezier(0.22,0.61,0.36,1); }
.hero .hero-stats        { animation: heroFadeUp 0.5s  0.58s both cubic-bezier(0.22,0.61,0.36,1); }

/* 4.5 — Section title: accent underline decoration */
.section-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  border-radius: 2px;
  margin: 0.3rem auto 0;
}

/* 4.6 — Cards: elevated hover lift */
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 44px rgba(0, 45, 87, 0.18);
}

/* ===========================
   Security: replaced inline styles
   =========================== */

/* Robot catalog card CTA button */
.compare-label + .btn {
  margin-top: 0.5rem;
}

/* Member avatar: named colour variant */
.member-avatar--primary {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
}

/* Quiz result labels */
.result-label {
  color: var(--secondary);
  font-weight: 700;
}

.result-price-row {
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 1.25rem;
}

.result-price-value {
  color: var(--secondary);
}

/* ===========================
   Dark Mode
   =========================== */

/* Toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
  line-height: 1;
  padding: 0;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Dark palette */
html.dark {
  --bg:           #0e1a2d;
  --text:         #cdd9ed;
  --white:        #162840;
  --shadow:       0 4px 16px rgba(0,0,0,0.55);
  --text-muted:   #8aa8c6;
  --text-subtle:  #7a9abd;
  --text-faint:   #5a7a9a;
  --text-heading: #93c5fd;
  --level-beginner: #66bb6a;
  --level-advanced: #ba68c8;
  --error-text:   #f87171;
  color-scheme: dark;
}

html.dark body {
  background:
    radial-gradient(ellipse 75% 35% at 50% 0%,   rgba(0,60,120,0.20) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 100% 60%,  rgba(0,80,150,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 0%   80%,  rgba(30,100,160,0.10) 0%, transparent 55%),
    linear-gradient(170deg, #090f1c 0%, #0e1a2d 45%, #0b1525 100%);
}

/* Section text — colors now handled by --text-heading / --text-subtle variables */

html.dark .highlight-strip {
  background: linear-gradient(90deg, #0e2438, #0d1e30);
  border-color: #1a3555;
  color: #8ab0cc;
}
html.dark .highlight-strip span { color: var(--text-heading); }

/* Cards */
html.dark .card {
  background: #132034 !important;
}
/* card h3 / card p — handled by --text-heading / --text-muted */
html.dark .card-icon {
  background: linear-gradient(135deg, #162e4a 0%, #1a3d61 100%);
  box-shadow: 0 2px 10px rgba(0,80,180,0.18);
}
html.dark .robot-img,
html.dark .result-img { background: #0d1e30 !important; }

/* Table */
html.dark table                    { background: #132034 !important; }
html.dark tbody tr:nth-child(even) { background: #0f2238 !important; }
html.dark tbody td                 { border-bottom-color: #1e3555; }
/* .features-list color — handled by --text-muted */

/* FAQ */
html.dark .faq-item           { background: #132034 !important; }
html.dark .faq-question       { color: var(--text-heading); }
html.dark .faq-question:hover { background: #1a3050 !important; }
html.dark .faq-answer         { color: var(--text-muted); }

/* Quiz */
html.dark .quiz-step,
html.dark .quiz-result        { background: #132034 !important; }
html.dark .quiz-step h2,
html.dark .quiz-result h2     { color: var(--text-heading); }
html.dark .quiz-option {
  background: #0f2035 !important;
  color: var(--text);
}
html.dark .quiz-option:hover    { background: #0f2a42 !important; border-color: var(--accent); }
html.dark .quiz-option.selected { background: #0d2a40 !important; border-color: var(--secondary); }
html.dark .result-desc         { color: var(--text-muted); }

/* Chatbot */
html.dark .chatbot-card {
  background: #132034 !important;
  border-color: #1e3555;
}
html.dark .chatbot-guide {
  background: #0e1e30 !important;
  border-bottom-color: #1e3555;
}
html.dark .chatbot-guide-title   { color: var(--text-heading); }
html.dark .chatbot-guide-list li { color: var(--text-muted); }
html.dark .chatbot-suggestions   { border-bottom-color: #1e3555; }
html.dark .chatbot-suggestions-label { color: var(--text-faint); }
html.dark .chatbot-chip {
  background: #0f2035 !important;
  border-color: #1e4060;
  color: var(--text-heading);
}
html.dark .chatbot-chip:hover  { background: #123050 !important; border-color: #3b82f6; }
html.dark .chatbot-chip:active { background: #0d2540 !important; }
html.dark .chatbot-hint        { color: var(--text-faint); }

/* About / Org sections */
html.dark .org-section--light  { background: #132034 !important; }
html.dark .org-section--accent { background: #0e1e30 !important; }
html.dark .org-text h2        { color: var(--text-heading); }
html.dark .org-text p         { color: var(--text-muted); }
html.dark .org-logo-frame {
  background: #0d1e30 !important;
  border-color: #1e3555;
}
html.dark .org-logo-frame--light {
  background: #132034 !important;
  border-color: #1e3555;
}

/* Team cards */
html.dark .member-card { background: #132034 !important; }
html.dark .member-name { color: var(--text-heading); }
html.dark .member-avatar-placeholder {
  background: #1e3555 !important;
  color: #7aa2c4 !important;
}

/* Comparison modal */
html.dark .compare-modal-inner {
  background: #132034 !important;
  border-color: #1e3555;
}
html.dark .compare-table tbody tr:nth-child(odd)  { background: #132034 !important; }
html.dark .compare-table tbody tr:nth-child(even) { background: #0f2238 !important; }
html.dark .compare-table tbody td { border-color: #1e3555; }
html.dark .compare-row-label {
  background: #0d1e30 !important;
  color: var(--text-heading);
}
html.dark .compare-mobile-card {
  background: #132034 !important;
  border-color: #1e3555;
}
html.dark .compare-mobile-img {
  background: #0d1e30;
  border-color: #1e3555;
}
html.dark .compare-mobile-meta-item {
  background: #0f2035;
  border-color: #1e3555;
}
html.dark .compare-mobile-meta-item strong { color: var(--text-subtle); }
html.dark .compare-mobile-meta-item span   { color: var(--text-heading); }
html.dark .compare-mobile-feature-title    { color: var(--text-subtle); }
html.dark .compare-mobile-features li      { color: var(--text-muted); }

/* Restore actual white for elements on dark/colored backgrounds */
html.dark .site-title                    { color: #ffffff; }
html.dark .header-nav a                  { color: rgba(255,255,255,0.85); }
html.dark .hamburger span                { background: #ffffff; }
html.dark .lang-btn--ar,
html.dark .lang-btn--en                  { color: rgba(255,255,255,0.60); }
html.dark footer                         { color: #ffffff; }
html.dark .btn                           { color: #ffffff; }
html.dark thead                          { color: #ffffff; }
html.dark .level-badge                   { color: #ffffff; }
html.dark .hero,
html.dark .page-hero,
html.dark .about-hero                    { color: #ffffff; }
html.dark .hero .btn-outline             { color: #ffffff; }
html.dark .chatbot-card-header           { color: #ffffff; }
html.dark .compare-modal-header          { color: #ffffff; }
html.dark .guide-num                     { color: #ffffff; }
html.dark .chatbot-open-btn              { color: #ffffff; }
html.dark .member-avatar:not(.member-avatar-placeholder) { color: #ffffff; }

/* Dark mode: section subtitle & footer tagline */
html.dark .footer-tagline  { opacity: 0.55; }
html.dark .footer-links a  { opacity: 0.70; }
html.dark .faq-question:hover {
  background: #1a3050 !important;
  border-inline-start-color: var(--accent);
}

/* ===========================
   Robot Card — Collapsible Details (<details>/<summary>)
   =========================== */
.card-details {
  margin-top: 0.5rem;
  border-radius: 8px;
  border: 1px solid #dde8f5;
  background: #f8fbff;
  overflow: hidden;
}

.card-details summary {
  list-style: none;
  cursor: pointer;
  padding: 0.55rem 1rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background var(--transition);
}

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

.card-details summary::after {
  content: "﹀";
  font-size: 0.75rem;
  transition: transform var(--transition);
  flex-shrink: 0;
}

.card-details[open] summary::after {
  transform: rotate(180deg);
}

.card-details summary:hover {
  background: #eef5ff;
}

.card-details-body {
  padding: 0.75rem 1rem 0.85rem;
  border-top: 1px solid #dde8f5;
}

html.dark .card-details {
  background: #0f2035;
  border-color: #1e3555;
}

html.dark .card-details summary {
  color: #60a5fa;
}

html.dark .card-details summary:hover {
  background: #132a45;
}

html.dark .card-details-body {
  border-top-color: #1e3555;
}

/* ===========================
   Quiz result: spacing between CTA and restart
   =========================== */
.quiz-result .btn {
  margin-bottom: 0.75rem;
}

/* ===========================
   Comparison table (choose.html) — zebra + hover row
   =========================== */
tbody tr:hover td {
  background: rgba(0, 119, 182, 0.06) !important;
}

html.dark tbody tr:hover td {
  background: rgba(72, 202, 228, 0.07) !important;
}

/* ===========================
   Custom Scrollbar (Webkit)
   =========================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 119, 182, 0.35);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 119, 182, 0.65);
}

html.dark ::-webkit-scrollbar-thumb {
  background: rgba(72, 202, 228, 0.25);
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(72, 202, 228, 0.50);
}

/* ===========================
   Selection highlight
   =========================== */
::selection {
  background: rgba(0, 119, 182, 0.22);
  color: inherit;
}

html.dark ::selection {
  background: rgba(72, 202, 228, 0.28);
}

/* ===========================
   Image polish — subtle lift on robot cards
   =========================== */
.card:hover .robot-img {
  transform: scale(1.03);
  transition: transform 0.3s ease;
}

.robot-img {
  transition: transform 0.3s ease;
}

/* ===========================
   Button: focus ring consistency
   =========================== */
.btn:focus-visible,
.quiz-option:focus-visible,
.faq-question:focus-visible {
  outline: 3px solid rgba(72, 202, 228, 0.85);
  outline-offset: 2px;
}

/* ===========================
   Footer: hover color on org links
   =========================== */
.footer-org-logos a:hover span {
  color: var(--accent);
}
