/* ==========================================================================
   نظام التنسيق البصري الشامل — موقع تسويق نظام معلومات الطلاب (SIS Master)
   المطور: فريق Antigravity Deepmind
   الميزات: ثيم مظلم/فاتح، تأثيرات Glassmorphism، أنيميشن سلس، ودعم RTL بالكامل
   ========================================================================== */

/* ---------- متغيرات الألوان والنظام البصري (CSS Variables) ---------- */
:root {
    /* الوضع المظلم الافتراضي (Dark Mode Default) */
    --bg-main: #090d16;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --bg-element: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(255, 45, 65, 0.42);
    
    /* الألوان الأساسية والتأكيدية */
    --primary: #ff2d41;
    --primary-hover: #e61f35;
    --primary-glow: rgba(255, 45, 65, 0.24);
    --secondary: #ff6b59;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-cyan: #06b6d4;
    
    /* ألوان النصوص */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* الظلال وتأثيرات الضوء */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --glow-primary: 0 0 30px rgba(255, 45, 65, 0.28);
    
    /* انحناء الحدود والانتقالات */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 9999px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* الوضع الفاتح عند التبديل (Light Theme Override) */
[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-hover: rgba(241, 245, 249, 0.95);
    --bg-element: rgba(15, 23, 42, 0.04);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-highlight: rgba(230, 31, 53, 0.3);
    
    --primary: #e61f35;
    --primary-hover: #c8172a;
    --primary-glow: rgba(230, 31, 53, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
    --glow-primary: 0 0 25px rgba(230, 31, 53, 0.16);
}

/* ---------- التنسيقات العامة والقواعد الأساسية ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    position: relative;
    isolation: isolate;
}

h1, h2, h3, h4, h5, h6,
.brand-text, .btn, .nav-link, .section-tag, .tab-btn {
    font-family: 'Alexandria', 'IBM Plex Sans Arabic', sans-serif;
}

/* التنسيق الأساسي للحاويات */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- الترويسة وشريط التنقل (Header & Navigation) ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    padding: 16px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(9, 13, 22, 0.93);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(248, 250, 252, 0.95);
}

[data-theme="light"] .navbar {
    background: rgba(248, 250, 252, 0.85);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* الشعار الرئيسي */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.company-logo-shell {
    display: grid;
    width: 82px;
    height: 46px;
    place-items: center;
    overflow: hidden;
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.company-logo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-logo:hover .company-logo-shell {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 28px rgba(255, 45, 65, 0.2);
}

.company-logo-shell-footer {
    width: 92px;
    height: 52px;
}

.logo-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.brand-text span {
    color: var(--primary);
}

/* قائمة التنقل */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-fast);
    border-radius: var(--radius-full);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* أزرار الإجراءات في الترويسة */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle-btn {
    background: var(--bg-element);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: rotate(15deg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 26px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #c8172a);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    background: linear-gradient(135deg, #ff4053, #b91427);
}

.btn-outline {
    background: var(--bg-element);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ---------- قسم البطل (Hero Section) ---------- */
.hero-section {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 10%;
    right: 50%;
    transform: translateX(50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: rgba(255, 45, 65, 0.1);
    border: 1px solid rgba(255, 45, 65, 0.25);
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 90%;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

/* إحصائيات سريعة في الهيرو */
.hero-stats-row {
    display: flex;
    gap: 40px;
    border-top: 1px solid var(--border-color);
    padding-top: 28px;
}

.stat-item h4 {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* المعاينة الحية والتفاعلية في قسم الهيرو */
.hero-preview-container {
    position: relative;
}

.mockup-window {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), var(--glow-primary);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.mockup-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.mockup-dots {
    display: flex;
    gap: 8px;
}

.mockup-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.mockup-title {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: monospace;
    direction: ltr;
}

.mockup-body {
    padding: 20px;
}

.hero-img-showcase {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
}

/* ---------- قسم المنظومة المتكاملة (Ecosystem Architecture) ---------- */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 64px;
}

.section-tag {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* بطاقات المنظومة التفاعلية */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.ecosystem-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ecosystem-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.ecosystem-icon-wrapper {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: var(--bg-element);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    color: var(--primary);
    transition: all var(--transition-fast);
}

.ecosystem-card:hover .ecosystem-icon-wrapper {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.ecosystem-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.ecosystem-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.ecosystem-slug {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: monospace;
    direction: ltr;
    font-size: 0.82rem;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-element);
    color: var(--text-muted);
    width: fit-content;
}

/* ---------- قسم الوحدات الأساسية الـ 21 (21 Modules Grid) ---------- */
.modules-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 22px;
    border-radius: var(--radius-full);
    background: var(--bg-element);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

.module-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all var(--transition-fast);
}

.module-mini-card:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.module-badge-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.module-mini-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.module-mini-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---------- قسم معرض الشاشات والتفاعل الحقيقي (Screenshots Slider) ---------- */
.screenshots-showcase {
    background: var(--bg-element);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid var(--border-color);
}

.showcase-display {
    width: 100%;
    max-height: 540px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 24px;
}

.showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- قسم حاسبة عائد الاستثمار التفاعلية (ROI Calculator) ---------- */
.calculator-box {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 44px;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
}

.range-slider {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--bg-element);
    outline: none;
    accent-color: var(--primary);
    cursor: pointer;
}

.calc-results {
    background: linear-gradient(135deg, rgba(255, 45, 65, 0.1), rgba(6, 182, 212, 0.08));
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-md);
    padding: 36px;
    text-align: center;
}

.calc-results-title {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.calc-savings-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-green);
    margin-bottom: 16px;
}

.calc-detail-p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ---------- قسم الأسئلة الشائعة Accordion ---------- */
.faq-list {
    max-width: 840px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.faq-item.active {
    border-color: var(--primary);
}

.faq-question {
    padding: 20px 24px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-toggle-icon {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
    color: var(--primary);
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: none;
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ---------- قسم الاتصال والنافذة المنبثقة (Modal Dialog) ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    padding: 20px;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-main);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    padding: 36px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--bg-element);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
}

/* ---------- التذييل (Footer) ---------- */
.footer {
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- الخلفية الحية وحركة ظهور العناصر ---------- */
.site-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 45, 65, 0.1), transparent 30rem),
        radial-gradient(circle at 88% 76%, rgba(6, 182, 212, 0.08), transparent 34rem),
        var(--bg-main);
}

.background-grid {
    position: absolute;
    inset: -60px;
    opacity: 0.32;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.065) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, #000 8%, transparent 92%);
    animation: gridDrift 28s linear infinite;
}

.bg-orb {
    position: absolute;
    display: block;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.58;
    will-change: transform;
}

.bg-orb::after {
    position: absolute;
    inset: 10%;
    content: '';
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: inherit;
}

.bg-orb-one {
    top: 8%;
    right: -8rem;
    width: 29rem;
    height: 29rem;
    background: radial-gradient(circle at 35% 35%, rgba(255, 107, 89, 0.28), rgba(255, 45, 65, 0.04) 68%, transparent 72%);
    animation: orbFloatOne 18s ease-in-out infinite alternate;
}

.bg-orb-two {
    bottom: 4%;
    left: -9rem;
    width: 34rem;
    height: 34rem;
    background: radial-gradient(circle at 55% 42%, rgba(6, 182, 212, 0.18), rgba(6, 182, 212, 0.025) 68%, transparent 72%);
    animation: orbFloatTwo 22s ease-in-out infinite alternate;
}

.bg-orb-three {
    top: 46%;
    left: 45%;
    width: 17rem;
    height: 17rem;
    border: 1px solid rgba(255, 45, 65, 0.13);
    background: rgba(255, 45, 65, 0.025);
    animation: orbSpin 30s linear infinite;
}

.bg-beam {
    position: absolute;
    top: -30%;
    left: 38%;
    width: 11rem;
    height: 160%;
    opacity: 0.2;
    background: linear-gradient(to bottom, transparent, rgba(255, 45, 65, 0.2), transparent);
    filter: blur(32px);
    transform: rotate(24deg);
    animation: beamSweep 16s ease-in-out infinite alternate;
}

.reveal {
    opacity: 0;
    transform: translateY(34px) scale(0.985);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

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

.hero-enter {
    opacity: 0;
    transform: translateY(24px);
    animation: heroEnter 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--hero-delay, 0ms);
}

.hero-preview-container.hero-enter {
    transform: translateY(24px) scale(0.96) rotateY(-3deg);
}

.mockup-window {
    animation: mockupFloat 6s ease-in-out 1.2s infinite;
}

.ecosystem-card::after,
.module-mini-card::after,
.calculator-box::after {
    position: absolute;
    inset: 0;
    content: '';
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,0.08) 48%, transparent 75%);
    transform: translateX(70%);
    transition: opacity 0.3s ease, transform 0.75s ease;
}

.ecosystem-card:hover::after,
.module-mini-card:hover::after,
.calculator-box:hover::after {
    opacity: 1;
    transform: translateX(-70%);
}

.module-mini-card,
.calculator-box {
    position: relative;
    overflow: hidden;
}

@keyframes gridDrift {
    to { transform: translate3d(54px, 54px, 0); }
}

@keyframes orbFloatOne {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-6rem, 4rem, 0) scale(1.12); }
}

@keyframes orbFloatTwo {
    from { transform: translate3d(0, 0, 0) scale(0.92); }
    to { transform: translate3d(7rem, -5rem, 0) scale(1.08); }
}

@keyframes orbSpin {
    to { transform: rotate(360deg) translate3d(2rem, 0, 0); }
}

@keyframes beamSweep {
    from { transform: translateX(-16vw) rotate(24deg); }
    to { transform: translateX(24vw) rotate(24deg); }
}

@keyframes heroEnter {
    to { opacity: 1; transform: translateY(0) scale(1) rotateY(0); }
}

@keyframes mockupFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal, .hero-enter {
        opacity: 1;
        transform: none;
    }
}

/* ---------- قواعد الشاشات الصغيرة (Responsive Design) ---------- */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-stats-row {
        justify-content: center;
    }
    .calculator-box {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-title {
        font-size: 2.2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .brand-text {
        display: none;
    }
    .company-logo-shell {
        width: 68px;
        height: 40px;
    }
    .nav-actions {
        gap: 8px;
    }
    .nav-actions .btn {
        padding: 10px 14px;
        font-size: 0.8rem;
    }
    .background-grid {
        background-size: 38px 38px;
    }
}
