/* =========================================================
           1. المتغيرات والأساسيات (Modern Corporate)
           ========================================================= */
        :root {
            --primary: #0f172a;       /* كحلي غامق */
            --accent: #2563eb;        /* تباين واضح للنص الأبيض */
            --accent-hover: #2563eb;
            --gold: #d97706;          /* ذهبي */
            --bg-body: #f8fafc;
            --bg-card: #ffffff;
            --text-main: #1e293b;
            --text-muted: #64748b;
            
            --radius-lg: 24px;
            --radius-md: 16px;
            --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.08);
            --shadow-hover: 0 25px 50px -12px rgba(59, 130, 246, 0.2);
            --glass: rgba(255, 255, 255, 0.9);
            --glass-border: 1px solid rgba(255, 255, 255, 0.5);
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        body {
            background: var(--bg-body);
            color: var(--text-main);
            font-family: 'Cairo', sans-serif;
            margin: 0;
            overflow-x: hidden;
        }

        /* =========================================================
           2. الهيرو (Modern Hero)
           ========================================================= */
        .modern-hero {
            position: relative;
            height: 85vh;
            min-height: 600px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border-bottom-left-radius: 40px;
            border-bottom-right-radius: 40px;
            margin-bottom: 2rem; /* مسافة بسيطة قبل القسم التالي */
        }

        .hero-bg-img {
            position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1;
            animation: slowZoom 20s infinite alternate;
        }
        @keyframes slowZoom { from { transform: scale(1); } to { transform: scale(1.1); } }

        .hero-overlay {
            position: absolute; inset: 0; z-index: 2;
            background: linear-gradient(180deg, rgba(15,23,42,0.4) 0%, rgba(15,23,42,0.8) 100%);
        }

        .hero-content {
            position: relative; z-index: 3; text-align: center; max-width: 800px; padding: 20px; color: white; margin-top: -60px;
        }

        .hero-pill {
            display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2); padding: 8px 20px; border-radius: 50px; font-size: 0.9rem; backdrop-filter: blur(5px); margin-bottom: 20px; animation: fadeInDown 1s ease;
        }

        .hero-title { font-size: 3.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 20px; text-shadow: 0 4px 20px rgba(0,0,0,0.3); animation: fadeInUp 1s ease 0.2s both; }
        .hero-desc { font-size: 1.2rem; color: rgba(255, 255, 255, 0.9); margin-bottom: 30px; line-height: 1.6; animation: fadeInUp 1s ease 0.4s both; }
        .hero-btns { display: flex; gap: 15px; justify-content: center; animation: fadeInUp 1s ease 0.6s both; }

        /* General Button Style (used for 'View All') */
        .btn-search { background: var(--primary); color: white; border: none; padding: 14px 28px; border-radius: 12px; font-weight: 700; cursor: pointer; transition: all 0.3s; height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; }
        .btn-search:hover { background: var(--accent); transform: translateY(-2px); }

        /* =========================================================
           3. ستايل كارد العقار
           ========================================================= */
        .property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }

        .property-card {
            background: var(--bg-card);
            border-radius: var(--radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-soft);
            transition: var(--transition);
            display: flex;
            flex-direction: column;
            position: relative;
            border: 1px solid rgba(0,0,0,0.05);
            font-family: 'Cairo', sans-serif;
        }
        .property-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

        .card-media-wrapper { position: relative; width: 100%; height: 260px; overflow: hidden; background: #e2e8f0; }
        .main-property-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
        .property-card:hover .main-property-img { transform: scale(1.05); }

        .thumbnails-container { position: absolute; bottom: 12px; left: 12px; right: 12px; display: flex; gap: 8px; padding: 8px; background: rgba(255, 255, 255, 0.25); backdrop-filter: blur(8px); border-radius: 16px; overflow-x: auto; scrollbar-width: none; z-index: 5; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.3); }
        .thumbnails-container::-webkit-scrollbar { display: none; }
        .property-card:hover .thumbnails-container { opacity: 1; transform: translateY(0); }
        .thumb-item { width: 45px; height: 45px; border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid rgba(255,255,255,0.6); flex-shrink: 0; transition: transform 0.2s; }
        .thumb-item img { width: 100%; height: 100%; object-fit: cover; }
        .thumb-item:hover, .thumb-item.active { border-color: var(--accent); transform: scale(1.15); z-index: 2; }
        .thumb-more { width: 45px; height: 45px; border-radius: 10px; background: rgba(0,0,0,0.6); color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.9rem; flex-shrink: 0; }

        .card-badges { position: absolute; top: 15px; right: 15px; display: flex; gap: 8px; z-index: 5; }
        .badge { padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: white; backdrop-filter: blur(4px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        .badge-sale { background: rgba(16, 185, 129, 0.95); }
        .badge-rent { background: rgba(245, 158, 11, 0.95); }
        .sold-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.3); z-index: 6; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(1px); pointer-events: none; }
        .sold-stamp { border: 4px solid #ef4444; color: #ef4444; font-size: 1.8rem; font-weight: 900; padding: 0.5rem 2rem; text-transform: uppercase; transform: rotate(-15deg); border-radius: 12px; background: rgba(255,255,255,0.9); box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3); }

        .card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }
        .price-row { display: flex; align-items: baseline; gap: 5px; margin-bottom: 0.5rem; }
        .price-val { font-size: 1.5rem; font-weight: 900; color: var(--primary); letter-spacing: -0.5px; }
        .price-curr { font-size: 0.9rem; color: var(--accent); font-weight: 700; }
        .price-period { font-size: 0.85rem; color: var(--text-muted); background: #f1f5f9; padding: 2px 8px; border-radius: 10px; }
        
        .card-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 0.5rem; line-height: 1.4; }
        .card-title a { color: var(--text-main); text-decoration: none; transition: color 0.2s; }
        .card-title a:hover { color: var(--accent); }
        
        .location-row { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
        .location-row i { color: var(--accent); }
        
        .specs-grid { display: flex; justify-content: space-around; background: #f8fafc; padding: 12px; border-radius: 20px; margin-bottom: 1.5rem; border: 1px solid #f1f5f9; }
        .spec-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
        .spec-icon-wrapper { width: 36px; height: 36px; border-radius: 50%; background: rgba(59, 130, 246, 0.1); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 5px; transition: transform 0.3s; }
        .property-card:hover .spec-icon-wrapper { background: var(--accent); color: white; transform: rotate(10deg); }
        .spec-item strong { font-size: 1rem; color: var(--primary); font-weight: 800; }
        .spec-item span.label { font-size: 0.75rem; color: var(--text-muted); }
        
        .card-footer { margin-top: auto; display: flex; gap: 10px; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
        .btn-action { flex: 1; padding: 0.8rem; border-radius: 14px; border: none; font-weight: 700; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--transition); text-decoration: none; }
        .btn-view { background: var(--primary); color: white; }
        .btn-view:hover { background: #334155; transform: translateY(-2px); }
        .btn-fav { width: 45px; flex: none; background: white; color: #ef4444; border: 1px solid #fee2e2; }
        .btn-fav:hover { background: #fee2e2; transform: scale(1.05); }
        .btn-fav.active { background: #ef4444; color: white; border-color: #ef4444; }

        /* =========================================================
           4. باقي الأقسام
           ========================================================= */
        .section { padding: 80px 0; }
        .container { width: min(1200px, 90%); margin: 0 auto; }
        .section-head { text-align: center; margin-bottom: 50px; max-width: 700px; margin-left: auto; margin-right: auto; }
        .section-badge { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; background: rgba(59, 130, 246, 0.1); padding: 6px 14px; border-radius: 20px; display: inline-block; margin-bottom: 15px; }
        .section-title { font-size: 2.2rem; font-weight: 800; color: var(--primary); margin: 0 0 15px; }
        .section-desc { color: var(--text-muted); font-size: 1.1rem; line-height: 1.6; }

        /* Services */
        .services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
        .service-box { background: white; border-radius: var(--radius-lg); padding: 35px; border: 1px solid #f1f5f9; transition: all 0.4s; position: relative; overflow: hidden; }
        .service-box::before { content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100px; background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), transparent); border-radius: 0 0 0 100%; transition: 0.4s; }
        .service-box:hover { transform: translateY(-10px); box-shadow: var(--shadow-soft); border-color: rgba(59, 130, 246, 0.2); }
        .service-icon { width: 60px; height: 60px; background: #eff6ff; color: var(--accent); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 20px; }
        .service-box h3 { font-size: 1.4rem; font-weight: 700; margin: 0 0 12px; color: var(--primary); }

        /* Marketing Banner */
        .marketing-section { background: linear-gradient(120deg, var(--primary) 0%, #1e293b 100%); border-radius: 30px; padding: 60px; color: white; position: relative; overflow: hidden; margin: 80px 0; box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25); }
        .marketing-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
        .marketing-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 15px; }
        .marketing-btn { background: white; color: var(--primary); padding: 16px 32px; border-radius: 14px; font-weight: 700; text-decoration: none; margin-top: 30px; display: inline-flex; align-items: center; gap: 10px; transition: 0.3s; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
        .marketing-btn:hover { transform: scale(1.05); box-shadow: 0 15px 30px rgba(0,0,0,0.2); }

        /* Floating CTA */
        .floating-action { position: fixed; bottom: 30px; right: 30px; z-index: 999; display: flex; flex-direction: column; gap: 15px; }
        .btn-float { width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: white; text-decoration: none; box-shadow: 0 10px 25px rgba(0,0,0,0.2); transition: 0.3s; position: relative; }
        .btn-float.whatsapp { background: #25d366; }
        .btn-float.call { background: var(--primary); }
        
        .btn-float:hover { transform: translateY(-5px); }
        .btn-float .tooltip { position: absolute; right: 70px; background: #1e293b; color: white; padding: 6px 12px; border-radius: 8px; font-size: 0.8rem; white-space: nowrap; opacity: 0; visibility: hidden; transition: 0.3s; }
        .btn-float:hover .tooltip { opacity: 1; visibility: visible; right: 65px; }

        @keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

        @media (max-width: 992px) { .search-form { grid-template-columns: 1fr 1fr; } .btn-search { grid-column: span 2; } }
        @media (max-width: 768px) { .hero-title { font-size: 2.2rem; } .search-container { padding: 20px; } .search-form { grid-template-columns: 1fr; gap: 12px; } .btn-search { grid-column: span 1; } .marketing-section { padding: 40px 20px; } .marketing-title { font-size: 1.8rem; } .listing-grid { grid-template-columns: 1fr; } }

        /* =========================================================
           إضافة: تنسيقات التنبيهات (Toast Notifications)
           ========================================================= */
        .toast {
            position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
            padding: 16px 24px; border-radius: 10px; background-color: #ffffff; color: #111827;
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16); z-index: 100000;
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); opacity: 0;
            min-width: 280px; text-align: center; font-weight: 500; font-family: 'Cairo', sans-serif;
        }
        .toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
        .toast-success { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: #ffffff; }
        .toast-error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: #ffffff; }
        /* =========================================================
           5. قسم آراء العملاء (Testimonials)
           ========================================================= */
        .testimonials-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-top: 40px;
        }

        .review-card {
            background: white;
            padding: 30px;
            border-radius: var(--radius-lg);
            border: 1px solid #f1f5f9;
            box-shadow: var(--shadow-soft);
            transition: var(--transition);
            position: relative;
            display: flex;
            flex-direction: column;
        }

        .review-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
            border-color: rgba(59, 130, 246, 0.3);
        }

        /* أيقونة اقتباس خلفية جمالية */
        .quote-bg-icon {
            position: absolute;
            top: 20px;
            left: 20px;
            font-size: 4rem;
            color: rgba(241, 245, 249, 0.8);
            font-family: serif;
            line-height: 1;
            z-index: 0;
            pointer-events: none;
        }

        .review-text {
            position: relative;
            z-index: 1;
            font-size: 1rem;
            line-height: 1.7;
            color: var(--text-main);
            margin-bottom: 25px;
            font-style: italic;
            opacity: 0.85;
        }

        .client-info {
            margin-top: auto;
            display: flex;
            align-items: center;
            gap: 15px;
            border-top: 1px solid #f1f5f9;
            padding-top: 20px;
        }

        .client-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 1.2rem;
            flex-shrink: 0;
        }

        .client-details h3 {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--primary);
        }

        .client-details span {
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .rating-stars {
            color: #fbbf24; /* لون ذهبي للنجوم */
            font-size: 0.85rem;
            margin-bottom: 5px;
            display: block;
        }
