/* ============================================= */
/* article.css - تنسيقات صفحة المقال بالكامل     */
/* ============================================= */

/* ===== 1. VARIABLES FOR ARTICLE PAGE ===== */
:root {
    --article-primary: #384999;
    --article-secondary: #c22530;
    --article-bg: #f8f9fa;
    --article-surface: #ffffff;
    --article-border: #e9ecef;
    --article-text: #2c3e50;
    --article-gray: #6c757d;
    --article-light: #f1f3f5;
}

/* ===== 2. ARTICLE PAGE BASE ===== */
.article-page {
    background: var(--article-bg);
    min-height: 100vh;
    padding-bottom: 80px;
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

/* ===== 3. ARTICLE HEADER ===== */
.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--article-border);
}

.article-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--article-primary), #2a3a8a);
    color: white !important; /* ⬅️ أضف هذا السطر */
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 0.9rem;
    box-shadow: 0 3px 10px rgba(56, 73, 153, 0.3);
}

.article-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--article-text);
    line-height: 1.3;
    margin: 15px 0 20px;
}

/* ===== 4. ARTICLE META ===== */
.article-meta-desktop {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.article-meta-mobile {
    display: none;
    background: var(--article-light);
    border-radius: 10px;
    padding: 12px 15px;
    margin: 15px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    justify-content: space-between;
    scrollbar-width: none;
}

.article-meta-mobile::-webkit-scrollbar {
    display: none;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--article-gray);
    white-space: nowrap;
    flex-shrink: 0;
}

.meta-item i {
    color: var(--article-secondary);
    font-size: 0.9rem;
}

/* ===== 5. ARTICLE HERO IMAGE ===== */
.article-hero-image {
    position: relative;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.article-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.image-caption {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 6. ARTICLE CONTENT ===== */
.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin: 30px 0;
}

.article-content p {
    margin-bottom: 25px;
    text-align: justify;
}

.article-content h2 {
    color: var(--article-primary);
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--article-border);
    font-size: 1.6rem;
}

.article-content h3 {
    color: var(--article-text);
    margin: 25px 0 15px;
    font-size: 1.3rem;
}

.article-content ul, 
.article-content ol {
    margin: 15px 0;
    padding-right: 25px;
}

.article-content li {
    margin-bottom: 10px;
}

.content-link {
    color: var(--article-primary);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dashed var(--article-primary);
    transition: all 0.3s;
}

.content-link:hover {
    color: var(--article-secondary);
    border-bottom-style: solid;
}

/* ===== 7. ARTICLE SIDEBAR ===== */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-section {
    background: var(--article-surface);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
}

.sidebar-title {
    color: var(--article-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--article-border);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* إعلانات السايدبار */
.sidebar-ad {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.sidebar-ad img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.sidebar-ad .ad-description {
    padding: 10px;
    font-size: 0.85rem;
    color: #666;
    background: white;
}

/* مقالات السايدبار */
.sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-article {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: var(--article-light);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.sidebar-article:hover {
    background: var(--article-surface);
    border-color: var(--article-primary);
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(56, 73, 153, 0.1);
}

.sidebar-article-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

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

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

.sidebar-article-content {
    flex: 1;
}

.sidebar-article-content h4 {
    font-size: 0.9rem;
    margin: 0 0 5px;
    line-height: 1.3;
    color: var(--article-text);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-time {
    font-size: 0.8rem;
    color: var(--article-gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-time i {
    color: var(--article-secondary);
    font-size: 0.8rem;
}

/* ===== 8. ARTICLE FOOTER (TAGS & BUTTONS) ===== */
.article-footer {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid var(--article-border);
}

.article-tags-section h4 {
    color: var(--article-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.article-tag {
    background: var(--article-light);
    color: var(--article-primary);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #ddd;
}

.article-tag:hover {
    background: var(--article-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(56, 73, 153, 0.3);
}

.back-to-category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--article-light), #e9ecef);
    color: var(--article-primary);
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    margin-top: 20px;
    border: 1px solid #ddd;
}

.back-to-category:hover {
    background: linear-gradient(135deg, var(--article-primary), #2a3a8a);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(56, 73, 153, 0.4);
    border-color: var(--article-primary);
}

/* ===== 9. SHARE BUTTONS ===== */
.share-buttons-inline {
    display: flex;
    gap: 12px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--article-border);
    border-bottom: 1px solid var(--article-border);
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn-inline {
    padding: 10px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-weight: 700;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
}

.share-btn-inline.copy { background: #6c757d; }
.share-btn-inline.print { background: #17a2b8; }
.share-btn-inline.comment { background: #28a745; }
.share-btn-inline.report { background: var(--article-secondary); }

.share-btn-inline:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===== 10. RELATED ARTICLES SECTION ===== */
.related-section {
    margin: 40px 0 20px;
    padding-top: 25px;
    border-top: 2px solid var(--article-border);
}

.related-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--article-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-title i {
    color: var(--article-secondary);
    font-size: 1.2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.related-article {
    background: var(--article-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.related-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: rgba(194, 37, 48, 0.15);
}

.related-article-image {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-article:hover .related-article-image img {
    transform: scale(1.08);
}

.related-article-content {
    padding: 20px;
}

.related-article-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--article-text);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-excerpt {
    font-size: 0.9rem;
    color: var(--article-gray);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--article-gray);
}

.related-article-category {
    background: var(--article-light);
    color: var(--article-primary);
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.75rem;
}

.related-article-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== 11. FLOATING ADS FOR ARTICLE PAGE - FIXED ===== */
.floating-ad {
    position: fixed;
    z-index: 99999; /* أعلى من index.php */
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    display: none;
    border: 2px solid #c22530;
    animation-duration: 0.6s;
    animation-fill-mode: both;
    transition: all 0.3s ease;
}

/* نسخة الهاتف - ثابتة على اليمين */
.floating-ad.mobile-version {
    bottom: 85px; /* أعلى قليلاً من bottom-nav */
    right: 15px !important; /* ⬅️ إصلاح: على اليمين */
    left: auto !important; /* ⬅️ إصلاح: إلغاء اليسار */
    width: 90%;
    max-width: 320px;
    transform: none !important; /* ⬅️ إصلاح: إلغاء التحويل */
    animation-name: slideInUpMobile;
}

/* نسخة الكمبيوتر - ثابتة على اليمين */
.floating-ad.desktop-version {
    bottom: 100px;
    right: 25px !important; /* ⬅️ إصلاح: على اليمين */
    left: auto !important; /* ⬅️ إصلاح: إلغاء اليسار */
    width: 300px;
    transform: none !important; /* ⬅️ إصلاح: إلغاء التحويل */
    animation-name: slideInUpDesktop;
}

/* أنيميشن جديد للهاتف */
@keyframes slideInUpMobile {
    from { 
        transform: translateY(100px) !important; 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) !important; 
        opacity: 1; 
    }
}

/* أنيميشن جديد للكمبيوتر */
@keyframes slideInUpDesktop {
    from { 
        transform: translateX(100px) !important; 
        opacity: 0; 
    }
    to { 
        transform: translateX(0) !important; 
        opacity: 1; 
    }
}

@keyframes slideInBottom {
    from { 
        transform: translateX(-50%) translateY(80px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1; 
    }
}

.floating-ad .ad-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}

.floating-ad .ad-close:hover {
    transform: scale(1.1) rotate(90deg);
}

.floating-ad .ad-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--article-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 1;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.floating-ad img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.floating-ad a:hover img {
    transform: scale(1.05);
}

.floating-ad .ad-description {
    padding: 18px;
    text-align: center;
    background: var(--article-bg);
}

.floating-ad .ad-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--article-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.floating-ad .ad-text {
    font-size: 13px;
    color: var(--article-gray);
    line-height: 1.5;
    margin-bottom: 12px;
}

.floating-ad .cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #27ae60, #219955);
    color: white;
    padding: 9px 22px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.floating-ad .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #219955, #27ae60);
}

/* ===== 12. PAGE FOOTER ===== */
.article-page-footer {
    background: linear-gradient(to bottom, #1a1a1a, #2d2d2d);
    color: white;
    padding: 2.5rem 1.5rem 1rem;
    margin-top: 3rem;
}

.article-page-footer .footer-title {
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: white;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.article-page-footer .footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--article-primary);
    border-radius: 2px;
}

.article-page-footer .footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.article-page-footer .social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
}

.article-page-footer .social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.article-page-footer .social-icon.facebook:hover { background: #3b5998; }
.article-page-footer .social-icon.twitter:hover { background: #1da1f2; }
.article-page-footer .social-icon.instagram:hover { background: #e1306c; }
.article-page-footer .social-icon.rss:hover { background: #ff6600; }

.article-page-footer .footer-links-section {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.article-page-footer .footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.article-page-footer .footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.article-page-footer .footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.article-page-footer .copyright {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    line-height: 1.6;
}

.article-page-footer .developed-by a {
    color: var(--article-primary);
    text-decoration: none;
    font-weight: 700;
}

.article-page-footer .developed-by a:hover {
    text-decoration: underline;
}

/* ===== 13. RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 992px) {
    .article-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-sidebar {
        position: static;
        order: 3;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .article-image {
        height: 350px;
    }
    
    .related-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-image {
        height: 250px;
    }
    
    .article-content {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .article-meta-desktop {
        display: none;
    }
    
    .article-meta-mobile {
        display: flex;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .share-buttons-inline {
        gap: 8px;
        padding: 15px 0;
    }
    
    .share-btn-inline {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    /* Floating Ads Mobile */
    .floating-ad.desktop-version {
        display: none !important;
    }
    
    .floating-ad.mobile-version {
        display: block !important;
    }
    
    .floating-ad.mobile-version img {
        height: 160px;
    }
    
    .floating-ad .ad-description {
        padding: 15px;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .article-title {
        font-size: 1.3rem;
    }
    
    .article-image {
        height: 200px;
    }
    
    .article-category-badge {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
    
    .article-tag {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .back-to-category {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .related-title {
        font-size: 1.2rem;
    }
    
    .sidebar-article {
        padding: 8px;
    }
    
    .sidebar-article-image {
        width: 50px;
        height: 50px;
    }
}

@media (min-width: 769px) {
    .floating-ad.mobile-version {
        display: none !important;
    }
    
    .floating-ad.desktop-version {
        display: block !important;
    }
}
/* ===== 14. SIDEBAR ADS IN ARTICLE PAGE ===== */
.sidebar-ads-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-ad {
    position: relative;
    background: var(--article-surface);
    border: 1px solid var(--article-border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.sidebar-ad:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--article-primary);
}

.sidebar-ad .ad-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--article-primary);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sidebar-ad img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.sidebar-ad:hover img {
    transform: scale(1.05);
}

.sidebar-ad .ad-description {
    padding: 12px;
    background: white;
    font-size: 0.85rem;
    color: var(--article-gray);
    line-height: 1.5;
    border-top: 1px solid var(--article-border);
}

.sidebar-ad .ad-description strong {
    color: var(--article-text);
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* ===== 15. TOP BAR FOR ARTICLE PAGE ===== */
.top-bar {
    background: linear-gradient(135deg, var(--article-primary), #2a3a8a);
    padding: 15px 20px;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-decoration: none;
}

.top-bar .nav-links {
    display: flex;
    gap: 20px;
}

.top-bar .nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar .nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateY(-2px);
}

/* ===== 16. RESPONSIVE FOR TOP BAR ===== */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
    
    .top-bar .logo {
        font-size: 1.3rem;
    }
    
    .top-bar .nav-links {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .top-bar .nav-links a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* ===== 17. SOCIAL MEDIA SHARE BUTTONS - NEW ===== */
.share-buttons-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 2px solid var(--article-border);
    border-bottom: 2px solid var(--article-border);
}

.share-btn-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 110px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

/* تأثير داخلي للأزرار */
.share-btn-inline::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.share-btn-inline:hover::before {
    transform: translateX(100%);
}

/* Facebook Button */
.share-btn-inline.facebook {
    background: #1877F2;
    color: white;
}

.share-btn-inline.facebook:hover {
    background: #166fe5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3);
}

/* WhatsApp Button */
.share-btn-inline.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn-inline.whatsapp:hover {
    background: #1ebe5d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* Twitter (X) Button */
.share-btn-inline.twitter {
    background: #000000;
    color: white;
}

.share-btn-inline.twitter:hover {
    background: #14171a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Instagram Button */
.share-btn-inline.instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
    background-size: 400% 400%;
}

.share-btn-inline.instagram:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 29, 29, 0.3);
}

/* Copy Link Button */
.share-btn-inline.copy {
    background: #6c757d;
    color: white;
}

.share-btn-inline.copy:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

/* Print Button - Hidden */
.share-btn-inline.print {
    display: none;
}

/* الأيقونات */
.share-btn-inline i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.share-btn-inline:hover i {
    transform: scale(1.2);
}

/* ===== تصميم متجاوب جديد - صغير مع ترتيب 2 × 2 ===== */

/* للشاشات الكبيرة: 5 أزرار في صف واحد */
@media (min-width: 769px) {
    .share-buttons-inline {
        gap: 12px;
    }
    
    .share-btn-inline {
        min-width: 130px;
        padding: 12px 20px;
        font-size: 15px;
        flex: 0 1 auto;
    }
}

/* للتابلت: 4 أزرار في صف واحد */
@media (max-width: 768px) {
    .share-buttons-inline {
        gap: 10px;
        justify-content: center;
    }
    
    .share-btn-inline {
        flex: 0 1 calc(25% - 10px); /* 4 أزرار في الصف */
        min-width: calc(25% - 10px);
        max-width: calc(25% - 10px);
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .share-btn-inline i {
        font-size: 14px;
    }
    
    /* إخفاء النص في الأزرار الصغيرة */
    .share-btn-inline span {
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 70px;
    }
}

/* للهواتف: 2 × 2 (صفين، كل صف زرين) */
@media (max-width: 576px) {
    .share-buttons-inline {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* عمودين */
        grid-template-rows: repeat(2, auto);   /* سطرين */
        gap: 8px;
        margin: 20px 0;
        padding: 15px 0;
    }
    
    .share-btn-inline {
        flex: 1 1 100%; /* يملأ الخلية */
        min-width: 100%;
        max-width: 100%;
        padding: 10px 8px;
        font-size: 12px;
        border-radius: 8px;
        margin: 0;
    }
    
    .share-btn-inline i {
        font-size: 13px;
    }
    
    /* جعل النص أصغر للهواتف */
    .share-btn-inline span {
        font-size: 11px;
        max-width: 60px;
    }
    
    /* ترتيب الأزرار في الشبكة 2×2 */
    /* يمكنك ضبط الترتيب حسب الحاجة */
}

/* للأجهزة الصغيرة جداً */
@media (max-width: 375px) {
    .share-buttons-inline {
        gap: 6px;
        padding: 12px 0;
    }
    
    .share-btn-inline {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .share-btn-inline i {
        font-size: 12px;
    }
    
    .share-btn-inline span {
        font-size: 10px;
        max-width: 50px;
    }
}

/* Animation for buttons */
@keyframes buttonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.share-btn-inline:active {
    animation: buttonPulse 0.2s ease;
    transform: scale(0.98);
}

/* تحسين للأزرار القديمة */
.share-btn-inline.comment,
.share-btn-inline.report {
    display: none;
}

/* ===== تحسينات إضافية للتصميم ===== */
.share-btn-inline {
    position: relative;
    overflow: hidden;
}

/* تأثير الضغط عند النقر */
.share-btn-inline:active {
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

/* تلميح عند التحويم (Hover) */
.share-btn-inline:hover {
    z-index: 10;
}

/* ===== ترتيب خاص للأزرار على الهاتف ===== */
@media (max-width: 576px) {
    /* يمكنك ضبط ترتيب الأزرار حسب الرغبة */
    .share-btn-inline.facebook {
        order: 1;
    }
    .share-btn-inline.whatsapp {
        order: 2;
    }
    .share-btn-inline.twitter {
        order: 3;
    }
    .share-btn-inline.instagram {
        order: 4;
    }
    .share-btn-inline.copy {
        order: 5;
        grid-column: span 2; /* يجعل زر النسخ يأخذ عرض عمودين */
        justify-self: center;
        width: 80%;
        margin-top: 5px;
    }
}

/* ===== 18. HOME FOOTER IN ARTICLE PAGE ===== */
.home-footer {
    background: linear-gradient(to bottom, #1a1a1a, #2d2d2d);
    color: white;
    padding: 2.5rem 1.5rem 1rem;
    margin-top: 3rem;
    width: 100%;
}

/* قسم الأقسام في الفوتر */
.footer-categories {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: white;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: var(--article-primary);
    border-radius: 2px;
}

.footer-categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.footer-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 140px;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-category:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-3px);
    border-color: var(--article-primary);
}

.footer-category i {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--article-primary);
}

.footer-category span {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

/* قسم السوشيال ميديا في الفوتر */
.footer-social-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.footer-social .social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
}

.footer-social .social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.footer-social .social-icon.facebook:hover { background: #3b5998; }
.footer-social .social-icon.twitter:hover { background: #1da1f2; }
.footer-social .social-icon.instagram:hover { background: #e1306c; }
.footer-social .social-icon.rss:hover { background: #ff6600; }

/* قسم الروابط وحقوق النشر */
.footer-links-section {
    padding-top: 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 1rem;
}

.developed-by a {
    color: var(--article-primary);
    text-decoration: none;
    font-weight: 700;
}

.developed-by a:hover {
    text-decoration: underline;
}

/* ===== 19. RESPONSIVE FOOTER FOR MOBILE ===== */

/* للهاتف: 4 أقسام في السطر */
@media (max-width: 768px) {
    .home-footer {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-title {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
        padding-bottom: 0.8rem;
    }
    
    .footer-title::after {
        width: 60px;
        height: 2px;
    }
    
    /* الأقسام: 4 في السطر */
    .footer-categories-list {
        gap: 10px;
        justify-content: space-between;
    }
    
    .footer-category {
        width: calc(25% - 8px); /* 4 أقسام في السطر */
        min-width: 0;
        padding: 12px 5px;
        margin-bottom: 5px;
    }
    
    .footer-category i {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .footer-category span {
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    /* السوشيال ميديا أصغر على الهاتف */
    .footer-social {
        gap: 0.8rem;
    }
    
    .footer-social .social-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    /* الروابط */
    .footer-links {
        gap: 1rem;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
    
    .copyright {
        font-size: 0.8rem;
    }
}

/* للأجهزة الصغيرة جداً */
@media (max-width: 480px) {
    .home-footer {
        padding: 1.5rem 0.8rem 0.8rem;
    }
    
    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    /* الأقسام: 4 في السطر مع مساحات أقل */
    .footer-categories-list {
        gap: 8px;
    }
    
    .footer-category {
        width: calc(25% - 6px);
        padding: 10px 4px;
    }
    
    .footer-category i {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .footer-category span {
        font-size: 0.7rem;
    }
    
    /* السوشيال ميديا أصغر */
    .footer-social {
        gap: 0.6rem;
    }
    
    .footer-social .social-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    /* الروابط في سطرين */
    .footer-links {
        gap: 0.8rem;
        row-gap: 0.5rem;
    }
    
    .footer-links a {
        font-size: 0.75rem;
    }
    
    .copyright {
        font-size: 0.75rem;
    }
}

/* للهواتف الأفقية */
@media (max-width: 768px) and (orientation: landscape) {
    .footer-category {
        width: calc(20% - 8px); /* 5 أقسام في السطر */
        padding: 8px 4px;
    }
    
    .footer-category i {
        font-size: 1.2rem;
    }
    
    .footer-category span {
        font-size: 0.7rem;
    }
}

/* لضمان أن الفوتر يظهر بشكل صحيح */
@media (max-width: 992px) {
    .article-container {
        padding-bottom: 100px; /* مساحة للفوتر */
    }
}

/* إصلاح لعرض الفوتر على الهاتف */
@media (max-width: 576px) {
    .article-page {
        padding-bottom: 60px;
    }
    
    .home-footer {
        position: relative;
        bottom: 0;
        width: 100%;
    }
}
[file content end]