:root{
    --bg:#0f0f10;
    --panel:#171719;
    --panel2:#202023;

    --gold:#d6a63c;
    --gold2:#f0c766;

    --text:#f6f3eb;
    --muted:#b8b3a8;

    --line:#2f2f33;

    --danger:#b94c4c;
    --ok:#3b8f62;

    --premium-dark:#071724;
    --premium-dark2:#0c2538;
    --premium-gold:#f0bd38;
    --premium-gold2:#d69613;
}


/* =========================================================
   عام
========================================================= */

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;

    font-family:
        Tahoma,
        Arial,
        sans-serif;

    background:var(--bg);

    color:var(--text);

    direction:rtl;
}

a{
    text-decoration:none;
    color:inherit;
}

img{
    max-width:100%;
}

.container{
    width:min(1180px,92%);
    margin:auto;
}


/* =========================================================
   الهيدر
========================================================= */

header{
    position:sticky;

    top:0;

    z-index:20;

    background:
        rgba(15,15,16,.94);

    backdrop-filter:
        blur(10px);

    border-bottom:
        1px solid
        var(--line);
}


.nav{
    min-height:74px;

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:20px;
}


.brand{
    font-weight:800;

    color:var(--gold2);

    font-size:26px;
}


.office-brand{
    display:flex;
    align-items:center;
}


.office-brand img{
    display:block;

    max-width:150px;

    height:55px;

    object-fit:contain;
}


.navlinks{
    display:flex;

    gap:24px;

    align-items:center;

    flex-wrap:wrap;
}


.navlinks a{
    color:#ddd;

    transition:
        color .2s ease;
}


.navlinks a:hover,
.navlinks a.active{
    color:var(--gold2);
}


/* =========================================================
   الأزرار
========================================================= */

.btn{
    display:inline-flex;

    align-items:center;

    justify-content:center;

    border:0;

    border-radius:12px;

    padding:
        12px
        18px;

    font-weight:700;

    cursor:pointer;
}


.btn-gold{
    background:
        linear-gradient(
            135deg,
            var(--gold2),
            var(--gold)
        );

    color:#111;
}


.btn-dark{
    background:
        var(--panel2);

    color:#fff;

    border:
        1px solid
        var(--line);
}


.btn-danger{
    background:
        var(--danger);

    color:#fff;
}


/* =========================================================
   الهيرو
========================================================= */

.hero{
    min-height:520px;

    display:grid;

    place-items:center;

    background:
        linear-gradient(
            rgba(0,0,0,.58),
            rgba(0,0,0,.72)
        ),
        url(
            'https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1600&q=80'
        )
        center /
        cover;
}


.hero-box{
    text-align:center;

    max-width:800px;

    padding:
        40px
        20px;
}


.hero h1{
    font-size:
        clamp(
            34px,
            6vw,
            72px
        );

    margin:
        0
        0
        16px;
}


.hero p{
    color:#ddd;

    font-size:20px;

    line-height:1.8;
}


.cta-row{
    display:flex;

    gap:14px;

    justify-content:center;

    flex-wrap:wrap;

    margin-top:26px;
}


/* =========================================================
   الأقسام
========================================================= */

.section{
    padding:
        62px
        0;
}


.section-title{
    display:flex;

    justify-content:space-between;

    align-items:end;

    gap:16px;

    margin-bottom:28px;
}


.section-title h2{
    margin:0;

    font-size:32px;
}


.section-title p{
    margin:
        8px
        0
        0;

    color:var(--muted);
}


/* =========================================================
   شبكة العقارات
========================================================= */

.grid{
    display:grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0,1fr)
        );

    gap:30px;

    align-items:stretch;
}


/* =========================================================
   البطاقة الجديدة
========================================================= */

.premium-card{
    position:relative;

    display:grid;

    /*
       المعلومات يسار
       والصورة يمين
    */
    grid-template-columns:
        46%
        54%;

    grid-template-areas:
        "info photo";

    min-height:430px;

    overflow:hidden;

    border-radius:30px;

    background:
        radial-gradient(
            circle
            at
            0%
            100%,
            rgba(56,112,143,.22),
            transparent 45%
        ),
        linear-gradient(
            145deg,
            #061521 0%,
            #081c2b 45%,
            #0c283b 100%
        );

    box-shadow:
        0 20px 55px
        rgba(0,0,0,.30);

    border:
        1px solid
        rgba(255,255,255,.05);

    direction:ltr;

    isolation:isolate;

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


.premium-card:hover{
    transform:
        translateY(-6px);

    box-shadow:
        0 30px 70px
        rgba(0,0,0,.38);
}


/* =========================================================
   صورة العقار
========================================================= */

.premium-photo{
    grid-area:photo;

    position:relative;

    z-index:3;

    min-width:0;

    min-height:430px;

    overflow:hidden;


    /*
       الانحناء بين الصورة
       والمعلومات
    */
    border-radius:
        48%
        0
        0
        48%
        /
        56%
        0
        0
        56%;


    box-shadow:
        -18px
        0
        35px
        rgba(0,0,0,.13);
}


.premium-photo img{
    width:100%;

    height:100%;

    min-height:430px;

    display:block;

    object-fit:cover;

    transition:
        transform .6s ease;
}


.premium-card:hover
.premium-photo img{
    transform:
        scale(1.045);
}


/*
 * تدرج بسيط فوق الصورة
 */
.premium-photo::after{
    content:"";

    position:absolute;

    inset:0;

    background:
        linear-gradient(
            90deg,
            rgba(5,20,31,.22)
            0%,
            transparent
            34%
        );

    pointer-events:none;
}


/* =========================================================
   شارة للبيع / للإيجار
========================================================= */

.premium-badge{
    position:absolute;

    top:24px;

    right:24px;

    z-index:5;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    min-width:82px;

    padding:
        10px
        20px;

    border-radius:10px;

    background:
        linear-gradient(
            135deg,
            #f7d970,
            #dba628
        );

    color:#071724;

    font-size:17px;

    font-weight:900;

    direction:rtl;

    box-shadow:
        0 8px 25px
        rgba(0,0,0,.20);
}


/* =========================================================
   معلومات العقار
========================================================= */

.premium-info{
    grid-area:info;

    position:relative;

    z-index:2;

    min-width:0;

    display:flex;

    flex-direction:column;

    direction:rtl;

    padding:
        38px
        30px
        30px
        34px;

    overflow:hidden;
}


.premium-main{
    position:relative;

    z-index:4;
}


.premium-title{
    margin:
        4px
        0
        13px;

    color:#fff;

    font-size:
        clamp(
            23px,
            2.2vw,
            31px
        );

    line-height:1.4;

    font-weight:900;
}


/* =========================================================
   الموقع
========================================================= */

.premium-location{
    display:flex;

    align-items:center;

    gap:7px;

    padding-bottom:20px;

    color:#dcb54e;

    font-size:15px;

    font-weight:700;

    border-bottom:
        1px solid
        rgba(255,255,255,.10);
}


.premium-pin{
    font-size:17px;
}


/* =========================================================
   الوصف
========================================================= */

.premium-description{
    margin-top:21px;

    padding-bottom:22px;

    color:#f1f3f5;

    font-size:15px;

    line-height:2;

    border-bottom:
        1px solid
        rgba(255,255,255,.10);
}


/* =========================================================
   أسفل البطاقة
========================================================= */

.premium-bottom{
    position:relative;

    z-index:5;

    margin-top:auto;

    padding-top:25px;
}


/* =========================================================
   السعر
========================================================= */

.premium-price{
    margin-bottom:20px;

    color:#ffd133;

    font-size:
        clamp(
            24px,
            2.6vw,
            34px
        );

    font-weight:900;

    line-height:1.4;

    text-shadow:
        0
        3px
        10px
        rgba(0,0,0,.28);
}


/* =========================================================
   زر Google Maps
========================================================= */

.premium-map-button{
    display:flex;

    align-items:center;

    justify-content:center;

    gap:8px;

    width:100%;

    padding:
        14px
        17px;

    border-radius:999px;

    background:
        linear-gradient(
            135deg,
            #ffdb43,
            #dfa714
        );

    color:#101b22;

    text-decoration:none;

    font-size:14px;

    font-weight:900;

    box-shadow:
        0 10px 28px
        rgba(224,165,20,.28);

    transition:
        transform .2s ease,
        filter .2s ease,
        box-shadow .2s ease;
}


.premium-map-button:hover{
    color:#101b22;

    transform:
        translateY(-2px);

    filter:
        brightness(1.06);

    box-shadow:
        0 15px 35px
        rgba(224,165,20,.40);
}


.premium-map-icon{
    font-size:18px;
}


/* =========================================================
   الزخرفة الذهبية
========================================================= */

.premium-gold-shape{
    position:absolute;

    z-index:1;

    width:280px;

    height:180px;

    left:-125px;

    bottom:-125px;

    border-radius:50%;

    background:
        linear-gradient(
            135deg,
            rgba(221,170,54,.95),
            rgba(248,211,113,.95)
        );

    transform:
        rotate(-12deg);

    pointer-events:none;

    box-shadow:
        0 0 50px
        rgba(214,166,60,.15);
}


/* =========================================================
   التصميم القديم العام للبطاقات
========================================================= */

.card{
    background:
        var(--panel);

    border:
        1px solid
        var(--line);

    border-radius:18px;

    overflow:hidden;

    box-shadow:
        0
        12px
        35px
        rgba(0,0,0,.18);
}


.card img{
    width:100%;

    height:220px;

    object-fit:cover;

    display:block;
}


.card-body{
    padding:18px;
}


.badge{
    display:inline-block;

    background:
        rgba(214,166,60,.16);

    color:var(--gold2);

    border:
        1px solid
        rgba(214,166,60,.3);

    padding:
        6px
        10px;

    border-radius:999px;

    font-size:13px;
}


.price{
    color:var(--gold2);

    font-weight:800;

    font-size:22px;

    margin:
        10px
        0;
}


.meta{
    color:var(--muted);

    font-size:14px;

    line-height:1.8;
}


/* =========================================================
   Footer
========================================================= */

footer{
    border-top:
        1px solid
        var(--line);

    padding:
        34px
        0;

    color:var(--muted);

    text-align:center;
}


/* =========================================================
   عناوين الصفحات
========================================================= */

.page-head{
    padding:
        48px
        0
        20px;
}


.page-head h1{
    margin:
        0
        0
        8px;

    font-size:38px;
}


/* =========================================================
   Toolbar
========================================================= */

.toolbar{
    display:flex;

    justify-content:space-between;

    gap:12px;

    align-items:center;

    flex-wrap:wrap;

    margin-bottom:20px;
}


/* =========================================================
   الحقول
========================================================= */

.input,
textarea,
select{
    width:100%;

    background:#111113;

    color:#fff;

    border:
        1px solid
        var(--line);

    border-radius:10px;

    padding:12px;
}


label{
    display:block;

    margin:
        0
        0
        7px;

    color:#ddd;

    font-size:14px;
}


/* =========================================================
   النماذج
========================================================= */

.form-grid{
    display:grid;

    grid-template-columns:
        repeat(2,1fr);

    gap:14px;
}


.form-card{
    max-width:900px;

    margin:auto;

    background:
        var(--panel);

    border:
        1px solid
        var(--line);

    border-radius:18px;

    padding:24px;
}


/* =========================================================
   تسجيل الدخول
========================================================= */

.login-wrap{
    min-height:
        calc(100vh - 74px);

    display:grid;

    place-items:center;

    padding:30px;
}


.login-card{
    width:
        min(430px,92%);

    background:
        var(--panel);

    border:
        1px solid
        var(--line);

    border-radius:20px;

    padding:28px;
}


.login-card h1{
    margin-top:0;
}


/* =========================================================
   التنبيهات
========================================================= */

.notice{
    padding:
        12px
        14px;

    border-radius:10px;

    margin-bottom:15px;

    background:#151a16;

    border:
        1px solid
        #294c35;

    color:#c8f0d4;
}


/* =========================================================
   لوحة الأدمن
========================================================= */

.admin-layout{
    display:grid;

    grid-template-columns:
        240px
        1fr;

    min-height:
        calc(100vh - 74px);
}


.sidebar{
    background:#121214;

    border-left:
        1px solid
        var(--line);

    padding:
        24px
        16px;
}


.sidebar h3{
    color:var(--gold2);

    margin-top:0;
}


.sidebar a{
    display:block;

    padding:12px;

    border-radius:10px;

    color:#ddd;

    margin-bottom:6px;
}


.sidebar a:hover{
    background:
        var(--panel2);
}


.admin-main{
    padding:28px;
}


/* =========================================================
   الإحصائيات
========================================================= */

.stats{
    display:grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:14px;

    margin-bottom:22px;
}


.stat{
    background:
        var(--panel);

    border:
        1px solid
        var(--line);

    border-radius:16px;

    padding:18px;
}


.stat b{
    display:block;

    font-size:28px;

    color:var(--gold2);

    margin-top:8px;
}


/* =========================================================
   الجدول
========================================================= */

.table-wrap{
    overflow:auto;

    border:
        1px solid
        var(--line);

    border-radius:16px;
}


table{
    width:100%;

    border-collapse:collapse;

    background:
        var(--panel);

    min-width:800px;
}


th,
td{
    padding:14px;

    border-bottom:
        1px solid
        var(--line);

    text-align:right;
}


th{
    color:var(--gold2);

    background:#151517;
}


.actions{
    display:flex;

    gap:8px;
}


/* =========================================================
   الخريطة القديمة إذا استخدمت بأي صفحة
========================================================= */

.mapbox{
    height:260px;

    border-radius:14px;

    overflow:hidden;

    border:
        1px solid
        var(--line);

    background:#0c0c0d;
}


.mapbox iframe{
    width:100%;

    height:100%;

    border:0;
}


/* =========================================================
   لا توجد عقارات
========================================================= */

.empty{
    grid-column:
        1 / -1;

    padding:35px;

    text-align:center;

    color:var(--muted);

    border:
        1px dashed
        var(--line);

    border-radius:14px;
}


/* =========================================================
   Modal
========================================================= */

.modal{
    position:fixed;

    inset:0;

    background:
        rgba(0,0,0,.72);

    display:none;

    align-items:center;

    justify-content:center;

    padding:20px;

    z-index:99;
}


.modal.show{
    display:flex;
}


.modal-card{
    width:
        min(920px,96vw);

    max-height:90vh;

    overflow:auto;

    background:
        var(--panel);

    border:
        1px solid
        var(--line);

    border-radius:18px;

    padding:22px;
}


.modal-head{
    display:flex;

    justify-content:space-between;

    gap:10px;

    align-items:center;

    margin-bottom:15px;
}


.small{
    font-size:13px;

    color:var(--muted);
}


/* =========================================================
   شاشة متوسطة
========================================================= */

@media (max-width:1100px){

    .grid{
        grid-template-columns:1fr;
    }


    .premium-card{
        width:100%;

        max-width:900px;

        margin-inline:auto;

        grid-template-columns:
            46%
            54%;
    }

}


/* =========================================================
   التابلت
========================================================= */

@media (max-width:900px){

    .admin-layout{
        grid-template-columns:1fr;
    }


    .sidebar{
        border-left:0;

        border-bottom:
            1px solid
            var(--line);

        display:flex;

        gap:8px;

        overflow:auto;
    }


    .sidebar h3{
        display:none;
    }


    .sidebar a{
        white-space:nowrap;
    }


    .stats{
        grid-template-columns:
            1fr
            1fr;
    }


    .premium-card{
        min-height:390px;
    }


    .premium-photo,
    .premium-photo img{
        min-height:390px;
    }

}


/* =========================================================
   الجوال
========================================================= */

@media (max-width:700px){

    .grid{
        grid-template-columns:1fr;

        gap:24px;
    }


    /*
       بالجوال الصورة فوق
       والتفاصيل تحت
    */
    .premium-card{
        display:flex;

        flex-direction:column;

        min-height:auto;

        border-radius:24px;
    }


    .premium-photo{
        width:100%;

        height:285px;

        min-height:285px;

        border-radius:
            0
            0
            45%
            45%
            /
            0
            0
            20%
            20%;

        box-shadow:
            0
            12px
            30px
            rgba(0,0,0,.16);
    }


    .premium-photo img{
        height:285px;

        min-height:285px;
    }


    .premium-photo::after{
        background:
            linear-gradient(
                0deg,
                rgba(5,20,31,.18),
                transparent 45%
            );
    }


    .premium-info{
        padding:
            20px
            22px
            26px;
    }


    .premium-title{
        font-size:25px;
    }


    .premium-location{
        font-size:14px;

        padding-bottom:16px;
    }


    .premium-description{
        font-size:14px;

        margin-top:16px;

        padding-bottom:17px;
    }


    .premium-bottom{
        padding-top:20px;
    }


    .premium-price{
        font-size:27px;

        margin-bottom:16px;
    }


    .premium-map-button{
        padding:
            14px
            15px;

        font-size:14px;
    }


    .premium-badge{
        top:18px;

        right:18px;

        font-size:15px;

        min-width:72px;

        padding:
            8px
            16px;
    }


    .premium-gold-shape{
        width:210px;

        height:135px;

        left:-100px;

        bottom:-100px;
    }

}


/* =========================================================
   جوال صغير
========================================================= */

@media (max-width:640px){

    .nav{
        height:auto;

        padding:
            14px
            0;

        align-items:flex-start;
    }


    .navlinks{
        gap:12px;

        font-size:14px;
    }


    .brand{
        font-size:22px;
    }


    .office-brand img{
        max-width:120px;

        height:45px;
    }


    .hero{
        min-height:430px;
    }


    .hero p{
        font-size:16px;
    }


    .section{
        padding:
            40px
            0;
    }


    .section-title{
        align-items:flex-start;

        flex-direction:column;
    }


    .section-title h2{
        font-size:26px;
    }


    .form-grid,
    .stats{
        grid-template-columns:1fr;
    }


    .admin-main{
        padding:
            18px
            12px;
    }

}