/* ============================================
   KING HOUSES - STYLE SHEET
   Version: 5.0 | Clean & Organized
   ============================================ */

/* ===== VARIABLES ===== */
:root {
    --primary: #C9A84C;
    --primary-dark: #A07830;
    --primary-light: #E8C97A;
    --secondary: #1A1410;
    --secondary-light: #2C2218;
    --dark: #1a1a2e;
    --gray-dark: #2d3436;
    --gray: #636e72;
    --gray-light: #b2bec3;
    --light: #f8f9fa;
    --white: #ffffff;
    --danger: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --info: #3498db;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
    --shadow-hover: 0 12px 40px rgba(0,0,0,0.2);
    --shadow-gold: 0 4px 15px rgba(201,168,76,0.3);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-base: 18px;
}

/* ===== RESET & GLOBAL ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 18px; }
body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--light);
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: var(--font-base);
}
.container { max-width: 1400px; margin: 0 auto; padding: 0 30px; }
.gold-text { color: var(--primary); }

/* ============================================
   PRELOADER - شاشة التحميل
   ============================================ */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-content {
    text-align: center;
}
.preloader-logo {
    width: 180px;
    height: 180px;
    max-width: 70vw;
    max-height: 70vw;
    object-fit: contain;
    margin-bottom: 20px;
    animation: crownPulse 1.5s ease-in-out infinite;
}
.preloader-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 4px;
    margin: 20px 0;
}
.preloader-dots {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.preloader-dots span {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: dotsPulse 1.5s ease-in-out infinite;
}
.preloader-dots span:nth-child(2) { animation-delay: 0.3s; }
.preloader-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes crownPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
}
@keyframes dotsPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.5); opacity: 1; }
}

/* ============================================
   HEADER
   ============================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}
header.scrolled {
    background: var(--white);
    box-shadow: var(--shadow-md);
}
.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    height: 90px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}
.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-ar {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
}
.logo-en {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 2px;
}

/* Navigation */
nav ul {
    display: flex;
    gap: 35px;
    list-style: none;
}
nav ul li a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 18px;
    transition: var(--transition);
    position: relative;
}
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}
nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}
nav ul li a:hover,
nav ul li a.active {
    color: var(--primary);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switcher {
    display: inline-flex;
    gap: 0;
    background: rgba(26, 20, 16, 0.9);
    border-radius: 50px;
    padding: 3px;
    border: 1px solid var(--primary);
}
html[dir="rtl"] .lang-switcher { margin-left: 15px; margin-right: 0; }
html[dir="ltr"] .lang-switcher { margin-left: 0; margin-right: 15px; }

.lang-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}
html[dir="rtl"] .lang-btn:first-child { border-radius: 0 40px 40px 0; }
html[dir="rtl"] .lang-btn:last-child { border-radius: 40px 0 0 40px; }
html[dir="ltr"] .lang-btn:first-child { border-radius: 40px 0 0 40px; }
html[dir="ltr"] .lang-btn:last-child { border-radius: 0 40px 40px 0; }

.lang-btn:hover,
.lang-btn.active {
    background: var(--primary);
    color: var(--secondary);
}

/* ============================================
   HERO SECTION
   ============================================ */
   .hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: visible;
    padding: 120px 0 80px;
    /* خلفية الصورة مع تراكب متدرج */
    background: 
        /* تراكب علوي وسفلي لتظليل الحواف */
        linear-gradient(to bottom, 
            rgba(26, 20, 16, 0.9) 0%, 
            rgba(26, 20, 16, 0.6) 30%, 
            rgba(26, 20, 16, 0.6) 70%, 
            rgba(26, 20, 16, 0.9) 100%
        ),
        /* تراكب جانبي */
        linear-gradient(to right,
            rgba(26, 20, 16, 0.7) 0%,
            rgba(26, 20, 16, 0.3) 20%,
            rgba(26, 20, 16, 0.3) 80%,
            rgba(26, 20, 16, 0.7) 100%
        ),
        /* الصورة */
        url('https://res.cloudinary.com/dkdilpnuc/image/upload/v1783203152/king-houses-header-bg_h3klgm.webp') center/cover no-repeat;
    background-attachment: fixed;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}
.hero-text {
    animation: fadeInUp 0.8s ease;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(201,168,76,0.2);
    border: 1px solid var(--primary);
    padding: 10px 24px;
    border-radius: 40px;
    margin-bottom: 25px;
}
.hero-badge span {
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
}
.hero-title-ar {
    font-size: 52px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
}
.hero-title-en {
    font-size: 20px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 3px;
    margin-bottom: 20px;
}
.hero-description {
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 500px;
}
.hero-search-wrapper {
    flex: 2;
    min-width: 300px;
    position: relative;
    z-index: 99999;
    overflow: visible;
}
.hero-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.search-icon-hero {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
}
.hero-search-input {
    width: 100%;
    padding: 16px 55px 16px 25px;
    font-size: 16px;
    border: none;
    border-radius: 60px;
    background: var(--white);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: var(--transition);
}
.hero-search-input:focus {
    outline: none;
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}
.hero-clear-search {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 18px;
}
.hero-clear-search:hover { color: var(--danger); }

.btn-outline {
    background: rgba(201,168,76,0.1);
    border: 2px solid var(--primary);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(8px);
    margin-top: 20px;
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.stat-card {
    text-align: center;
}
.stat-number {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
}
.stat-label {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: var(--transition);
    animation: bounce 2s infinite;
}
.hero-scroll span {
    font-size: 14px;
    letter-spacing: 2px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ============================================
   FILTERS SECTION
   ============================================ */
.filters-section {
    background: var(--white);
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(26,20,16,0.06);
}
.filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
}
.filters-title h3 {
    font-size: 20px;
    font-weight: 700;
}
.filters-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: var(--primary);
}
.filters-wrapper {
    padding-bottom: 30px;
    transition: var(--transition);
}
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.filter-group label {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray);
}
.filter-group label i {
    color: var(--primary);
    margin-left: 5px;
}
.filter-select,
.filter-input {
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
}
.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}
.filters-actions button {
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.filters-actions button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.btn-favorite { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; }
.btn-all { background: linear-gradient(135deg, #3498db, #2980b9); color: white; }
.btn-refresh { background: linear-gradient(135deg, #27ae60, #1e8449); color: white; }
.btn-hide-sold { background: linear-gradient(135deg, #9b59b6, #8e44ad); color: white; }

/* ============================================
   PROPERTIES SECTION
   ============================================ */
.properties-section { padding: 30px 0; }
.section-header {
    text-align: center;
    margin-bottom: 25px;
    margin-top: 25px;
}
.section-badge {
    display: inline-block;
    background: rgba(201,168,76,0.1);
    color: var(--primary);
    padding: 5px 16px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}
.section-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 5px;
}
.section-subtitle {
    color: var(--gray);
    font-size: 18px;
    margin-bottom: 5px;
}
.results-info {
    margin-top: 10px;
    font-size: 16px;
    color: var(--gray);
}
.results-info span:nth-child(2) {
    color: var(--primary);
    font-weight: 800;
    font-size: 22px;
    margin: 0 5px;
}

/* Property Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Property Card */
.property-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    max-width: 100%;
    height: auto;
}
.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}
.property-card.featured-property {
    border: 4px solid var(--primary);
    box-shadow: 0 0 20px rgba(201,168,76,0.3);
}
.card-images {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}
.card-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.property-card:hover .card-images img {
    transform: scale(1.05);
}

/* الصورة الافتراضية (الشعار) عندما لا توجد صور */
.card-images img[src*="king-propertis-logo"],
.card-images img.default-image {
    object-fit: contain !important;
    padding: 10px;
    background: #f5f5f5;
    transform: none !important;
}
.property-card:hover .card-images img[src*="king-propertis-logo"] {
    transform: scale(1) !important;
}


/* كود العقار - يظهر في الأسفل مع المعلومات */
.card-code {
    display: inline-block;
    background: rgba(201,168,76,0.15);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(201,168,76,0.2);
    letter-spacing: 0.5px;
}
.card-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 25;
}
.badge-type {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    background: var(--primary);
    color: var(--white);
}
.featured-badge {
    position: absolute;
    top: 15px;
    left: 3px;
    background: var(--primary);
    color: #1a1410;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: bold;
    z-index: 25;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(201,168,76,0.3);
}
.card-img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
}
.card-img-nav:hover {
    background: var(--primary);
    color: white;
}
.card-img-nav.prev { left: 10px; }
.card-img-nav.next { right: 10px; }
.card-image-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.card-image-dots .img-dot {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
}
.card-image-dots .img-dot.active {
    width: 20px;
    border-radius: 4px;
    background: var(--primary);
}
.card-body { padding: 20px; }
.card-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.card-views,
.card-favs,
.card-date {
    font-size: 13px;
    color: var(--gray);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 20px;
}
.card-views i,
.card-favs i,
.card-date i { color: var(--primary); }
.card-favs i { color: #e74c3c; }
.card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray);
    font-size: 15px;
    margin-bottom: 8px;
}
.card-location i { color: var(--primary); }
.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--secondary);
}
.card-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.spec-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: var(--light);
    border-radius: var(--radius-sm);
}
.spec-icon {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 5px;
    display: block;
}
.spec-value {
    font-size: 16px;
    font-weight: 700;
    display: block;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.card-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}
.card-price span { font-size: 18px; font-weight: 700; }
.btn-more {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 10px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.btn-more:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}
.sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.sold-stamp {
    border: 3px solid var(--danger);
    color: var(--danger);
    padding: 15px 75px;
    font-size: 36px;
    font-weight: 800;
    transform: rotate(-15deg);
    background: rgba(255,255,255,0.9);
}
.load-more {
    text-align: center;
    margin-top: 50px;
}
.btn-load-more {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 14px 40px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-load-more:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== حاوية كود العقار ===== */
.card-code-wrapper {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-code-wrapper .card-code {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(201,168,76,0.12);
    color: var(--primary);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(201,168,76,0.2);
    letter-spacing: 0.5px;
}

.card-code-wrapper .card-code i {
    font-size: 12px;
    opacity: 0.8;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    padding: 70px 0;
    color: var(--white);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stats-item { padding: 20px; }
.stats-icon {
    font-size: 52px;
    margin-bottom: 15px;
    color: var(--primary);
}
.stats-number {
    font-size: 46px;
    font-weight: 800;
    margin-bottom: 10px;
}
.stats-label {
    font-size: 16px;
    opacity: 0.8;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 70px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}
.footer-about {
    min-width: 0;
}
.footer-links {
    min-width: 0;
}
.footer-contact {
    text-align: center;
    min-width: 0;
}
.footer-links:first-of-type { order: 2; }
.footer-links:nth-child(3) { order: 3; }
.footer-contact { order: 4; }

.social-link {
    width: 44px;
    height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    color: var(--white);
    font-size: 20px;
    text-decoration: none !important;
    border: 1px solid rgba(255,255,255,0.15);
}
.social-link:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
}
.social-link.facebook:hover { background: #1877f2; color: white; }
.social-link.instagram:hover { background: linear-gradient(135deg, #f09433, #d62976, #962fbf); color: white; }
.social-link.telegram:hover { background: #0088cc; color: white; }

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 16px;
}
.footer-links ul li a:hover {
    color: var(--primary);
    padding-right: 5px;
}
.footer-contact-btn {
    margin-top: 20px;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-contact-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 15px;
}
.privacy-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition);
}
.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}
.modal-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}
.modal-overlay.active .modal-container {
    transform: scale(1);
}
.modal-container.modal-large {
    max-width: 1200px;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
}
.modal-title h3 {
    font-size: 22px;
    font-weight: 700;
}
.modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--light);
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}
.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}
.modal-body { padding: 25px; }

/* Contact Form */
.contact-greeting {
    background: rgba(201,168,76,0.1);
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}
.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 15px;
}
.required { color: var(--danger); }
.form-input,
.phone-select {
    width: 100%;
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}
.form-input:focus,
.phone-select:focus {
    outline: none;
    border-color: var(--primary);
}
.phone-group {
    display: flex;
    gap: 15px;
}
.phone-select {
    width: 180px;
    font-size: 14px;
}
.phone-input { flex: 1; }
textarea.form-input {
    resize: vertical;
    min-height: 120px;
}
.submit-btn {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
}
.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.modal-thanks {
    text-align: center;
    padding: 40px;
}
.thanks-icon {
    font-size: 70px;
    margin-bottom: 20px;
}
.modal-thanks h3 {
    font-size: 26px;
    margin-bottom: 10px;
}
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: var(--white);
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}
.whatsapp-btn:hover {
    transform: scale(1.05);
}

/* Property Detail Modal */
.property-detail-body { padding: 0; }
.property-gallery { position: relative; }
.gallery-main {
    position: relative;
    height: 500px;
    background: var(--gray-light);
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}
.gallery-nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    transition: var(--transition);
}
.gallery-nav-btn:hover {
    background: var(--primary);
    color: var(--white);
}
.image-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
}
.property-info { padding: 25px; }
.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
.property-header h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}
.property-code {
    color: var(--gray);
    font-size: 14px;
}
.property-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}
.property-price span { font-size: 22px; }
.property-views {
    font-size: 14px;
    color: var(--gray);
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: flex-end;
}
.property-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.meta-badge {
    background: var(--light);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}
.meta-badge i {
    color: var(--primary);
    margin-left: 5px;
}
.property-description h4 {
    font-size: 20px;
    margin-bottom: 12px;
}
.property-description p {
    color: var(--gray);
    line-height: 1.8;
    font-size: 16px;
}
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}
.spec-item-detail {
    background: var(--light);
    padding: 15px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
}
.spec-item-detail i {
    font-size: 26px;
    color: var(--primary);
}
.spec-label-detail {
    font-size: 12px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.spec-value-detail {
    font-size: 17px;
    font-weight: 700;
}
.spec-item-detail:last-child {
    grid-column: span 2;
    background: rgba(201,168,76,0.1);
    border: 1px solid var(--primary);
}
.spec-item-detail:last-child .spec-value-detail {
    font-size: 22px;
    color: var(--primary);
    font-weight: 800;
}

.map-container {
    height: 280px;
    background: var(--light);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 25px;
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.property-suggestions h4 {
    margin-bottom: 15px;
    font-size: 20px;
}
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}
.suggestion-card {
    background: var(--light);
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.suggestion-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.suggestion-card .s-title {
    font-weight: 600;
    font-size: 15px;
}
.suggestion-card .s-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}
.property-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    font-size: 15px;
}
.action-btn.contact {
    background: var(--primary);
    color: var(--white);
}
.action-btn.contact:hover {
    background: var(--primary-dark);
}
.action-btn.share {
    background: var(--info);
    color: var(--white);
}
.action-btn.favorite {
    background: var(--danger);
    color: var(--white);
}

/* ============================================
   FLOATING BUTTON
   ============================================ */
.floating-contact-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatAnim 2s ease-in-out infinite;
}
.floating-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #C9A84C, #1A1410);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: 2px solid #C9A84C;
    position: relative;
}
.floating-icon i {
    font-size: 30px;
    color: #C9A84C;
    transition: all 0.3s ease;
}
.floating-pulse {
    position: absolute;
    width: 65px;
    height: 65px;
    background: rgba(201,168,76,0.4);
    border-radius: 50%;
    animation: pulse 1.8s ease-out infinite;
    z-index: -1;
}
.floating-tooltip {
    position: absolute;
    right: 80px;
    background: #1A1410;
    color: #C9A84C;
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-right: 3px solid #C9A84C;
    font-family: 'Cairo', sans-serif;
}
.floating-tooltip::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent #1A1410 transparent transparent;
}
.floating-contact-btn:hover .floating-icon {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(201,168,76,0.5);
    background: linear-gradient(135deg, #1A1410, #C9A84C);
}
.floating-contact-btn:hover .floating-icon i {
    color: #FFFFFF;
    transform: scale(1.05);
}
.floating-contact-btn:hover .floating-tooltip {
    opacity: 1;
    visibility: visible;
    right: 90px;
}
.floating-contact-btn:hover .floating-pulse {
    animation: none;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}
@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================================
   TOAST & SCROLL TOP
   ============================================ */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--secondary);
    color: var(--white);
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 16px;
    z-index: 3000;
    transition: 0.3s;
    opacity: 0;
}
.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.scroll-top-btn.show {
    opacity: 1;
    visibility: visible;
}
.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   SEARCH DROPDOWN
   ============================================ */
.hero-search-dropdown {
    position: absolute !important;
    top: calc(100% + 5px) !important;
    left: 0 !important;
    right: 0 !important;
    background: white !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 50px rgba(0,0,0,0.25) !important;
    z-index: 999999 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
}
.hero-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: 0.2s;
}
.hero-result-item:hover {
    background: rgba(201,168,76,0.1);
}
.hero-result-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}
.hero-result-info {
    flex: 1;
    min-width: 0;
}
.hero-result-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--secondary);
}
.hero-result-code {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}
.hero-result-location {
    font-size: 12px;
    color: var(--gray);
}
.hero-result-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

/* ============================================
   RENT PERIOD
   ============================================ */
.rent-period {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    margin-right: 5px;
}
.card-price .rent-period {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-dark);
}

/* ============================================
   COPY WHATSAPP BUTTON
   ============================================ */
.copy-whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.copy-whatsapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
}
.copy-whatsapp-btn:active {
    transform: scale(0.95);
}
.whatsapp-number-display {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
    direction: ltr;
}
.whatsapp-number-display .number {
    font-size: 20px;
    font-weight: 700;
    color: #25D366;
    direction: ltr;
    display: inline-block;
}

/* ============================================
   UTILITIES
   ============================================ */
.card-main-img { loading: lazy; }
.property-card { will-change: transform; transform: translateZ(0); }
.filters-wrapper { max-height: 80vh; overflow-y: auto; }
html[dir="ltr"] .container,
html[dir="ltr"] .hero-content,
html[dir="ltr"] .filters-grid { direction: ltr; }
html[dir="ltr"] .card-location i,
html[dir="ltr"] .btn-more i { margin-left: 0; margin-right: 8px; }
html[dir="ltr"] .btn-more i { transform: rotate(180deg); }

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */

/* Tablets and smaller desktops */
@media (max-width: 1200px) {
    .hero-title-ar { font-size: 48px; }
    .properties-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
    .card-images { height: 200px; }
    .properties-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; gap: 40px; }
    .hero-text { text-align: center; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-stats { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .header-wrapper { height: 75px; }
    .logo-img { height: 40px; }
    .logo-text { flex-direction: row; align-items: baseline; gap: 8px; }
    .logo-ar { font-size: 18px; }
    .logo-en { font-size: 11px; }
    
    .lang-switcher { padding: 2px; }
    .lang-btn { padding: 4px 12px; font-size: 11px; }
    html[dir="rtl"] .lang-switcher,
    html[dir="ltr"] .lang-switcher { margin-left: 8px; margin-right: 8px; }

    .hero {
        background-attachment: scroll; /* إزالة التأثير الثابت على الجوال */
        padding: 100px 0 60px;
        background: 
            linear-gradient(135deg, rgba(26, 20, 16, 0.88) 0%, rgba(26, 20, 16, 0.75) 100%),
            url('https://res.cloudinary.com/dkdilpnuc/image/upload/v1783203152/king-houses-header-bg_h3klgm.webp') center/cover no-repeat;
    }
    
    nav {
        position: fixed;
        top: 75px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 75px);
        background: var(--white);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        z-index: 999;
    }
    nav.mobile-open { left: 0; }
    nav ul { flex-direction: column; padding: 30px; gap: 20px; }
    .hamburger { display: flex; }
    
    .filters-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        color: var(--secondary);
        border: none;
        padding: 12px 20px;
        border-radius: 50px;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        width: auto;
        min-width: 140px;
        box-shadow: var(--shadow-gold);
    }
    .filters-wrapper { display: none; }
    .filters-wrapper.show { display: block; }
    .filters-grid { grid-template-columns: 1fr; gap: 12px; }
    .filter-group label { font-size: 13px; }
    .filter-select, .filter-input { padding: 10px; font-size: 14px; }
    .filters-actions button { padding: 8px 16px; font-size: 12px; }
    
    .properties-grid { grid-template-columns: 1fr; gap: 20px; }
    .properties-section { padding: 30px 0; }
    .section-header { margin-bottom: 30px; margin-top: 30px; }
    .section-title { font-size: 28px; }
    
    .hero { padding: 100px 0 60px; }
    .hero-title-ar { font-size: 28px; }
    .hero-title-en { font-size: 14px; }
    .hero-description { font-size: 13px; }
    .hero-stats { gap: 15px; flex-wrap: wrap; justify-content: center; }
    .stat-card { min-width: 80px; padding: 5px; }
    .stat-number { font-size: 22px; }
    .stat-label { font-size: 9px; white-space: nowrap; }
    
    .card-images { height: 200px; }
    .card-body { padding: 12px; }
    .card-title { font-size: 16px; }
    .card-price { font-size: 24px; }
    .btn-more { padding: 6px 12px; font-size: 12px; }
    
    .footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .footer-about,
    .footer-links:first-of-type,
    .footer-links:nth-child(3),
    .footer-contact {
        width: 100%;
        text-align: center;
        order: unset;
    }
    .footer-links:first-of-type,
    .footer-links:nth-child(3) {
        margin-top: 0;
    }
    .footer-social {
        justify-content: center !important;
    }
    .footer-links h4 {
        font-size: 13px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }
    .footer-links h4::after {
        width: 25px;
        height: 2px;
        right: 50%;
        transform: translateX(50%);
    }
    .footer-links ul li { margin-bottom: 6px; }
    .footer-links ul li a { font-size: 11px; }
    .footer-logo .logo-img { height: 80px; }
    .footer-logo .logo-ar { font-size: 30px; color: var(--white) !important; }
    .footer-logo .logo-en { font-size: 20px; color: var(--primary) !important; }
    .footer-logo { justify-content: center; }
    .footer-logo div { align-items: center; }
    .footer-description {
        font-size: 11px;
        margin-bottom: 12px;
        text-align: center;
    }
    .footer-social { justify-content: center; }
    .social-link { width: 34px; height: 34px; font-size: 15px; }
    .footer-social { gap: 10px; }
    .footer-contact-btn { padding: 8px 16px; font-size: 12px; margin-top: 10px; }
    .footer-bottom { flex-direction: column; align-items: center; gap: 8px; font-size: 11px; }

    .footer-social {
        display: flex;
        gap: 12px;
        justify-content: flex-start;
        margin-top: 15px;
        flex-wrap: nowrap;
    }

    .footer-logo {
        display: flex;
        align-items: center;
        gap: 15px;
        justify-content: center;
    }
    .footer-logo div {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stats-number { font-size: 28px; }
    .stats-label { font-size: 12px; }
    
    .gallery-main { height: 300px; }
    .property-header { flex-direction: column; gap: 10px; }
    .property-actions { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .phone-group { flex-direction: column; }
    .phone-select { width: 100%; }
    .specs-grid { grid-template-columns: 1fr; }
    .spec-item-detail:last-child { grid-column: span 1; }
    
    .hero-search-dropdown {
        position: fixed !important;
        top: auto !important;
        left: 10px !important;
        right: 10px !important;
        width: calc(100% - 20px) !important;
        max-height: 300px !important;
        z-index: 999999 !important;
        margin-top: 5px !important;
    }
    .hero-result-item { padding: 10px; gap: 8px; }
    .hero-result-image { width: 45px; height: 45px; }
    .hero-result-title { font-size: 13px; white-space: normal; }
    
    .floating-contact-btn { bottom: 20px; left: 20px; }
    .floating-icon { width: 50px; height: 50px; }
    .floating-icon i { font-size: 24px; }
    .map-container { height: 200px; }
    .map-open-btn { padding: 10px 20px; font-size: 14px; white-space: normal; }
    .rent-period { font-size: 12px; }

    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .card-images {
        height: 150px;
    }
    
    .card-body {
        padding: 10px;
    }
    
    .card-title {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .card-price {
        font-size: 18px;
    }
    
    .card-specs {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .spec-item {
        padding: 6px 4px;
    }
    
    .spec-value {
        font-size: 13px;
    }
    
    .spec-icon {
        font-size: 14px;
    }
    
    .btn-more {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .card-stats {
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .card-views, .card-favs, .card-date {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .card-location {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .card-code-wrapper .card-code {
        font-size: 10px;
        padding: 2px 10px;
    }
    
    .card-code-wrapper {
        margin-bottom: 6px;
    }
    
    .card-footer {
        padding-top: 8px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .btn-more {
        width: 100%;
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .preloader-logo {
        width: 140px;
        height: 140px;
    }
    .hero-title-ar { font-size: 24px; }
    .section-title { font-size: 24px; }
    .card-price { font-size: 20px; }
    .stat-number { font-size: 18px; }
    .stat-card { min-width: 65px; }
    .logo-img { height: 32px; }
    .logo-ar { font-size: 14px; }
    .logo-en { font-size: 9px; }
    .btn-outline { padding: 10px 16px; font-size: 12px; }
    .hero-search-input { font-size: 13px; padding: 12px 40px 12px 15px; }
    .footer-links h4 { font-size: 12px; }
    .footer-links ul li a { font-size: 10px; }
    .footer-description { font-size: 10px; }
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .card-images {
        height: 120px;
    }
    
    .card-body {
        padding: 8px;
    }
    
    .card-title {
        font-size: 12px;
    }
    
    .card-price {
        font-size: 15px;
    }
    
    .spec-item {
        padding: 4px 2px;
    }
    
    .spec-value {
        font-size: 11px;
    }
    
    .btn-more {
        font-size: 10px;
        padding: 4px 8px;
    }

    footer {
        padding: 20px 0 10px;
    }
    
    .footer-grid {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .footer-logo .logo-img {
        height: 32px;
    }
    
    .footer-logo .logo-ar {
        font-size: 15px;
    }
    
    .footer-logo .logo-en {
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .footer-description {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .footer-links h4 {
        font-size: 12px;
        margin-bottom: 6px;
        padding-bottom: 3px;
    }
    
    .footer-links ul li {
        margin-bottom: 3px;
    }
    
    .footer-links ul li a {
        font-size: 11px;
    }
    
    .social-link {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 11px;
    }
    
    .footer-contact h4 {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .footer-contact-btn {
        padding: 5px 12px;
        font-size: 11px;
        margin-top: 4px;
    }
    
    .footer-bottom {
        padding-top: 8px;
        font-size: 9px;
    }

}

/* ===== إصلاح نهائي لأزرار التواصل الاجتماعي ===== */
.footer-social {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
}

@media (max-width: 768px) {
    .footer-social {
        justify-content: center !important;
    }
    .social-link {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
    }

    .card-code-wrapper .card-code {
        font-size: 12px;
        padding: 3px 12px;
    }
}

/* ============================================
   FOOTER - UPDATED
   ============================================ */
   footer {
    background: var(--secondary);
    color: var(--white);
    padding: 70px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
}
.footer-about { min-width: 0; }
.footer-links { min-width: 0; }
.footer-contact { text-align: center; min-width: 0; }

/* شعار الفوتر - مكبر وواضح */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
    margin-bottom: 15px;
}
.footer-logo .logo-img {
    height: 80px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}
.footer-logo div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.footer-logo .logo-ar {
    font-size: 28px;
    color: var(--white) !important;
    font-weight: 800;
    line-height: 1.2;
}
.footer-logo .logo-en {
    font-size: 18px;
    color: var(--primary) !important;
    letter-spacing: 3px;
    font-weight: 600;
}

/* أزرار التواصل */
.footer-social {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-top: 15px;
}

.social-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition);
    color: var(--white);
    font-size: 20px;
    border: 1px solid rgba(255,255,255,0.15);
}
.social-link:hover {
    background: var(--primary);
    color: var(--secondary);
    transform: translateY(-3px);
}
.social-link.facebook:hover { background: #1877f2; color: white; }
.social-link.instagram:hover { background: linear-gradient(135deg, #f09433, #d62976, #962fbf); color: white; }
.social-link.telegram:hover { background: #0088cc; color: white; }

/* للجوال */
@media (max-width: 768px) {
    .footer-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .footer-about,
    .footer-links:first-of-type,
    .footer-links:nth-child(3),
    .footer-contact {
        width: 100%;
        text-align: center;
        order: unset;
    }
    .footer-logo {
        justify-content: center;
    }
    .footer-logo div {
        align-items: center;
    }
    .footer-logo .logo-img {
        height: 60px;
    }
    .footer-logo .logo-ar {
        font-size: 22px;
    }
    .footer-logo .logo-en {
        font-size: 14px;
    }
    .footer-social {
        justify-content: center !important;
    }
    .social-link {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        font-size: 17px;
    }
}

/* ===== تحسينات البطاقات ===== */
.property-card {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-images {
    height: 200px;
    flex-shrink: 0;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-specs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.spec-item {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    background: var(--light);
    border-radius: 6px;
}

.spec-icon {
    font-size: 16px;
    margin-bottom: 3px;
}

.spec-value {
    font-size: 14px;
    font-weight: 600;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.card-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.card-price span {
    font-size: 14px;
}

.btn-more {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 25px;
}

.card-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.card-views, .card-favs, .card-date {
    font-size: 11px;
    padding: 2px 8px;
}

.card-location {
    font-size: 13px;
    margin-bottom: 4px;
}

.card-code-wrapper {
    margin-bottom: 8px;
}

.card-code-wrapper .card-code {
    font-size: 11px;
    padding: 2px 12px;
}

/* رتبة المميز */
.featured-badge {
    font-size: 11px;
    padding: 4px 10px;
    top: 10px;
    left: 10px;
}

.badge-type {
    font-size: 11px;
    padding: 4px 12px;
}

/* أيقونات البطاقة */
.card-views i, .card-favs i, .card-date i {
    font-size: 11px;
}

/* ============================================
   FOOTER - COMPACT VERSION
   ============================================ */

/* تصغير الفوتر بشكل عام */
footer {
    padding: 40px 0 15px;
}

.footer-grid {
    gap: 20px;
    margin-bottom: 25px;
}

/* تصغير الشعار والنصوص */
.footer-logo .logo-img {
    height: 100px;
}

.footer-logo .logo-ar {
    font-size: 24px;
}

.footer-logo .logo-en {
    font-size: 20px;
    letter-spacing: 2px;
}

.footer-logo {
    gap: 10px;
    margin-bottom: 6px;
}

/* تصغير الوصف */
.footer-description {
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* تصغير العناوين والروابط */
.footer-links h4 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 6px;
}

.footer-links h4::after {
    width: 25px;
    height: 2px;
}

.footer-links ul li {
    margin-bottom: 6px;
}

.footer-links ul li a {
    font-size: 13px;
}

/* تصغير أزرار التواصل */
.footer-social {
    gap: 8px;
    margin-top: 8px;
}

.social-link {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 15px;
}

/* تصغير زر التواصل */
.footer-contact-btn {
    padding: 8px 18px;
    font-size: 13px;
    margin-top: 8px;
}

.footer-contact h4 {
    font-size: 15px;
    margin-bottom: 8px;
}

/* تصغير أسفل الفوتر */
.footer-bottom {
    padding-top: 15px;
    font-size: 12px;
    gap: 8px;
}

/* ============================================
   STATS SECTION - COMPACT VERSION
   ============================================ */

/* تصغير قسم الإحصائيات */
.stats-section {
    padding: 40px 0;
}

.stats-grid {
    gap: 15px;
}

.stats-item {
    padding: 10px;
}

.stats-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stats-number {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stats-label {
    font-size: 13px;
    opacity: 0.8;
}

/* للجوال */
@media (max-width: 768px) {
    .stats-section {
        padding: 25px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stats-item {
        padding: 8px;
    }
    
    .stats-icon {
        font-size: 24px;
        margin-bottom: 4px;
    }
    
    .stats-number {
        font-size: 24px;
        margin-bottom: 2px;
    }
    
    .stats-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .stats-section {
        padding: 15px 0;
    }
    
    .stats-grid {
        gap: 6px;
    }
    
    .stats-item {
        padding: 5px;
    }
    
    .stats-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .stats-number {
        font-size: 18px;
    }
    
    .stats-label {
        font-size: 9px;
    }
}

/* ============================================
   FOOTER STATS - مدمج مع الفوتر
   ============================================ */

/* حاوية الإحصائيات في الفوتر */
.footer-stats {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 10px;
}

.footer-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
}

.footer-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 5px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.footer-stat-item:hover {
    background: rgba(201,168,76,0.15);
    transform: translateY(-2px);
}

.footer-stat-item i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 2px;
}

.footer-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
}

.footer-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}

/* للجوال */
@media (max-width: 768px) {
    .footer-stats {
        padding-top: 15px;
        margin-top: 5px;
    }
    
    .footer-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-stat-item {
        padding: 6px 4px;
        gap: 2px;
    }
    
    .footer-stat-item i {
        font-size: 24px;
    }
    
    .footer-stat-number {
        font-size: 25px;
    }
    
    .footer-stat-label {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .footer-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .footer-stat-item {
        padding: 4px 2px;
        border-radius: 6px;
    }
    
    .footer-stat-item i {
        font-size: 16px;
    }
    
    .footer-stat-number {
        font-size: 18px;
    }
    
    .footer-stat-label {
        font-size: 9px;
    }
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 30px;
    margin-bottom: 20px;
    align-items: start;
}

/* جعل الإحصائيات تأخذ عرض كامل */
.footer-stats {
    grid-column: 1 / -1;
    order: 5;
}

@media (max-width: 480px) {
    .footer-logo .logo-ar {
        font-size: 24px;  /* كانت 15px */
    }

    .footer-logo .logo-en {
        font-size: 24px;  /* كانت 10px */
    }

    .footer-description {
        font-size: 24px;  /* كانت 11px */
    }

    .footer-links h4 {
        font-size: 16px;  /* كانت 12px */
    }

    .footer-links ul li a {
        font-size: 16px;  /* كانت 11px */
    }

    .footer-contact h4 {
        font-size: 17px;  /* كانت 12px */
    }

    .footer-contact-btn {
        font-size: 16px;  /* كانت 11px */
    }

    .footer-stat-number {
        font-size: 27px;  /* كانت 18px */
    }

    .footer-stat-label {
        font-size: 15px;  /* كانت 9px */
    }

    .footer-stat-item i {
        font-size: 23px;  /* كانت 16px */
    }

    .footer-bottom {
        font-size: 13px;  /* كانت 9px */
    }
}