/* 1. استيراد الخطوط */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

/* 2. المتغيرات العامة */
:root {
    --main-blue: #003366;
    --accent-blue: #0056b3;
    --light-blue: #e7f1ff;
    --bg-grey: #6c757d; 
    --white: #ffffff;
    --radius: 12px;
    
    /* Modern Header Enhancements Variables */
    --header-bg: rgba(255, 255, 255, 0.98);
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3. الإعدادات العامة */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    padding-top: 75px; /* مساحة لتعويض الـ Fixed Header لكي لا يغطي المحتوى */
}

/* --- Navbar (Modern & Sticky) --- */
.navbar {
    position: fixed; /* تم تغييره من sticky لضمان ثباته فوق كل شيء */
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(10px); /* تأثير زجاجي حديث */
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-light);
    z-index: 2000;
    transition: var(--transition-fast);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Styling */
.logo { 
    font-size: 28px; 
    font-weight: 900; 
    color: var(--main-blue); 
    text-decoration: none;
    letter-spacing: -1px;
}
.logo span { color: var(--accent-blue); }

/* Navigation Links */
.nav-links { 
    list-style: none;
    display: flex; 
    gap: 30px; 
}

.nav-links a {
    text-decoration: none;
    color: #444;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
    transition: var(--transition-fast);
}

/* تأثير الخط المتحرك تحت الروابط */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: var(--transition-fast);
}

.nav-links a:hover { color: var(--accent-blue); }
.nav-links a:hover::after, 
.nav-links a.active::after { 
    width: 100%; 
}

/* الأزرار ومعلومات المستخدم */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.user-welcome { 
    color: var(--main-blue); 
    font-weight: 600; 
}

.btn-action {
    background: var(--accent-blue);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.2);
    transition: var(--transition-fast);
}

.btn-action:hover {
    background: var(--main-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.3);
}

.icon-link, .logout-btn {
    font-size: 1.2rem;
    color: #7f8c8d;
    transition: var(--transition-fast);
    text-decoration: none;
}

.logout-btn:hover { 
    color: #e74c3c; 
    transform: scale(1.1); 
}

/* زر القائمة للجوال */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--main-blue);
    cursor: pointer;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .menu-toggle { display: block; }
    
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%; /* مخفي خارج الشاشة */
        width: 100%;
        height: calc(100vh - 70px);
        background: #fff;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
        box-shadow: inset 0 10px 10px rgba(0,0,0,0.02);
    }
    
    .nav-links.active { right: 0; } /* يظهر عند النقر */
    
    .nav-actions { display: none; } /* إخفاء الأزرار الجانبية في الجوال لتبسيط الواجهة */
    .nav-links li { margin: 15px 0; }
}

/* بقية الكود الخاص بك (Hero, Search, etc.) يستمر من هنا... */
/* --- Hero Section --- */
.hero {
    position: relative;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    animation: slideBg 15s infinite ease-in-out; 
}

@keyframes slideBg {
    0%, 100% { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/bg1.JFIF'); }
    33% { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/bg2.jpg'); }
    66% { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/bg3.jpg'); }
}

/* --- أزرار الهيرو (Glass Box) --- */
.hero-btns {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}

.glass-cta-box {
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 20px;
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    display: inline-flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.btn-primary-blue, .btn-outline-white {
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary-blue {
    background: var(--accent-blue);
    color: var(--white) !important;
    box-shadow: 0 8px 15px rgba(0, 86, 179, 0.3);
}

.btn-primary-blue:hover {
    background: var(--main-blue);
    transform: translateY(-3px) scale(1.02);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white) !important;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    transform: translateY(-3px);
}

/* --- صندوق البحث الرئيسي --- */
.search-container {
    background: var(--white);
    max-width: 1150px; 
    margin: -50px auto 20px; 
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative; 
    z-index: 100;
}

.search-box { 
    display: flex; 
    flex-direction: row; 
    gap: 10px; 
    align-items: stretch;
    width: 100%;
}

.search-group {
    flex: 1; 
    display: flex; 
    align-items: center;
    background: #f1f5f9; 
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    position: relative;
    min-width: 140px;
}

.search-group i { 
    color: var(--accent-blue); 
    margin-left: 10px; 
    font-size: 1rem;
}

.search-group select, 
.search-group input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
}

.btn-search {
    background: var(--main-blue);
    color: white !important;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

/* --- كروت العقارات والأسعار --- */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card { 
    background: var(--white); 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    transition: 0.3s;
    border: 1px solid #eee;
}

.price-tag {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    font-weight: bold;
    margin: 10px 15px;
}

.price-value { font-size: 1.2rem; }
.price-period { font-size: 0.9rem; color: #555; }

/* --- Footer --- */
.main-footer { 
    background: var(--main-blue); 
    color: white; 
    padding: 30px 0; 
    text-align: center; 
    margin-top: 60px; 
}

/* --- استعلامات الوسائط (Responsive) --- */
@media (max-width: 992px) {
    .search-box { flex-direction: column; }
    .search-group { width: 100%; }
    .btn-search { padding: 15px; width: 100%; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .glass-cta-box {
        flex-direction: column;
        border-radius: 25px;
        width: 85%;
        padding: 15px;
        gap: 10px;
    }
    .btn-primary-blue, .btn-outline-white {
        width: 100%;
        justify-content: center;
    }
}/* 1. استيراد الخطوط */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&display=swap');

/* 2. المتغيرات العامة */
:root {
    --main-blue: #003366;
    --accent-blue: #0056b3;
    --light-blue: #e7f1ff;
    --bg-grey: #6c757d; 
    --white: #ffffff;
    --radius: 12px;
}

/* 3. الإعدادات العامة */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* --- Navbar --- */
.navbar {
    background: var(--white);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

.logo { font-size: 26px; font-weight: 900; color: var(--main-blue); text-decoration: none; }
.logo span { color: var(--accent-blue); }

.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { text-decoration: none; color: #555; font-weight: 500; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-blue); }

.btn-reg {
    background: var(--accent-blue);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    animation: slideBg 15s infinite ease-in-out; 
}

@keyframes slideBg {
    0%, 100% { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/bg1.JFIF'); }
    33% { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/bg2.jpg'); }
    66% { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/bg3.jpg'); }
}

/* --- أزرار الهيرو (Glass Box) --- */
.hero-btns {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}

.glass-cta-box {
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 20px;
    border-radius: 60px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    display: inline-flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.btn-primary-blue, .btn-outline-white {
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary-blue {
    background: var(--accent-blue);
    color: var(--white) !important;
    box-shadow: 0 8px 15px rgba(0, 86, 179, 0.3);
}

.btn-primary-blue:hover {
    background: var(--main-blue);
    transform: translateY(-3px) scale(1.02);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--white) !important;
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
    transform: translateY(-3px);
}

/* --- تنسيق صفحة تسجيل الدخول (Auth Page) --- */
.auth-body {
    background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.8)), 
                url('../images/bg1.JFIF') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background: rgba(255, 255, 255, 0.15); /* إطار زجاجي */
    backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.auth-container h2 {
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.auth-container input {
    width: 100%;
    padding: 14px 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.auth-container input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 86, 179, 0.2);
}

.auth-container button {
    width: 100%;
    padding: 14px;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.auth-container button:hover {
    background: var(--main-blue);
    transform: translateY(-2px);
}

.auth-container p {
    margin-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.auth-container p a {
    color: var(--white);
    font-weight: bold;
    text-decoration: underline;
}

.error-msg {
    background: rgba(255, 0, 0, 0.2);
    color: #ffcccc;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* --- صندوق البحث الرئيسي --- */
.search-container {
    background: var(--white);
    max-width: 1150px; 
    margin: -50px auto 20px; 
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative; 
    z-index: 100;
}

.search-box { 
    display: flex; 
    flex-direction: row; 
    gap: 10px; 
    align-items: stretch;
    width: 100%;
}

.search-group {
    flex: 1; 
    display: flex; 
    align-items: center;
    background: #f1f5f9; 
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    position: relative;
    min-width: 140px;
}

.search-group i { 
    color: var(--accent-blue); 
    margin-left: 10px; 
    font-size: 1rem;
}

.search-group select, 
.search-group input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    width: 100%;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    color: #334155;
    cursor: pointer;
}

.btn-search {
    background: var(--main-blue);
    color: white !important;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

/* --- كروت العقارات والأسعار --- */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.card { 
    background: var(--white); 
    border-radius: 15px; 
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
    transition: 0.3s;
    border: 1px solid #eee;
}

.price-tag {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 8px 15px;
    border-radius: 8px;
    display: inline-block;
    font-weight: bold;
    margin: 10px 15px;
}

.price-value { font-size: 1.2rem; }
.price-period { font-size: 0.9rem; color: #555; }

.dashboard-container { padding: 40px 5%; margin-top: 80px; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-card { background: white; padding: 20px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); text-align: center; }
.stat-card h3 { font-size: 2rem; color: var(--main-blue); margin-bottom: 5px; }

.dash-table { width: 100%; border-collapse: collapse; background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.dash-table th, .dash-table td { padding: 15px; text-align: right; border-bottom: 1px solid #eee; }
.dash-table th { background: #f8f9fa; color: #555; }

/* Badges */
.badge { padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.badge.approved { background: #d4edda; color: #155724; }
.badge.pending { background: #fff3cd; color: #856404; }
.badge.rejected { background: #f8d7da; color: #721c24; }
/*admin*/
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }
.admin-card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 1px solid #eee; }
.card-img { position: relative; height: 200px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.type-badge { position: absolute; top: 10px; right: 10px; background: var(--main-blue); color: white; padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; }

.card-content { padding: 20px; text-align: right; }
.docs-section { margin: 15px 0; background: #f9f9f9; padding: 10px; border-radius: 10px; }
.doc-link { display: inline-block; margin: 5px; color: var(--main-blue); text-decoration: none; font-size: 0.9rem; font-weight: bold; }

.admin-actions textarea { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #ddd; margin: 10px 0; font-family: 'Tajawal'; resize: none; }
.action-btns { display: flex; gap: 10px; }
.approve-btn { flex: 2; background: #27ae60; color: white; border: none; padding: 10px; border-radius: 8px; cursor: pointer; }
.reject-btn { flex: 1; background: #e74c3c; color: white; border: none; padding: 10px; border-radius: 8px; cursor: pointer; }
.sidebar {
    width: 260px;
    height: 100vh;
    background: #2c3e50;
    color: white;
    position: fixed;
    right: 0; /* لأن الموقع RTL */
    top: 0;
    padding: 20px 0;
}
.sidebar-header { text-align: center; padding-bottom: 30px; border-bottom: 1px solid #34495e; }
.sidebar-menu { list-style: none; padding: 20px; }
.sidebar-menu li { margin-bottom: 5px; }
.sidebar-menu a {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    transition: 0.3s;
}
.sidebar-menu a:hover { background: #34495e; color: white; }
.sidebar-menu i { margin-left: 10px; width: 20px; }
.menu-label { 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    color: #7f8c8d; 
    margin: 20px 15px 10px 0;
    letter-spacing: 1px;
}
.badge { background: #e67e22; color: white; padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; float: left; }
/* --- Footer --- */
.main-footer { 
    background: var(--main-blue); 
    color: white; 
    padding: 30px 0; 
    text-align: center; 
    margin-top: 60px; 
}

/* --- استعلامات الوسائط (Responsive) --- */
@media (max-width: 992px) {
    .search-box { flex-direction: column; }
    .search-group { width: 100%; }
    .btn-search { padding: 15px; width: 100%; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .glass-cta-box {
        flex-direction: column;
        border-radius: 25px;
        width: 85%;
        padding: 15px;
        gap: 10px;
    }
    .btn-primary-blue, .btn-outline-white {
        width: 100%;
        justify-content: center;
    }
}