/* css/style.css */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
    /* Main Brand */
    --primary-dark: #194795;
    --dark-blue: #174086;
    --secondary-light: #CDCFCE;
    --neutral: #A9AEB2;
    
    /* Auctions Brand */
    --auction-dark: #00365D;
    --auction-blue: #00798E;
    --auction-teal: #00A4A2;
    
    /* Project Brand (Residence 1) */
    --proj-red: #D17A22;
    --proj-gray: #989BA9;
    --proj-light: #C8C9CB;

    /* Global */
    --white: #FFFFFF;
    --bg-light: #F8F9FA;
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ------------------- Typography ------------------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }
.section-title { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.section-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 3rem; }

/* ------------------- Buttons ------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary { background-color: var(--primary-dark); color: var(--white); }
.btn-primary:hover { background-color: var(--dark-blue); transform: translateY(-2px); }
.btn-auction { background-color: var(--auction-blue); color: var(--white); }
.btn-auction:hover { background-color: var(--auction-dark); }
.btn-auction-outline { border-color: var(--auction-blue); color: var(--auction-blue); }
.btn-auction-outline:hover { background-color: var(--auction-blue); color: var(--white); }
.btn-project { background-color: var(--proj-red); color: var(--white); }

/* ------------------- Header ------------------- */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%;
    background: #00365D; z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 5%;
    display: flex; justify-content: space-between; align-items: center;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* 1. التخطيط والهيكلة (استعادة المسافات المفقودة) */
.nav-menu { display: flex; gap: 2rem; align-items: center; }
.header-actions { display: flex; gap: 1rem; align-items: center; }
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; transition: var(--transition); }

/* 2. الألوان الافتراضية (بيضاء فوق الهيرو) */
.logo h1 { 
    font-size: 1.8rem; 
    color: var(--white); 
    transition: var(--transition); 
}
.nav-menu a { 
    font-weight: 500; 
    color: var(--white); 
    transition: var(--transition); 
}
.nav-menu a:hover { 
    color: var(--secondary-light); 
}
.lang-switch { 
    font-weight: 500; 
    cursor: pointer; 
    color: var(--white); 
    transition: var(--transition); 
}
.mobile-toggle { 
    color: var(--white); /* أيقونة الجوال بيضاء */
}

/* 3. الألوان عند النزول Scrolled (داكنة على خلفية بيضاء) */
.site-header.scrolled .logo h1 { 
    color: var(--primary-dark); 
}
.site-header.scrolled .nav-menu a { 
    color: var(--neutral); 
}
.site-header.scrolled .nav-menu a:hover { 
    color: var(--primary-dark); 
}
.site-header.scrolled .lang-switch { 
    color: var(--text-main); 
}
.site-header.scrolled .mobile-toggle { 
    color: var(--text-main); /* أيقونة الجوال داكنة */
}

/* ------------------- Hero Section ------------------- */
.hero {
    height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; position: relative;
    background: url('../assets/images/development/aqaronaresidence1/hero.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 0 5%;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(25, 71, 149, 0.8), rgba(0,0,0,0.4));
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero-content p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; }

/* ------------------- Statistics ------------------- */
.statistics { padding: 4rem 5%; background: var(--bg-light); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: center; }
.stat-card .stat-value { font-size: 2.5rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.stat-card .stat-label { color: var(--text-muted); font-weight: 500; }

/* ------------------- Auctions Section (Custom Brand) ------------------- */
.auctions-section { padding: 6rem 5%; background: var(--white); }
.auctions-section .section-title { color: var(--auction-dark); }
/* =========================================
   ضبط شبكة المزادات (3 أعمدة ثابتة)
   ========================================= */
.auctions-grid, #featured-auctions-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); /* 3 أعمدة في الكمبيوتر دائماً */
    gap: 2rem; 
    align-items: start;
}
.auction-card {
    border: 1px solid #EAEAEA; border-radius: 8px; overflow: hidden;
    transition: var(--transition); background: var(--white);
}
.auction-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,54,93,0.1); }
.auction-image-wrapper { position: relative; height: 220px; overflow: hidden; }
.auction-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.auction-card:hover .auction-image { transform: scale(1.05); }
.auction-status {
    position: absolute; top: 1rem; right: 1rem;
    background: var(--auction-dark); color: var(--white);
    padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem; z-index: 2;
}
.status-active { background: var(--auction-teal); }
.auction-content { padding: 1.5rem; }
.auction-title { font-size: 1.3rem; color: var(--auction-dark); margin: 0.5rem 0 1rem; }
.auction-meta, .auction-meta-bottom {
    display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem;
}
.auction-card .btn { width: 100%; margin-top: 1rem; }

/* ------------------- Residence 1 (Project Brand) ------------------- */
.projects-section { padding: 6rem 5%; background: var(--bg-light); }
.project-editorial {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
    background: var(--white); padding: 3rem; border-radius: 8px;
}
.project-img-wrapper { height: 400px; border-radius: 8px; overflow: hidden; }
.project-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.project-brand-title { color: var(--proj-red); font-size: 2.2rem; margin-bottom: 1rem; }
.project-features { margin: 1.5rem 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.project-features li { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); }
.project-features li::before { content: '✓'; color: var(--proj-red); font-weight: bold; }

/* ------------------- Responsive ------------------- */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 2.8rem; }
    .project-editorial { grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem; }
    /* إضافة هذا السطر للتابلت: */
    .auctions-grid, #featured-auctions-grid { grid-template-columns: repeat(2, 1fr); } 
}
@media (max-width: 768px) {
    .nav-menu {
        position: fixed; top: 70px; right: -100%; width: 100%; height: calc(100vh - 70px);
        background: #00365D; flex-direction: column; justify-content: center;
        transition: var(--transition);
    }
    .nav-menu.active { right: 0; }
    .mobile-toggle { display: block; }
    .site-header { box-shadow: 0 2px 10px rgba(0,0,0,0.05); padding: 1rem 5%; }
    .hero-content h1 { font-size: 2rem; }
    .hero-btns { flex-direction: column; }
}

/* ==========================================================================
   Mobile Responsiveness Fixes (For Screens < 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* إصلاحات عامة للنصوص والصور */
    img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }

    body {
        font-size: 15px; /* تصغير الخط العام قليلاً في الجوال */
    }

    .section-title {
        font-size: 2rem;
    }

    /* إصلاح Hero Section */
    .hero-content h1, .hero-auctions h1, .hero-projects h1, .hero-about h1 {
        font-size: 2.2rem !important;
        line-height: 1.4;
    }
    
    .hero, .hero-auctions, .hero-projects {
        height: auto;
        min-height: 70vh;
        padding-top: 100px; /* لعدم تغطية الـ Header للنص */
        padding-bottom: 50px;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }
    .hero-btns .btn {
        width: 100%;
    }

    /* إصلاح كروت المزادات (Auctions Grid) */
    .auctions-grid, #featured-auctions-grid {
        grid-template-columns: 1fr; /* كارت واحد في كل صف */
        gap: 1.5rem;
    }

    /* إصلاح كروت المشاريع (Projects - Editorial Card) */
    .editorial-card {
        grid-template-columns: 1fr !important;
    }
    .ec-image {
        min-height: 250px !important; /* تصغير ارتفاع صورة المشروع */
    }
    .ec-content {
        padding: 2rem 1.5rem !important; /* تقليل الـ Padding الداخلي */
    }
    .ec-title {
        font-size: 1.8rem !important;
    }

    /* إصلاح صفحة التواصل (Contact) */
    .contact-container {
        grid-template-columns: 1fr;
    }
    .contact-info, .contact-form-container {
        padding: 2rem 1.5rem !important;
    }
    
    /* إصلاح المسافات (Padding) للأقسام كاملة */
    .auctions-section, .projects-section, .statistics, .why-section, .contact-wrapper, .projects-wrapper {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    /* إصلاح الفلاتر في صفحة المزادات */
    .filters-top, .filters-bottom {
        flex-direction: column;
    }
    .filter-btn, .filter-input, .filter-select {
        width: 100%;
    }
}

/* إصلاحات للشاشات الصغيرة جداً (مثل 360px و 390px) */
@media (max-width: 400px) {
    .section-title {
        font-size: 1.7rem;
    }
    .stat-card .stat-value {
        font-size: 2rem;
    }
}

/* تنسيقات أوقات المزاد داخل الكروت */
.auction-dates-box {
    background: #F8F9FA;
    border: 1px solid #EAEAEA;
    border-radius: 6px;
    padding: 0.8rem;
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.date-label {
    font-weight: 600;
    color: var(--auction-dark);
}

.date-value {
    color: var(--text-muted);
    font-family: 'Inter', 'IBM Plex Sans Arabic', sans-serif;
}