/* file: apps/neferwa_platform_app/src/styles.css */
:root {
  --bg: #050507;
  --bg-2: #0a0a0f;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(255, 102, 0, 0.4);
  --accent: #ff6600;
  --accent-soft: rgba(255, 102, 0, 0.15);
  --accent-glow: rgba(255, 102, 0, 0.6);
  --text: #f4f4f6;
  --text-dim: #9a9aa3;
  --text-faint: #5a5a63;
  --radius: 16px;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Cairo', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); min-height: 100vh; overflow-x: hidden; position: relative; line-height: 1.6; }

#neural-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.55; pointer-events: none; }
.grid-overlay { position: fixed; inset: 0; z-index: 0; background-image: linear-gradient(rgba(255, 102, 0, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 102, 0, 0.04) 1px, transparent 1px); background-size: 60px 60px; mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%); pointer-events: none; }
.glass { background: var(--surface); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border: 1px solid var(--border); }

.header { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); width: calc(100% - 40px); max-width: 1200px; display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-radius: 14px; z-index: 100; transition: background 0.4s, border-color 0.4s; }
.header.scrolled { background: rgba(10, 10, 15, 0.75); border-color: rgba(255, 102, 0, 0.2); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.5px; }
.logo-mark { font-size: 1.4rem; color: var(--accent); text-shadow: 0 0 12px var(--accent-glow); }
.logo-sub { color: var(--accent); font-size: 0.8rem; opacity: 0.8; }
.nav { display: flex; gap: 28px; }
.nav-link { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; font-weight: 500; position: relative; transition: color 0.3s; }
.nav-link::after { content: ''; position: absolute; bottom: -6px; right: 0; width: 0; height: 2px; background: var(--accent); border-radius: 2px; transition: width 0.3s ease; box-shadow: 0 0 8px var(--accent-glow); }
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.portal-btn { display: flex; align-items: center; gap: 8px; padding: 9px 18px; background: linear-gradient(135deg, rgba(255, 102, 0, 0.15), rgba(255, 102, 0, 0.05)); border: 1px solid rgba(255, 102, 0, 0.35); border-radius: 10px; color: var(--accent); font-family: var(--font-display); font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.3s; letter-spacing: 0.5px; }
.portal-btn:hover { background: linear-gradient(135deg, rgba(255, 102, 0, 0.3), rgba(255, 102, 0, 0.1)); border-color: var(--accent); box-shadow: 0 0 24px rgba(255, 102, 0, 0.35), inset 0 0 12px rgba(255, 102, 0, 0.1); transform: translateY(-1px); }
.portal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }

.hero { position: relative; z-index: 10; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 120px 20px 60px; }
.hero-eyebrow { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 4px; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; opacity: 0.85; }
.hero-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 900; line-height: 1.2; margin-bottom: 18px; }
.title-line { display: block; }
.title-line.accent { background: linear-gradient(135deg, var(--accent), #ffaa55); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { max-width: 580px; color: var(--text-dim); font-size: 1.05rem; margin-bottom: 50px; }

.neural-stage { position: relative; width: 100%; max-width: 1000px; aspect-ratio: 10 / 7; margin: 0 auto; overflow: hidden; }
.connections { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.conn { stroke: url(#line-grad); stroke-width: 1.5; opacity: 0.35; stroke-dasharray: 6 8; animation: dash-flow 3s linear infinite; transition: opacity 0.4s, stroke-width 0.4s; }
.conn.active { opacity: 1; stroke-width: 2.5; filter: drop-shadow(0 0 6px var(--accent-glow)); }
@keyframes dash-flow { to { stroke-dashoffset: -28; } }

.core { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 200px; z-index: 5; display: flex; align-items: center; justify-content: center; }
.core-rings { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ring { position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 1px solid rgba(255, 102, 0, 0.25); transform: translate(-50%, -50%); }
.ring.r1 { width: 100%; height: 100%; animation: ring-pulse 3s ease-in-out infinite; }
.ring.r2 { width: 130%; height: 130%; border-color: rgba(255, 102, 0, 0.15); animation: ring-pulse 3s ease-in-out infinite 0.5s; }
.ring.r3 { width: 160%; height: 160%; border-color: rgba(255, 102, 0, 0.08); animation: ring-pulse 3s ease-in-out infinite 1s; }
@keyframes ring-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; } 50% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; } }

.core-inner { position: relative; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255, 102, 0, 0.25), rgba(10, 10, 15, 0.9)); border: 1.5px solid rgba(255, 102, 0, 0.5); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 40px rgba(255, 102, 0, 0.3), inset 0 0 20px rgba(255, 102, 0, 0.15); animation: core-breathe 4s ease-in-out infinite; }
@keyframes core-breathe { 0%, 100% { box-shadow: 0 0 40px rgba(255, 102, 0, 0.3), inset 0 0 20px rgba(255, 102, 0, 0.15); } 50% { box-shadow: 0 0 60px rgba(255, 102, 0, 0.5), inset 0 0 30px rgba(255, 102, 0, 0.25); } }
.core-glyph { font-size: 2.8rem; color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); line-height: 1; }
.core-label { font-family: var(--font-display); font-size: 0.85rem; font-weight: 700; letter-spacing: 1px; margin-top: 6px; color: var(--text); }
.core-sub { font-size: 0.62rem; color: var(--text-faint); letter-spacing: 0.5px; }

.node { position: absolute; top: var(--ny); left: var(--nx); transform: translate(-50%, -50%); width: 220px; padding: 22px 20px; background: var(--surface); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; z-index: 10; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.4s, box-shadow 0.4s, background 0.4s; }
.node:hover { transform: translate(-50%, -50%) translateY(-8px) scale(1.05); border-color: var(--accent); background: rgba(255, 102, 0, 0.08); box-shadow: 0 12px 40px rgba(255, 102, 0, 0.25), 0 0 0 1px rgba(255, 102, 0, 0.3), inset 0 0 20px rgba(255, 102, 0, 0.08); }
.node-icon { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: rgba(255, 102, 0, 0.1); border: 1px solid rgba(255, 102, 0, 0.2); color: var(--accent); transition: all 0.4s; }
.node-icon svg { width: 30px; height: 30px; }
.node:hover .node-icon { background: rgba(255, 102, 0, 0.2); border-color: var(--accent); box-shadow: 0 0 16px rgba(255, 102, 0, 0.4); }
.node-title { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: var(--text); letter-spacing: 0.5px; }
.node-desc { font-size: 0.82rem; color: var(--text-dim); line-height: 1.5; margin-top: 4px; }

.node.special { border-color: rgba(255, 102, 0, 0.3); box-shadow: 0 0 24px rgba(255, 102, 0, 0.15); }
.node.special .node-icon { background: rgba(255, 102, 0, 0.18); border-color: rgba(255, 102, 0, 0.4); box-shadow: 0 0 12px rgba(255, 102, 0, 0.3); }
.special-badge { position: absolute; top: -8px; right: -8px; padding: 2px 10px; font-size: 0.6rem; font-family: var(--font-display); font-weight: 700; letter-spacing: 0.5px; background: var(--accent); color: #000; border-radius: 20px; box-shadow: 0 0 12px var(--accent-glow); animation: badge-pulse 2s infinite; }
@keyframes badge-pulse { 0%, 100% { box-shadow: 0 0 12px var(--accent-glow); } 50% { box-shadow: 0 0 20px var(--accent-glow), 0 0 30px rgba(255, 102, 0, 0.3); } }

.about { position: relative; z-index: 10; padding: 80px 20px; max-width: 1100px; margin: 0 auto; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.about-card { padding: 32px 24px; border-radius: var(--radius); transition: transform 0.4s, border-color 0.4s; }
.about-card:hover { transform: translateY(-6px); border-color: rgba(255, 102, 0, 0.25); }
.about-num { font-family: var(--font-display); font-size: 2rem; font-weight: 900; color: var(--accent); opacity: 0.3; margin-bottom: 12px; }
.about-card h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 10px; }
.about-card p { color: var(--text-dim); font-size: 0.92rem; }

.footer { position: relative; z-index: 10; padding: 40px 20px 30px; max-width: 900px; margin: 0 auto; text-align: center; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px; border-radius: var(--radius); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.footer-tag { color: var(--text-dim); font-size: 0.9rem; }
.footer-copy { margin-top: 24px; color: var(--text-faint); font-size: 0.8rem; }

@media (max-width: 1024px) {
  .neural-stage { max-width: 800px; }
  .core { width: 170px; height: 170px; }
  .core-inner { width: 120px; height: 120px; }
  .core-glyph { font-size: 2.4rem; }
  .node { width: 190px; padding: 18px 16px; }
  .node-icon { width: 48px; height: 48px; }
  .node-icon svg { width: 26px; height: 26px; }
}

@media (max-width: 768px) {
  .header { top: 12px; padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .logo { font-size: 1rem; }
  .logo-mark { font-size: 1.2rem; }
  .nav { order: 3; width: 100%; justify-content: center; gap: 16px; }
  .nav-link { font-size: 0.8rem; }
  .portal-btn { font-size: 0.72rem; padding: 6px 12px; }
  .hero { padding: 100px 16px 40px; }
  .hero-eyebrow { font-size: 0.68rem; letter-spacing: 3px; }
  .hero-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .hero-sub { font-size: 0.92rem; margin-bottom: 36px; padding: 0 8px; }
  
  .neural-stage { aspect-ratio: auto; max-width: 360px; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; }
  .connections { display: none; }
  .core { position: relative; top: auto; left: auto; transform: none; width: 140px; height: 140px; margin-bottom: 8px; }
  .core-inner { width: 100px; height: 100px; }
  .core-glyph { font-size: 2rem; }
  .core-label { font-size: 0.7rem; }
  .core-sub { font-size: 0.5rem; }
  .ring.r1 { width: 100%; height: 100%; }
  .ring.r2 { width: 130%; height: 130%; }
  .ring.r3 { width: 160%; height: 160%; }
  
  .neural-stage::before { content: ''; position: relative; width: 2px; height: 24px; background: linear-gradient(to bottom, var(--accent-glow), transparent); opacity: 0.5; }
  .node { position: relative; top: auto; left: auto; transform: none; width: 100%; max-width: 320px; padding: 16px 18px; flex-direction: row; text-align: right; gap: 14px; animation: none; margin-bottom: 12px; }
  .node:hover { transform: translateY(-4px); }
  .node-icon { flex-shrink: 0; width: 48px; height: 48px; }
  .node-icon svg { width: 26px; height: 26px; }
  .node-title { font-size: 0.85rem; }
  .node-desc { font-size: 0.76rem; max-height: 60px; opacity: 0.85; margin-top: 2px; text-align: right; }
  .node:hover .node-desc { max-height: 60px; }
  .node > span:not(.node-icon):not(.special-badge) { text-align: right; }
  .special-badge { font-size: 0.55rem; padding: 2px 8px; top: -6px; right: -6px; }
  
  .about { padding: 50px 16px; }
  .about-grid { grid-template-columns: 1fr; gap: 16px; }
  .about-card { padding: 24px 20px; }
  .footer { padding: 30px 16px 20px; }
  .footer-inner { padding: 24px 20px; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 1.4rem; }
  .hero-sub { font-size: 0.85rem; }
  .node { padding: 14px 14px; gap: 10px; }
  .node-icon { width: 42px; height: 42px; }
  .node-icon svg { width: 22px; height: 22px; }
  .node-title { font-size: 0.8rem; }
  .node-desc { font-size: 0.72rem; }
  .core { width: 120px; height: 120px; }
  .core-inner { width: 86px; height: 86px; }
  .core-glyph { font-size: 1.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 5, 7, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal { position: relative; width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; background: linear-gradient(180deg, rgba(15, 15, 20, 0.95), rgba(8, 8, 12, 0.98)); border: 1px solid rgba(255, 102, 0, 0.25); border-radius: 20px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 102, 0, 0.1); transform: translateY(24px) scale(0.97); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 16px; left: 16px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border); border-radius: 50%; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; z-index: 10; transition: all 0.3s; }
.modal-close:hover { background: rgba(255, 102, 0, 0.15); border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }
.modal-hero { padding: 40px 36px 28px; text-align: center; border-bottom: 1px solid var(--border); position: relative; }
.modal-hero .node-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 16px; background: rgba(255, 102, 0, 0.12); border: 1px solid rgba(255, 102, 0, 0.3); color: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 24px rgba(255, 102, 0, 0.2); }
.modal-hero .node-icon svg { width: 34px; height: 34px; }
.modal-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.modal-tagline { color: var(--accent); font-size: 0.85rem; font-family: var(--font-display); letter-spacing: 1px; }
.modal-body { padding: 28px 36px; }
.modal-section { margin-bottom: 28px; }
.modal-section:last-child { margin-bottom: 0; }
.modal-section h4 { font-family: var(--font-display); font-size: 0.9rem; color: var(--accent); margin-bottom: 12px; letter-spacing: 0.5px; }
.modal-section p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.7; }
.features-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.features-list li { display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 0.88rem; }
.features-list li::before { content: '𓋹'; color: var(--accent); font-size: 0.9rem; flex-shrink: 0; }

.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 102, 0, 0.2); background: #000; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }

/* تنسيق فيديو الريل الطولي الجديد */
.reel-frame { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 102, 0, 0.2); background: #000; }
.reel-frame iframe { width: 100%; height: 100%; border: 0; }

.video-placeholder { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a0a0f, #12121a); color: var(--text-faint); font-size: 0.85rem; cursor: pointer; transition: color 0.3s; }
.video-placeholder:hover { color: var(--accent); }
.video-placeholder .play-icon { position: absolute; width: 56px; height: 56px; border-radius: 50%; background: rgba(255, 102, 0, 0.15); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(255, 102, 0, 0.3); transition: transform 0.3s; }
.video-placeholder:hover .play-icon { transform: scale(1.1); }
.video-placeholder .play-icon::after { content: ''; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent var(--accent); margin-left: 3px; }

.testimonials { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.testimonial-card { padding: 16px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 12px; }
.testimonial-card .stars { color: var(--accent); font-size: 0.8rem; margin-bottom: 8px; letter-spacing: 2px; }
.testimonial-card p { color: var(--text-dim); font-size: 0.85rem; line-height: 1.6; margin-bottom: 10px; }
.testimonial-card .author { display: flex; align-items: center; gap: 8px; }
.testimonial-card .author-avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 102, 0, 0.15); border: 1px solid rgba(255, 102, 0, 0.3); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 0.85rem; font-weight: 700; }
.testimonial-card .author-name { font-size: 0.82rem; color: var(--text); font-weight: 600; }
.testimonial-card .author-role { font-size: 0.72rem; color: var(--text-faint); }

.modal-footer { padding: 24px 36px 32px; border-top: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.download-btn { display: flex; align-items: center; gap: 10px; padding: 14px 36px; background: linear-gradient(135deg, var(--accent), #ff8533); border: none; border-radius: 12px; color: #000; font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: all 0.3s; letter-spacing: 0.5px; box-shadow: 0 8px 24px rgba(255, 102, 0, 0.3); }
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255, 102, 0, 0.45); }
.download-btn svg { width: 20px; height: 20px; }
.platforms { display: flex; gap: 16px; color: var(--text-faint); font-size: 0.8rem; }
.platforms span { display: flex; align-items: center; gap: 5px; }

@media (max-width: 600px) {
  .modal { max-height: 92vh; border-radius: 16px; }
  .modal-hero { padding: 32px 24px 20px; }
  .modal-body { padding: 22px 24px; }
  .modal-footer { padding: 20px 24px 28px; }
  .modal-title { font-size: 1.3rem; }
  .features-list { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .download-btn { width: 100%; justify-content: center; }
}

/* Header Actions & Language Switcher */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}
.lang-btn:hover {
  background: rgba(255, 102, 0, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.lang-globe {
  font-size: 0.95rem;
}

/* LTR adjustments */
html[dir="ltr"] {
  direction: ltr;
  text-align: left;
}
html[dir="ltr"] body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
html[dir="ltr"] .nav-link::after {
  right: auto;
  left: 0;
}
html[dir="ltr"] .special-badge {
  right: auto;
  left: -8px;
}

