﻿        :root {
            --primary-color: #f68f33;
            --primary-dark: #e67e22;
            --secondary-color: #2c3e50;
            --accent-color: #3498db;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --danger-color: #e74c3c;
            --light-bg: #f8f9fa;
            --white: #ffffff;
            --text-dark: #2c3e50;
            --text-light: #6c757d;
            --border-color: #e9ecef;
            --shadow: 0 2px 10px rgba(0,0,0,0.1);
            --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
            --border-radius: 12px;
            --border-radius-sm: 8px;
            --transition: all 0.3s ease;
        }

        /* Reset and Base Styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-weight: bolder;
            font-size: 16px;
        }
        
        html {
            scroll-behavior: smooth;
        }
        
        body {
            font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            line-height: 1.6;
            color: var(--text-dark);
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            direction: rtl;
            overflow-x: hidden;
            width: 100%;
            min-width: 100%;
        }
        
        /* Container */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            width: 100%;
            box-sizing: border-box;
        }
        
        /* Header */
        .header {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: var(--white);
            padding: 3rem 0 2rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
            animation: float 20s linear infinite;
        }
        
        @keyframes float {
            0% { transform: translate(0, 0); }
            100% { transform: translate(50px, 50px); }
        }
        
        .header h1 {
            font-size: clamp(2rem, 5vw, 3.5rem);
            font-weight: 700;
            margin-bottom: 1rem;
            text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            position: relative;
            z-index: 1;
            padding: 0 1rem;
        }
        
        .header p {
            font-size: clamp(1rem, 3vw, 1.25rem);
            opacity: 0.95;
            margin-bottom: 2rem;
            position: relative;
            z-index: 1;
            padding: 0 1rem;
        }

        .header-content {
            position: relative;
            z-index: 2;
            text-align: center;
            max-width: 800px;
            margin: 0 auto;
            padding: 0 1rem;
        }

        .header-badges {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .badge {
            background: rgba(255,255,255,0.2);
            padding: 0.5rem 1rem;
            border-radius: 50px;
            font-size: 0.9rem;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,0.3);
        }
        
        /* Navigation */
        .nav-wrapper {
            background: var(--white);
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
            transition: var(--transition);
        }
        
        .nav-wrapper.scrolled {
            box-shadow: var(--shadow-lg);
        }
        
        .main-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 0;
        }
        
        .logo {
            height: 40px;
            transition: var(--transition);
        }
        
        .logo:hover {
            transform: scale(1.05);
        }
        
        .nav-links {
            display: flex;
            list-style: none;
            align-items: center;
            gap: 2rem;
        }
        
        .nav-links a {
            color: var(--text-dark);
            text-decoration: none;
            font-weight: 500;
            transition: var(--transition);
            padding: 0.5rem 1rem;
            border-radius: var(--border-radius-sm);
            font-size: 1rem;
        }
        
        .nav-links a:hover {
            color: var(--primary-color);
            background: rgba(246, 143, 51, 0.1);
        }
        
        .nav-links .btn-primary {
            background: var(--primary-color);
            color: var(--white);
            padding: 0.75rem 1.5rem;
            border-radius: 50px;
            transition: var(--transition);
            font-size: 1rem;
        }
        
        .nav-links .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(246, 143, 51, 0.3);
        }
        
        /* Mobile Menu Toggle */
        .mobile-menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-dark);
            padding: 0.5rem;
            border-radius: var(--border-radius-sm);
            transition: var(--transition);
        }
        
        .mobile-menu-toggle:hover {
            background: rgba(246, 143, 51, 0.1);
            color: var(--primary-color);
        }
        
        /* Mobile close button */
        .mobile-close {
            display: none !important;
            position: absolute;
            top: 15px; /* تقليل المسافة */
            left: 15px; /* تقليل المسافة */
            font-size: 1.3rem; /* تقليل الحجم */
            cursor: pointer;
            background: rgba(255, 255, 255, 0.9);
            border: 2px solid #f68f33;
            color: #f68f33;
            padding: 6px; /* تقليل padding */
            border-radius: 50%;
            transition: all 0.3s ease;
            z-index: 1010;
            width: 35px; /* تقليل العرض */
            height: 35px; /* تقليل الارتفاع */
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .mobile-close:hover {
            background: #f68f33;
            color: white;
            transform: scale(1.1);
        }
        
        /* Sidebar close button for mobile */
        .sidebar-close {
            display: none;
            position: absolute;
            top: 12px; /* تقليل المسافة */
            left: 12px; /* تقليل المسافة */
            background: none;
            border: none;
            font-size: 1.1rem; /* تقليل الحجم */
            color: #666;
            cursor: pointer;
            padding: 6px; /* تقليل padding */
            border-radius: 50%;
            transition: all 0.3s ease;
            z-index: 1002;
        }
        
        .sidebar-close:hover {
            background: rgba(246, 143, 51, 0.1);
            color: #f68f33;
        }
        
        /* Main Content */
        .main-content {
            padding: 2rem 0;
        }
        
        /* Sidebar Navigation - تحديث للسلوك اللاصق */
        .content-wrapper {
            display: grid;
            grid-template-columns: 300px 1fr;
            gap: 2rem;
            align-items: start;
        }
        
        .sidebar {
            position: sticky;
            top: 100px;
            background: var(--white);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            box-shadow: var(--shadow);
            height: fit-content;
            max-height: calc(100vh - 120px);
            overflow-y: auto;
            z-index: 10;
            transition: var(--transition);
        }
        
        /* تحسين السلوك اللاصق للـ sidebar */
        .sidebar.sticky-active {
            position: fixed;
            top: 100px;
            width: 300px;
            max-height: calc(100vh - 120px);
            box-shadow: var(--shadow-lg);
            transform: translateY(0);
            animation: slideInSticky 0.3s ease-out;
        }
        
        @keyframes slideInSticky {
            from {
                transform: translateY(-10px);
                opacity: 0.8;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        
        /* Placeholder للحفاظ على التخطيط */
        .sidebar-placeholder {
            display: none;
            width: 300px;
            height: var(--sidebar-height);
        }
        
        .sidebar-placeholder.active {
            display: block;
        }
        
        /* Custom scrollbar for sidebar */
        .sidebar::-webkit-scrollbar {
            width: 6px;
        }
        
        .sidebar::-webkit-scrollbar-track {
            background: var(--light-bg);
            border-radius: 3px;
        }
        
        .sidebar::-webkit-scrollbar-thumb {
            background: var(--primary-color);
            border-radius: 3px;
        }
        
        .sidebar::-webkit-scrollbar-thumb:hover {
            background: var(--primary-dark);
        }
        
        .sidebar h3 {
            color: var(--primary-color);
            margin-bottom: 1.5rem;
            font-size: 1.25rem;
            text-align: center;
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 1rem;
        }
        
        .sidebar-links {
            list-style: none;
        }
        
        .sidebar-links li {
            margin-bottom: 0.5rem;
        }
        
        .sidebar-links a {
            display: block;
            padding: 0.75rem 1rem;
            color: var(--text-light);
            text-decoration: none;
            border-radius: var(--border-radius-sm);
            transition: var(--transition);
            font-size: 0.95rem;
            border-right: 3px solid transparent;
        }
        
        .sidebar-links a:hover {
            background: rgba(246, 143, 51, 0.1);
            color: var(--primary-color);
            border-right-color: var(--primary-color);
            transform: translateX(-5px);
        }
        
        .sidebar-links a.active {
            background: rgba(246, 143, 51, 0.15);
            color: var(--primary-color);
            border-right-color: var(--primary-color);
            font-weight: 600;
        }
        
        /* Toggle button for sidebar on smaller screens */
        .sidebar-toggle {
            display: none;
            position: fixed;
            top: 50%;
            right: 15px; /* تقليل المسافة من الحافة */
            transform: translateY(-50%);
            background: #f68f33;
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px; /* تقليل العرض */
            height: 50px; /* تقليل الارتفاع */
            font-size: 1.1rem; /* تقليل حجم الأيقونة */
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(246, 143, 51, 0.4);
            z-index: 1001;
            transition: all 0.3s ease;
            opacity: 0.9;
        }
        
        .sidebar-toggle:hover {
            transform: translateY(-50%) scale(1.05);
            opacity: 1;
            box-shadow: 0 6px 16px rgba(246, 143, 51, 0.5);
        }
        
        .sidebar-toggle:active {
            transform: translateY(-50%) scale(0.95);
        }
        
        /* Content Sections */
        .content {
            background: var(--white);
            border-radius: var(--border-radius);
            padding: 2rem;
            box-shadow: var(--shadow);
        }
        
        .section {
            margin-bottom: 3rem;
            scroll-margin-top: 120px;
        }
        
        .section h2 {
            color: var(--primary-color);
            font-size: clamp(1.5rem, 4vw, 2.25rem);
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 3px solid var(--border-color);
            position: relative;
        }
        
        .section h2::after {
            content: '';
            position: absolute;
            bottom: -3px;
            right: 0;
            width: 80px;
            height: 3px;
            background: var(--primary-color);
            border-radius: 2px;
        }
        
        .section h3 {
            color: var(--accent-color);
            font-size: clamp(1.25rem, 3vw, 1.75rem);
            margin: 2rem 0 1rem;
        }
        
        .section h4 {
            color: var(--text-dark);
            font-size: clamp(1.1rem, 2.5vw, 1.4rem);
            margin: 1.5rem 0 1rem;
        }
        
        /* Info Boxes */
        .info-box {
            background: var(--light-bg);
            border-right: 4px solid var(--primary-color);
            padding: 1.5rem;
            margin: 1.5rem 0;
            border-radius: var(--border-radius-sm);
            box-shadow: var(--shadow);
        }
        
        .info-box.success {
            border-color: var(--success-color);
            background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
        }
        
        .info-box.warning {
            border-color: var(--warning-color);
            background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
        }
        
        .info-box.danger {
            border-color: var(--danger-color);
            background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
        }

        /* Cards */
        .card {
            background: var(--light-bg);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            margin: 1.5rem 0;
            border-left: 4px solid var(--primary-color);
            transition: var(--transition);
            box-shadow: var(--shadow);
        }

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

        .card.success {
            border-left-color: var(--success-color);
            background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
        }

        .card.warning {
            border-left-color: var(--warning-color);
            background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
        }

        .card.danger {
            border-left-color: var(--danger-color);
            background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
        }

        .card.info {
            border-left-color: var(--accent-color);
            background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
        }
        
        /* Tables - تحسين شامل للتوافق مع الشاشة */
        .table-container {
            background: var(--white);
            border-radius: var(--border-radius);
            overflow: hidden;
            box-shadow: var(--shadow);
            margin: 1.5rem 0;
        }
        
        .table-container table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .table-container th {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: var(--white);
            padding: 1rem;
            text-align: right;
            font-weight: 600;
            font-size: 1rem;
        }
        
        .table-container td {
            padding: 1rem;
            border-bottom: 1px solid var(--border-color);
            text-align: right;
        }
        
        .table-container tr:nth-child(even) {
            background: var(--light-bg);
        }
        
        .table-container tr:hover {
            background: rgba(246, 143, 51, 0.05);
        }
        
        /* Video Container */
        .video-container {
            position: relative;
            padding-bottom: 56.25%;
            height: 0;
            overflow: hidden;
            border-radius: var(--border-radius);
            box-shadow: var(--shadow-lg);
            margin: 1.5rem 0;
        }
        
        .video-container iframe {
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
            border: none;
        }
        
        /* Calculator Section */
        .calculator {
            background: linear-gradient(135deg, var(--light-bg) 0%, #e9ecef 100%);
            padding: 2rem;
            border-radius: var(--border-radius);
            text-align: center;
            box-shadow: var(--shadow);
        }
        
        .calculator h3 {
            color: var(--primary-color);
            margin-bottom: 1.5rem;
            font-size: 1.3rem;
        }
        
        .calculator-inputs {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-bottom: 1.5rem;
        }
        
        .calculator input {
            padding: 1rem;
            border: 2px solid var(--border-color);
            border-radius: var(--border-radius-sm);
            font-size: 1rem;
            text-align: center;
            transition: var(--transition);
        }
        
        .calculator input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(246, 143, 51, 0.1);
        }
        
        .calculator-result {
            background: var(--white);
            padding: 1.5rem;
            border-radius: var(--border-radius-sm);
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary-color);
            box-shadow: var(--shadow);
        }
        
        /* Lists */
        .section ul, .section ol {
            margin: 1rem 0;
            padding-right: 1.5rem;
        }
        
        .section li {
            margin-bottom: 0.75rem;
            line-height: 1.7;
        }
        
        .section ul li::marker {
            color: var(--primary-color);
        }
        
        /* Quick Links */
        .quick-links {
            background: linear-gradient(135deg, var(--accent-color) 0%, #2980b9 100%);
            color: var(--white);
            padding: 2rem;
            border-radius: var(--border-radius);
            margin: 2rem 0;
            box-shadow: var(--shadow);
        }
        
        .quick-links h4 {
            color: var(--white);
            margin-bottom: 1.5rem;
            text-align: center;
            font-size: 1.2rem;
        }
        
        .quick-links a {
            display: block;
            color: var(--white);
            text-decoration: none;
            padding: 0.75rem 1rem;
            margin-bottom: 0.5rem;
            border-radius: var(--border-radius-sm);
            transition: var(--transition);
            background: rgba(255,255,255,0.1);
            font-size: 0.95rem;
        }
        
        .quick-links a:hover {
            background: rgba(255,255,255,0.2);
            transform: translateX(-5px);
        }
        
        /* Footer */
        .footer {
            background: var(--secondary-color);
            color: var(--white);
            padding: 3rem 0 2rem;
            margin-top: 4rem;
        }
        
        .footer-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 1rem;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
        }
        
        .footer-section h3 {
            color: var(--primary-color);
            margin-bottom: 1rem;
        }
        
        .footer-section p {
            opacity: 0.9;
            line-height: 1.7;
        }
        
        .footer-section ul {
            list-style: none;
        }
        
        .footer-section ul li {
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .footer-section ul a {
            color: var(--white);
            text-decoration: none;
            opacity: 0.9;
            transition: var(--transition);
        }
        
        .footer-section ul a:hover {
            opacity: 1;
            color: var(--primary-color);
        }
        
        .footer-bottom {
            text-align: center;
            padding-top: 2rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            opacity: 0.8;
        }
        
        /* Popup Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
            padding: 1rem;
        }
        
        .modal-overlay.show {
            opacity: 1;
            visibility: visible;
        }
        
        .modal {
            background: var(--white);
            padding: 2rem;
            border-radius: var(--border-radius);
            max-width: 500px;
            width: 100%;
            box-shadow: var(--shadow-lg);
            transform: scale(0.8);
            transition: var(--transition);
        }
        
        .modal-overlay.show .modal {
            transform: scale(1);
        }
        
        .modal h2 {
            color: var(--primary-color);
            margin-bottom: 1rem;
            text-align: center;
        }
        
        .modal p {
            line-height: 1.7;
            margin-bottom: 2rem;
        }
        
        .modal-close {
            display: block;
            margin: 0 auto;
            padding: 0.75rem 2rem;
            background: var(--primary-color);
            color: var(--white);
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            cursor: pointer;
            transition: var(--transition);
        }
        
        .modal-close:hover {
            background: var(--primary-dark);
            transform: translateY(-2px);
        }
        
        /* Responsive Design */
        @media (max-width: 1024px) {
            .content-wrapper {
                grid-template-columns: 250px 1fr;
            }
            
            .sidebar {
                padding: 1rem;
                max-height: calc(100vh - 120px);
            }
            
            .sidebar.sticky-active {
                width: 250px;
            }
            
            .sidebar-placeholder {
                width: 250px;
            }
            
            .container {
                padding: 0 1rem;
            }
        }
        
        @media (max-width: 768px) {
            .nav-links {
                display: none;
            }

            .mobile-menu-toggle {
                display: block;
            }

            .main-container {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
            .content-wrapper {
                grid-template-columns: auto;
            }
            
            .sidebar {
                position: fixed;
                top: 0;
                right: -100%;
                width: 300px;
                height: 100vh;
                z-index: 1001;
                transition: right 0.3s ease;
                border-radius: 0;
            }
            
            .sidebar.active {
                right: 0;
            }
            
            .sidebar.sticky-active {
                position: fixed;
                top: 0;
                width: 85%;
                max-width: 300px;
            }
            
            .sidebar-placeholder {
                display: none !important;
            }
            
            .sidebar-close {
                display: block;
            }
            
            .sidebar-toggle {
                display: block;
            }
            
            .nav-links {
                position: fixed;
                top: 0;
                right: -100%;
                width: 85%; /* تقليل العرض */
                max-width: 350px; /* إضافة max-width */
                height: 100vh;
                background: white;
                flex-direction: column;
                padding: 60px 20px 20px 20px; /* تقليل padding */
                box-shadow: -5px 0 20px rgba(0,0,0,0.1);
                transition: right 0.3s ease;
                z-index: 1001;
                gap: 15px; /* تقليل gap */
                align-items: flex-start;
                overflow-y: auto;
            }
            
            .nav-links.active {
                right: 0;
            }
            
            .nav-links.active .mobile-close {
                display: flex;
            }
            
            .header {
                padding: 40px 0 20px; /* تقليل padding */
                width: 100%;
            }
            
            .header h1 {
                font-size: clamp(1.3rem, 5vw, 2rem); /* تحسين الحجم للهواتف */
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                max-width: 100%;
            }
            
            .header p {
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                max-width: 100%;
            }
            
            .content {
                padding: 20px; /* تقليل padding */
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
            }
            
            .calculator-inputs {
                grid-template-columns: 1fr;
                gap: 12px; /* تقليل gap */
            }
            
            .section {
                margin-bottom: 30px; /* تقليل margin */
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
            }
            
            .section h2, .section h3, .section h4 {
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                max-width: 100%;
            }
            
            .main-content {
                padding: 20px 0; /* تقليل padding */
                width: 100%;
            }
            
            /* تحسين الجداول للهواتف - بدون تمرير */
            .table-container {
                margin: 15px 0;
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
                overflow: hidden; /* إزالة التمرير */
                border-radius: 6px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            }
            
            table {
                width: 100%;
                border-collapse: collapse;
                table-layout: fixed; /* توزيع الأعمدة بالتساوي */
            }
            
            th {
                padding: 12px 6px;
                font-size: 15px; /* زيادة من 13px إلى 15px */
                line-height: 1.2;
                white-space: normal;
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                width: 50%; /* عرض متساوي */
            }
            
            td {
                padding: 12px 6px;
                font-size: 14px; /* زيادة من 12px إلى 14px */
                line-height: 1.3;
                white-space: normal;
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                width: 50%; /* عرض متساوي */
            }
            
            /* تحسين النصوص */
            body {
                font-size: 16px; /* زيادة من 14px إلى 16px */
                width: 100%;
            }
            
            * {
                font-size: 16px; /* زيادة من 14px إلى 16px */
                word-wrap: break-word;
                overflow-wrap: break-word;
                max-width: 100%;
                box-sizing: border-box;
            }
            
            /* إصلاح النصوص الطويلة */
            p, li, div, span {
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                max-width: 100%;
                font-size: 15px; /* تحديد حجم واضح */
                line-height: 1.5;
            }
            
            /* إصلاح الروابط والأزرار */
            a, button {
                word-wrap: break-word;
                overflow-wrap: break-word;
                max-width: 100%;
            }
            
            /* إصلاح العناصر المختلفة */
            .info-box, .quick-links, .calculator {
                width: 100%;
                max-width: 100%;
                box-sizing: border-box;
            }
        }
        
        @media (max-width: 480px) {
            .header {
                padding: 2rem 0 1.5rem;
            }
            
            .header h1 {
                font-size: clamp(1.1rem, 6vw, 1.5rem); /* تحسين الحجم للهواتف الصغيرة */
                margin-bottom: 10px;
                padding: 0 5px;
                line-height: 1.2;
            }
            
            .header p {
                font-size: clamp(0.85rem, 4vw, 1rem);
                padding: 0 5px;
                line-height: 1.3;
            }

            .content {
                padding: 1.5rem;
            }
            
            .section h2 {
                font-size: clamp(1.1rem, 5vw, 1.5rem); /* تحسين الحجم للهواتف الصغيرة */
                margin-bottom: 15px; /* تقليل margin */
                line-height: 1.2;
            }
            
            .section h3 {
                font-size: clamp(1rem, 4.5vw, 1.3rem);
                line-height: 1.3;
            }
            
            .section h4 {
                font-size: clamp(0.95rem, 4vw, 1.1rem);
                line-height: 1.3;
            }

            .calculator {
                padding: 1.5rem;
            }

            .modal {
                padding: 1.5rem;
            }
            
            .footer-content {
                grid-template-columns: 1fr;
                gap: 25px; /* تقليل gap */
            }
            
            .sidebar-toggle {
                right: 10px; /* تقليل المسافة من الحافة */
                width: 45px; /* تقليل العرض */
                height: 45px; /* تقليل الارتفاع */
                font-size: 1rem; /* تقليل حجم الأيقونة */
            }
            
            .sidebar {
                width: 90%; /* زيادة العرض للهواتف الصغيرة */
                right: -100%;
            }
            
            .nav-links {
                width: 90%; /* زيادة العرض للهواتف الصغيرة */
                padding: 50px 15px 15px 15px; /* تقليل padding */
            }
            
            .content {
                padding: 15px; /* تقليل padding أكثر */
                margin: 0;
                width: 100%;
            }
            
            .calculator {
                padding: 15px; /* تقليل padding */
                margin: 15px 0;
            }
            
            .info-box {
                padding: 12px; /* تقليل padding */
                margin: 12px 0; /* تقليل margin */
            }
            
            .quick-links {
                padding: 15px; /* تقليل padding */
                margin: 15px 0;
            }
            }
            
            /* تحسين النصوص للهواتف الصغيرة */
            ul, ol {
                font-size: 15px; /* زيادة من 13px إلى 15px */
                padding-right: 15px; /* تقليل padding */
            }
            
            li {
                margin-bottom: 6px; /* تقليل margin */
                line-height: 1.5; /* تقليل line-height */
                font-size: 15px; /* زيادة من 13px إلى 15px */
            }
            
            p {
                font-size: 15px; /* زيادة من 13px إلى 15px */
                line-height: 1.5;
            }
            
            .modal {
                padding: 20px; /* تقليل padding */
                margin: 10px; /* إضافة margin */
                max-width: 95%;
                width: 95%;
            }
            
            .modal h2 {
                margin-bottom: 12px; /* تقليل margin */
                font-size: clamp(1.1rem, 5vw, 1.4rem);
            }
            
            .modal p {
                margin-bottom: 20px; /* تقليل margin */
                font-size: clamp(0.9rem, 4vw, 1rem);
            }
            
            /* تحسين الجداول للهواتف الصغيرة */
            table {
                font-size: 11px; /* تقليل حجم الخط أكثر */
                width: 100%;
            }
            
            th, td {
                padding: 6px 4px; /* تقليل padding أكثر */
                font-size: 11px; /* تقليل حجم الخط */
                line-height: 1.3;
            }
            
            .table-container {
                width: 100%;
                margin: 15px 0;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            
            /* إصلاح شامل للعرض */
            .main-nav {
                padding: 10px 0;
                width: 100%;
            }
            
            .nav-wrapper {
                width: 100%;
            }
            
            .main-content {
                width: 100%;
                padding: 15px 0;
            }
            
            .content-wrapper {
                width: 100%;
            }
            
            .footer {
                width: 100%;
                padding: 30px 0 20px;
            }
        
        
        @media (max-width: 480px) {
            .container {
                padding: 0 2px; /* تقليل padding للحد الأدنى */
                width: 100%;
                max-width: 100%;
            }
            
            .header {
                padding: 25px 0 10px;
                width: 100%;
            }
            
            .header h1 {
                font-size: clamp(1rem, 7vw, 1.3rem); /* تحسين أكثر للهواتف الصغيرة جداً */
                padding: 0 3px;
                margin-bottom: 8px;
                line-height: 1.1;
            }
            
            .header p {
                font-size: clamp(0.8rem, 5vw, 1rem); /* تحسين أكثر */
                padding: 0 3px;
                line-height: 1.2;
            }
            
            .content {
                padding: 10px; /* تقليل padding أكثر */
                width: 100%;
                max-width: 100%;
                margin: 0;
            }
            
            .section h2 {
                font-size: clamp(1rem, 6vw, 1.3rem); /* تحسين أكثر */
                margin-bottom: 12px;
                line-height: 1.1;
                padding: 0 2px;
            }
            
            .section h3 {
                font-size: clamp(0.95rem, 5vw, 1.2rem); /* تحسين أكثر */
                line-height: 1.2;
                padding: 0 2px;
            }
            
            .section h4 {
                font-size: clamp(0.9rem, 4.5vw, 1.1rem);
                line-height: 1.2;
                padding: 0 2px;
            }
            
            .calculator-result {
                font-size: clamp(1.1rem, 5vw, 1.5rem); /* تحسين أكثر */
                padding: 12px;
            }
            
            .calculator {
                padding: 12px;
                margin: 12px 0;
                width: 100%;
            }
            
            .calculator input {
                padding: 10px;
                font-size: 14px;
            }
            
            .info-box {
                padding: 10px;
                margin: 10px 0;
                width: 100%;
            }
            
            .quick-links {
                padding: 12px;
                margin: 12px 0;
                width: 100%;
            }
            
            .quick-links a {
                font-size: 12px;
                padding: 6px 10px;
                line-height: 1.3;
            }
            
            /* تحسين الجداول للهواتف الصغيرة جداً - بدون تمرير */
            table {
                width: 100%;
                table-layout: fixed;
                font-size: 14px; /* زيادة من 12px إلى 14px */
            }
            
            th {
                padding: 8px 3px;
                font-size: 13px; /* زيادة من 11px إلى 13px */
                line-height: 1.1;
                white-space: normal;
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                width: 50%;
            }
            
            td {
                padding: 8px 3px;
                font-size: 12px; /* زيادة من 10px إلى 12px */
                line-height: 1.2;
                white-space: normal;
                word-wrap: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                width: 50%;
            }
            
            .table-container {
                width: 100%;
                margin: 12px 0;
                border-radius: 4px;
                overflow: hidden; /* إزالة التمرير */
            }
            
            .sidebar {
                width: 95%; /* زيادة العرض للاستفادة القصوى */
                padding-top: 45px;
            }
            
            .nav-links {
                width: 95%; /* زيادة العرض للاستفادة القصوى */
                padding: 45px 10px 10px 10px;
            }
            
            .nav-links a {
                font-size: 13px;
                padding: 8px 12px;
            }
            
            /* تحسين النصوص */
            p {
                font-size: 14px; /* زيادة من 12px إلى 14px */
                line-height: 1.4;
                margin-bottom: 10px;
            }
            
            ul, ol {
                font-size: 14px; /* زيادة من 12px إلى 14px */
                padding-right: 12px;
            }
            
            li {
                font-size: 14px; /* زيادة من 12px إلى 14px */
                margin-bottom: 5px;
                line-height: 1.4;
            }
            
            .modal {
                padding: 15px;
                margin: 5px;
                width: 98%;
                max-width: 98%;
            }
            
            .modal h2 {
                font-size: clamp(1rem, 6vw, 1.2rem);
                margin-bottom: 10px;
            }
            
            .modal p {
                font-size: clamp(0.85rem, 4vw, 0.95rem);
                margin-bottom: 15px;
            }
            
            .modal-close {
                padding: 8px 20px;
                font-size: 14px;
            }
            
            /* تحسين العناصر الأخرى */
            .video-container {
                margin: 12px 0;
            }
            
            .footer {
                padding: 25px 0 15px;
            }
            
            .footer-section h3 {
                font-size: clamp(0.95rem, 4vw, 1.1rem);
            }
            
            .footer-section p, 
            .footer-section a {
                font-size: 12px;
            }
            
            .footer-bottom {
                font-size: 11px;
                padding-top: 20px;
            }
            
            /* إصلاح التمرير والعرض */
            .main-content {
                padding: 12px 0;
                width: 100%;
            }
            
            .content-wrapper {
                width: 100%;
                max-width: 100%;
            }
            
            /* إصلاح الأزرار */
            .sidebar-toggle {
                width: 40px;
                height: 40px;
                font-size: 0.9rem;
                right: 8px;
            }
            
            .mobile-menu-toggle {
                font-size: 1.1rem;
                padding: 6px;
            }
            
            /* إصلاح التنقل */
            .main-nav {
                padding: 8px 0;
            }
            
            .logo {
                height: 35px;
            }
            
            /* إصلاح النوافذ المنبثقة */
            .modal-overlay {
                padding: 5px;
            }
        }
        
        /* Accessibility */
        :focus {
            outline: 2px solid var(--primary-color);
            outline-offset: 2px;
        }
        
        /* Print Styles */
        @media print {
            .nav, .sidebar, .footer {
                display: none;
            }
            
            .main-container {
                grid-template-columns: 1fr;
            }
            
            .content {
                box-shadow: none;
                padding: 0;
            }
        }
        
        /* Animations */
        .fade-in {
            animation: fadeIn 0.6s ease-out;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* تحسين عام للنصوص */
        p {
            font-size: 16px;
            line-height: 1.6;
            margin-bottom: 1rem;
        }
        /* زيادة مقروئية النصوص الصغيرة عبر الصفحة */
        p, li, td, th,
        .sidebar-links a,
        .nav-links a,
        .quick-links a,
        .footer-section p,
        .footer-section a,
        .badge {
            font-size: clamp(1rem, 1.9vw, 1.125rem) !important; /* حتى ~18px على الشاشات الكبيرة */
            line-height: 1.7;
        }
        
        /* تحسين النصوص في المربعات */
        .info-box p,
        .quick-links a {
            font-size: 15px;
            line-height: 1.5;
        }
        
        /* تحسين النصوص الملونة */
        .text-red {
            color: var(--danger-color);
            font-weight: bold;
            font-size: 16px;
            line-height: 1.5;
        }
        
        .text-blue {
            color: var(--accent-color);
            font-weight: bold;
            font-size: 16px;
            line-height: 1.5;
        }
        
        /* Strike through text */
        .strike {
            text-decoration: line-through;
            color: var(--text-light);
        }
        
        /* إضافة تحسينات إضافية للهواتف */
        
        /* منع zoom عند النقر على inputs */
        input, select, textarea {
            font-size: 16px !important;
        }
        
        /* تحسين touch targets */
        a, button, .sidebar-links a, .nav-links a {
            min-height: 44px;
            display: flex;
            align-items: center;
            -webkit-tap-highlight-color: transparent;
        }
        
        /* تحسين النصوص الطويلة */
        p {
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
        }
        
        /* تحسين الصور */
        img {
            max-width: 100%;
            height: auto;
        }
        
        /* تحسين العناصر الثابتة */
        .nav-wrapper {
            width: 100%;
            left: 0;
            right: 0;
        }
        
        /* إصلاح شامل للعرض والتداخل */
        html, body {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }
        
        * {
            box-sizing: border-box;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }
        
        /* إصلاح مشكلة تداخل النصوص */
        .section, .content, .container, 
        .header, .footer, .main-content, .content-wrapper {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
            box-sizing: border-box;
        }
        
        /* إصلاح العناصر الطويلة */
        table, .table-container, .video-container,
        .calculator, .info-box, .quick-links, .modal {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            overflow-x: auto;
        }
        
        /* إصلاح النصوص والروابط */
        h1, h2, h3, h4, h5, h6, p, li, a, span, div {
            word-wrap: break-word;
            overflow-wrap: break-word;
            hyphens: auto;
            max-width: 100%;
        }
        
        /* إصلاح خاص للجداول - بدون تمرير */
        @media (max-width: 968px) {
            .table-container {
                width: 100%;
                margin: 10px 0;
                border-radius: 6px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
                background: white;
                overflow: hidden; /* إزالة التمرير */
            }
            
            table {
                width: 100%;
                table-layout: fixed; /* توزيع متساوي للأعمدة */
                border-collapse: collapse;
                font-size: 15px;
            }
            
            th {
                background: #f68f33;
                color: white;
                padding: 15px 8px;
                font-size: 16px; /* زيادة من 14px إلى 16px */
                font-weight: 600;
                text-align: right;
                white-space: normal;
                word-wrap: break-word;
                line-height: 1.3;
                width: 50%; /* عرض متساوي */
            }
            
            td {
                padding: 15px 8px;
                font-size: 15px; /* زيادة من 13px إلى 15px */
                line-height: 1.4;
                text-align: right;
                white-space: normal;
                word-wrap: break-word;
                overflow-wrap: break-word;
                border-bottom: 1px solid #f0f0f0;
                width: 50%; /* عرض متساوي */
            }
            
            /* تحسين ألوان الصفوف */
            tr:nth-child(even) {
                background: #f8f9fa;
            }
            
            tr:hover {
                background: #f0f0f0;
            }
        }
        
        /* تحسين الجداول للهواتف */
        @media (max-width: 640px) {
            .table-container {
                margin: 15px 0;
                border-radius: 6px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
                overflow: hidden; /* إزالة التمرير */
                width: 100%;
            }
            
            table {
                width: 100%;
                table-layout: fixed;
                border-collapse: collapse;
            }
            
            th, td {
                word-wrap: break-word;
                overflow-wrap: break-word;
                white-space: normal;
                hyphens: auto;
                width: 50%;
            }
        }
        
        /* إصلاح مشكلة العرض الكامل */
        @media (max-width: 480px) {
            .container {
                padding: 0 1px !important;
                margin: 0;
                width: 100% !important;
                max-width: 100% !important;
            }
            
            .header, .main-content, .footer {
                width: 100% !important;
                max-width: 100% !important;
                margin: 0;
                padding-left: 0;
                padding-right: 0;
            }
            
            .content {
                width: 100% !important;
                max-width: 100% !important;
                margin: 0;
                padding: 8px !important;
            }
        }
        
        /* إصلاح خاص للهواتف الصغيرة جداً */
        @media (max-width: 360px) {
            .container {
                padding: 0 !important;
                width: 100% !important;
            }
            
            .content {
                padding: 5px !important;
                width: 100% !important;
            }
            
            .header h1 {
                font-size: clamp(0.9rem, 8vw, 1.2rem) !important;
                padding: 0 2px;
            }
            
            .header p {
                font-size: clamp(0.75rem, 6vw, 0.9rem) !important;
                padding: 0 2px;
            }
            
            .section h2 {
                font-size: clamp(0.9rem, 7vw, 1.2rem) !important;
            }
            
            table {
                width: 100% !important;
                table-layout: fixed !important;
                font-size: 13px !important; /* زيادة من 11px إلى 13px */
            }
            
            th {
                padding: 6px 2px !important;
                font-size: 12px !important; /* زيادة من 10px إلى 12px */
                line-height: 1.1;
                word-wrap: break-word;
                overflow-wrap: break-word;
                white-space: normal;
                width: 50% !important;
            }
            
            td {
                padding: 6px 2px !important;
                font-size: 11px !important; /* زيادة من 9px إلى 11px */
                line-height: 1.2;
                word-wrap: break-word;
                overflow-wrap: break-word;
                white-space: normal;
                width: 50% !important;
            }
            
            .table-container {
                overflow: hidden !important;
                width: 100% !important;
                margin: 10px 0 !important;
            }
            
            p, li {
                font-size: 13px !important; /* زيادة من 11px إلى 13px */
                line-height: 1.3;
            }
        }
        
        /* تحسينات النقر للأجهزة اللمسية */
        .touch-active {
            opacity: 0.7;
            transform: scale(0.98);
            transition: all 0.1s ease;
        }
        
        /* تحسين الأزرار للهواتف */
        @media (max-width: 768px) {
            button, .btn-primary, .modal-close {
                min-height: 48px;
                padding: 12px 24px;
                font-size: 16px;
                border-radius: 8px;
                cursor: pointer;
                -webkit-tap-highlight-color: transparent;
            }
            
            /* تحسين النقر على الروابط */
            a {
                -webkit-tap-highlight-color: transparent;
            }
            
            /* تحسين القوائم */
            .sidebar, .nav-links {
                -webkit-overflow-scrolling: touch;
                overscroll-behavior: contain;
            }
            
            /* تحسين الجداول للهواتف */
            .table-container {
                overflow-x: hidden !important;
                width: 100% !important;
            }
            
            table {
                table-layout: fixed !important;
                width: 100% !important;
            }
            
            th, td {
                width: 50% !important;
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
                white-space: normal !important;
                hyphens: auto !important;
            }
        }
        
        /* تحسين لتجنب التداخل في النصوص العربية */
        @media (max-width: 480px) {
            * {
                font-feature-settings: normal;
                text-rendering: optimizeSpeed;
            }
            
            .text-blue, .text-red {
                word-break: break-word;
                overflow-wrap: break-word;
            }
            
            /* تحسين خاص للجداول في الهواتف الصغيرة - بدون تمرير */
            .table-container {
                margin: 15px 0;
                box-shadow: 0 3px 10px rgba(0,0,0,0.15);
                border: 1px solid #e0e0e0;
                border-radius: 6px;
                overflow: hidden; /* إزالة التمرير */
                width: 100%;
            }
            
            table {
                background: white;
                font-family: 'Tajawal', Arial, sans-serif;
                width: 100%;
                table-layout: fixed;
            }
            
            th {
                background: linear-gradient(135deg, #f68f33 0%, #f29745 100%);
                color: white;
                text-shadow: 0 1px 2px rgba(0,0,0,0.1);
                border-bottom: 2px solid #e67e22;
                width: 50%;
            }
            
            td {
                background: white;
                border-bottom: 1px solid #e8e8e8;
                width: 50%;
            }
            
            tr:nth-child(even) td {
                background: #fafafa;
            }
            
            tr:hover td {
                background: #f5f5f5;
                transition: background-color 0.2s ease;
            }
            
            /* تحسين النصوص الطويلة في الجداول */
            td .strike {
                text-decoration: line-through;
                color: #999;
                opacity: 0.7;
            }
            
            td .text-red {
                color: #e74c3c;
                font-weight: bold;
                font-size: 13px; /* زيادة من 11px إلى 13px */
            }
        }
