/* تطبيق إدارة المخزون - صفحة الهبوط - محسن للأداء والسيو */

/* تحسينات الأداء */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* تحسين الخطوط */
@font-display: swap;

/* تحسين التمرير */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

/* تحسين الرسوم المتحركة */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: var(--bg-gradient);
    color: white !important;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header * {
    color: white !important;
}

.header h1 {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p,
.header .header-subtitle {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
}

.header .container {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Button Styles */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--success-color);
    color: white !important;
    padding: 18px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
    border: none;
    cursor: pointer;
    text-shadow: none;
}

.download-btn * {
    color: white !important;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(5, 150, 105, 0.4);
    background: #047857;
    color: white !important;
}

.download-btn:hover * {
    color: white !important;
}

.download-btn i {
    font-size: 1.3rem;
    color: white !important;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--bg-gradient);
    border-radius: 2px;
}

/* Features Section */
.features {
    background: var(--bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background: var(--bg-primary);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: var(--transition);
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: white;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Benefits Section */
.benefits {
    background: var(--bg-primary);
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: 15px;
    transition: var(--transition);
    border-left: 4px solid var(--success-color);
}

.benefit-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.benefit-content h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
}

.benefit-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    background: var(--bg-secondary);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.screenshot {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.screenshot:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.screenshot img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 15px;
}

.screenshot h4 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

/* CTA Section */
.cta {
    background: var(--bg-gradient);
    color: white !important;
    text-align: center;
}

.cta * {
    color: white !important;
}

.cta h2 {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cta p {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer p {
    opacity: 0.8;
    margin-bottom: 5px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 60px 0;
    }
    
    .header h1 {
        font-size: 2.2rem;
    }

    .header p {
        font-size: 1.1rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .feature-card {
        padding: 30px 20px;
    }

    .container {
        padding: 0 15px;
    }

    .download-btn {
        padding: 15px 25px;
        font-size: 1rem;
    }

    .cta h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 50px 0;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .benefit-item {
        flex-direction: column;
        text-align: center;
    }
}

/* تحسينات إضافية للأداء والسيو */

/* تحسين الصور */
img {
    max-width: 100%;
    height: auto;
    loading: lazy;
    decoding: async;
}

/* تحسين الخطوط */
.header h1,
.section-title {
    font-display: swap;
    text-rendering: optimizeLegibility;
}

/* تحسين الرسوم المتحركة */
.feature-card,
.benefit-item,
.screenshot {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* تحسين التركيز للوصولية */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* تحسين الطباعة */
@media print {
    .header,
    .download-btn,
    .footer {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
}

/* أنماط للعناصر الجديدة */
.header-subtitle {
    font-size: 1.1rem;
    margin: 15px 0;
    opacity: 0.9;
}

.header-features {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.feature-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.feature-badge * {
    color: white !important;
}

.download-info {
    font-size: 0.9rem;
    margin-top: 15px;
    opacity: 0.8;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* تحسين ألوان النصوص في الخلفيات الملونة */
.header .download-info,
.cta .download-info {
    color: white !important;
}

.download-note {
    font-size: 0.9rem;
    margin-top: 15px;
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.cta-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 1.5rem;
    color: white !important;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.stat-item span {
    font-size: 0.9rem;
    color: white !important;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* تحسين ألوان CTA stats في الخلفية الملونة */
.cta .stat-item strong,
.cta .stat-item span {
    color: white !important;
}

.download-note {
    font-size: 0.9rem;
    margin-top: 15px;
    color: var(--success-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-features {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.footer-features span {
    font-size: 0.9rem;
    color: var(--success-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

.app-info {
    list-style: none;
}

.app-info li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.keywords-footer {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

/* تحسينات الاستجابة للأجهزة المحمولة */
@media (max-width: 768px) {
    .header-features {
        gap: 10px;
    }

    .feature-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .cta-stats {
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .social-links {
        justify-content: center;
    }
}

/* تحسينات إضافية للأجهزة المحمولة */

/* تحسين اللمس والتفاعل */
@media (hover: none) and (pointer: coarse) {
    .download-btn,
    .feature-card,
    .benefit-item {
        transform: none !important;
        transition: background-color 0.3s ease;
    }

    .download-btn:active {
        background-color: #1d4ed8;
        transform: scale(0.98);
    }

    .feature-card:active,
    .benefit-item:active {
        background-color: #f8fafc;
    }
}

/* تحسين الخطوط للشاشات الصغيرة */
@media (max-width: 480px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    .header h1 {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .header-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .feature-card h3,
    .benefit-item h4 {
        font-size: 1.1rem;
    }

    .feature-card p,
    .benefit-item p {
        font-size: 0.9rem;
    }
}

/* تحسين المسافات للشاشات الصغيرة جداً */
@media (max-width: 360px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 40px 0;
    }

    .section {
        padding: 40px 0;
    }

    .features-grid,
    .benefits-list,
    .screenshots-grid {
        gap: 15px;
    }

    .download-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* تحسين الوصولية للأجهزة المحمولة */
@media (max-width: 768px) {
    /* زيادة حجم المناطق القابلة للنقر */
    .download-btn {
        min-height: 48px;
        min-width: 48px;
    }

    .footer-links a,
    .social-links a {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* تحسين التباين */
    .feature-badge {
        background: rgba(255, 255, 255, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
}

/* تحسين الأداء للأجهزة المحمولة */
@media (max-width: 768px) {
    /* تقليل الرسوم المتحركة المعقدة */
    .feature-card,
    .benefit-item,
    .screenshot {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    /* تحسين الخلفيات */
    .header::before {
        display: none;
    }

    .header {
        background: var(--bg-gradient);
    }
}

/* تحسين التمرير الأفقي */
.screenshots-grid {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.screenshot {
    scroll-snap-align: center;
    flex-shrink: 0;
}

/* تحسين النماذج للأجهزة المحمولة (إذا أضيفت لاحقاً) */
@media (max-width: 768px) {
    input,
    textarea,
    select {
        font-size: 16px; /* منع التكبير في iOS */
        min-height: 44px;
    }
}

/* تحسين الطباعة للأجهزة المحمولة */
@media print {
    .header-features,
    .cta-stats,
    .social-links {
        display: none;
    }

    .section-description {
        font-size: 10pt;
    }
}

/* تحسين الوضع الأفقي للهواتف */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 30px 0;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header-subtitle {
        font-size: 0.9rem;
    }

    .section {
        padding: 30px 0;
    }
}

/* تحسين الشاشات عالية الكثافة */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .feature-icon i,
    .benefit-icon i {
        transform: scale(1.1);
    }
}

/* تحسين الوضع المظلم (إذا كان مدعوماً) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
    }

    body {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .feature-card,
    .benefit-item,
    .screenshot {
        background: var(--bg-primary);
        border: 1px solid #334155;
    }
}

/* تحسينات إضافية لضمان وضوح النصوص في الخلفيات الملونة */
.header,
.cta {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.header h1,
.header p,
.header .header-subtitle,
.header .download-info,
.cta h2,
.cta p,
.cta .download-note {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.feature-badge,
.download-btn {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* تحسين التباين للوصولية */
.header .download-btn,
.cta .download-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    backdrop-filter: blur(10px);
}

.header .download-btn:hover,
.cta .download-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
}

/* تحسين ألوان الإحصائيات في CTA */
.cta .cta-stats {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.cta .stat-item strong,
.cta .stat-item span {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
