/* ============================================
   نظام ERP العقاري المتكامل
   تنسيقات الواجهة العامة
   ============================================ */

/* ============================================
   1. المتغيرات العامة
   ============================================ */
:root {
    --primary: #4361ee;
    --primary-light: #6b7de8;
    --primary-dark: #3451d1;
    --secondary: #3f37c9;
    --success: #2aa9cc;
    --success-dark: #2399b5;
    --warning: #f8961e;
    --danger: #f72585;
    --info: #4895ef;
    --light: #f8f9fa;
    --lighter: #f0f4ff;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --gray-lighter: #f1f5f9;
    --white: #ffffff;
    
    --border-radius-sm: 6px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --border-radius-circle: 50%;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.2);
    
    --font-family: 'Tajawal', 'Segoe UI', 'Cairo', Tahoma, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 22px;
    --font-size-3xl: 28px;
    --font-size-4xl: 36px;
    --font-size-5xl: 48px;
}

/* ============================================
   2. إعادة تعيين الأساسيات (Reset)
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--white);
    color: var(--dark);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

input, select, textarea, button {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   3. تنسيق شريط التمرير
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-lighter);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* ============================================
   4. تنسيقات النصوص
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p {
    margin-bottom: 10px;
    color: var(--dark-light);
}

.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }

/* ============================================
   5. شريط المعلومات العلوي (Top Bar)
   ============================================ */
.top-bar {
    background: var(--dark);
    color: white;
    padding: 10px 0;
    font-size: var(--font-size-sm);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.top-bar-contact {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.top-bar-contact span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
}

.top-bar-contact i {
    color: var(--primary-light);
    font-size: 14px;
}

.top-bar-social {
    display: flex;
    gap: 12px;
}

.top-bar-social a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
}

.top-bar-social a:hover {
    color: white;
    background: var(--primary);
    transform: translateY(-2px);
}

/* ============================================
   6. رأس الصفحة والتنقل الرئيسي
   ============================================ */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-light);
}

.main-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* الشعار */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin: 0;
    line-height: 1.2;
}

.logo-text span {
    font-size: 11px;
    color: var(--gray);
    font-weight: 500;
}

/* زر القائمة للموبايل */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--dark);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* قائمة التنقل */
.main-nav ul {
    display: flex;
    gap: 5px;
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    color: var(--dark-light);
    font-weight: 600;
    font-size: var(--font-size-md);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
}

.main-nav a i {
    font-size: 14px;
    color: var(--gray);
    transition: var(--transition);
}

.main-nav a:hover {
    background: rgba(67, 97, 238, 0.05);
    color: var(--primary);
}

.main-nav a:hover i {
    color: var(--primary);
}

.main-nav a.active {
    background: var(--primary);
    color: white;
}

.main-nav a.active i {
    color: white;
}

/* ============================================
   7. قسم الترحيب (Hero Section)
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="white" fill-opacity="0.05" d="M0,192L48,176C96,160,192,128,288,128C384,128,480,160,576,181.3C672,203,768,213,864,192C960,171,1056,117,1152,112C1248,107,1344,149,1392,170.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"/></svg>') no-repeat bottom;
    background-size: cover;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: var(--font-size-5xl);
    font-weight: 900;
    color: white;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero p {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 900;
    color: white;
}

.hero-stat-label {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
}

/* ============================================
   8. الأقسام العامة
   ============================================ */
.section {
    padding: 70px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-header p {
    color: var(--gray);
    font-size: var(--font-size-lg);
    max-width: 500px;
    margin: 15px auto 0;
}

.section-gray {
    background: var(--gray-lighter);
}

/* ============================================
   9. بطاقات المشاريع
   ============================================ */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-card-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.project-card-body {
    padding: 20px;
}

.project-card-body h3 {
    font-size: var(--font-size-xl);
    margin-bottom: 8px;
}

.project-card-body p {
    color: var(--gray);
    font-size: var(--font-size-sm);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid var(--gray-light);
}

.project-card-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray);
}

.project-card-stat i {
    color: var(--primary);
}

/* ============================================
   10. بطاقات الشقق
   ============================================ */
.apartments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.apartment-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.apartment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.apartment-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.apartment-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.apartment-card:hover .apartment-card-image img {
    transform: scale(1.05);
}

.apartment-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.status-available {
    background: var(--success);
}

.status-reserved {
    background: var(--warning);
}

.status-sold {
    background: var(--danger);
}

.apartment-card-body {
    padding: 20px;
}

.apartment-card-body h3 {
    font-size: var(--font-size-lg);
    margin-bottom: 12px;
    color: var(--dark);
}

.apartment-card-info {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.apartment-card-info span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--gray);
}

.apartment-card-info i {
    color: var(--primary);
    font-size: 14px;
}

.apartment-card-price {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
}

.apartment-card-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--gray-light);
}

/* ============================================
   11. صفحة تفاصيل الشقة
   ============================================ */
.apartment-detail {
    padding: 50px 0;
}

.apartment-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.apartment-gallery {
    position: relative;
}

.apartment-gallery-main {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 15px;
}

.apartment-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.apartment-gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.apartment-gallery-thumbs img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.apartment-gallery-thumbs img:hover,
.apartment-gallery-thumbs img.active {
    border-color: var(--primary);
}

.apartment-detail-info h2 {
    font-size: var(--font-size-3xl);
    margin-bottom: 10px;
}

.apartment-detail-price {
    font-size: var(--font-size-3xl);
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 20px;
}

.apartment-detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.apartment-detail-spec {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--gray-lighter);
    border-radius: var(--border-radius-sm);
}

.apartment-detail-spec i {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.apartment-detail-spec div span {
    display: block;
    font-size: 11px;
    color: var(--gray);
}

.apartment-detail-spec div strong {
    font-size: var(--font-size-md);
    color: var(--dark);
}

.apartment-detail-description {
    margin-bottom: 25px;
    line-height: 1.8;
    color: var(--dark-light);
}

/* ============================================
   12. نموذج طلب الحجز
   ============================================ */
.reservation-form {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-light);
}

.reservation-form h3 {
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================
   13. صفحة اتصل بنا
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background: var(--primary);
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
}

.contact-info-card h3 {
    color: white;
    margin-bottom: 20px;
}

.contact-info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-info-item i {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-info-item div strong {
    display: block;
    margin-bottom: 3px;
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-light);
}

/* ============================================
   14. الأزرار
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: var(--font-size-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-white {
    background: white;
    color: var(--primary);
}
.btn-white:hover {
    background: var(--light);
    box-shadow: var(--shadow-md);
}

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}
.btn-outline-white:hover {
    background: white;
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover {
    background: var(--success-dark);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* ============================================
   15. النماذج
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: var(--font-size-sm);
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-md);
    color: var(--dark);
    background: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   16. التنبيهات
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-right: 4px solid;
}

.alert-success {
    background: #f0fff4;
    color: #276749;
    border-right-color: #28a745;
}

.alert-danger {
    background: #fff5f7;
    color: #9b1c2c;
    border-right-color: var(--danger);
}

/* ============================================
   17. التذييل (Footer)
   ============================================ */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: white;
    font-size: var(--font-size-xl);
    margin-bottom: 20px;
}

.footer-column h4 {
    color: white;
    font-size: var(--font-size-lg);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-column p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

.footer-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 14px;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
    padding-right: 5px;
}

.footer-links a i {
    font-size: 10px;
    color: var(--primary);
}

.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

.footer-contact i {
    color: var(--primary);
    font-size: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   18. زر واتساب العائم
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #20bd5a;
    transform: scale(1.1);
    color: white;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================
   19. زر العودة للأعلى
   ============================================ */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-circle);
    cursor: pointer;
    font-size: 18px;
    box-shadow: var(--shadow-md);
    z-index: 999;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   20. المودال
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-lighter);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0,0,0,0.05);
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================
   21. أنيميشن الظهور
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   22. أدوات مساعدة
   ============================================ */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }

.flex-wrap { flex-wrap: wrap !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.align-center { align-items: center !important; }

.gap-10 { gap: 10px !important; }
.gap-15 { gap: 15px !important; }
.gap-20 { gap: 20px !important; }

.mt-10 { margin-top: 10px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-30 { margin-top: 30px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-30 { margin-bottom: 30px !important; }

.p-0 { padding: 0 !important; }
.p-20 { padding: 20px !important; }

.w-100 { width: 100% !important; }
.text-nowrap { white-space: nowrap !important; }
.cursor-pointer { cursor: pointer !important; }

.rounded { border-radius: var(--border-radius) !important; }
.rounded-circle { border-radius: var(--border-radius-circle) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.bg-white { background: var(--white) !important; }
.bg-light { background: var(--light) !important; }

/* ============================================
   23. التجاوب (Responsive)
   ============================================ */
@media (max-width: 992px) {
    .apartment-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: var(--font-size-4xl);
    }
    
    .hero-stats {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-xl);
        padding: 80px 20px 20px;
        transition: var(--transition);
        z-index: 1000;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 5px;
    }
    
    .main-nav a {
        padding: 14px 18px;
        border-radius: var(--border-radius);
    }
    
    .hero h1 {
        font-size: var(--font-size-3xl);
    }
    
    .hero p {
        font-size: var(--font-size-md);
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .hero-stat-number {
        font-size: var(--font-size-3xl);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .apartments-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .top-bar-content {
        flex-direction: column;
        text-align: center;
    }
    
    .top-bar-contact {
        justify-content: center;
    }
    
    .apartment-detail-specs {
        grid-template-columns: 1fr;
    }
    
    .apartment-gallery-main {
        height: 250px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: var(--font-size-2xl);
    }
}

@media (max-width: 576px) {
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: var(--font-size-2xl);
    }
    
    .hero-stat-number {
        font-size: var(--font-size-2xl);
    }
    
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 20px;
        left: 20px;
    }
    
    #backToTop {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }
}