/*
© 2026 VotaAI S.à r.l. All Rights Reserved.
This source code is proprietary and confidential.
Unauthorized copying, modification, or distribution is strictly prohibited.
*/

/* ============================================================
   VotaAI - التصميم الاحترافي العالمي
   ============================================================ */

/* ---------- 1. المتغيرات الأساسية ---------- */
:root {
    /* الألوان الرئيسية */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #3b82f6;
    --secondary-light: #60a5fa;
    --secondary-dark: #2563eb;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    
    /* الألوان المساعدة */
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    
    /* التدرجات */
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    
    /* الظلال */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-glow: 0 0 40px rgba(59,130,246,0.2);
    
    /* الخطوط */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-arabic: 'Tajawal', 'Cairo', sans-serif;
    
    /* المسافات */
    --container-width: 1280px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* الحواف */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    /* الانتقالات */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.6s ease;
}

/* ---------- 2. إعادة تعيين عامة ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: #ffffff;
    color: #1e293b;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---------- 3. شريط الإشعارات العلوي ---------- */
.top-bar {
    background: var(--primary);
    color: #94a3b8;
    padding: 0.4rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 100;
}

.top-bar .left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-bar .right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar .badge {
    background: var(--secondary);
    color: white;
    padding: 0.1rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.top-bar .clock {
    font-family: 'Courier New', monospace;
    color: #e2e8f0;
}

/* ---------- 4. شريط التنقل الرئيسي ---------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226,232,240,0.6);
    position: sticky;
    top: 0;
    z-index: 99;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255,255,255,0.98);
}

.navbar .logo-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.navbar .logo-sub {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.15em;
    background: rgba(59,130,246,0.1);
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar .nav-links a {
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: width var(--transition-base);
    border-radius: var(--radius-full);
}

.navbar .nav-links a:hover {
    color: var(--primary);
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

.navbar .nav-links a.active::after {
    width: 100%;
}

.navbar .nav-links .cart-link {
    position: relative;
    font-size: 1.2rem;
    color: var(--primary);
}

.navbar .nav-links .cart-link .cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- 5. زر القائمة للجوال ---------- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2.5px;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- 6. القسم الرئيسي (Hero) ---------- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 2rem;
    min-height: 90vh;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse at center, rgba(59,130,246,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero .content {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero .badge-top {
    display: inline-block;
    background: rgba(59,130,246,0.1);
    color: var(--secondary);
    padding: 0.3rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid rgba(59,130,246,0.15);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero h1 .highlight {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: #475569;
    max-width: 500px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero .btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero .visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero .visual .floating-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.hero .visual .floating-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(226,232,240,0.6);
    text-align: center;
    min-width: 140px;
    transition: all var(--transition-base);
}

.hero .visual .floating-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.hero .visual .floating-card .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero .visual .floating-card .label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
}

.hero .visual .floating-card .sub {
    font-size: 0.7rem;
    color: #94a3b8;
}

/* ---------- 7. الأزرار ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(15,23,42,0.2);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15,23,42,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid #cbd5e1;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(15,23,42,0.04);
    transform: translateY(-2px);
}

.btn-gradient {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}

.btn-gradient:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(59,130,246,0.4);
}

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---------- 8. قسم المنتجات ---------- */
.products-section {
    padding: var(--spacing-xl) 2rem;
    background: #ffffff;
}

.products-section .section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.products-section .section-header .tag {
    display: inline-block;
    background: rgba(59,130,246,0.1);
    color: var(--secondary);
    padding: 0.2rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.products-section .section-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.products-section .section-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    border: 1px solid #f1f5f9;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.product-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card .product-icon {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.product-card .product-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.product-card .product-desc {
    color: #64748b;
    font-size: 0.9rem;
    flex-grow: 1;
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

.product-card .product-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.product-card .product-license {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 1.2rem;
}

.product-card .product-license i {
    color: var(--success);
}

.product-card .btn {
    align-self: flex-start;
    background: #f1f5f9;
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.product-card .btn:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
}

/* ---------- 9. قسم المؤسس ---------- */
.founder-section {
    padding: var(--spacing-xl) 2rem;
    background: var(--gradient-hero);
    border-top: 1px solid #e2e8f0;
}

.founder-section .container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.founder-section .founder-image {
    text-align: center;
}

.founder-section .founder-image .avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-lg);
    color: white;
}

.founder-section .founder-image .name {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.founder-section .founder-image .title {
    color: #64748b;
    font-size: 0.9rem;
}

.founder-section .founder-quote {
    font-size: 1.2rem;
    font-style: italic;
    color: #334155;
    border-left: 4px solid var(--secondary);
    padding-left: 2rem;
    line-height: 1.8;
}

.founder-section .founder-quote .attribution {
    font-style: normal;
    font-weight: 700;
    margin-top: 1rem;
    color: var(--primary);
}

/* ---------- 10. قسم الإحصائيات ---------- */
.stats-section {
    padding: var(--spacing-lg) 2rem;
    background: var(--primary);
    color: white;
}

.stats-section .stats-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stats-section .stat-item .number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-section .stat-item .label {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

/* ---------- 11. شريط العملاء ---------- */
.clients-section {
    padding: var(--spacing-lg) 2rem;
    background: white;
    text-align: center;
}

.clients-section .clients-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    max-width: var(--container-width);
    margin: 0 auto;
}

.clients-section .client-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.05em;
    opacity: 0.5;
    transition: opacity var(--transition-base);
}

.clients-section .client-logo:hover {
    opacity: 1;
}

/* ---------- 12. التذييل ---------- */
.footer {
    background: var(--primary);
    color: #94a3b8;
    padding: var(--spacing-lg) 2rem var(--spacing-md);
}

.footer .footer-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer .footer-brand .logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer .footer-brand p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    max-width: 300px;
}

.footer .footer-col h4 {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer .footer-col a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.2rem 0;
    transition: color var(--transition-fast);
}

.footer .footer-col a:hover {
    color: white;
}

.footer .footer-bottom {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer .footer-bottom .socials {
    display: flex;
    gap: 1rem;
}

.footer .footer-bottom .socials a {
    color: #94a3b8;
    transition: color var(--transition-fast);
    font-size: 1.2rem;
}

.footer .footer-bottom .socials a:hover {
    color: white;
}

/* ---------- 13. تأثيرات الحركة ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- 14. التوافق مع الجوال ---------- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .hero .visual .floating-cards { gap: 1rem; }
    .hero .visual .floating-card { padding: 1rem; min-width: 100px; }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        padding: 0.3rem 1rem;
        gap: 0.2rem;
        font-size: 0.65rem;
    }
    .top-bar .left { gap: 0.8rem; }
    
    .navbar {
        padding: 0.8rem 1rem;
    }
    .navbar .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
        gap: 0.8rem;
        border-top: 1px solid #e2e8f0;
        margin-top: 0.5rem;
    }
    .navbar .nav-links.open {
        display: flex;
    }
    .menu-toggle {
        display: flex;
    }
    
    .hero {
        flex-direction: column;
        padding: 2rem 1rem;
        min-height: auto;
        text-align: center;
    }
    .hero h1 { font-size: 2.5rem; }
    .hero p { margin: 0 auto 1.5rem; }
    .hero .btn-group { justify-content: center; }
    .hero .visual .floating-cards {
        grid-template-columns: 1fr 1fr;
        margin-top: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .founder-section .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .founder-section .founder-quote {
        border-left: none;
        border-top: 4px solid var(--secondary);
        padding-left: 0;
        padding-top: 1.5rem;
    }
    
    .stats-section .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    .stats-section .stat-item .number { font-size: 2.2rem; }
    
    .footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .products-section .section-header h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero .visual .floating-cards { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
    .hero .visual .floating-card { padding: 0.8rem; min-width: auto; }
    .hero .visual .floating-card .icon { font-size: 1.8rem; }
    .hero .visual .floating-card .label { font-size: 0.7rem; }
    
    .btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
}
