@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&family=Cairo:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --font-base: 17px;
    --font-h1: 36px;
    --font-h2: 24px;
    --font-h3: 20px;
    --font-body: 17px;
    --line-height: 1.7;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #2D3748;
    --text-heading: #1e293b;
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #e2e8f0;
    --text-heading: #f8fafc;
    --light: #1e293b;
    --white: #1e293b;
    --border: #334155;
}

body.dark-mode .header { background: #1e293b; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3); }
body.dark-mode .footer { background: #0f172a; }
body.dark-mode .newsletter-section { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); }
body.dark-mode .hero { background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 50%, #0f172a 100%); }
body.dark-mode .hero-card { background: #1e293b; }
body.dark-mode .card-item { background: #334155; }
body.dark-mode .article-card { background: #1e293b; }
body.dark-mode .breadcrumb { background: #1e293b; border-bottom-color: #334155; }
body.dark-mode .admin-card { background: #1e293b; }
body.dark-mode .stat-card { background: #1e293b; }
body.dark-mode .login-container { background: #1e293b; }
body.dark-mode .nav a { color: #94a3b8; }
body.dark-mode .nav a:hover { color: var(--primary); background: rgba(37, 99, 235, 0.15); }
body.dark-mode .footer-section a { color: rgba(255,255,255,0.6); }
body.dark-mode .footer-section a:hover { color: var(--white); }
body.dark-mode .page-content h1, body.dark-mode .page-content h2, body.dark-mode .page-content h3 { color: var(--text-heading); }
body.dark-mode .page-content p { color: var(--text-main); }
body.dark-mode .article-excerpt { color: #94a3b8; }
body.dark-mode .article-meta { color: #94a3b8; }
body.dark-mode .category-card p { color: #94a3b8; }
body.dark-mode .hero p { color: #94a3b8; }
body.dark-mode .hero-card h3 { color: var(--text-heading); }
body.dark-mode .card-item:hover { background: rgba(37, 99, 235, 0.15); }

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: var(--line-height);
    color: var(--text-main);
    background: var(--bg-body);
    font-size: var(--font-base);
    transition: background 0.3s, color 0.3s;
}

body[dir="rtl"] { direction: rtl; text-align: right; }
body[dir="ltr"] { direction: ltr; text-align: left; }

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
}

h1 { font-size: var(--font-h1); }
h2 { font-size: var(--font-h2); }
h3 { font-size: var(--font-h3); }

p, li, td, th, span, a, input, textarea, select, button {
    font-family: 'Cairo', 'Segoe UI', sans-serif;
}

/* Header */
.header {
    background: var(--bg-card);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-heading);
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
}

.logo img { height: 40px; width: auto; }

.nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 8px;
    text-align: center;
    white-space: nowrap;
    font-family: 'Tajawal', sans-serif;
}

.nav a:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.lang-switch {
    background: transparent;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.3s;
    border: 2px solid rgba(255,255,255,0.9);
    font-family: 'Tajawal', sans-serif;
}

.lang-switch:hover {
    background: rgba(255,255,255,0.15);
    color: #fbbf24;
    border-color: #fbbf24;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-heading);
}

/* Accessibility Bar */
.accessibility-bar {
    background: var(--dark);
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.accessibility-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.accessibility-controls button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.accessibility-controls button:hover {
    background: rgba(255,255,255,0.2);
}

.admin-quick-link {
    color: #fbbf24;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.admin-quick-link:hover {
    background: rgba(251, 191, 36, 0.1);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    color: var(--white);
    padding: 60px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
}

.hero-text {
    max-width: 700px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--white);
    font-family: 'Tajawal', sans-serif;
}

.hero h1 span { color: #fbbf24; }

.hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.7;
    font-family: 'Cairo', sans-serif;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f59e0b;
    color: #1e293b;
    padding: 16px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    font-family: 'Tajawal', sans-serif;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: #d97706;
}

.hero-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 900px;
}

.hero-card-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px 30px;
    min-width: 200px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-card-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-5px);
}

.hero-card-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero-card-item h3 {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 5px;
    font-family: 'Tajawal', sans-serif;
}

.hero-card-item p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

/* Categories */
.categories-section { padding: 60px 0; }
.section-title { 
    text-align: center; 
    font-size: var(--font-h2); 
    margin-bottom: 40px; 
    color: var(--text-heading);
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text-heading);
    display: block;
    position: relative;
}

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

.category-count {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    font-family: 'Tajawal', sans-serif;
}

body[dir="ltr"] .category-count { left: auto; right: 15px; }

.category-icon { font-size: 2.5rem; margin-bottom: 15px; }
.category-card h3 { 
    font-size: 1.3rem; 
    margin-bottom: 10px; 
    color: var(--primary);
    font-family: 'Tajawal', sans-serif;
}
.category-card p { 
    color: var(--secondary); 
    font-size: 0.95rem;
    font-family: 'Cairo', sans-serif;
}

/* Category Filter */
.category-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.category-filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
}

.category-filter-btn:hover,
.category-filter-btn.active {
    background: var(--primary);
    color: white;
}

body.dark-mode .category-filter-btn {
    border-color: #60a5fa;
    color: #60a5fa;
}

body.dark-mode .category-filter-btn:hover,
body.dark-mode .category-filter-btn.active {
    background: #60a5fa;
    color: #0f172a;
}

/* Articles */
.articles-section { padding: 60px 0; background: var(--bg-body); }
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.article-card:hover { transform: translateY(-3px); }

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--border);
}

.article-content { padding: 25px; }
.article-category {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 12px;
    font-family: 'Tajawal', sans-serif;
}

.article-card h3 { 
    font-size: var(--font-h3); 
    margin-bottom: 10px; 
    line-height: 1.4;
    font-family: 'Tajawal', sans-serif;
}
.article-card h3 a { color: var(--text-heading); text-decoration: none; }
.article-card h3 a:hover { color: var(--primary); }

.article-excerpt { 
    color: var(--secondary); 
    font-size: 0.95rem; 
    margin-bottom: 15px;
    font-family: 'Cairo', sans-serif;
}
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--secondary);
    font-family: 'Cairo', sans-serif;
}

.author-info { display: flex; align-items: center; gap: 8px; }
.author-info img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* Page Content */
.page-content {
    padding: 60px 0;
    max-width: 900px;
    margin: 0 auto;
}

.page-content h1 { 
    font-size: var(--font-h1); 
    margin-bottom: 30px; 
    color: var(--text-heading);
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
}
.page-content h2 { 
    font-size: var(--font-h2); 
    margin: 30px 0 15px; 
    color: var(--primary);
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}
.page-content h3 { 
    font-size: var(--font-h3); 
    margin: 25px 0 12px; 
    color: var(--text-heading);
    font-family: 'Tajawal', sans-serif;
}
.page-content p { 
    margin-bottom: 15px; 
    line-height: var(--line-height);
    font-size: var(--font-body);
    color: var(--text-main);
    font-family: 'Cairo', sans-serif;
}
.page-content ul, .page-content ol { 
    margin: 15px 0; 
    padding-left: 25px;
    font-size: var(--font-body);
}
body[dir="rtl"] .page-content ul, body[dir="rtl"] .page-content ol { 
    padding-left: 0; 
    padding-right: 25px; 
}
.page-content li { 
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
}

/* Newsletter */
.newsletter-section {
    background: linear-gradient(135deg, var(--dark) 0%, #334155 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.newsletter-section h2 { 
    font-size: var(--font-h2); 
    margin-bottom: 15px;
    font-family: 'Tajawal', sans-serif;
}
.newsletter-section p { 
    opacity: 0.9; 
    margin-bottom: 30px; 
    max-width: 500px; 
    margin-left: auto; 
    margin-right: auto;
    font-family: 'Cairo', sans-serif;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    font-family: 'Cairo', sans-serif;
}

.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form input:focus { outline: 2px solid var(--accent); background: rgba(255,255,255,0.15); }

.newsletter-form button {
    padding: 14px 30px;
    background: var(--accent);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Tajawal', sans-serif;
}

.newsletter-form button:hover { background: #d97706; }

.thank-you-message { display: none; padding: 20px; background: var(--success); border-radius: 8px; margin-top: 20px; }
.thank-you-message.show { display: block; }

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 50px 0 20px;
}

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

.footer-section h4 { 
    font-size: 1.1rem; 
    margin-bottom: 15px; 
    color: var(--accent);
    font-family: 'Tajawal', sans-serif;
}
.footer-section a { 
    color: rgba(255,255,255,0.7); 
    text-decoration: none; 
    display: block; 
    margin-bottom: 10px; 
    transition: color 0.3s;
    font-family: 'Cairo', sans-serif;
}
.footer-section a:hover { color: var(--white); }

.social-links { display: flex; gap: 15px; margin-top: 15px; }
.social-links a { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 40px; 
    height: 40px; 
    background: rgba(255,255,255,0.1); 
    border-radius: 50%; 
    transition: all 0.3s; 
    color: white;
    text-decoration: none;
}
.social-links a:hover { 
    background: var(--primary); 
    transform: translateY(-2px);
}

.footer-bottom { 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 20px; 
    text-align: center; 
    color: rgba(255,255,255,0.5); 
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
}

/* Admin */
.admin-body { background: var(--light); }
.admin-header { background: var(--dark); color: var(--white); padding: 15px 0; }
.admin-header-content { display: flex; justify-content: space-between; align-items: center; }
.admin-nav { display: flex; gap: 20px; }
.admin-nav a { 
    color: rgba(255,255,255,0.8); 
    text-decoration: none; 
    padding: 8px 15px; 
    border-radius: 6px; 
    transition: background 0.3s;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.1); color: var(--white); }
.admin-container { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.admin-card { 
    background: var(--bg-card); 
    border-radius: 12px; 
    padding: 30px; 
    box-shadow: var(--shadow); 
    margin-bottom: 30px;
    transition: background 0.3s;
}
.admin-card h2 { 
    font-size: 1.5rem; 
    margin-bottom: 20px; 
    color: var(--text-heading);
    font-family: 'Tajawal', sans-serif;
}

.form-group { margin-bottom: 20px; }
.form-group label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 600; 
    color: var(--text-heading);
    font-family: 'Tajawal', sans-serif;
}
.form-group input, .form-group textarea, .form-group select { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    font-size: 1rem; 
    font-family: 'Cairo', sans-serif;
    background: var(--bg-card);
    color: var(--text-main);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { 
    outline: none; 
    border-color: var(--primary); 
}
.form-group textarea { min-height: 150px; resize: vertical; }

.btn { 
    display: inline-block; 
    padding: 12px 25px; 
    border-radius: 8px; 
    border: none; 
    font-size: 1rem; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s; 
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #059669; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.data-table th { 
    background: var(--light); 
    padding: 12px; 
    text-align: left; 
    font-weight: 600; 
    border-bottom: 2px solid var(--border);
    font-family: 'Tajawal', sans-serif;
}
.data-table td { 
    padding: 12px; 
    border-bottom: 1px solid var(--border);
    font-family: 'Cairo', sans-serif;
}
.data-table tr:hover { background: var(--light); }
.table-actions { display: flex; gap: 10px; }
.table-actions a { padding: 6px 12px; border-radius: 6px; font-size: 0.85rem; text-decoration: none; }

.login-container { 
    max-width: 400px; 
    margin: 100px auto; 
    background: var(--bg-card); 
    padding: 40px; 
    border-radius: 12px; 
    box-shadow: var(--shadow-lg);
    transition: background 0.3s;
}
.login-container h2 { 
    text-align: center; 
    margin-bottom: 30px; 
    color: var(--text-heading);
    font-family: 'Tajawal', sans-serif;
}

.alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { 
    background: var(--bg-card); 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    text-align: center;
    transition: background 0.3s;
}
.stat-card h3 { font-size: 2rem; color: var(--primary); margin-bottom: 5px; }
.stat-card p { color: var(--secondary); font-size: 0.95rem; }

.image-preview { max-width: 200px; max-height: 200px; border-radius: 8px; margin-top: 10px; border: 2px solid var(--border); }

.founder-section { 
    display: flex; 
    align-items: center; 
    gap: 30px; 
    margin-top: 30px; 
    padding: 30px; 
    background: var(--light); 
    border-radius: 12px;
    transition: background 0.3s;
}
.founder-section img { 
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 4px solid var(--primary); 
}

/* Breadcrumb */
.breadcrumb { 
    background: var(--bg-card); 
    border-bottom: 1px solid var(--border); 
    padding: 15px 0; 
    font-size: 0.9rem;
    transition: background 0.3s, border-color 0.3s;
}
.breadcrumb .container { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
.breadcrumb a:hover { color: var(--primary-dark); text-decoration: underline; }
.breadcrumb .separator { color: var(--secondary); opacity: 0.5; }
.breadcrumb .current { color: var(--text-heading); font-weight: 600; }

/* Admin Dark Mode */
body.dark-mode .admin-body { background: #0f172a; }
body.dark-mode .admin-header { background: #1e293b; }
body.dark-mode .admin-nav a { color: #94a3b8; }
body.dark-mode .admin-nav a:hover, body.dark-mode .admin-nav a.active { background: rgba(37, 99, 235, 0.15); color: #e2e8f0; }
body.dark-mode .data-table th { background: #1e293b; color: #e2e8f0; border-bottom-color: #334155; }
body.dark-mode .data-table td { border-bottom-color: #334155; color: #e2e8f0; }
body.dark-mode .data-table tr:hover { background: #334155; }
body.dark-mode .form-group input, body.dark-mode .form-group textarea, body.dark-mode .form-group select { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark-mode .alert-success { background: #064e3b; color: #6ee7b7; border-color: #059669; }
body.dark-mode .alert-error { background: #7f1d1d; color: #fca5a5; border-color: #ef4444; }
body.dark-mode .founder-section { background: #1e293b; }

/* Share Buttons */
.share-dropdown {
    position: relative;
    display: inline-block;
    margin: 10px 0;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
}

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

.share-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    margin-bottom: 8px;
}

body[dir="rtl"] .share-menu {
    left: auto;
    right: 0;
}

.share-menu.show {
    display: block;
}

.share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    font-family: 'Cairo', sans-serif;
}

.share-item:hover {
    background: var(--light);
}

.share-item.whatsapp { color: #25D366; }
.share-item.twitter { color: #000000; }
.share-item.facebook { color: #1877F2; }
.share-item.linkedin { color: #0A66C2; }
.share-item.telegram { color: #0088cc; }
.share-item.email { color: var(--secondary); }
.share-item.copy { color: var(--primary); }

body.dark-mode .share-item.twitter { color: #e2e8f0; }

/* Share Bar */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Tajawal', sans-serif;
    border: none;
    cursor: pointer;
}

.share-bar-item.whatsapp { background: #25D366; color: white; }
.share-bar-item.whatsapp:hover { background: #1faa52; }
.share-bar-item.twitter { background: #000000; color: white; }
.share-bar-item.twitter:hover { background: #333333; }
.share-bar-item.facebook { background: #1877F2; color: white; }
.share-bar-item.facebook:hover { background: #166fe5; }
.share-bar-item.linkedin { background: #0A66C2; color: white; }
.share-bar-item.linkedin:hover { background: #0959a8; }
.share-bar-item.telegram { background: #0088cc; color: white; }
.share-bar-item.telegram:hover { background: #0077b3; }
.share-bar-item.email { background: var(--secondary); color: white; }
.share-bar-item.email:hover { background: #4a5568; }
.share-bar-item.copy { background: var(--primary); color: white; }
.share-bar-item.copy:hover { background: var(--primary-dark); }

body.dark-mode .share-bar-item.twitter { background: #1e293b; color: #e2e8f0; }

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); flex-direction: column; padding: 20px; box-shadow: var(--shadow); }
    .nav.active { display: flex; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .hero-cards { flex-direction: column; align-items: center; }
    .hero-card-item { min-width: 100%; }
    .categories-grid, .articles-grid { grid-template-columns: 1fr; }
    .admin-nav { flex-wrap: wrap; }
    .stats-grid { grid-template-columns: 1fr; }
    .founder-section { flex-direction: column; text-align: center; }
    .share-bar { justify-content: center; }
}

/* Filter count badge */
.filter-count {
    background: rgba(37, 99, 235, 0.15);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 4px;
}

body[dir="ltr"] .filter-count {
    margin-right: 0;
    margin-left: 4px;
}

/* Active filter - highly visible */
.category-filter-btn.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
}

.category-filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

body.dark-mode .category-filter-btn.active {
    background: #60a5fa !important;
    color: #0f172a !important;
    border-color: #60a5fa !important;
}
