/* ===== Namadhiji - Clean Professional Theme ===== */

/* ===== CSS Variables ===== */
:root {
    /* الخلفيات */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-dark: #0a1628;

    /* النصوص */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    /* Better contrast (4.5:1) */
    --text-light: #cbd5e1;

    /* الألوان الرئيسية - أزرق احترافي ملكي */
    --accent-primary: #1e40af;
    --accent-primary-light: #3b82f6;
    --accent-primary-dark: #1e3a8a;
    --accent-secondary: #0ea5e9;

    /* ألوان الحالة */
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* التدرجات الملكية */
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #1e40af 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);

    /* الحدود */
    --border-color: #f1f5f9;
    --border-color-dark: #e2e8f0;
    --border-accent: rgba(30, 64, 175, 0.2);

    /* الظلال الفاخرة */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(30, 64, 175, 0.2);

    /* الزوايا */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* الانتقالات */
    --transition-fast: all 0.15s ease;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* المسافات */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* ===== Font Optimization ===== */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../webfonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2') format('woff2');
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Mobile font adjustments */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}

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

ul {
    list-style: none;
}

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

::selection {
    background: var(--accent-primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ===== Typography ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ===== Icons (CSS-based) ===== */
.icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-lg {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
}

.icon-xl {
    width: 64px;
    height: 64px;
    font-size: 2rem;
}

.icon-box {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-primary);
    stroke-width: 2;
    fill: none;
}

.icon-box-primary {
    background: var(--gradient-primary);
    border: none;
}

.icon-box-primary svg {
    stroke: white;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 4px 20px rgba(0, 102, 204, 0.3);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background: white;
    color: var(--accent-primary);
}

.btn-ghost {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-white {
    background: white;
    color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

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

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.8rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #ffffff;
    /* backdrop-filter: blur(20px); Removed for better clarity */
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-3) var(--space-6);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-icon {
    width: 120px;
    height: 48px;
    background: transparent;
    display: flex;
    align-items: center;
}

.logo-icon img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    background: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-link {
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-primary);
    background: rgba(0, 102, 204, 0.05);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(0, 102, 204, 0.08);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.mobile-menu-btn {
    display: none;
    width: 48px;
    height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem var(--space-6) 4rem;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(0, 102, 204, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(8, 145, 178, 0.1) 0%, transparent 50%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: rgba(0, 102, 204, 0.15);
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: #7dd3fc;
    margin-bottom: var(--space-6);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.25rem);
    font-weight: 800;
    margin-bottom: var(--space-6);
    line-height: 1.2;
    color: white;
}

.hero-title .highlight {
    color: #7dd3fc;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
    margin-bottom: var(--space-10);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-16);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    max-width: 800px;
    margin: 0 auto;
}

.stat-card {
    padding: var(--space-5);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 102, 204, 0.3);
    transform: translateY(-4px);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: var(--space-1);
}

/* ===== Sections ===== */
.section {
    padding: var(--space-20) 0;
}

.section-gray {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-badge {
    display: inline-flex;
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 102, 204, 0.08);
    border: 1px solid rgba(0, 102, 204, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.card-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.card-body {
    padding: var(--space-6);
}

/* ===== Subject Cards ===== */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-5);
}

.subject-card {
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.subject-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-accent);
}

.subject-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.subject-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--accent-primary);
    stroke-width: 2;
    fill: none;
}

.subject-card:hover .subject-icon {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.subject-card:hover .subject-icon svg {
    stroke: white;
}

.subject-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.subject-count {
    font-size: 0.85rem;
    color: #475569;
    /* Darker than var(--text-muted) for contrast */
}

/* ===== Feature Cards ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    position: relative;
    padding: var(--space-8);
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.feature-number {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.feature-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-5);
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: var(--space-16) 0;
}

.cta-card {
    padding: var(--space-16) var(--space-8);
    background: var(--gradient-hero);
    border-radius: var(--radius-2xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(8, 145, 178, 0.1) 0%, transparent 50%);
}

.cta-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: var(--space-4);
    position: relative;
    color: white;
}

.cta-desc {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 550px;
    margin: 0 auto var(--space-8);
    position: relative;
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-dark);
    padding: var(--space-16) 0 var(--space-8);
    color: rgba(255, 255, 255, 0.85);
    /* Improved text contrast */
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: var(--space-4);
    color: white;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    /* High contrast for subtext on dark bg */
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-links h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-5);
    color: white;
    letter-spacing: -0.01em;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

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

.footer-links a:hover {
    color: var(--accent-primary-light);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    stroke-width: 2;
    fill: none;
}

.footer-social a:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.footer-social a:hover svg {
    stroke: white;
}

/* ===== Mobile Menu & Overlay ===== */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    /* Changed from right/inset to specific left */
    width: 85%;
    max-width: 320px;
    background: white;
    z-index: 999;
    padding: 6rem var(--space-6) var(--space-6);
    transform: translateX(-100%);
    /* Slide from Left in LTR/RTL correctly */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
    display: flex;
    /* Changed from none/block to flex for layout */
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Mobile Breadcrumbs */
.mobile-breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.mobile-breadcrumbs a {
    color: var(--accent-primary);
    font-weight: 500;
}

.mobile-breadcrumbs i {
    font-size: 0.7rem;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-link {
    font-size: 1.1rem;
    font-weight: 600;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.mobile-link:hover {
    color: var(--accent-primary);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ===== Tables ===== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--space-4);
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-secondary);
}

.table tr:hover td {
    background: var(--bg-secondary);
}

/* ===== Status Badges ===== */
.status-badge {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #a16207;
    /* Yellow 700 for contrast */
}

.status-verified,
.status-success {
    background: rgba(0, 168, 107, 0.1);
    color: #047857;
    /* Emerald 700 for contrast */
}

.status-rejected,
.status-error {
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    /* Red 700 for contrast */
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-4) var(--space-8);
    background: var(--bg-dark);
    color: white;
    border-radius: var(--radius-xl);
    font-weight: 500;
    z-index: 10000;
    box-shadow: var(--shadow-xl);
}

.toast-success {
    background: var(--color-success);
}

.toast-error {
    background: var(--color-error);
}

/* ===== Page Header ===== */
.page-header {
    padding: 7rem 0 var(--space-12);
    background: var(--gradient-hero);
    color: white;
    text-align: center;
}

.page-header .section-badge {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.page-header .section-title {
    color: white;
}

.page-header .section-subtitle {
    color: var(--text-light);
}

/* ===== Resources Page ===== */
.resources-page {
    min-height: 100vh;
}

.filters-section {
    padding: var(--space-6) 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-4);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
    padding: var(--space-12) 0 var(--space-16);
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.resource-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.resource-image {
    height: 140px;
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.resource-image .icon-box {
    width: 64px;
    height: 64px;
}

.resource-content {
    padding: var(--space-5);
}

.resource-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: 1.4;
}

.resource-meta {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.resource-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.price-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* ===== Blog ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-6);
    padding: var(--space-12) 0 var(--space-16);
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.blog-image {
    height: 180px;
    background: var(--gradient-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
}

.blog-content {
    padding: var(--space-5);
}

.blog-category {
    display: inline-flex;
    padding: var(--space-1) var(--space-3);
    background: rgba(0, 102, 204, 0.08);
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.blog-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
    line-height: 1.4;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.blog-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    width: 32px;
    height: 32px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
}

.author-name {
    font-weight: 500;
    font-size: 0.85rem;
}

.blog-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== Dashboard Layout ===== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: #fafafa;
}

.ndj-dashboard-drawer {
    width: 260px;
    background: #ffffff;
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    padding: var(--space-6);
    right: 0;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-5);
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-link:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    transform: translateX(-4px);
}

.sidebar-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.sidebar-link-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link-icon i {
    font-size: 1.1rem;
}

.dashboard-main {
    flex: 1;
    margin-right: 260px;
    padding: var(--space-10);
    background: #fafafa;
}

.dashboard-header {
    margin-bottom: var(--space-8);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-menu-btn {
    display: none;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.dashboard-menu-btn:active {
    transform: scale(0.95);
    background: var(--bg-secondary);
}

@media (max-width: 1024px) {
    .dashboard-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.dashboard-subtitle {
    color: var(--text-secondary);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.stat-box {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0;
    transition: var(--transition);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary-light);
}

.stat-box:hover::before {
    opacity: 1;
}

.stat-box-icon {
    width: 50px;
    height: 50px;
    background: rgba(30, 64, 175, 0.08);
    color: var(--accent-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    font-size: 1.25rem;
    transition: var(--transition);
}

.stat-box:hover .stat-box-icon {
    background: var(--accent-primary);
    color: white;
    transform: rotate(-10deg);
}

.stat-box-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.stat-box-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===== Auth Page ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem var(--space-4) var(--space-8);
    background: var(--bg-secondary);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.auth-logo {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-4);
}

.auth-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-tabs {
    display: flex;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-1);
    margin-bottom: var(--space-6);
}

.auth-tab {
    flex: 1;
    padding: var(--space-3);
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.9rem;
}

.auth-tab.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.role-selector {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.role-option {
    flex: 1;
    padding: var(--space-4);
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.role-option:hover {
    border-color: var(--accent-primary);
}

.role-option.active {
    border-color: var(--accent-primary);
    background: rgba(0, 102, 204, 0.05);
}

.role-icon {
    margin-bottom: var(--space-2);
}

.role-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--accent-primary);
    stroke-width: 1.5;
    fill: none;
}

.role-label {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ndj-dashboard-drawer {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 280px;
        z-index: 2000;
        background: white;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
        padding-top: 5rem;
    }

    .ndj-dashboard-drawer.active {
        transform: translateX(0);
    }

    .ndj-dashboard-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        z-index: 1050;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .ndj-dashboard-overlay.active {
        display: block;
        opacity: 1;
    }

    .dashboard-menu-btn {
        display: flex;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
    }

    .dashboard-main {
        margin-right: 0;
        padding: var(--space-4);
    }

    .dashboard-header {
        margin-bottom: var(--space-4);
    }

    .dashboard-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .hero-buttons,
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: var(--space-12) 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .hero-title {
        font-size: 1.75rem;
    }
}

/* ===== SEO & UX Enhancements ===== */

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: var(--radius-md);
    color: transparent !important;
    border: none !important;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1.2rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.8rem;
    margin-bottom: 1rem;
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 350px;
}

/* Preview Modal */
.preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-modal.active {
    display: flex;
    opacity: 1;
}

.preview-content {
    background: var(--bg-primary);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.preview-modal.active .preview-content {
    transform: scale(1);
}

.preview-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-body {
    padding: 0;
    overflow-y: auto;
    height: calc(90vh - 150px);
    background: #525659;
    display: flex;
    justify-content: center;
}

.preview-image,
.preview-iframe {
    max-width: 100%;
    height: auto;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-preview {
    background: var(--bg-tertiary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.close-preview:hover {
    background: var(--color-error);
    color: white;
    transform: rotate(90deg);
}

/* Watermark & Protection */
.watermark-container {
    position: relative;
    user-select: none;
    pointer-events: none;
}

.watermark-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.watermark-text {
    font-size: 4rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.15);
    transform: rotate(-30deg);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5rem;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.blurred {
    filter: blur(15px);
    transition: filter 0.5s ease;
}

.protected-preview {
    position: relative;
}

.protected-preview::after {
    content: 'يرجى الشراء للتحميل';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.4);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    backdrop-filter: blur(5px);
    z-index: 5;
}