/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif; /* تم تغيير الخط هنا */
}

body {
    background-color: #f5f7fa; /* لون الخلفية الرمادي الفاتح */
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* التخطيط الرئيسي باستخدام Grid */
.main-layout {
    display: grid;
    /* تقسيم الشاشة: عمود يمنى (250px)، وسط (مرن)، يسار (220px) */
    grid-template-columns: 280px 1fr 240px;
    gap: 20px;
    padding: 20px;
    min-height: 100vh;
}

/* تنسيق الأعمدة الجانبية */
.sidebar-right, .sidebar-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-left {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

/* تنسيق قسم "وصول سريع" */
.quick-access {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.quick-access h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.quick-access ul li {
    margin-bottom: 10px;
}

.quick-access ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s;
}

.quick-access ul li a:hover {
    background-color: #e2e8f0;
}

/* تنسيق المنطقة الوسطى */
.content-center {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* تنسيق البانر الرئيسي */
.hero-banner {
    position: relative; /* مهم جداً لجعل شريط الفلترة يطفو فوقه */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80') center/cover no-repeat;
    background-color: #1c3d40; /* لون احتياطي في حال عدم تحميل الصورة */
    border-radius: 20px;
    padding: 60px 40px 100px 40px; /* مساحة سفلية إضافية لاستيعاب شريط الفلترة */
    color: white;
    text-align: right;
    min-height: 300px;
    margin-bottom: 50px; /* مساحة تحت البانر */
}

.hero-content h1 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: bold;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.hero-subtitle {
    font-size: 16px;
    color: #e2e8f0;
}

/* تنسيق شريط الفلترة العائم */
.floating-filter-bar {
    position: absolute;
    bottom: -25px; /* سحبه للأسفل ليتقاطع مع حافة البانر */
    left: 50%;
    transform: translateX(-50%); /* توسيط العنصر تماماً */
    width: 90%;
    background-color: white;
    border-radius: 50px; /* حواف دائرية بالكامل */
    padding: 10px 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); /* ظل ناعم */
}

.filter-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    color: #4a5568;
}

.filter-group select {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    font-family: inherit;
}

/* الخط الفاصل بين الخيارات */
.divider {
    width: 1px;
    height: 30px;
    background-color: #e2e8f0;
}

/* قسم البحث النصي */
.search-input-group {
    display: flex;
    align-items: center;
    flex-grow: 1;
    background-color: #f8fafc;
    border-radius: 30px;
    padding: 5px 5px 5px 15px;
    margin-right: 15px;
}

.search-input-group input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* زر البحث الأخضر الغامق */
.btn-search {
    background-color: #1a4d46; /* لون مقارب للون تصميم المنصة */
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.btn-search:hover {
    background-color: #123631;
}

/* ==================================
   تنسيق شريط التصنيفات (الأيقونات)
   ================================== */
.categories-bar {
    display: flex;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    margin-bottom: 40px; /* مسافة للأسفل قبل قسم العقارات */
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #4a5568;
    font-weight: 500;
    font-size: 14px;
    transition: transform 0.2s, color 0.2s;
}

.category-item .icon-box {
    width: 60px;
    height: 60px;
    background-color: #f8fafc;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px; /* حجم الأيقونة */
    transition: background 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
    color: #1a4d46;
}

.category-item:hover .icon-box {
    background-color: #e6f0ed; /* لون أخضر فاتح عند التمرير */
    color: #1a4d46;
}

/* ==================================
   تنسيق قسم أحدث العقارات (البطاقات)
   ================================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    color: #1a1a1a;
}

.section-header .view-all {
    color: #1a4d46;
    font-size: 14px;
    font-weight: bold;
}

/* شبكة البطاقات */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* يتكيف مع حجم الشاشة */
    gap: 20px;
}

/* تصميم البطاقة */
.property-card {
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card-image {
    position: relative;
    height: 160px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* الشارة (للبيع / للإيجار) وزر المفضلة */
.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.badge.sale { background-color: #1a4d46; } /* لون أخضر للبيع */
.badge.rent { background-color: #2c5282; } /* لون أزرق للإيجار */

.btn-fav {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    color: #a0aec0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* محتوى البطاقة */
.card-content {
    padding: 15px;
}

.card-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.location {
    color: #718096;
    font-size: 13px;
    margin-bottom: 10px;
}

.details {
    color: #4a5568;
    font-size: 13px;
    margin-bottom: 10px;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: #1a4d46;
    margin-bottom: 15px;
}

/* الكلمات الدلالية (التاغات) أسفل البطاقة */
.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: #4a5568;
}

/* ==================================
   تنسيق القائمة الجانبية اليمنى
   ================================== */

/* بطاقة الترحيب */
.welcome-card {
    background-color: #f8fafc;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-card h3 {
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.welcome-card h3 span {
    font-weight: bold;
    color: #1a4d46;
}

.welcome-card p {
    font-size: 12px;
    color: #718096;
    margin-bottom: 15px;
}

.welcome-img {
    width: 100%;
    opacity: 0.8;
}

/* تنسيق قسم وصول سريع */
.quick-access h3 {
    font-size: 15px;
    margin-bottom: 15px;
    color: #1a1a1a;
    font-weight: bold;
}

.quick-access ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8fafc;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 10px;
}

.icon-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 14px;
}

.icon-circle.add { background-color: #1a4d46; }
.icon-circle.chat { background-color: #a0aec0; color: #1a1a1a; background: #e2e8f0; }
.icon-circle.calc { background-color: #e2e8f0; color: #1a1a1a; }
.icon-circle.track { background-color: #e2e8f0; color: #1a1a1a; }

/* عمليات البحث الأخيرة */
.recent-searches {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 20px;
}

.recent-header h3 {
    font-size: 14px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.recent-searches ul li {
    margin-bottom: 12px;
}

.recent-searches ul li a {
    font-size: 13px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-search {
    display: block;
    font-size: 12px;
    color: #1a4d46;
    margin-top: 15px;
    text-align: right;
}

/* بطاقة لماذا تختارنا */
.why-us-card {
    background: linear-gradient(rgba(26, 77, 70, 0.9), rgba(26, 77, 70, 0.9)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=300&q=80') center/cover;
    border-radius: 15px;
    padding: 25px 20px;
    color: white;
}

.why-us-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.why-us-card ul li {
    font-size: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.why-us-card ul li span {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
}

/* ==================================
   تنسيق القائمة الجانبية اليسرى
   ================================== */
.sidebar-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    border-radius: 15px;
    padding: 30px 20px;
    height: calc(100vh - 40px); /* لجعل القائمة تملأ الشاشة وتثبت */
    position: sticky;
    top: 20px;
}

/* الشعار */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container h2 {
    font-size: 24px;
    color: #1a4d46;
    letter-spacing: 2px;
}

.logo-container p {
    font-size: 9px;
    color: #718096;
    text-transform: uppercase;
    margin-top: 5px;
}

/* التنقل الرئيسي */
.main-nav ul {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.main-nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.main-nav ul li a span {
    font-size: 18px;
    opacity: 0.7;
}

/* تأثير التمرير والعنصر النشط */
.main-nav ul li a:hover {
    background-color: #f8fafc;
    color: #1a4d46;
}

.main-nav ul li.active a {
    background-color: #1a4d46;
    color: white;
}

.main-nav ul li.active a span {
    opacity: 1;
}

/* البطاقة الإعلانية الجانبية */
.promo-card {
    margin-top: auto; /* لدفع البطاقة إلى الأسفل */
    margin-bottom: 20px;
    background-color: #f8fafc;
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    position: relative;
    border: 1px solid #e2e8f0;
}

.promo-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.promo-content {
    padding: 20px 15px;
    position: relative;
}

.promo-icon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 20px;
}

.promo-content p {
    font-size: 13px;
    color: #1a1a1a;
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.5;
}

.btn-discover {
    display: inline-block;
    background-color: #1a4d46;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-discover:hover {
    background-color: #123631;
}

/* التذييل ومواقع التواصل */
.sidebar-footer {
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.social-icons a {
    color: #718096;
    font-size: 16px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #1a4d46;
}

.sidebar-footer p {
    font-size: 9px;
    color: #a0aec0;
}


/* ==================================
   تنسيق صفحة إضافة عقار
   ================================== */
.form-container {
    background-color: #ffffff;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.form-container h2 {
    color: #1a4d46;
    margin-bottom: 10px;
}

.form-desc {
    color: #718096;
    margin-bottom: 30px;
    font-size: 14px;
}

.property-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: bold;
    color: #4a5568;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1a4d46;
}

.file-input {
    padding: 10px 0;
}

.btn-submit {
    background-color: #1a4d46;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: #123631;
}

/* رسائل التنبيه (النجاح والخطأ) */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: bold;
}
.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================================
   تنسيق صفحة الاستشارة (Multi-step Form)
   ================================== */
.consultation-container {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.consultation-header {
    text-align: right;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/* شريط التقدم (Stepper) */
.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #a0aec0;
    font-weight: 600;
}

.step.active {
    color: #1a4d46;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transition: all 0.3s;
}

.step.active .step-circle {
    background: #1a4d46;
    border-color: #1a4d46;
    color: #fff;
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 15px;
    position: relative;
    top: -15px;
}

/* أزرار التنقل */
.form-actions {
    display: flex;
    margin-top: 30px;
}
.form-actions.right { justify-content: flex-end; }
.form-actions.split { justify-content: space-between; }

.btn-next, .btn-submit {
    background: #1a4d46;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}
.btn-prev {
    background: #f8fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
}

/* القوائم الجانبية المساعدة */
.help-card, .info-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.help-card h3 { color: #1a4d46; margin-bottom: 15px; }
.help-card ul li { margin-bottom: 15px; font-size: 13px; color: #4a5568; }

/* ==================================
   تنسيق صفحات المصادقة (تسجيل / دخول)
   ================================== */
.auth-page {
    background: linear-gradient(135deg, #1a4d46 0%, #2c7a6f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h2 {
    color: #1a4d46;
    font-size: 28px;
    letter-spacing: 2px;
}

.auth-logo p {
    font-size: 11px;
    color: #718096;
    text-transform: uppercase;
}

.auth-card h3 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 20px;
}

.btn-auth {
    width: 100%;
    background: #1a4d46;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn-auth:hover {
    background: #123631;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #718096;
}

.auth-links a {
    color: #1a4d46;
    font-weight: bold;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ==================================
   تنسيق لوحة تحكم الإدارة (Dashboard)
   ================================== */
.dashboard-header {
    margin-bottom: 30px;
}
.dashboard-header h2 {
    color: #1a4d46;
    font-size: 24px;
}
.dashboard-header p {
    color: #718096;
    font-size: 14px;
}

/* بطاقات الإحصائيات */
.stats-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}
.stat-info h3 {
    font-size: 14px;
    color: #718096;
    margin-bottom: 5px;
}
.stat-info p {
    font-size: 24px;
    font-weight: bold;
    color: #1a1a1a;
}

/* جدول لوحة التحكم */
.admin-table-container {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    overflow-x: auto;
}
.admin-table-container h3 {
    margin-bottom: 20px;
    color: #1a1a1a;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
.admin-table th, .admin-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
}
.admin-table th {
    background: #f8fafc;
    color: #4a5568;
    font-weight: 600;
}

/* تفاصيل الطلب المخفية تحت كل صف */
.details-row td {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    padding: 10px 20px 20px 20px;
}
.req-details {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.6;
}

/* الشارات (Badges) */
.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}
.status-pending { background: #fffaf0; color: #dd6b20; border: 1px solid #feebc8; }
.status-reviewed { background: #ebf8ff; color: #3182ce; border: 1px solid #bee3f8; }
.status-completed { background: #f0fff4; color: #38a169; border: 1px solid #c6f6d5; }

/* أزرار التحديث */
.status-select {
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    font-family: inherit;
}
.btn-update {
    background: #1a4d46;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
}
.btn-update:hover {
    background: #123631;
}