
        /* ================ CSS Reset المحسن ================ */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            line-height: 1.15;
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
            scroll-behavior: smooth;
        }

        body {
            margin: 0;
            padding: 0;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* ================ المتغيرات المحسنة ================ */
        :root {
            /* نظام الألوان */
            --primary-color: #C4161C;
            --primary-dark: #9E1217;
            --primary-light: rgba(196, 22, 28, 0.08);
            --secondary-color: #1E1E1E;
            --secondary-light: #2D2D2D;
            --accent-color: #2F5D8C;
            --accent-light: #3A6CA8;
            
            /* الألوان المحايدة */
            --background-color: #F9FAFB;
            --background-light: #FFFFFF;
            --text-color: #111111;
            --text-secondary: #4B5563;
            --text-muted: #6B7280;
            --text-light: #9CA3AF;
            --border-color: #E5E7EB;
            --border-light: #F3F4F6;
            --white: #FFFFFF;
            
            /* الظلال */
            --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
            --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            
            /* الانتقالات */
            --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
            
            /* الزوايا */
            --radius-sm: 4px;
            --radius-md: 8px;
            --radius-lg: 12px;
            --radius-xl: 16px;
            --radius-full: 9999px;
            
            /* الأبعاد */
            --header-height: 80px;
            --header-height-md: 70px;
            --header-height-sm: 60px;
            --container-max: 1400px;
            --container-padding: 2rem;
            --section-padding: 6rem;
            --gutter: 1.5rem;
            
            /* الخطوط */
            --font-size-xs: 0.75rem;
            --font-size-sm: 0.875rem;
            --font-size-base: 1rem;
            --font-size-md: 1.125rem;
            --font-size-lg: 1.25rem;
            --font-size-xl: 1.5rem;
            --font-size-2xl: 1.875rem;
            --font-size-3xl: 2.25rem;
            --font-size-4xl: 3rem;
            --font-size-5xl: 3.75rem;
            
            /* أنماط الخطوط */
            --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Arabic', Roboto, sans-serif;
            --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans Arabic', Roboto, sans-serif;
        }

        /* ================ الأنماط الأساسية المحسنة ================ */
        .layout-body {
            font-family: var(--font-sans);
            background-color: var(--background-color);
            color: var(--text-color);
            line-height: 1.6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow-x: hidden;
        }

        /* ================ الهيكل الرئيسي المحسن ================ */
        .layout-content-wrapper {
            flex: 1 0 auto;
            display: flex;
            flex-direction: column;
            width: 100%;
            position: relative;
        }

        .layout-main {
            flex: 1;
            width: 100%;
            position: relative;
            background-color: var(--background-color);
            transition: var(--transition-base);
            z-index: 1;
        }

        /* ================ الهيدر المحسن بشكل كبير ================ */
        .layout-header {
            background-color: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            position: fixed;
            top: 0;
            right: 0;
            left: 0;
            height: var(--header-height);
            z-index: 1000;
            transition: var(--transition-base);
            padding: 0 var(--container-padding);
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        }

        .layout-header.scrolled {
            height: var(--header-height-md);
            background-color: rgba(255, 255, 255, 0.98);
            box-shadow: var(--shadow-md);
            border-bottom-color: transparent;
        }

        .layout-header__container {
            width: 100%;
            max-width: var(--container-max);
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--gutter);
        }

        .layout-header__left {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            flex: 1;
        }

        /* الشعار المحسن */
        .layout-logo {
            display: flex;
            align-items: center;
            text-decoration: none;
            transition: var(--transition-base);
            position: relative;
            z-index: 2;
        }

        .layout-logo-image {
            height: 55px;
            width: auto;
            object-fit: contain;
            transition: var(--transition-base);
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
        }

        .layout-logo:hover .layout-logo-image {
            transform: translateY(-2px) scale(1.05);
            filter: drop-shadow(0 4px 8px rgba(196, 22, 28, 0.2));
        }

        /* زر القائمة للجوال المحسن */
        .layout-menu-toggle {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 48px;
            height: 48px;
            background: var(--background-light);
            border: 2px solid var(--border-color);
            cursor: pointer;
            padding: 0;
            border-radius: var(--radius-md);
            transition: var(--transition-base);
            z-index: 1001;
            position: relative;
            box-shadow: var(--shadow-sm);
        }

        .layout-menu-toggle:hover {
            background-color: var(--primary-light);
            border-color: var(--primary-color);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        .layout-menu-toggle span {
            display: block;
            width: 22px;
            height: 2px;
            background-color: var(--text-color);
            transition: var(--transition-base);
            border-radius: 1px;
            transform-origin: center;
        }

        .layout-menu-toggle span:nth-child(2) {
            margin: 5px 0;
            width: 18px;
        }

        .layout-menu-toggle.active {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .layout-menu-toggle.active span {
            background-color: white;
        }

        .layout-menu-toggle.active span:nth-child(1) {
            transform: translateY(7px) rotate(45deg);
        }

        .layout-menu-toggle.active span:nth-child(2) {
            opacity: 0;
            transform: scaleX(0);
        }

        .layout-menu-toggle.active span:nth-child(3) {
            transform: translateY(-7px) rotate(-45deg);
        }

        /* التنقل الرئيسي المحسن */
        .layout-nav {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .layout-nav-list {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            background: rgba(255, 255, 255, 0.8);
            padding: 0.5rem;
            border-radius: var(--radius-xl);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid rgba(0, 0, 0, 0.05);
        }

        .layout-nav-item {
            position: relative;
        }

        .layout-nav-link {
            white-space: nowrap;
            display: block;
            padding: 0.625rem 1.25rem;
            color: var(--text-color);
            text-decoration: none;
            font-weight: 500;
            font-size: var(--font-size-base);
            border-radius: var(--radius-lg);
            transition: var(--transition-base);
            position: relative;
            overflow: hidden;
        }

        .layout-nav-link::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--primary-color) 0%, rgba(196, 22, 28, 0) 100%);
            opacity: 0;
            transition: var(--transition-base);
            z-index: -1;
        }

        .layout-nav-link:hover {
            color: white;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .layout-nav-link:hover::before {
            opacity: 1;
        }

        /* تأثير النشاط المحسن */
        .layout-nav-link.active {
            color: white;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(196, 22, 28, 0.25);
        }

        .layout-nav-link.active:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(196, 22, 28, 0.3);
        }

        /* الجزء الأيمن من الهيدر المحسن */
        .layout-header__right {
            display: flex;
            align-items: center;
            gap: 1.25rem;
        }

        /* زر CTA محسن */
        .layout-cta-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.875rem 2.25rem;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: var(--background-light);
            text-decoration: none;
            font-weight: 600;
            font-size: var(--font-size-md);
            border-radius: var(--radius-lg);
            border: none;
            cursor: pointer;
            transition: var(--transition-base);
            white-space: nowrap;
            position: relative;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(196, 22, 28, 0.25);
        }

        .layout-cta-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: var(--transition-slow);
        }

        .layout-cta-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(196, 22, 28, 0.35);
        }

        .layout-cta-button:hover::before {
            left: 100%;
        }

        .layout-cta-button:active {
            transform: translateY(-1px);
        }

        /* ================ الشريط الجانبي المحسن ================ */
        .layout-sidebar {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            max-width: 380px;
            height: 100vh;
            background: var(--background-light);
            box-shadow: var(--shadow-2xl);
            z-index: 999;
            transition: var(--transition-slow);
            display: flex;
            flex-direction: column;
            padding: calc(var(--header-height) + 2rem) 2rem 2rem;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .layout-body.menu-open .layout-sidebar {
            right: 0;
        }

        .layout-sidebar-logo {
            text-align: center;
            margin-bottom: 3rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-light);
        }

        .layout-sidebar-logo img {
            height: 60px;
            width: auto;
            max-width: 100%;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
        }

        .layout-sidebar-nav {
            flex: 1;
            margin-bottom: 2rem;
        }

        .layout-sidebar-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .layout-sidebar-item {
            margin-bottom: 0.75rem;
        }

        .layout-sidebar-link {
            display: flex;
            align-items: center;
            padding: 1.125rem 1.5rem;
            color: var(--text-color);
            text-decoration: none;
            font-weight: 500;
            font-size: var(--font-size-lg);
            border-radius: var(--radius-lg);
            transition: var(--transition-base);
            border: 2px solid transparent;
            position: relative;
            background: var(--background-light);
            box-shadow: var(--shadow-sm);
        }

        .layout-sidebar-link::before {
            content: '';
            position: absolute;
            right: 0;
            top: 0;
            height: 100%;
            width: 4px;
            background: var(--primary-color);
            border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
            opacity: 0;
            transition: var(--transition-base);
        }

        .layout-sidebar-link:hover {
            transform: translateX(-8px);
            background: var(--primary-light);
            color: var(--primary-color);
            border-color: var(--primary-light);
            box-shadow: var(--shadow-md);
        }

        .layout-sidebar-link:hover::before {
            opacity: 1;
        }

        .layout-sidebar-link.active {
            background: linear-gradient(135deg, var(--primary-light) 0%, rgba(196, 22, 28, 0.05) 100%);
            color: var(--primary-color);
            border-color: var(--primary-color);
            font-weight: 600;
        }

        .layout-sidebar-link.active::before {
            opacity: 1;
        }

        .layout-sidebar-footer {
            padding-top: 2rem;
            border-top: 1px solid var(--border-light);
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

        /* مبدل اللغة في الشريط الجانبي المحسن */
        .layout-sidebar-language {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .layout-language-title {
            font-size: var(--font-size-md);
            font-weight: 600;
            color: var(--secondary-color);
            text-align: center;
            padding: 0.5rem;
            background: var(--primary-light);
            border-radius: var(--radius-md);
            margin-bottom: 0.5rem;
        }

        .layout-language-buttons {
            display: flex;
            gap: 0.75rem;
            justify-content: center;
        }

        .layout-button--language {
            flex: 1;
            padding: 0.875rem 1rem;
            background: var(--background-light);
            border: 2px solid var(--border-color);
            color: var(--text-color);
            font-weight: 500;
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: var(--transition-base);
            text-decoration: none;
            text-align: center;
            min-width: 80px;
            box-shadow: var(--shadow-sm);
        }

        .layout-button--language:hover {
            border-color: var(--primary-color);
            color: var(--primary-color);
            background-color: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .layout-button--language.active {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: var(--white);
            border-color: var(--primary-color);
            box-shadow: 0 4px 12px rgba(196, 22, 28, 0.25);
        }

        /* زر CTA في الشريط الجانبي */
        .layout-sidebar-footer .layout-cta-button {
            width: 100%;
            justify-content: center;
            margin-top: 1rem;
        }

        /* ================ زر العودة للأعلى المحسن ================ */
        .layout-back-to-top {
            position: fixed;
            bottom: 2rem;
            left: 2rem;
            width: 56px;
            height: 56px;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
            color: var(--background-light);
            border-radius: var(--radius-full);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition-base);
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px) scale(0.9);
            box-shadow: 0 4px 20px rgba(196, 22, 28, 0.3);
            z-index: 995;
            border: none;
            font-size: 1.5rem;
            font-weight: bold;
        }

        .layout-back-to-top::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.1);
            border-radius: inherit;
            opacity: 0;
            transition: var(--transition-base);
        }

        .layout-back-to-top.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        .layout-back-to-top:hover {
            transform: translateY(-4px) scale(1.05);
            box-shadow: 0 8px 30px rgba(196, 22, 28, 0.4);
        }

        .layout-back-to-top:hover::before {
            opacity: 1;
        }

        .layout-back-to-top:active {
            transform: translateY(-2px) scale(1.02);
        }

        /* ================ المحتوى الرئيسي المحسن ================ */
        .layout-main-container {
            max-width: var(--container-max);
            margin: 0 auto;
            padding: calc(var(--header-height) + 2rem) var(--container-padding) var(--section-padding);
            width: 100%;
            animation: fadeInUp 0.6s ease-out;
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* التايبوغرافي المحسن */
        .layout-heading {
            font-family: var(--font-display);
            font-weight: 700;
            line-height: 1.2;
            color: var(--secondary-color);
            margin-bottom: 1.5rem;
            position: relative;
        }

        .layout-heading--h1 {
            font-size: var(--font-size-5xl);
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 2rem;
        }

        .layout-heading--h2 {
            font-size: var(--font-size-4xl);
            padding-bottom: 1rem;
        }

        .layout-heading--h2::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 80px;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
            border-radius: 2px;
        }

        .layout-heading--h3 {
            font-size: var(--font-size-3xl);
        }

        .layout-heading--h4 {
            font-size: var(--font-size-2xl);
            color: var(--white);
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            position: relative;
            font-size: var(--font-size-xl);
        }

        .layout-heading--h4::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 60px;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
            border-radius: 2px;
        }

        .layout-heading--h5 {
            font-size: var(--font-size-xl);
        }

        .layout-heading--h6 {
            font-size: var(--font-size-lg);
        }

        .layout-paragraph {
            margin-bottom: 1.5rem;
            font-size: var(--font-size-md);
            line-height: 1.8;
            color: var(--text-secondary);
        }

        .layout-paragraph.lead {
            font-size: var(--font-size-lg);
            color: var(--text-color);
            font-weight: 500;
        }

        .layout-link {
            color: var(--primary-color);
            text-decoration: none;
            transition: var(--transition-base);
            font-weight: 500;
            position: relative;
            display: inline-block;
            padding-bottom: 2px;
        }

        .layout-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 0;
            height: 2px;
            background: var(--primary-color);
            transition: var(--transition-base);
        }

        .layout-link:hover {
            color: var(--primary-dark);
        }

        .layout-link:hover::after {
            width: 100%;
        }

        /* ================ الفوتر المحسن بشكل كبير ================ */
        .layout-footer {
            background: linear-gradient(135deg, var(--secondary-color) 0%, #0f172a 100%);
            color: var(--white);
            padding: 5rem var(--container-padding) 2rem;
            margin-top: auto;
            position: relative;
            width: 100%;
        }

        .footer-title {
            position: relative;
            color: var(--white);
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            font-size: var(--font-size-xl);
        }

        .footer-title span {
            position: relative;
            display: inline-block;
            padding-bottom: 10px;
        }

        .footer-title span::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 100%;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-color), transparent);
            border-radius: 2px;
        }

        .layout-footer__container {
            max-width: var(--container-max);
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 3rem;
            margin-bottom: 3rem;
            position: relative;
            z-index: 1;
        }

        .layout-footer__section {
            animation: fadeInUp 0.6s ease-out;
            animation-delay: calc(var(--i, 0) * 0.1s);
        }

        .layout-footer__section h3 {
            color: var(--white);
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            position: relative;
            font-size: var(--font-size-xl);
        }

        .layout-footer__section h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 60px;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
            border-radius: 2px;
        }

        .layout-footer-text {
            color: rgba(255, 255, 255, 0.85);
            margin-bottom: 1.5rem;
            line-height: 1.8;
            font-size: var(--font-size-md);
        }

        .layout-footer-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .layout-footer-item {
            margin-bottom: 0.875rem;
            transform: translateX(0);
            transition: var(--transition-base);
        }

        .layout-footer-item:hover {
            transform: translateX(-8px);
        }

        .layout-footer-link {
            color: rgba(255, 255, 255, 0.85);
            text-decoration: none;
            transition: var(--transition-base);
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.375rem 0;
            position: relative;
            font-size: var(--font-size-base);
        }


        

        .layout-footer-link::before {
            content: '→';
            opacity: 0;
            transform: translateX(-5px);
            transition: var(--transition-base);
            color: var(--primary-color);
        }

        .layout-footer-link:hover {
            color: var(--primary-color);
            padding-right: 1.5rem;
        }

        .layout-footer-link:hover::before {
            opacity: 1;
            transform: translateX(0);
        }

        .layout-contact-info {
            font-style: normal;
        }

        .layout-contact-item {
            margin-bottom: 1.25rem;
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            color: rgba(255, 255, 255, 0.85);
            line-height: 1.6;
        }

        .layout-contact-icon {
            width: 24px;
            height: 24px;
            flex-shrink: 0;
            background-size: contain;
            background-repeat: no-repeat;
            margin-top: 0.25rem;
            filter: drop-shadow(0 2px 4px rgba(196, 22, 28, 0.3));
        }

        .layout-contact-item a {
            color: var(--primary-color);
            text-decoration: none;
            transition: var(--transition-base);
            font-weight: 500;
        }

        .layout-contact-item a:hover {
            color: white;
            text-decoration: underline;
        }

        .layout-footer__bottom {
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 2rem;
            max-width: var(--container-max);
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1.5rem;
            position: relative;
            z-index: 1;
        }

        .layout-copyright {
            color: rgba(255, 255, 255, 0.7);
            font-size: var(--font-size-sm);
            margin: 0;
        }

        .layout-certificate-link {
           background: rgba(255, 255, 255, 0.08);
           color: white;
            padding: 0.6rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            white-space: nowrap;
            }

        .layout-certificate-link:hover {
            color: var(--primary-color);
            background: rgba(255, 255, 255, 0.15);
            border-color: var(--primary-color);
            transform: translateY(-2px);
        }

        .layout-certificate-text {
            color: rgba(255, 255, 255, 0.9);
            font-weight: 500;
            margin: 0;
            font-size: var(--font-size-sm);
        }

        /* ================ تأثيرات متقدمة ================ */
        .layout-fade-in {
            animation: fadeIn 0.8s ease-out forwards;
        }

        .layout-slide-in {
            animation: slideIn 0.8s ease-out forwards;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        /* تأثيرات hover متقدمة */
        .layout-hover-card {
            transition: var(--transition-base);
            border-radius: var(--radius-lg);
            padding: 1.5rem;
            background: var(--background-light);
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
        }

        .layout-hover-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-lg);
            border-color: var(--primary-light);
        }

        /* تدرج لطيف */
        .layout-gradient-bg {
            background: linear-gradient(135deg, var(--primary-light) 0%, rgba(47, 93, 140, 0.1) 100%);
            border-radius: var(--radius-xl);
            padding: 2rem;
        }

        /* ================ تجاوبية محسنة بشكل كبير ================ */
        @media (max-width: 1200px) {
            :root {
                --container-padding: 1.75rem;
                --section-padding: 5rem;
                --font-size-5xl: 3.25rem;
                --font-size-4xl: 2.75rem;
            }
            
            .layout-nav-list {
                gap: 0.25rem;
            }
            
            .layout-nav-link {
                padding: 0.5rem 1rem;
                font-size: var(--font-size-sm);
            }
        }

        @media (max-width: 992px) {
            :root {
                --header-height: 70px;
                --container-padding: 1.5rem;
                --section-padding: 4rem;
                --font-size-5xl: 2.75rem;
                --font-size-4xl: 2.25rem;
                --font-size-3xl: 2rem;
            }
            
            .layout-header {
                height: var(--header-height);
                padding: 0 1.5rem;
            }
            
            .layout-menu-toggle {
                display: flex;
            }
            
            .layout-nav {
                display: none;
            }
            
            .layout-header__right .layout-cta-button {
                display: none;
            }
            
            .layout-logo-image {
                height: 50px;
            }
            
            .layout-main-container {
                padding-top: calc(var(--header-height) + 1.5rem);
            }
            
            .layout-footer__container {
                grid-template-columns: repeat(2, 1fr);
                gap: 2.5rem;
            }
            
            .layout-footer__section {
                --i: 0;
            }
            
            .layout-footer__section:nth-child(1) { --i: 0; }
            .layout-footer__section:nth-child(2) { --i: 1; }
            .layout-footer__section:nth-child(3) { --i: 2; }
        }

        @media (max-width: 768px) {
            :root {
                --container-padding: 1.25rem;
                --section-padding: 3.5rem;
                --header-height: 65px;
                --font-size-5xl: 2.25rem;
                --font-size-4xl: 1.875rem;
                --font-size-3xl: 1.625rem;
                --font-size-2xl: 1.375rem;
            }
            
            .layout-header {
                padding: 0 1.25rem;
            }
            
            .layout-logo-image {
                height: 45px;
            }
            
            .layout-menu-toggle {
                width: 44px;
                height: 44px;
            }
            
            .layout-sidebar {
                max-width: 320px;
                padding: calc(var(--header-height) + 1.5rem) 1.5rem 1.5rem;
            }
            
            .layout-sidebar-link {
                padding: 1rem 1.25rem;
                font-size: var(--font-size-md);
            }
            
            .layout-footer {
                padding: 4rem 1.25rem 1.5rem;
            }
            
            .layout-footer__container {
                grid-template-columns: 1fr;
                text-align: center;
                gap: 2rem;
            }
            
            .layout-footer__section h3::after {
                right: 50%;
                transform: translateX(50%);
                width: 80px;
            }
            
            .layout-footer-item:hover {
                transform: translateX(-4px);
            }
            
            .layout-contact-item {
                justify-content: center;
                text-align: center;
                flex-direction: column;
                gap: 0.5rem;
            }
            
            .layout-footer__bottom {
                flex-direction: column;
                text-align: center;
                gap: 1.25rem;
            }
            
            .layout-back-to-top {
                left: 1.25rem;
                bottom: 1.25rem;
                width: 48px;
                height: 48px;
                font-size: 1.25rem;
            }
        }

        @media (max-width: 576px) {
            :root {
                --container-padding: 1rem;
                --section-padding: 3rem;
                --header-height: 60px;
                --font-size-5xl: 1.875rem;
                --font-size-4xl: 1.625rem;
                --font-size-3xl: 1.375rem;
            }
            
            .layout-header {
                padding: 0 1rem;
            }
            
            .layout-logo-image {
                height: 40px;
            }
            
            .layout-menu-toggle {
                width: 40px;
                height: 40px;
            }
            
            .layout-menu-toggle span {
                width: 18px;
                height: 2px;
            }
            
            .layout-menu-toggle span:nth-child(2) {
                width: 14px;
            }
            
            .layout-sidebar {
                max-width: 280px;
                padding: calc(var(--header-height) + 1rem) 1rem 1rem;
            }
            
            .layout-sidebar-logo img {
                height: 50px;
            }
            
            .layout-sidebar-link {
                padding: 0.875rem 1rem;
                font-size: var(--font-size-base);
            }
            
            .layout-button--language {
                min-width: 70px;
                padding: 0.75rem 0.5rem;
                font-size: var(--font-size-sm);
            }
            
            .layout-main-container {
                padding-top: calc(var(--header-height) + 1rem);
            }
            
            .layout-paragraph {
                font-size: var(--font-size-base);
            }
            
            .layout-back-to-top {
                left: 1rem;
                bottom: 1rem;
                width: 44px;
                height: 44px;
                font-size: 1.125rem;
            }
        }

        @media (max-width: 400px) {
            .layout-sidebar {
                max-width: 100%;
                border-radius: 0;
            }
            
            .layout-language-buttons {
                flex-direction: column;
            }
            
            .layout-button--language {
                width: 100%;
            }
        }

        /* ================ تحسينات للغة الإنجليزية ================ */
        [dir="ltr"] .layout-body {
            text-align: left;
        }
        
        [dir="ltr"] .layout-nav-link::before,
        [dir="ltr"] .layout-nav-link.active::before,
        [dir="ltr"] .layout-footer__section h3::after,
        [dir="ltr"] .layout-footer-link::before,
        [dir="ltr"] .layout-heading--h2::after {
            right: auto;
            left: 0;
        }
        
        [dir="ltr"] .layout-footer-item:hover {
            transform: translateX(8px);
        }
        
        [dir="ltr"] .layout-footer-link:hover {
            padding-right: 0;
            padding-left: 1.5rem;
        }
        
        [dir="ltr"] .layout-footer-link::before {
            content: '←';
            transform: translateX(5px);
        }
        
        [dir="ltr"] .layout-footer-link:hover::before {
            transform: translateX(0);
        }
        
        [dir="ltr"] .layout-sidebar {
            right: auto;
            left: -100%;
        }
        
        [dir="ltr"] .layout-body.menu-open .layout-sidebar {
            right: auto;
            left: 0;
        }
        
        [dir="ltr"] .layout-sidebar-link::before {
            right: auto;
            left: 0;
            border-radius: var(--radius-sm) 0 0 var(--radius-sm);
        }
        
        [dir="ltr"] .layout-sidebar-link:hover {
            transform: translateX(8px);
        }
        
        [dir="ltr"] .layout-back-to-top {
            left: auto;
            right: 2rem;
        }
        
        [dir="ltr"] .layout-footer__section h3::after {
            right: auto;
            left: 50%;
            transform: translateX(-50%);
        }

        [dir="ltr"] .layout-heading--h2::after {
            background: linear-gradient(90deg, transparent 0%, var(--primary-color) 100%);
        }

        /* ================ تحسينات الوصول ================ */
        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
            }
            
            .layout-fade-in,
            .layout-slide-in {
                animation: none;
            }
        }

        /* تحسين التركيز للواجهات */
        .layout-nav-link:focus,
        .layout-cta-button:focus,
        .layout-menu-toggle:focus,
        .layout-sidebar-link:focus,
        .layout-button--language:focus,
        .layout-back-to-top:focus,
        .layout-footer-link:focus,
        .layout-certificate-link:focus {
            outline: 3px solid var(--primary-color);
            outline-offset: 2px;
            box-shadow: 0 0 0 4px rgba(196, 22, 28, 0.1);
        }

        .layout-nav-link:focus-visible,
        .layout-cta-button:focus-visible {
            outline: 3px solid var(--primary-color);
            outline-offset: 2px;
        }

        /* تحسين التباين */
        @media (prefers-contrast: high) {
            :root {
                --primary-color: #B3151B;
                --primary-dark: #8C1116;
                --text-color: #000000;
                --text-secondary: #333333;
            }
            
            .layout-nav-link.active {
                outline: 2px solid var(--primary-color);
            }
        }

        /* تحسين الطباعة */
        @media print {
            .layout-header,
            .layout-sidebar,
            .layout-back-to-top,
            .layout-menu-toggle,
            .layout-footer::before,
            .layout-footer::after {
                display: none !important;
            }
            
            .layout-body {
                background: white;
                color: black;
                font-size: 12pt;
            }
            
            .layout-main-container {
                padding: 0;
                margin: 0;
            }
            
            .layout-footer {
                background: white !important;
                color: black;
                border-top: 1px solid #ddd;
                padding: 2rem 0 1rem;
            }

                .cr-group {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 0.75rem;
    align-items: center;
}
            
            .layout-footer-text,
            .layout-footer-link,
            .layout-contact-item,
            .layout-copyright,
            .layout-certificate-text {
                color: black !important;
            }
            
            .layout-footer-link:hover::before {
                display: none;
            }
            
            a {
                color: black !important;
                text-decoration: underline;
            }
            
            .layout-heading--h1 {
                -webkit-text-fill-color: black;
                background: none;
            }
        }

        /* تحسين أداء اللمس */
        @media (hover: none) and (pointer: coarse) {
            .layout-nav-link:hover,
            .layout-footer-link:hover,
            .layout-cta-button:hover,
            .layout-button--language:hover,
            .layout-sidebar-link:hover,
            .layout-certificate-link:hover,
            .layout-back-to-top:hover {
                transform: none;
            }
            
            .layout-menu-toggle:hover {
                background-color: var(--background-light);
            }
            
            .layout-nav-link.active:hover {
                transform: translateY(-2px);
            }
            
            /* زيادة حجم مناطق النقر للجوال */
            .layout-nav-link,
            .layout-sidebar-link,
            .layout-button--language,
            .layout-footer-link {
                min-height: 44px;
                min-width: 44px;
            }
            
            .layout-menu-toggle {
                min-height: 44px;
                min-width: 44px;
            }
        }

        /* تحسينات الأداء */
        .layout-logo-image,
        .layout-sidebar-logo img {
            content-visibility: auto;
        }

        /* تأثيرات scroll reveal */
        .layout-scroll-reveal {
            opacity: 0;
            transform: translateY(30px);
            transition: opacity 0.6s ease, transform 0.6s ease;
        }

        .layout-scroll-reveal.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* تأثيرات إضافية */
        .layout-divider {
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--border-color), transparent);
            margin: 2rem 0;
        }

        .layout-badge {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            background: var(--primary-light);
            color: var(--primary-color);
            border-radius: var(--radius-full);
            font-size: var(--font-size-xs);
            font-weight: 600;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        /* تأثيرات شبه ثلاثية الأبعاد */
        .layout-card-3d {
            transform-style: preserve-3d;
            perspective: 1000px;
        }

        .layout-card-3d:hover {
            transform: rotateY(5deg) rotateX(5deg);
        }

        /* توهج خفيف */
        .layout-glow {
            position: relative;
        }

        .layout-glow::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 50% 0%, rgba(196, 22, 28, 0.1), transparent 70%);
            pointer-events: none;
            border-radius: inherit;
        }

        /* تأثير موجات */
        .layout-wave {
            position: relative;
            overflow: hidden;
        }

        .layout-wave::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            animation: wave 2s linear infinite;
        }

        @keyframes wave {
            0% { left: -100%; }
            100% { left: 100%; }
        }

        /* تأثيرات النص */
        .layout-text-gradient {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        /* تأثيرات الظل المتحرك */
        .layout-moving-shadow {
            position: relative;
        }

        .layout-moving-shadow::after {
            content: '';
            position: absolute;
            bottom: -10px;
            right: 10%;
            width: 80%;
            height: 20px;
            background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, transparent 70%);
            filter: blur(10px);
            transition: var(--transition-base);
            z-index: -1;
        }

        .layout-moving-shadow:hover::after {
            transform: scale(1.2);
            opacity: 0.8;
        }

        /* ================ تحسينات متقدمة للتفاعل ================ */
        .layout-ripple {
            position: relative;
            overflow: hidden;
        }

        .layout-ripple::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 5px;
            height: 5px;
            background: rgba(255, 255, 255, 0.5);
            opacity: 0;
            border-radius: 100%;
            transform: scale(1, 1) translate(-50%);
            transform-origin: 50% 50%;
        }

        .layout-ripple:focus:not(:active)::after {
            animation: ripple 1s ease-out;
        }

        @keyframes ripple {
            0% {
                transform: scale(0, 0);
                opacity: 0.5;
            }
            100% {
                transform: scale(40, 40);
                opacity: 0;
            }
        }

        /* تحسينات للشاشات الكبيرة */
        @media (min-width: 1600px) {
            :root {
                --container-max: 1600px;
                --section-padding: 8rem;
            }
            
            .layout-header__container {
                max-width: var(--container-max);
            }
            
            .layout-footer__container,
            .layout-footer__bottom {
                max-width: var(--container-max);
            }
        }

        /* تأثيرات تحميل الصفحة */
        .layout-loading {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }

        /* تأثيرات الشريط التقدمي */
        .layout-progress-bar {
            position: fixed;
            top: 0;
            right: 0;
            width: 0%;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
            z-index: 1001;
            transition: width 0.3s ease;
        }

        /* تأثيرات الانعكاس */
        .layout-reflection {
            position: relative;
        }

        .layout-reflection::after {
            content: '';
            position: absolute;
            bottom: -10px;
            right: 0;
            width: 100%;
            height: 20px;
            background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
            transform: scaleY(-1);
            opacity: 0.3;
            filter: blur(2px);
        }


        /* ===== تحسين قسم التواصل للجوال ===== */
@media (max-width: 768px) {

    .layout-contact-info {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .layout-contact-item {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        background: rgba(255,255,255,0.06);
        padding: 0.9rem 1rem;
        border-radius: 12px;
        text-align: right;
        gap: 0.75rem;
    }

    .layout-contact-icon {
        width: 22px;
        height: 22px;
        margin-top: 0;
    }

    .layout-contact-item a {
        font-size: 0.95rem;
        word-break: break-word;
    }

    @media (max-width: 768px) {
    .cr-group {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        justify-items: center;
    }
}

}

