 body {
            font-family: 'Cairo', sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f9f9f9;
            /* إضافة مساحة علوية لتعويض الهيدر الثابت حتى لا يغطي المحتوى */
            padding-top: 90px;
        }

        /* HEADER */
        .ff-header {
            background: linear-gradient(90deg, #2f7d32, #4caf50);
            padding: 10px 15px; /* حشوة ابتدائية */
            color: #fff;
            box-shadow: 0 3px 10px #0002;
            
            /* التثبيت */
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            width: 100%;
            z-index: 1000;
            transition: all 0.3s ease; /* تنقل سلس عند تغيير الحجم */
        }

        /* تنسيق الهيدر عند التمرير (Scrolled State) */
        .ff-header.scrolled {
            padding: 5px 15px; /* تقليل الحشوة */
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
            background: linear-gradient(90deg, #266428, #3d8b40); /* لون أغمق قليلاً */
        }

        .ff-header-inner {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .ff-logo img {
            height: 65px; /* حجم كبير في البداية */
            background: white; 
            border-radius: 50%;
            transition: height 0.3s ease; /* تنقل سلس للحجم */
        }

        /* تصغير اللوجو عند التمرير */
        .ff-header.scrolled .ff-logo img {
            height: 40px; /* حجم صغير */
        }

        .ff-title h1 {
            font-size: 1.4rem;
            margin: 0;
            transition: font-size 0.3s ease;
        }
        
        .ff-header.scrolled .ff-title h1 {
            font-size: 1.1rem; /* تصغير العنوان أيضاً */
        }

        .ff-title p {
            margin: 0;
            font-size: .85rem;
            opacity: .9;
            transition: opacity 0.3s ease;
        }
        
        /* إخفاء الوصف الفرعي عند التمرير لتوفير المساحة */
        .ff-header.scrolled .ff-title p {
            opacity: 0;
            height: 0;
            overflow: hidden;
        }

        /* Search Bar */
        .ff-search {
            margin-right: auto;
            display: flex;
            background: #fff;
            border-radius: 30px;
            overflow: hidden;
            height: 40px;
            border: 1px solid #ddd;
            transition: height 0.3s ease;
        }
        
        .ff-header.scrolled .ff-search {
            height: 34px; /* تصغير البحث قليلاً */
        }

        .ff-search input {
            border: none;
            padding: 10px 15px;
            flex: 1;
            font-size: .9rem;
            outline: none;
        }

        .ff-search button {
            background: #1c7c3c;
            color: #fff;
            padding: 0 15px;
            border: none;
            cursor: pointer;
        }

        /* Flag */
        .ff-flag img {
            width: 34px;
            border-radius: 4px;
        }

        /* Menu trigger (mobile only) */
        .ff-menu-trigger {
            display: none;
            background: none;
            border: none;
            font-size: 1.8rem;
            color: #fff;
            cursor: pointer;
        }

        /* Desktop navbar */
        .ff-navbar {
            background: #fff;
            padding: 8px 10px;
            box-shadow: 0 2px 5px #0001;
            display: block;
            /* يمكن جعل الناف بار ثابتاً أيضاً أسفل الهيدر إذا رغبت، لكن حالياً يختفي عند التمرير */
        }

        .ff-navbar ul {
            display: flex;
            gap: 18px;
            list-style: none;
            margin: 0;
            padding: 0;
            justify-content: center;
        }

        .ff-navbar a {
            color: #145c2c;
            font-weight: 600;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.95rem;
            transition: color 0.3s;
        }
        
        .ff-navbar a:hover {
            color: #4caf50;
        }

        /* SIDEBAR (mobile) */
        .ff-sidebar {
            position: fixed;
            top: 0;
            right: 0;
            width: 280px; 
            max-width: 80%;
            height: 100vh;
            background: #fff;
            box-shadow: -3px 0 15px #0003;
            transform: translateX(100%); 
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            padding: 20px;
            
            /* رفع الـ Z-index ليكون فوق الهيدر الثابت */
            z-index: 2000; 
            
            display: flex;
            flex-direction: column;
            
            /* التمرير الداخلي: أهم نقطة لضمان ظهور القائمة كاملة */
            overflow-y: auto; 
        }

        /* تصحيح: استخدام active لتطابق الـ JS */
        .ff-sidebar.active {
            transform: translateX(0%);
        }

        .ff-sidebar-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #eee;
            padding-bottom: 15px;
            margin-bottom: 15px;
            flex-shrink: 0; /* منع انكماش الرأس */
        }
        
        .ff-sidebar-header strong {
            font-size: 1.2rem;
            color: #1c7c3c;
        }

        .ff-sidebar-header button {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: #666;
            cursor: pointer;
        }

        .ff-sidebar-nav ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .ff-sidebar-nav li {
            border-bottom: 1px solid #f5f5f5;
        }

        .ff-sidebar-nav a {
            color: #333;
            font-size: 1rem;
            font-weight: 600;
            text-decoration: none;
            display: block;
            padding: 10px 0; /* تقليل الحشو قليلاً لتقصير القائمة */
            transition: color 0.2s;
        }
        
        .ff-sidebar-nav a:hover {
            color: #1c7c3c;
            padding-right: 5px; 
        }

        /* OVERLAY */
        .ff-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1999; /* تحت السايدبار وفوق الهيدر */
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .ff-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        /* Mobile responsive */
        @media (max-width: 900px) {
            .ff-navbar {
                display: none;
            }
            .ff-menu-trigger {
                display: block;
            }
            .ff-search {
                display: none; 
            }
            /* تقليل مساحة الهيدر في الموبايل */
            body {
                padding-top: 70px;
            }
            .ff-header {
                padding: 8px 15px;
            }
            .ff-logo img {
                height: 50px;
            }
        }