/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --primary: #0284c7;        /* Sky Blue 600 */
    --primary-dark: #0369a1;   /* Sky Blue 700 */
    --secondary: #0f172a;      /* Slate 900 */
    --text-main: #1e293b;      /* Slate 800 */
    --text-muted: #64748b;     /* Slate 500 */
    --bg-body: #f8fafc;        /* Slate 50 */
    --bg-card: #ffffff;
    --border-color: #e2e8f0;   /* Slate 200 */
    
    /* Typography */
    --font-main: 'Cairo', system-ui, -apple-system, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    
    /* Spacing */
    --container-width: 1200px;
    --header-height: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; }
body { font-family: var(--font-main); background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000;
    height: var(--header-height);
    display: flex; align-items: center;
}

.header-container {
    max-width: var(--container-width); width: 100%; margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: white; transform: rotate(-5deg);
}
.logo-text { font-size: 20px; font-weight: 800; color: var(--secondary); letter-spacing: -0.5px; }
.logo-text .highlight { color: var(--primary); }

.nav-menu { display: flex; gap: 5px; }
.nav-link { color: var(--text-muted); font-size: 15px; font-weight: 600; padding: 8px 16px; border-radius: 6px; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: #f0f9ff; }

.header-actions { display: flex; align-items: center; gap: 15px; }
.header-search-box {
    position: relative; display: flex; align-items: center;
    opacity: 1; visibility: visible; transform: translateY(0); transition: all 0.3s ease-in-out;
}
/* Hidden state for scroll effect */
.header-search-box.hidden { opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none; }

.header-search-box input {
    background: #f1f5f9; border: 1px solid transparent; padding: 8px 12px 8px 35px;
    border-radius: 20px; font-size: 13px; width: 200px; color: var(--text-main);
    outline: none; font-family: inherit; direction: rtl; transition: all 0.3s;
}
.header-search-box input:focus { background: white; border-color: #cbd5e1; width: 240px; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1); }
.search-icon-sm { position: absolute; left: 12px; font-size: 12px; color: var(--text-muted); pointer-events: none; }

.btn-primary-sm { background: var(--secondary); color: white; font-size: 13px; font-weight: 600; padding: 9px 20px; border-radius: 6px; }
.btn-primary-sm:hover { background: #334155; transform: translateY(-1px); }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; color: var(--text-main); }

/* =========================================
   3. HERO SECTIONS
   ========================================= */
/* Primary Hero (Home) */
.hero-primary {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #0369a1 100%);
    padding: 80px 20px 100px; text-align: center; color: white;
    overflow: hidden; min-height: 500px;
    display: flex; align-items: center; justify-content: center;
}
.hero-glow {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none; z-index: 1;
}
.hero-pattern {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px; z-index: 1; opacity: 0.5;
}
.hero-content { position: relative; z-index: 2; max-width: 750px; width: 100%; margin: 0 auto; }

.hero-badge {
    display: inline-block; background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2); padding: 6px 16px; border-radius: 50px;
    font-size: 13px; margin-bottom: 20px; backdrop-filter: blur(5px); color: #e0f2fe;
}
.hero-primary h1 { font-size: 46px; font-weight: 800; margin-bottom: 15px; line-height: 1.3; }
.hero-primary p { font-size: 18px; color: #e0f2fe; margin-bottom: 40px; }

/* Hero Search Form */
.hero-search-form {
    background: white; padding: 8px; border-radius: 12px; display: flex; gap: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2); border: 4px solid rgba(255, 255, 255, 0.1);
}
.input-wrapper { flex: 1; display: flex; align-items: center; padding-right: 15px; }
.search-icon { font-size: 20px; color: #94a3b8; margin-left: 10px; }
.hero-search-form input {
    width: 100%; border: none; outline: none; font-size: 16px;
    font-family: inherit; color: var(--text-main); background: transparent; direction: rtl;
}
.hero-search-form button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white; border: none; padding: 12px 30px; border-radius: 8px;
    font-weight: bold; font-size: 16px; cursor: pointer; transition: filter 0.3s;
}
.hero-search-form button:hover { filter: brightness(110%); }

.hero-tags { margin-top: 30px; display: flex; align-items: center; justify-content: center; gap: 15px; font-size: 14px; color: #bae6fd; flex-wrap: wrap; }
.tags-list { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tags-list a {
    background: rgba(255, 255, 255, 0.1); color: white; padding: 6px 14px;
    border-radius: 20px; font-size: 13px; transition: all 0.3s; border: 1px solid transparent;
}
.tags-list a:hover { background: white; color: var(--primary); transform: translateY(-2px); }

/* Secondary Hero (Listing Pages) */
.hero-secondary {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    padding: 60px 20px; text-align: center; color: white; margin-bottom: 40px;
}
.hero-secondary-content h1 { font-size: 32px; margin-bottom: 10px; font-weight: 700; }
.hero-secondary-content p { font-size: 16px; color: #cbd5e1; }

/* =========================================
   4. GENERAL SECTIONS
   ========================================= */
.section { max-width: var(--container-width); margin: 0 auto; padding: 60px 20px; }
.section-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 40px; border-bottom: 2px solid var(--border-color); padding-bottom: 15px;
}
.section-title { font-size: 28px; font-weight: 700; color: var(--text-main); }
.see-more { color: var(--primary); font-weight: 600; font-size: 14px; }

.promo-section { background: white; border-bottom: 1px solid var(--border-color); padding: 15px 20px; }
.promo-container { max-width: var(--container-width); margin: 0 auto; display: flex; justify-content: center; align-items: center; gap: 20px; }
.promo-content { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.promo-btn { color: var(--primary); font-weight: 700; font-size: 14px; }
.promo-btn:hover { text-decoration: underline; }

/* =========================================
   5. CARDS & GRIDS
   ========================================= */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }
.articles-grid.two-columns { grid-template-columns: repeat(2, 1fr); }

.article-card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-color);
    display: flex; flex-direction: column; transition: all 0.3s ease;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #bae6fd; }

.article-card-image { height: 180px; position: relative; background: #e2e8f0; }
.article-card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
    position: absolute; top: 10px; right: 10px; background: #ef4444; color: white;
    font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: bold;
}
.article-card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.article-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.category-tag { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 4px; }
.read-time { font-size: 11px; color: var(--text-muted); }
.tag-green { color: #059669; background: #d1fae5; }
.tag-blue { color: #0284c7; background: #e0f2fe; }
.tag-purple { color: #7c3aed; background: #ede9fe; }
.article-title { font-size: 16px; font-weight: 700; color: var(--text-main); margin-bottom: 10px; line-height: 1.5; }
.article-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* =========================================
   6. CATEGORIES HUB (Home Page) & CARDS (List Page)
   ========================================= */

/* --- Home Page: Categories Hub (Hub Cards) --- */
.categories-section {
    background: #f8fafc; /* خلفية فاتحة جداً لتمييز القسم */
    padding: 80px 20px;
    border-top: 1px solid var(--border-color);
}

.categories-columns {
    display: grid;
    /* التعديل: إجبار المتصفح على عرض 4 أعمدة في الشاشات الكبيرة */
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.hub-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* الشريط الملون العلوي */
.hub-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent-color);
}

.hub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color); /* تلوين الإطار عند التحويم */
}

.hub-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.hub-icon {
    font-size: 24px;
    background: #f1f5f9;
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    transition: background 0.3s;
}

.hub-card:hover .hub-icon {
    background: var(--accent-color);
    color: white; /* لجعل الرموز النصية بيضاء إن أمكن، أو يمكن استخدام SVG وتلوينه */
}

.hub-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

/* روابط الأقسام داخل الكارت */
.hub-links {
    flex-grow: 1; /* لجعل الكروت متساوية الطول */
}

.hub-links li {
    margin-bottom: 12px;
}

.hub-links a {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: padding 0.2s;
}

/* تأثير عند مرور الماوس على الروابط */
.hub-links a:hover {
    color: var(--accent-color);
    padding-right: 5px; /* حركة بسيطة لليسار */
}

.hub-links a::before {
    content: '›'; /* سهم صغير */
    font-size: 18px;
    line-height: 1;
    color: #cbd5e1;
}

.view-all {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    display: block;
    text-align: center;
    color: var(--primary) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}
.view-all::before { content: none !important; }


/* --- Categories List Page (Big Icons) --- */
.categories-page-grid {
    display: grid;
    /* التعديل: 4 أعمدة في صفحة التصنيفات أيضاً */
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding-bottom: 60px;
}

.category-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    height: 100%; /* لتوحيد الطول */
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent);
    opacity: 0.5;
    transition: opacity 0.3s;
}
.category-card:hover::before { opacity: 1; }

.cat-icon-box {
    width: 70px; height: 70px; /* تكبير الأيقونة */
    background: #f8fafc;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
    transition: all 0.3s;
    border: 1px solid #f1f5f9;
}

.category-card:hover .cat-icon-box {
    background: var(--accent);
    color: white; /* تأثير لوني */
    border-color: transparent;
    transform: scale(1.1); /* تكبير بسيط */
}

.cat-info h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 8px;
}

.cat-info p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

.cat-count {
    margin-top: auto; /* دفع العداد للأسفل دائماً */
    background: #f8fafc;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
}

/* --- Responsive Layouts for 4 Columns --- */
@media (max-width: 1024px) {
    /* في التابلت نجعلها 3 أعمدة */
    .categories-columns, .categories-page-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* في الموبايل الكبير عمودين */
    .categories-columns, .categories-page-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    /* في الموبايل الصغير عمود واحد */
    .categories-columns, .categories-page-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================
   7. ARTICLE PAGE
   ========================================= */
.page-wrapper {
    max-width: var(--container-width); margin: 40px auto; padding: 0 20px;
    display: grid; grid-template-columns: 1fr 340px; gap: 40px;
}
.breadcrumb { margin-bottom: 20px; font-size: 14px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .separator { color: #cbd5e1; font-size: 12px; }
.breadcrumb .current { color: var(--text-main); font-weight: 600; }

.article-header { margin-bottom: 30px; }
.article-badges { display: flex; gap: 10px; margin-bottom: 15px; }
.article-title-main { font-size: 36px; font-weight: 800; color: var(--secondary); line-height: 1.3; margin-bottom: 20px; }
.author-meta { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 40px; height: 40px; background: var(--secondary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.article-image-container { margin-bottom: 40px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md); }
.article-body { background: white; padding: 40px; border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.lead-text { font-size: 20px; color: var(--text-main); margin-bottom: 30px; line-height: 1.7; }
.article-body h2 { font-size: 24px; font-weight: 700; color: var(--secondary); margin: 40px 0 20px; position: relative; padding-bottom: 10px; }
.article-body h2::after { content: ''; position: absolute; bottom: 0; right: 0; width: 60px; height: 3px; background: var(--primary); border-radius: 2px; }
.info-box { background: #f0f9ff; border-right: 4px solid var(--primary); padding: 20px; border-radius: 4px; margin: 30px 0; color: #0c4a6e; font-size: 16px; }

/* Share & Comments */
.share-actions { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border-color); text-align: center; }
.share-buttons { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.share-btn { border: none; padding: 10px 20px; border-radius: 6px; color: white; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; transition: transform 0.2s; }
.share-btn:hover { transform: translateY(-2px); }
.share-btn.twitter { background: #000; }
.share-btn.facebook { background: #1877f2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy { background: #64748b; }

.comments-section { margin-top: 50px; background: white; border-radius: 12px; padding: 30px; border: 1px solid var(--border-color); }
.comment-item { display: flex; gap: 15px; margin-bottom: 25px; }
.comment-avatar { width: 40px; height: 40px; background: var(--primary); color: white; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.comment-content { background: #f8fafc; padding: 15px; border-radius: 8px; flex-grow: 1; }
.comment-form-box { margin-top: 40px; padding-top: 30px; border-top: 1px dashed var(--border-color); }
.form-row { display: flex; gap: 15px; margin-bottom: 15px; }
.comment-form-box input, .comment-form-box textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 6px; background: #f8fafc; font-family: inherit; }
.btn-submit { background: var(--secondary); color: white; padding: 12px 25px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* =========================================
   8. SIDEBAR
   ========================================= */
.article-sidebar { position: sticky; top: 90px; height: fit-content; }
.sidebar-widget { background: white; border-radius: 12px; padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); }
.widget-title { font-size: 18px; font-weight: 700; color: var(--secondary); margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; padding-bottom: 10px; }
.widget-post-item { display: flex; gap: 15px; margin-bottom: 15px; align-items: center; }
.widget-post-item:hover h4 { color: var(--primary); }
.widget-post-item img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.widget-categories li { margin-bottom: 10px; border-bottom: 1px dashed #e2e8f0; padding-bottom: 8px; }
.widget-categories a { display: flex; justify-content: space-between; font-size: 15px; color: var(--text-main); }
.promo-widget { background: var(--secondary); color: white; text-align: center; }
.promo-widget input { width: 100%; padding: 10px; border-radius: 6px; border: none; margin: 15px 0 10px; }
.promo-widget button { width: 100%; padding: 10px; background: var(--primary); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* =========================================
   9. FOOTER
   ========================================= */
.main-footer {
    background: #1e293b; color: #cbd5e1; padding: 70px 20px 30px;
    border-top: 5px solid var(--primary); margin-top: auto;
}
.footer-container {
    max-width: var(--container-width); margin: 0 auto;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 50px;
}
.footer-links h4 { color: white; margin-bottom: 20px; font-size: 16px; }
.footer-links a { display: block; color: #94a3b8; margin-bottom: 12px; font-size: 14px; }
.footer-links a:hover { color: white; padding-right: 5px; }
.newsletter-form { display: flex; margin-top: 15px; }
.newsletter-form input { background: #334155; border: none; padding: 12px; border-radius: 0 4px 4px 0; color: white; width: 100%; outline: none; direction: rtl; }
.newsletter-form button { background: var(--primary); color: white; border: none; padding: 0 15px; border-radius: 4px 0 0 4px; cursor: pointer; }
.footer-bottom {
    max-width: var(--container-width); margin: 0 auto; border-top: 1px solid #334155;
    padding-top: 30px; display: flex; justify-content: space-between; font-size: 13px;
}
.social-icons a { color: #cbd5e1; margin-left: 15px; }

/* =========================================
   10. RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .nav-menu { display: none; position: absolute; top: 72px; right: 0; left: 0; background: white; flex-direction: column; padding: 20px; box-shadow: 0 10px 15px rgba(0,0,0,0.05); }
    .nav-menu.active { display: flex; }
    .header-search-box { display: none; }
    .mobile-menu-btn { display: block; }
    .articles-grid, .articles-grid.two-columns { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .page-wrapper { grid-template-columns: 1fr; }
    .article-sidebar { position: static; }
    .category-page-header { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
    .hero-search-form { flex-direction: column; }
    .hero-search-form button { width: 100%; }
    .promo-container { flex-direction: column; text-align: center; }
    .articles-grid, .articles-grid.two-columns { grid-template-columns: 1fr; }
    .categories-columns { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .article-title-main { font-size: 26px; }
    .article-body { padding: 20px; }
    .form-row { flex-direction: column; }
}

/* =========================================
   11. NEW ARTICLE COMPONENTS (Author & Tags)
   ========================================= */

/* --- 1. Article Tags (Bottom) --- */
.article-tags-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-label {
    font-weight: 700;
    font-size: 14px;
    color: var(--secondary);
    margin-left: 5px;
}

.tag-item {
    background: #f1f5f9;
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* --- 2. Author Box (Below Article) --- */
.author-box-bottom {
    margin-top: 40px;
    background: #f8fafc; /* خلفية مختلفة قليلاً لتمييزه */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
}

.author-box-img img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.author-box-content { flex-grow: 1; }

.author-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.author-box-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--secondary);
}

.author-box-role {
    font-size: 12px;
    background: #e0f2fe;
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.author-box-bio {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.author-box-social {
    display: flex; gap: 10px;
}
.author-box-social a {
    color: #94a3b8; font-size: 14px;
    transition: color 0.2s;
}
.author-box-social a:hover { color: var(--primary); }


/* --- 3. Sidebar Widgets Updates --- */

/* تنسيق ويدجت المقالات (يستخدم لكل من الأشهر والأحدث) */
.widget-list {
    list-style: none;
    padding: 0 20px 20px;
}

.widget-list-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
    align-items: flex-start;
}

.widget-list-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border: none;
}

.widget-thumb {
    width: 70px; height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.widget-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s;
}

.widget-list-item:hover .widget-thumb img {
    transform: scale(1.1);
}

/* تنسيق خاص للأرقام في قائمة "الأشهر" */
.popular-number {
    position: absolute;
    top: -5px; right: -5px;
    background: var(--primary);
    color: white;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    border: 2px solid white;
}
.widget-thumb { position: relative; } /* ضروري لتموضع الرقم */

.widget-info h4 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 5px;
}
.widget-info h4 a { color: var(--text-main); transition: color 0.2s; }
.widget-info h4 a:hover { color: var(--primary); }

.widget-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex; gap: 10px;
}

/* Responsive for Author Box */
@media (max-width: 600px) {
    .author-box-bottom { flex-direction: column; text-align: center; }
    .author-box-header { flex-direction: column; gap: 5px; }
}