:root {
            --bg-color: #f9f9f9; 
            --text-color: #1a1a1a; 
            --primary: #4a148c; 
            --accent: #ffb300; 
            --white: #ffffff;
            --card-shadow: rgba(0,0,0,0.05); 
            --sidebar-bg: #ffffff; 
            --border-color: #eee;
            --btn-bg: #f4f4f4; 
            --btn-text: #4a148c;
        }
        [data-theme="dark"] {
            --bg-color: #121212; 
            --text-color: #e0e0e0; 
            --primary: #9c67e8; 
            --accent: #ffca28; 
            --white: #1e1e1e;
            --card-shadow: rgba(0,0,0,0.5); 
            --sidebar-bg: #1a1a1a; 
            --border-color: #333;
            --btn-bg: #252525;
            --btn-text: #e0e0e0;
        }
        * { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
        
img, a, div { -webkit-user-drag: none; user-drag: none; }

        body { font-family: 'Amiri', serif; background-color: var(--bg-color); color: var(--text-color); line-height: 2.2; font-size: 19px; overflow-x: hidden; cursor: default; }
        
        h2, h3, h4, .btn { font-family: 'Cairo', sans-serif; }

        /* كلاسات الحركة المستمرة */
        .reveal { opacity: 0; transform: translateY(50px); transition: all 1s ease-out; }
        .reveal.active { opacity: 1; transform: translateY(0); }

        header { background-color: var(--white); padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 15px var(--card-shadow); position: sticky; top: 0; z-index: 1000; border-bottom: 3px solid var(--primary); height: 80px; }
        .logo { font-family: 'Reem Kufi', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 10px; }
        .logo i { color: var(--accent); }
        
        .header-icons { display: flex; align-items: center; gap: 15px; }
        
        .icon-btn, .menu-btn { 
            font-size: 1.3rem; color: var(--btn-text); cursor: pointer; padding: 10px 14px; border-radius: 8px; background: var(--btn-bg); transition: 0.3s; display: flex; align-items: center; justify-content: center; border: 1px solid transparent;
        }
        [data-theme="dark"] .icon-btn, [data-theme="dark"] .menu-btn { border: 1px solid #333; }
        .icon-btn:hover, .menu-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

        /* --- نافذة البحث (حركة محسنة) --- */
        .search-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(8px);
            z-index: 5000;
            display: flex; flex-direction: column; align-items: center; padding-top: 120px;
            
            opacity: 0; 
            visibility: hidden;
            transform: scale(0.95); 
            transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
        }
        
        .search-overlay.active { 
            opacity: 1; 
            visibility: visible; 
            transform: scale(1); 
        }
        
        .search-box { width: 90%; max-width: 650px; position: relative; }
        .search-input-large {
            width: 100%; padding: 15px 10px; font-size: 1.6rem;
            background: transparent; border: none; border-bottom: 2px solid var(--accent);
            color: #fff; font-family: 'Amiri', serif; text-align: center;
            outline: none;
        }
        .search-input-large::placeholder { color: rgba(255,255,255,0.4); font-family: 'Amiri', serif; font-style: italic; }
        
        .close-search {
            position: absolute; top: 30px; right: 30px;
            font-size: 2.5rem; color: #fff; cursor: pointer; transition: 0.3s;
        }
        .close-search:hover { color: var(--accent); transform: rotate(90deg); }

        .search-results-large {
            width: 90%; max-width: 650px; margin-top: 30px;
            max-height: 55vh; overflow-y: auto;
        }
        .result-item {
            background: rgba(255,255,255,0.08); padding: 18px; margin-bottom: 12px;
            border-radius: 8px; color: #fff; text-decoration: none; display: block;
            font-family: 'Cairo', sans-serif; transition: 0.3s; border-right: 4px solid transparent;
            text-align: right;
        }
        .result-item:hover { background: rgba(255,255,255,0.15); border-right-color: var(--accent); padding-right: 28px; }
        .result-item small { display: block; color: var(--accent); font-size: 0.85rem; margin-top: 6px; opacity: 0.8; }

        /* --- باقي التنسيقات --- */
        .sidebar { height: 100%; width: 0; position: fixed; z-index: 3000; top: 0; right: 0; background-color: var(--sidebar-bg); overflow-x: hidden; transition: 0.4s; box-shadow: -2px 0 15px rgba(0,0,0,0.2); padding-top: 60px; border-left: 3px solid var(--accent); display: flex; flex-direction: column; }
        .sidebar a { font-family: 'Cairo', sans-serif; padding: 10px 25px; text-decoration: none; font-size: 1.15rem; color: var(--text-color); display: flex; align-items: center; transition: 0.3s; border-bottom: 1px solid var(--border-color); text-align: right; }
        .sidebar a i { width: 30px; text-align: center; margin-left: 10px; font-size: 1.1rem; }
        .sidebar a:hover { background-color: var(--primary); color: #fff; padding-right: 35px; }
        .sidebar .close-btn { position: absolute; top: 15px; left: 20px; font-size: 30px; color: var(--primary); cursor: pointer; }
        .sidebar-header { font-family: 'Cairo', sans-serif; text-align: center; margin-bottom: 20px; color: var(--primary); font-weight: bold; font-size: 1.5rem; border-bottom: 2px solid var(--accent); padding-bottom: 15px; width: 80%; margin: 0 auto 20px auto; }
        .theme-switch-wrapper { margin-top: auto; padding: 20px; border-top: 1px solid var(--border-color); text-align: center; }
        .theme-btn { background: transparent; border: 2px solid var(--primary); color: var(--text-color); padding: 10px 20px; border-radius: 50px; cursor: pointer; font-family: 'Cairo', sans-serif; font-weight: bold; width: 100%; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px; }
        @media (hover: hover) { .theme-btn:hover { background: var(--primary); color: #fff; } }
        .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 2500; opacity: 0; visibility: hidden; transition: 0.3s; }
        .overlay.active { opacity: 1; visibility: visible; }

        .hero { padding: 4rem 1rem 5rem; text-align: center; background: linear-gradient(180deg, var(--white) 0%, var(--bg-color) 100%); }
        .hero h4 { font-size: 1.4rem; font-weight: 500; color: var(--text-color); opacity: 0.8; margin-bottom: 0.5rem; letter-spacing: 0.5px; }
        .hero h1 { font-family: 'Reem Kufi', sans-serif; font-size: 4rem; font-weight: 700; color: var(--primary); margin: 0; line-height: 1.2; text-shadow: 2px 2px 0px rgba(0,0,0,0.05); }
        .author-photo-container { display: flex; justify-content: center; margin: 30px 0; }
        .author-photo { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 4px solid var(--accent); padding: 4px; background-color: var(--white); box-shadow: 0 8px 20px rgba(74, 20, 140, 0.2); transition: transform 0.3s; }
        .author-photo:hover { transform: scale(1.05); }
        .bio-text { max-width: 800px; margin: 0 auto 2rem; font-size: 1.15rem; color: var(--text-color); padding: 3rem 2rem; background: var(--white); border-bottom: 5px solid var(--accent); box-shadow: 0 5px 30px var(--card-shadow); border-radius: 15px; text-align: center; position: relative; line-height: 2.2; }
        .quote-icon { font-size: 2.5rem; color: var(--primary); opacity: 0.3; display: block; margin: 0 auto 15px auto; }
        .hero-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 25px; flex-wrap: wrap; }
        .btn { display: inline-block; padding: 12px 30px; background-color: var(--primary); color: #fff; text-decoration: none; border-radius: 50px; font-weight: bold; border: 2px solid var(--primary); transition: 0.3s; font-size: 1.1rem; min-width: 140px; }
        .btn:hover { background: transparent; color: var(--primary); transform: translateY(-3px); }
        .btn-outline { background: transparent; color: var(--primary); }
        .btn-outline:hover { background: var(--primary); color: #fff; }

        .section-title { font-family: 'Reem Kufi', sans-serif; text-align: center; font-size: 2.5rem; margin: 4rem 0 2rem; color: var(--primary); position: relative; }
        .section-title::after { content: ''; display: block; width: 60px; height: 3px; background-color: var(--accent); margin: 10px auto 0; }
        .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
        .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
        
        .service-card { 
            background: var(--white); padding: 2rem; border-radius: 12px; border: 1px solid var(--border-color); text-align: right; box-shadow: 0 5px 15px var(--card-shadow); overflow: hidden; 
            transition: transform 0.4s ease, box-shadow 0.4s ease; 
        }
        .service-card:hover { transform: translateY(-7px) scale(1.01); border-color: var(--primary); box-shadow: 0 15px 30px rgba(74, 20, 140, 0.15); }
        .service-card::before { content: ''; position: absolute; top: 0; right: 0; width: 4px; height: 100%; background-color: var(--primary); }
        .service-card h3 { margin-bottom: 1rem; color: var(--text-color); font-size: 1.4rem; }
        .service-card p { color: var(--text-color); opacity: 0.8; font-size: 1.1rem; }

        .contact-section { background: #1a1a1a; color: white; padding: 4rem 1rem; margin-top: 5rem; text-align: center; }
        .contact-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
        .social-btn { width: 60px; height: 60px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: white; font-size: 1.5rem; text-decoration: none; transition: 0.3s; border: 1px solid rgba(255,255,255,0.2); }
        .social-btn:hover { transform: scale(1.1); }
        footer { background: #000; color: #777; text-align: center; padding: 1.5rem; font-size: 0.9rem; }
        @media (max-width: 600px) { .hero h1 { font-size: 3rem; } .hero h4 { font-size: 1.2rem; } .hero-buttons { flex-wrap: nowrap; } .btn { padding: 10px 15px; font-size: 1rem; min-width: auto; flex: 1; } }
