/* Article Styles */
.breadcrumb {
    background: var(--light-bg);
    padding: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-green);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------------------------------- */
/* 1. ARTICLE INTERNAL LINKS CLASS */
/* ---------------------------------- */
/* هذا الكلاس يجب أن يُطبق على الروابط داخل فقرات المقال (بدلاً من الـ inline style) */
.article-content a {
    color: var(--primary-green);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: var(--dark-text); /* تغميق اللون عند التحويم لزيادة الوضوح */
}


/* ---------------------------------- */
/* 2. TABLE OF CONTENTS (TOC) STYLES */
/* ---------------------------------- */
.toc-box {
    background: var(--light-bg);
    border: 1px solid var(--border-color); /* استخدام لون الحدود الأساسي */
    padding: 1.5rem;
    border-radius: 12px;
    margin: var(--spacing-xl) auto; /* لتوسيط الجدول في المقال */
    max-width: 800px; /* ليتماشى مع عرض المقال */
}

.toc-box h2,
.toc-box h3 {
    margin-top: 0;
    font-size: 1.25rem;
    color: var(--primary-green);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.toc-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-box ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.toc-box ul li a {
    text-decoration: none;
    color: var(--dark-text);
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s, padding-left 0.2s;
    font-size: 1rem;
}

.toc-box ul li a:hover {
    color: var(--primary-green);
    padding-left: 5px; /* تأثير بصري لزيادة التفاعل */
}

/* Styling for nested/sub-lists (H3 links) */
.toc-box ul ul {
    padding-left: 1.5rem;
    margin-top: 0.3rem;
}


/* ---------------------------------- */
/* 3. DOMAIN MARKETING & RELATED ARTICLES BOXES */
/* ---------------------------------- */

/* Box style used for the smart domain CTA inside the article content */
.domain-marketing-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem auto;
    border-left: 4px solid var(--primary-green);
}

/* Section for Related Articles (Links Grid) */
.related-articles-section {
    padding: 3rem 0; 
    text-align: center; 
    border-top: 1px solid var(--border-color);
}

.related-articles-section .section-title {
    font-size: 1.8rem; 
    margin-bottom: 2rem;
}

/* Style for the individual related article cards (using existing .related-card) */
.related-card {
    background: var(--white); 
    border: 2px solid var(--border-color); /* border is typically lighter than primary green */
    border-radius: 12px; 
    text-decoration: none; 
    color: var(--dark-text); 
    transition: all 0.3s ease;
    padding: 1.5rem;
    display: block;
}

.related-card:hover {
    border-color: var(--primary-green); 
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Homepage Boost CTA at the bottom */
.homepage-boost-cta {
    padding: 2rem; 
    background: linear-gradient(90deg, #d1fae5, #e0f2f1); 
    border-radius: 12px; 
    margin-top: 2rem;
}

.homepage-boost-cta h3 {
    font-size: 1.5rem; 
    margin-bottom: 1rem; 
    color: #065f46;
}


/* ---------------------------------- */
/* EXISTING ARTICLE STYLES (Provided in your code) */
/* ---------------------------------- */

.article-container {
    padding: var(--spacing-xl) 0;
}

.article-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.article-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}
/* ... (بقية الستايلات) ... */

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    color: var(--light-text);
    font-size: 0.95rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-intro {
    font-size: 1.25rem;
    color: var(--dark-text);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--light-bg);
    border-left: 4px solid var(--primary-green);
    border-radius: 8px;
}

.content-placeholder {
    padding: var(--spacing-lg);
    background: var(--light-bg);
    border-radius: 12px;
    margin: var(--spacing-lg) 0;
}

.content-placeholder h2 {
    color: var(--primary-green);
    margin-bottom: var(--spacing-md);
}

.content-placeholder ul {
    list-style: none;
    padding: 0;
}

.content-placeholder li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.content-placeholder li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

/* ---------------------------------- */
/* SOCIAL SHARE BUTTONS - MODIFIED HERE */
/* ---------------------------------- */
.share-buttons {
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-lg);
    background: var(--light-bg);
    border-radius: 12px;
    text-align: center;
}

.share-buttons h4 {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.social-share {
    /* تطبيق ستايل الـ footer social links */
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center; /* توسيط الأزرار */
}

.share-btn {
    /* تحديد الحجم والشكل المربع للأيقونة فقط */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px; 
    height: 40px; 
    border-radius: 8px;
    text-decoration: none;
    color: var(--white); /* لون الأيقونة */
    transition: all 0.3s ease;
    padding: 0; /* إزالة البادينج ليصبح الزر أيقونة فقط */
    font-weight: 600; /* تم الإبقاء عليه لزيادة الوزن في حالة وجود نص */
}

.share-btn:hover {
    transform: translateY(-3px); /* تأثير الارتفاع عند التحويم */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* إضافة ظل */
    opacity: 0.95; /* تأثير بصري طفيف */
}

/* الألوان الخاصة بالشبكات الاجتماعية */
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.reddit { background: #ff4500; }

.share-btn svg {
    /* للتأكد من حجم الأيقونة داخل الزر */
    width: 20px;
    height: 20px;
    fill: currentColor;
}
/* ---------------------------------- */
/* END OF MODIFIED SOCIAL SHARE BUTTONS */
/* ---------------------------------- */


.related-articles {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--border-color);
}

.related-articles h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.related-card {
    background: var(--light-bg);
    padding: var(--spacing-md);
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark-text);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.related-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.related-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Responsive Design for Articles */

/* Large Tablets (769px - 1024px) */
@media (max-width: 1024px) {
    .article-container {
        padding: var(--spacing-lg) 0;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (481px - 768px) */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .social-share {
        /* إبقاء التوسيط عند الشاشات الصغيرة */
        justify-content: center;
    }
    
    .share-btn {
        /* لا حاجة لـ 100% عرض الآن لأنه أيقونة فقط */
        width: 40px; 
        height: 40px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
        padding: var(--spacing-sm) 0;
    }
}

/* Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    .article-icon {
        font-size: 3rem;
    }
    
    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .article-meta {
        font-size: 0.85rem;
    }
    
    .article-content {
        padding: var(--spacing-md);
    }
    
    .article-content h2 {
        font-size: 1.3rem;
    }
    
    .article-content h3 {
        font-size: 1.1rem;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .breadcrumb {
        font-size: 0.8rem;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .content-placeholder h2 {
        font-size: 1.3rem;
    }
    
    .related-card h4 {
        font-size: 1rem;
    }
    
    .related-icon {
        font-size: 2rem;
    }
}

/* Social Links Styling for Article Pages - (Kept as requested in original) */
.social-links {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Footer Styling for Article Pages */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 0.5rem;
}

[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 0.5rem;
}

.footer-subtitle {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.footer-description {
    opacity: 0.8;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
}

.footer-text {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive adjustments for social links */
@media (max-width: 480px) {
    .social-links {
        gap: var(--spacing-sm);
        justify-content: center;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
    }
}
/* =======================================
   CRITICAL CLARITY & CONTRAST FIXES (BIPV)
   ======================================= */

/* 1. ENSURE GENERAL LINKS (INSIDE BODY TEXT) ARE DARK AND CLEAR */
.article-container a {
    color: #1e3a8a; /* Dark Blue - Clear on White Background */
    text-decoration: none;
    border-bottom: 1px dotted #a78bfa; /* Subtle divider */
    transition: all 0.2s;
}

.article-container a:hover {
    color: #4f46e5; /* Distinct color change on hover */
    border-bottom: 2px solid #6366f1; /* Solid line */
}

/* 2. ENSURE HEADERS POP */
.article-container h2,
.article-container h3 {
    letter-spacing: -0.5px; /* تحسين جمالية الخط الكبير */
    line-height: 1.3;
}

/* 3. FIX FOR BUTTONS (The White Text Issue) */
/* نضمن أن اللون الأبيض للنص يُفرض على أزرار الخلفية الداكنة */
a.btn-primary, 
a.btn-primary:visited, 
a.btn-primary:hover {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important; /* لمتصفحات الجوال */
    text-decoration: none !important;
}

/* 4. CLARITY FIX FOR TABLE OF CONTENTS (TOC) LINKS */
/* جعل الروابط أغمق قليلاً على الخلفية الفاتحة للتجنب الغموض */
.toc-box a {
    color: #1e293b !important; 
    border-bottom: 1px dotted #e2e8f0; 
}
.toc-box a:hover {
    color: #0ea5e9 !important; /* الأزرق الساطع على التحويم */
}

/* 5. FIX FOR FOOTER TEXT COLOR IN LIGHT MODE (Safety Override) */
/* هذا للتأكد من أن أي نص يوضع في خلفية فاتحة لا يختفي */
.footer-text, .footer-description {
    color: #cbd5e1 !important;
}