/* المتغيرات الأساسية */
:root {
    /* الألوان الأساسية */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #87ceeb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    
    /* ألوان النصوص */
    --text-dark: #1f2937;
    --text-light: #666;
    --text-muted: #999;
    --white: #fff;
    
    /* التدرجات */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-light: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    
    /* الظلال */
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 40px rgba(0,0,0,0.15);
    --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.05);
    
    /* الحركة */
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* التصميم */
    --border-radius: 15px;
    --border-radius-sm: 8px;
    --section-padding: 80px 0;
    --card-padding: 2rem;
    
    /* الخط */
    --font-primary: 'Tajawal', sans-serif;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    --font-size-3xl: 2.5rem;
}

/* تنسيقات عامة */
body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-dark);
    direction: rtl;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* تنسيقات الأقسام */
.section-padding {
    padding: var(--section-padding);
}

.section-title {
    font-size: var(--font-size-3xl);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* تنسيقات البطاقات المشتركة */
.feature-card,
.tech-feature-card,
.stat-card,
.testimonial-card,
.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    height: 100%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover,
.tech-feature-card:hover,
.stat-card:hover,
.testimonial-card:hover,
.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* تنسيقات الأيقونات المشتركة */
.feature-icon,
.tech-icon,
.stat-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.feature-icon::after,
.tech-icon::after,
.stat-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    animation: pulse 2s infinite;
}

.feature-icon i,
.tech-icon i,
.stat-icon i {
    font-size: var(--font-size-xl);
    color: var(--white);
    position: relative;
    z-index: 1;
}

/* المزايا التقنية */
.tech-feature-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-feature-card ul li {
    padding: 0.8rem 2rem 0.8rem 0;
    color: var(--text-light);
    border-bottom: 1px dashed var(--primary-light);
    position: relative;
}

.tech-feature-card ul li:before {
    content: "✓";
    color: var(--primary-color);
    position: absolute;
    right: 0;
}

/* الإحصائيات */
.stat-card {
    text-align: center;
}

.stat-number {
    font-size: var(--font-size-3xl);
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-light);
    font-size: var(--font-size-lg);
}

/* الشهادات */
.testimonial-img {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid var(--primary-light);
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* الأسعار */
.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.price {
    font-size: var(--font-size-3xl);
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* تأثيرات حركية */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    70% {
        transform: scale(1.1);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* تحسينات للتجاوب */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --card-padding: 1.5rem;
        --font-size-3xl: 2rem;
        --font-size-2xl: 1.75rem;
        --font-size-xl: 1.25rem;
    }

    .feature-icon,
    .tech-icon,
    .stat-icon {
        width: 60px;
        height: 60px;
    }

    .feature-icon i,
    .tech-icon i,
    .stat-icon i {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .feature-card,
    .tech-feature-card,
    .stat-card,
    .testimonial-card,
    .pricing-card {
        margin-bottom: 1.5rem;
    }
}

/* تحسينات الأداء */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy-load.loaded {
    opacity: 1;
}

/* تأثيرات التمرير */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* تحسينات الطباعة */
@media print {
    .feature-card,
    .tech-feature-card,
    .stat-card,
    .testimonial-card,
    .pricing-card {
        break-inside: avoid;
        page-break-inside: avoid;
        background: none !important;
        box-shadow: none !important;
    }
    
    .feature-icon,
    .tech-icon,
    .stat-icon {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* تنسيقات القائمة */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--white) !important;
}

.navbar-brand i {
    color: var(--accent-color);
    margin-left: 0.5rem;
}

.nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 1rem;
    left: 1rem;
    height: 2px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.navbar-cta {
    margin-right: 1rem;
}

.btn-float {
    background: var(--accent-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(var(--accent-color-rgb), 0.2);
    transition: all 0.3s ease;
}

.btn-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-color-rgb), 0.3);
}

.btn-float i {
    margin-left: 0.5rem;
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--secondary-color);
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 10px;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
    }

    .navbar-cta {
        margin: 1rem 0 0;
    }
}

/* تنسيقات القسم الرئيسي */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 8rem 0 6rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff20" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-repeat: no-repeat;
    background-position: bottom;
    opacity: 0.1;
}

.hero h1 {
    font-size: var(--font-size-3xl);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: var(--font-size-xl);
    opacity: 0.9;
}

/* تنسيقات الأزرار */
.btn {
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* تنسيقات التذييل */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    margin-top: 0.5rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.social-links a i {
    width: 24px;
    margin-left: 0.75rem;
    color: var(--accent-color);
}

.social-links a:hover {
    color: var(--white);
    transform: translateX(-5px);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
}

.contact-info li i {
    margin-left: 1rem;
    color: var(--accent-color);
    width: 20px;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.contact-info .address-details,
.contact-info .phone-numbers,
.contact-info .email-addresses {
    flex: 1;
}

.contact-info .address-details strong {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
}

.contact-info .phone-numbers a,
.contact-info .email-addresses a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.contact-info .phone-numbers a:hover,
.contact-info .email-addresses a:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.certifications {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
}

.certifications span {
    color: rgba(255, 255, 255, 0.8);
}

.certifications i {
    color: var(--accent-color);
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 1rem;
    }

    .certifications {
        justify-content: flex-start;
        margin-top: 1rem;
    }

    .footer-bottom {
        text-align: center;
    }

    .certifications {
        justify-content: center;
    }

    .contact-info li {
        margin-bottom: 2rem;
    }

    .contact-info .address-details br {
        display: none;
    }

    .contact-info .address-details {
        line-height: 1.8;
    }
}

/* تنسيقات المقالات */
.article-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-content .category {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--secondary-color);
}

.article-content p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
}

.read-more {
    align-self: flex-start;
    color: var(--accent-color) !important;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-top: auto;
    padding: 0;
    transition: all 0.3s ease;
}

.read-more i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--secondary-color) !important;
}

.read-more:hover i {
    transform: translateX(-5px);
}

/* تنسيقات النافذة المنبثقة */
.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background: var(--secondary-color);
    padding: 1.5rem;
    border: none;
}

.modal-title {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-header .btn-close {
    background-color: var(--white);
    opacity: 0.8;
    padding: 0.75rem;
    margin: 0;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal-body img {
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.modal-body h2 {
    color: var(--secondary-color);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.modal-body h3 {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin: 1.5rem 0 1rem;
}

.modal-body p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.modal-body ul {
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .modal-body {
        padding: 1.5rem;
    }

    .modal-body h2 {
        font-size: 1.5rem;
    }

    .modal-body h3 {
        font-size: 1.25rem;
    }
}

/* تأثيرات إضافية */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    opacity: 0.1;
    position: absolute;
    top: -1rem;
    right: 1rem;
}

/* الأزرار المتحركة */
.btn-float {
    transition: all 0.3s ease;
}

.btn-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* تأثيرات الخلفية */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* تحسينات الأداء */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* بطاقات المميزات */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
}

.feature-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.feature-list li i {
    margin-left: 0.5rem;
    font-size: 0.9rem;
}

/* بطاقات الإحصائيات */
.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.stat-label {
    color: var(--text-dark);
    font-weight: 500;
}

/* بطاقات المقالات */
.article-card {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.article-image {
    position: relative;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.article-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* تأثيرات إضافية */
.counter {
    display: inline-block;
    font-weight: 700;
}

.text-accent {
    color: var(--accent-color);
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }

    .article-card {
        margin-bottom: 2rem;
    }

    .feature-card {
        margin-bottom: 2rem;
    }
}
