    :root { --brand:#4f46e5; --brand2:#22d3ee; }

  /* Default font (LTR) */
  html[dir="ltr"] body{
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  }

  /* Arabic font (RTL) */
  html[dir="rtl"] body{
    font-family: "Tajawal", system-ui, sans-serif;
  }

    html { scroll-behavior: smooth; }
    body { background:#0b1220; }


    @font-face{
  font-family:"Tajawal";
  src:url("/assets/fonts/Tajawal-Regular.woff2") format("woff2");
  font-weight:400;
  font-style:normal;
  font-display:swap;
    }
    @font-face{
      font-family:"Tajawal";
      src:url("/assets/fonts/Tajawal-Bold.woff2") format("woff2");
      font-weight:700;
      font-style:normal;
      font-display:swap;
    }

    /* Helpers */
    .clamp-2{
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .clamp-3{
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .focus-ring:focus { outline: none; box-shadow: 0 0 0 4px rgba(34,211,238,.15); }

    /* ---------------- HERO (home) ---------------- */
    .h-particle{
      position:absolute;
      width:4px; height:4px;
      background: linear-gradient(45deg, rgba(79,70,229,.95), rgba(124,58,237,.95));
      border-radius:999px;
      animation: hFloat 7s infinite ease-in-out;
      box-shadow: 0 0 12px rgba(79, 70, 229, 0.35);
      opacity: .9;
    }
    @keyframes hFloat{
      0%,100%{ transform: translate(0,0); opacity:.55; }
      50%{ transform: translate(10px,-18px); opacity:1; }
    }
    .h-animated-line{ animation: hDash 22s linear infinite; stroke-dasharray:10; }
    @keyframes hDash{ to{ stroke-dashoffset:1000; } }

    @keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
    .animate-spin-slow { animation: spin-slow 40s linear infinite; }

    .portrait-spotlight{
      background:
        radial-gradient(600px 400px at 65% 25%, rgba(34, 211, 238, 0.14), transparent 55%),
        radial-gradient(500px 360px at 35% 35%, rgba(59, 130, 246, 0.10), transparent 60%);
      mix-blend-mode: screen;
      opacity: 0.9;
    }

    .nav-pill{
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding: 14px 14px;
      border-radius: 18px;
      color: rgba(255,255,255,0.88);
      font-weight: 900;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.10);
      margin-bottom: 12px;
      transition: transform .18s ease, background .18s ease;
    }
    .nav-pill:hover{ background: rgba(255,255,255,0.10); transform: translateX(-2px); }
    .nav-ico{
      width:38px; height:38px;
      border-radius:14px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.10);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      color: rgba(255,255,255,0.85);
    }

    /* Reduced motion */
    @media (prefers-reduced-motion: reduce){
      .h-particle, .h-animated-line, .animate-spin-slow { animation: none !important; }
    }

    /* ---------------- HERO ARTICLES ---------------- */
    .articles-hero-particle{
      position:absolute;
      width:4px; height:4px;
      background: linear-gradient(45deg, rgba(79,70,229,.95), rgba(124,58,237,.95));
      border-radius:999px;
      animation: articlesFloat 7s infinite ease-in-out;
      box-shadow: 0 0 12px rgba(79, 70, 229, 0.35);
      opacity: .9;
    }
    @keyframes articlesFloat{
      0%,100%{ transform: translate(0,0); opacity:.55; }
      50%{ transform: translate(10px,-18px); opacity:1; }
    }
    .articles-animated-line{ animation: articlesDash 22s linear infinite; stroke-dasharray:10; }
    @keyframes articlesDash{ to{ stroke-dashoffset:1000; } }

    /* ---------------- ARTICLES GRID ---------------- */
    .articles-grid-card{
      border-radius: 22px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.10);
      box-shadow: 0 18px 60px rgba(2,6,23,0.35);
      overflow:hidden;
      transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
      height: 100%;
    }
    .articles-grid-card:hover{ transform: translateY(-6px); border-color: rgba(99,102,241,0.22); box-shadow: 0 22px 75px rgba(2,6,23,0.45); }
    .articles-grid-img{ height: 200px; width:100%; object-fit:cover; transition: transform .5s ease; }
    .articles-grid-card:hover .articles-grid-img{ transform: scale(1.05); }
    .articles-grid-body{ padding: 22px; }
    .articles-grid-meta{ color: rgba(255,255,255,.55); font-weight: 900; font-size: 12px; display: flex; align-items: center; justify-content: space-between; }
    .articles-grid-title{ color:#fff; font-weight: 950; font-size: 20px; line-height:1.35; margin-top:10px; }
    .articles-grid-desc{ color: rgba(255,255,255,.70); font-size: 14px; line-height:1.7; margin-top:10px; }
    
    /* ---------------- ARTICLES SIDEBAR ---------------- */
    .sidebar-article{
      border-radius: 18px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      padding: 16px;
      transition: transform .18s ease, background .18s ease;
    }
    .sidebar-article:hover{ transform: translateX(4px); background: rgba(255,255,255,0.08); }
    
    /* ---------------- NAVBAR & FOOTER STYLES ---------------- */
    .nav-pill{
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding: 14px 14px;
      border-radius: 18px;
      color: rgba(255,255,255,0.88);
      font-weight: 900;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.10);
      margin-bottom: 12px;
      transition: transform .18s ease, background .18s ease;
    }
    .nav-pill:hover{ background: rgba(255,255,255,0.10); transform: translateX(-2px); }
    .nav-ico{
      width:38px; height:38px;
      border-radius:14px;
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.10);
      display:inline-flex;
      align-items:center;
      justify-content:center;
      color: rgba(255,255,255,0.85);
    }

    /* Reduced motion */
    @media (prefers-reduced-motion: reduce){
      .articles-hero-particle, .articles-animated-line, .articles-grid-card, .sidebar-article { animation: none !important; transition: none !important; }
    }

    /* ---------------- IELTS TESTS (LIGHT) ---------------- */
    .tests-animated-line{ animation: testsDash 22s linear infinite; stroke-dasharray: 10; }
    @keyframes testsDash{ to{ stroke-dashoffset: 1000; } }
    .tests-particle{
      position:absolute;
      width:4px; height:4px;
      border-radius:999px;
      background: linear-gradient(45deg, rgba(79,70,229,.75), rgba(14,165,233,.75));
      animation: testsFloat 7s infinite ease-in-out;
      box-shadow: 0 0 14px rgba(79,70,229,.18);
      opacity: .85;
    }
    @keyframes testsFloat{
      0%,100%{ transform: translate(0,0); opacity:.55; }
      50%{ transform: translate(10px,-18px); opacity:1; }
    }
    .keli-test-card{
      border-radius: 22px;
      background: rgba(255,255,255,0.88);
      border: 1px solid rgba(15,23,42,0.10);
      box-shadow: 0 18px 60px rgba(2,6,23,0.08);
      backdrop-filter: blur(10px);
      padding: 22px;
      display:flex;
      flex-direction:column;
      height:100%;
      min-height:320px;
      position:relative;
      overflow:hidden;
      transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
    }
    .keli-test-card::before{
      content:"";
      position:absolute;
      inset:-40% -40% auto auto;
      width:240px; height:240px;
      background: radial-gradient(circle at 30% 30%, rgba(99,102,241,.18), transparent 60%);
      transform: rotate(18deg);
      pointer-events:none;
    }
    .keli-test-card:hover{
      transform: translateY(-6px);
      box-shadow: 0 22px 75px rgba(2,6,23,0.12);
      border-color: rgba(99,102,241,0.22);
    }
    .keli-test-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
    .keli-test-pill{
      display:inline-flex; align-items:center; gap:10px;
      padding: 8px 12px; border-radius:999px;
      background: rgba(15,23,42,0.06);
      border: 1px solid rgba(15,23,42,0.10);
      color: rgba(15,23,42,0.86);
      font-weight: 900; font-size: 12px; line-height:1;
    }
    .keli-test-meta{ color: rgba(15,23,42,0.45); font-size: 12px; font-weight: 900; }
    .keli-test-body{ flex: 1 1 auto; }
    .keli-test-title{ color:#0f172a; font-weight:950; font-size:22px; line-height:1.25; margin-top:8px; }
    .keli-test-desc{ color: rgba(15,23,42,0.65); font-size:14px; line-height:1.7; margin-top:10px; max-width:52ch; }
    .keli-test-stats{ margin-top:18px; display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:12px; }
    .keli-test-stat{
      border-radius:16px;
      background: rgba(15,23,42,0.04);
      border: 1px solid rgba(15,23,42,0.08);
      padding:14px 12px; text-align:center;
    }
    .keli-test-stat-val{ color:#0f172a; font-weight:950; font-size:18px; line-height:1.1; }
    .keli-test-stat-lbl{ color: rgba(15,23,42,0.50); font-size:12px; font-weight:800; margin-top:6px; }
    .keli-test-actions{ margin-top:16px; display:flex; gap:12px; align-items:center; }
    .keli-test-btn-primary{
      flex:1 1 auto;
      display:inline-flex; align-items:center; justify-content:center; gap:10px;
      height:50px; border-radius:16px;
      background: linear-gradient(90deg, rgba(79,70,229,.98), rgba(37,99,235,.98));
      color:#fff; font-weight:950;
      box-shadow: 0 14px 35px rgba(37,99,235,.18);
      transition: transform .18s ease, filter .18s ease;
    }
    .keli-test-btn-primary:hover{ transform: translateY(-1px); filter: brightness(1.03); }
    .keli-test-btn-icon{
      width:50px; height:50px; border-radius:16px;
      display:inline-flex; align-items:center; justify-content:center;
      background: rgba(15,23,42,0.04);
      border: 1px solid rgba(15,23,42,0.10);
      color: rgba(15,23,42,0.80);
      transition: transform .18s ease, background .18s ease;
    }
    .keli-test-btn-icon:hover{ transform: translateY(-1px); background: rgba(15,23,42,0.06); }

    @media (max-width: 640px){
      .keli-test-card{ min-height: 330px; }
      .keli-test-title{ font-size: 20px; }
    }
    @media (prefers-reduced-motion: reduce){
      .tests-animated-line, .tests-particle{ animation:none !important; }
    }

    /* ================= FORM STYLING ================= */
.contact-form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-label.required::after {
  content: " *";
  color: #ef4444;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  color: white;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b5cf6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 3rem;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(59, 130, 246, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  color: white;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.15);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(59, 130, 246, 0.95));
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button i {
  font-size: 1.1rem;
}

.form-note {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin-top: 1rem;
  line-height: 1.5;
}

.form-note a {
  color: #a78bfa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.form-note a:hover {
  color: #c4b5fd;
}

/* ================= FORM VALIDATION ================= */
.form-input:invalid:not(:placeholder-shown),
.form-textarea:invalid:not(:placeholder-shown) {
  border-color: rgba(239, 68, 68, 0.5);
}

.form-input:valid:not(:placeholder-shown),
.form-textarea:valid:not(:placeholder-shown) {
  border-color: rgba(34, 197, 94, 0.5);
}

/* ================= FORM SECTION STYLING ================= */
.contact-form-section {
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.6), rgba(20, 20, 30, 0.6));
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.contact-form-title {
  color: white;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-form-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* ================= RESPONSIVE ADJUSTMENTS ================= */
@media (max-width: 640px) {
  .contact-form-section {
    padding: 1.5rem;
  }
  
  .contact-form-title {
    font-size: 1.75rem;
  }
  
  .form-input,
  .form-textarea,
  .form-select {
    padding: 0.875rem 1rem;
  }
}

/* Make background layers non-clickable */
#general-tests .grid-bg,
#general-tests .animated-orb,
#general-tests .animated-line,
#general-tests .particle {
  pointer-events: none;
}

/* Ensure section stacking is correct */
#general-tests {
  position: relative;
}

#general-tests .grid-bg,
#general-tests .animated-orb,
#general-tests .animated-line,
#general-tests .particle {
  position: absolute; /* لو هم أصلاً absolute خلّيها، لو مش موجودة ما بتضر */
  z-index: 0;
}

/* Content should be above */
#general-tests .container {
  position: relative;
  z-index: 10;
}

/* Defensive: cards/buttons always clickable */
#general-tests .test-card,
#general-tests .primary-btn,
#general-tests .icon-btn {
  position: relative;
  z-index: 11;
  pointer-events: auto;
}
