/**
 * أنماط موقع أدوات الربح - wealthgear.net
 * تصميم عصري RTL مع تدرجات وأنيميشن
 */

/* ===== المتغيرات ===== */
:root {
    --primary: #0f172a;       /* Deep Navy */
    --primary-light: #1e293b; /* Slate 800 */
    --primary-dark: #020617;  /* Slate 950 */
    --secondary: #f59e0b;     /* Amber 500 */
    --secondary-light: #fbbf24; /* Amber 400 */
    --accent: #06b6d4;        /* Cyan 500 */
    --accent-light: #22d3ee;  /* Cyan 400 */
    
    --bg-body: #f8fafc;       /* Slate 50 */
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-dark: #1e293b;
    --bg-darker: #0f172a;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-white: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.16);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    --font-family: 'Tajawal', 'Segoe UI', sans-serif;
    --header-height: 72px;
    --container-width: 1200px;
    --sidebar-width: 320px;
}

/* ===== وضع الليل (دارك مود) أسود كامل ===== */
body.dark-theme {
    --bg-body: #000000;
    --bg-white: #0a0a0a;
    --bg-card: #0c0c0c;
    --bg-dark: #050505;
    --bg-darker: #000000;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-light: #334155;
    
    --border-color: #222222;
    --border-light: #121212;
    
    --primary: #fbbf24;       /* Gold/Amber primary in dark mode for stunning lux look */
    --primary-light: #fbbf24;
    --primary-dark: #ffffff;
    
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.8);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.9);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.95);
}

/* Adjustments for dark theme elements */
body.dark-theme img {
    filter: opacity(0.85); /* Slightly dim images in dark mode */
}

body.dark-theme .logo-img,
body.dark-theme .footer-logo img {
    filter: none !important; /* Keep logo bright */
}

body.dark-theme .site-header.scrolled {
    background: rgba(0, 0, 0, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.dark-theme .toc {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(245, 158, 11, 0.02)) !important;
}

body.dark-theme .toc-link::before {
    background: rgba(255, 255, 255, 0.08) !important;
}

/* زر التبديل للوضع الليلي */
.dark-mode-toggle {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.dark-mode-toggle:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--primary);
}

body.dark-theme .dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary);
}

/* ===== إعادة التعيين ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

/* ===== الهيدر ===== */
.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 24px;
}

/* الشعار */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img {
    height: 56px;
    width: auto;
    transition: var(--transition);
}

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

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* القائمة */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

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

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: rgba(15, 23, 42, 0.06);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}



/* أزرار الهيدر */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-toggle,
.mobile-menu-toggle {
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.search-toggle:hover,
.mobile-menu-toggle:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* شريط البحث */
.search-bar {
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.search-bar.active {
    max-height: 80px;
    padding: 0 0 16px;
}

.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.95rem;
    direction: rtl;
    background: var(--bg-body);
    transition: var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.search-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== المحتوى الرئيسي ===== */
.site-main {
    min-height: calc(100vh - var(--header-height) - 300px);
    margin-top: var(--header-height);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 40px;
    padding: 40px 0;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 214, 0, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroFloat 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: heroFloat 8s ease-in-out infinite reverse;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-30px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px 40px;
    border-radius: var(--radius-xl);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease both;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== بطاقات المقالات ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease both;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.12);
    border-color: rgba(6, 182, 212, 0.3);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-body {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-category {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(6, 182, 212, 0.08));
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
    width: fit-content;
    transition: var(--transition);
}

.card-category:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
}

.card-title a {
    color: var(--text-primary);
    transition: var(--transition);
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* ===== صفحة المقالة ===== */
.article-header {
    padding: 50px 0 30px;
    text-align: center;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.article-breadcrumb a:hover {
    color: var(--primary);
}

.article-breadcrumb .separator {
    color: var(--text-light);
}

.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.4;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.article-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* جدول المحتويات */
.toc {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.02), rgba(245, 158, 11, 0.02));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 36px;
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
}

.toc-list {
    display: none;
    counter-reset: toc-counter;
    margin-top: 16px;
    transition: var(--transition);
}

.toc.expanded .toc-list {
    display: block;
}

.toc.expanded .toc-chevron {
    transform: rotate(180deg) !important;
}

.toc-item {
    counter-increment: toc-counter;
    margin-bottom: 8px;
}

.toc-item.level-3 {
    padding-right: 24px;
}

.toc-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition);
    justify-content: flex-start;
}

.toc-link::before {
    content: counter(toc-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: rgba(15, 23, 42, 0.06);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.toc-link:hover {
    background: rgba(245, 158, 11, 0.08);
    color: var(--primary-dark);
}

/* محتوى المقالة */
.article-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
}

.article-content h2 {
    font-size: 1.6rem;
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--secondary);
    display: inline-block;
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 32px 0 16px;
    color: var(--primary);
}

.article-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-secondary);
}

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

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-content a {
    color: var(--primary);
    font-weight: 500;
    border-bottom: 1px dashed var(--primary);
    transition: var(--transition);
}

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

.article-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.article-content blockquote {
    border-right: 4px solid var(--secondary);
    background: rgba(15, 23, 42, 0.02);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
}

/* أزرار المشاركة */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    margin-top: 32px;
}

.share-title {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-btn.twitter { background: #1DA1F2; }
.share-btn.facebook { background: #4267B2; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.linkedin { background: #0077B5; }

/* مقالات ذات صلة */
.related-articles {
    margin-top: 40px;
}

.related-title {
    font-size: 1.4rem;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

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

/* ===== الشريط الجانبي ===== */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: start;
}

.widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

/* البحث في الشريط الجانبي */
.sidebar-search-form {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.sidebar-search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.sidebar-search-input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    font-family: var(--font-family);
    font-size: 0.9rem;
    direction: rtl;
    outline: none;
}

.sidebar-search-btn {
    padding: 10px 14px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-search-btn:hover {
    background: var(--primary-light);
}

/* التصنيفات */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.category-item a:hover {
    background: rgba(15, 23, 42, 0.04);
    color: var(--primary);
}

.cat-count {
    background: var(--bg-body);
    padding: 2px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* الأكثر قراءة */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.popular-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.popular-content {
    flex: 1;
}

.popular-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    display: block;
    margin-bottom: 4px;
    transition: var(--transition);
}

.popular-title:hover {
    color: var(--primary);
}

.popular-views {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== التصفح ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== التذييل ===== */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.footer-logo img {
    height: 46px;
    filter: brightness(10);
}

.footer-logo h3 {
    color: white;
    font-size: 1.2rem;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-title {
    color: white;
    font-size: 1.05rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-right: 8px;
}

.footer-info {
    font-size: 0.88rem;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== زر العودة للأعلى ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ===== صفحة البحث ===== */
.search-page-header {
    padding: 50px 0 30px;
    text-align: center;
}

.search-page-form {
    max-width: 600px;
    margin: 24px auto 0;
    display: flex;
    gap: 12px;
}

.search-results-info {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

mark {
    background: rgba(255, 214, 0, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    color: inherit;
}

/* ===== صفحة 404 ===== */
.error-page {
    text-align: center;
    padding: 100px 24px;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.error-message {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.error-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
}

.error-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* ===== أنيميشن عام ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تأخير الأنيميشن */
.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }

/* صفحة التصنيف */
.category-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    padding: 50px 0;
    text-align: center;
    color: white;
}

.category-header h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 8px;
}

.category-header p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
}

/* ===== Loading Skeleton ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
