/* ============================================
   ARAB AI ACADEMY — SHARED DESIGN SYSTEM
   ============================================ */
:root {
  --navy: #060E24;
  --navy-2: #0A1633;
  --navy-3: #0F2042;
  --navy-4: #162D5A;
  --cyan: #00C2FF;
  --cyan-deep: #0096CC;
  --cyan-glow: rgba(0,194,255,0.15);
  --cyan-glow-strong: rgba(0,194,255,0.3);
  --electric: #4DEEEA;
  --white: #FFFFFF;
  --off-white: #F5F7FA;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  --purple: #8B5CF6;
  --emerald: #10B981;
  --amber: #F59E0B;
  --rose: #F43F5E;
  --teal: #0EA5E9;
  --font-h: 'Cairo', sans-serif;
  --font-b: 'Tajawal', sans-serif;
  --r: 16px;
  --r-sm: 10px;
  --r-lg: 24px;
  --r-xl: 32px;
  --ease: cubic-bezier(0.25,0.46,0.45,0.94);
  --ease-bounce: cubic-bezier(0.34,1.56,0.64,1);
  --t: all 0.35s var(--ease);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  background: var(--white);
  color: var(--gray-900);
  overflow-x: hidden;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.ctn { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }

/* ===== NAVIGATION ===== */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; transition: var(--t); }
.nav-bar { padding: 16px 0; transition: var(--t); }
.nav.scrolled .nav-bar {
  background: rgba(6,14,36,0.92);
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 10px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.logo { display: flex; align-items: center; gap: 11px; transition: var(--t); }
.logo:hover { opacity: 0.85; }
.logo-mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--cyan), var(--electric));
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h); font-size: 0.8rem; font-weight: 900; color: var(--navy);
  box-shadow: 0 0 24px var(--cyan-glow);
  position: relative;
}
.logo-mark::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.25));
}
.logo-name { font-family: var(--font-h); font-weight: 800; font-size: 1.15rem; color: #fff; line-height: 1.2; }
.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-menu > .nm-item { position: relative; }
.nm-link {
  padding: 8px 14px;
  font-family: var(--font-h); font-size: 0.87rem; font-weight: 600;
  color: rgba(255,255,255,0.65);
  transition: color 0.2s;
  display: flex; align-items: center; gap: 5px;
  cursor: pointer; border: none; background: none;
}
.nm-link:hover, .nm-link.active { color: #fff; }
.nm-arrow { font-size: 0.5rem; transition: transform 0.25s; color: rgba(255,255,255,0.35); }
.nm-item:hover .nm-arrow { transform: rotate(180deg); color: rgba(255,255,255,0.6); }
.nm-mega {
  position: absolute; top: calc(100% + 14px);
  right: 50%; transform: translateX(50%) translateY(8px);
  min-width: 320px;
  background: rgba(10,22,51,0.97);
  backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--r);
  padding: 10px;
  opacity: 0; visibility: hidden;
  transition: all 0.25s var(--ease);
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
  pointer-events: none;
}
.nm-mega::before {
  content: ''; position: absolute; top: -6px; right: calc(50% - 6px);
  width: 12px; height: 12px;
  background: rgba(10,22,51,0.97);
  border: 1px solid rgba(255,255,255,0.07);
  border-bottom: none; border-right: none;
  transform: rotate(45deg);
}
.nm-item:hover .nm-mega { opacity: 1; visibility: visible; transform: translateX(50%) translateY(0); pointer-events: all; }
.nm-mega a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 0.86rem; font-weight: 500;
  color: rgba(255,255,255,0.65); transition: all 0.2s;
}
.nm-mega a:hover { color: #fff; background: rgba(0,194,255,0.08); }
.nm-mega .mg-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.05);
}
.nm-mega .mg-label { font-weight: 600; color: rgba(255,255,255,0.9); font-size: 0.86rem; }
.nm-mega .mg-desc { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 1px; }
.mg-sep { height: 1px; background: rgba(255,255,255,0.05); margin: 4px 8px; }
.mg-highlight { color: var(--cyan) !important; }
.mg-highlight .mg-icon { background: rgba(0,194,255,0.1); border-color: rgba(0,194,255,0.15); }
.nav-right { display: flex; align-items: center; gap: 8px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-h); font-weight: 700; font-size: 0.87rem;
  border: none; cursor: pointer; transition: var(--t); white-space: nowrap;
}
.btn-ghost { padding: 8px 16px; border-radius: var(--r-sm); background: transparent; color: rgba(255,255,255,0.7); border: 1.5px solid rgba(255,255,255,0.12); }
.btn-ghost:hover { color: #fff; border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }
.btn-glow { padding: 9px 22px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--cyan), var(--electric)); color: var(--navy); box-shadow: 0 0 24px var(--cyan-glow), 0 2px 8px rgba(0,0,0,0.2); }
.btn-glow:hover { transform: translateY(-1px); box-shadow: 0 0 40px var(--cyan-glow-strong), 0 4px 16px rgba(0,0,0,0.2); }
.btn-solid-cyan { padding: 14px 32px; border-radius: var(--r); background: linear-gradient(135deg, var(--cyan), var(--electric)); color: var(--navy); font-weight: 800; box-shadow: 0 0 32px var(--cyan-glow), 0 4px 16px rgba(0,0,0,0.15); }
.btn-solid-cyan:hover { transform: translateY(-2px); box-shadow: 0 0 56px var(--cyan-glow-strong), 0 8px 24px rgba(0,0,0,0.2); }
.btn-solid-navy { padding: 14px 32px; border-radius: var(--r); background: var(--navy); color: #fff; box-shadow: 0 4px 24px rgba(6,14,36,0.3); }
.btn-solid-navy:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(6,14,36,0.4); }
.btn-outline-w { padding: 14px 32px; border-radius: var(--r); background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.2); }
.btn-outline-w:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0,194,255,0.05); }
.btn-outline-dark { padding: 14px 32px; border-radius: var(--r); background: transparent; color: var(--gray-900); border: 2px solid var(--gray-200); }
.btn-outline-dark:hover { border-color: var(--cyan); color: var(--cyan-deep); }
.btn-lg { padding: 16px 36px; font-size: 0.95rem; border-radius: var(--r); }

/* ===== HAMBURGER ===== */
.hamburger {
  display: none; width: 40px; height: 40px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; cursor: pointer;
  position: relative;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger span { width: 18px; height: 1.5px; background: #fff; border-radius: 2px; transition: all 0.3s; display: block; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px,4.5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px,-4.5px); }

/* ===== PAGE HERO (shared) ===== */
.page-hero { background: var(--navy); position: relative; overflow: hidden; padding: 130px 0 70px; text-align: center; }
.page-hero-bg { position: absolute; inset: 0; }
.page-hero-bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,194,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,194,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black 30%, transparent 70%);
}
.page-hero-glow { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(0,194,255,0.08), transparent 70%); top: -200px; right: 50%; transform: translateX(50%); }
.page-hero-clip { position: absolute; bottom: 0; left: 0; right: 0; height: 80px; background: var(--white); clip-path: polygon(0 55%, 100% 0, 100% 100%, 0 100%); z-index: 3; }
.particles { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.particle { position: absolute; width: 3px; height: 3px; background: var(--cyan); border-radius: 50%; opacity: 0; animation: particleFloat linear infinite; }
@keyframes particleFloat { 0%{opacity:0;transform:translateY(100vh) scale(0)} 10%{opacity:0.6} 90%{opacity:0.6} 100%{opacity:0;transform:translateY(-20vh) scale(1)} }
.page-hero h1 { font-family: var(--font-h); font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 900; color: #fff; margin-bottom: 12px; position: relative; z-index: 2; }
.page-hero h1 .grad { background: linear-gradient(135deg, var(--cyan), var(--electric)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.page-hero p { font-size: 1.05rem; color: rgba(255,255,255,0.5); position: relative; z-index: 2; max-width: 540px; margin: 0 auto; }

/* ===== SECTIONS ===== */
section, .sec { padding: 80px 0; position: relative; z-index: 1; }
.s-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-h); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 3px; color: var(--cyan-deep); margin-bottom: 16px; }
.s-label::before { content: ''; width: 24px; height: 2px; background: var(--cyan); border-radius: 2px; }
.s-title { font-family: var(--font-h); font-size: 2.2rem; font-weight: 800; line-height: 1.28; margin-bottom: 16px; color: var(--gray-900); }
.s-desc { font-size: 1.05rem; color: var(--gray-500); max-width: 560px; line-height: 1.85; }
.tc { text-align: center; }
.tc .s-desc { margin: 0 auto; }
.s-navy { background: var(--navy); color: #fff; overflow: hidden; position: relative; }
.s-navy::before { content:''; position:absolute; inset:0; background-image: linear-gradient(rgba(0,194,255,0.02) 1px,transparent 1px), linear-gradient(90deg,rgba(0,194,255,0.02) 1px,transparent 1px); background-size: 64px 64px; }
.s-navy .s-label { color: var(--cyan); }
.s-navy .s-label::before { background: var(--cyan); }
.s-navy .s-title { color: #fff; }
.s-navy .s-desc { color: rgba(255,255,255,0.5); }
.s-soft { background: var(--gray-50); }

/* ===== CURTAIN EFFECT (shared) ===== */
.curtain { position: relative; overflow: hidden; }
.curtain > * { position: relative; z-index: 1; }
.curtain::after {
  content: ''; position: absolute;
  top: 0; right: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(0,194,255,0.05), rgba(139,92,246,0.03));
  transform: translateX(101%);
  transition: transform 0.45s cubic-bezier(0.65,0,0.35,1);
  z-index: 0; pointer-events: none;
}
.curtain:hover::after { transform: translateX(0); }

/* ===== FOOTER ===== */
.ft { background: var(--navy); color: rgba(255,255,255,0.5); padding: 60px 0 24px; }
.ft-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.ft-brand p { color: rgba(255,255,255,0.3); font-size: 0.85rem; line-height: 1.8; margin-top: 12px; }
.ft h4 { font-family: var(--font-h); font-weight: 700; margin-bottom: 16px; color: #fff; font-size: 0.95rem; }
.ft-links a { display: block; padding: 4px 0; font-size: 0.85rem; color: rgba(255,255,255,0.4); transition: color 0.2s; }
.ft-links a:hover { color: var(--cyan); }
.ft-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: rgba(255,255,255,0.25); }

/* ===== CTA BOX (shared) ===== */
.cta-sec { padding: 0 0 80px; }
.cta-box { background: linear-gradient(135deg, var(--navy), var(--navy-3)); border-radius: var(--r-xl); padding: 56px; text-align: center; position: relative; overflow: hidden; }
.cta-box::before { content:''; position:absolute; top:-50%; right:-20%; width:500px; height:500px; background:rgba(0,194,255,0.06); border-radius:50%; }
.cta-box h2 { font-family:var(--font-h); font-size:2rem; font-weight:800; color:#fff; margin-bottom:10px; position:relative; z-index:2; }
.cta-box p { color:rgba(255,255,255,0.55); font-size:1rem; margin-bottom:24px; position:relative; z-index:2; }
.cta-btns { display:flex; justify-content:center; gap:12px; position:relative; z-index:2; }

/* ===== REVEAL ANIMATION ===== */
.rv { opacity: 0; transform: translateY(30px); transition: opacity 0.7s, transform 0.7s; }
.rv.vis { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media(max-width:1024px) {
  .ft-grid { grid-template-columns: 1fr 1fr; }
}

@media(max-width:768px) {
  .nav-menu {
    display: none; position: absolute; top: 100%; right: 0; left: 0;
    background: rgba(6,14,36,0.98); backdrop-filter: blur(32px);
    flex-direction: column; padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  }
  .nav-menu.open { display: flex; }
  .nm-mega { position: static; opacity: 1; visibility: visible; transform: none; background: rgba(255,255,255,0.02); border: none; box-shadow: none; padding: 4px 0 4px 12px; min-width: auto; display: none; pointer-events: all; }
  .nm-mega::before { display: none; }
  .nm-item.dd-open .nm-mega { display: block; }
  .hamburger { display: flex; }
  .nav-right .btn-ghost { display: none; }
  .nav-right .btn-glow { font-size: 0.8rem; padding: 7px 16px; }
  .page-hero { padding: 100px 0 50px; }
  section, .sec { padding: 70px 0; }
  .s-title { font-size: 1.8rem; }
  .cta-box { padding: 36px 20px; }
  .cta-box h2 { font-size: 1.5rem; }
  .cta-btns { flex-direction: column; align-items: center; }
  .ft-grid { grid-template-columns: 1fr; }
  .ft-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
