/* =========================================================
   OMAK GROUP - REAL ESTATE PLATFORM
   Desktop + Tablet + Mobile
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary: #0d2b45;
    --primary-dark: #071d30;

    --gold: #d4a13c;
    --gold-dark: #b48329;

    --white: #ffffff;
    --background: #f5f7f8;

    --text: #172431;
    --muted: #6f7c88;

    --border: #dfe5e9;

    --radius: 12px;

    --shadow: 0 7px 22px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   GENERAL
   ========================================================= */

body {
    font-family: Arial, Tahoma, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: relative;
    z-index: 10;

    background: var(--white);

    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 88px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
}


/* =========================================================
   LOGO
   ========================================================= */

.brand-logo-link {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;
}

.brand-logo {
    width: 78px;
    height: 78px;

    display: block;

    object-fit: contain;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.main-nav {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 18px;
}

.main-nav a {
    color: var(--text);

    text-decoration: none;

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;

    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--gold-dark);
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.header-actions {
    flex: 0 0 auto;

    display: flex;
    align-items: center;

    gap: 10px;
}

.lang-switch {
    min-width: 120px;
    height: 42px;

    padding: 0 12px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--white);

    color: var(--text);

    font-family: inherit;
    font-size: 13px;

    cursor: pointer;
}

.add-listing-btn {
    min-height: 42px;

    padding: 9px 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: var(--gold);
    color: var(--white);

    text-decoration: none;

    font-size: 14px;
    font-weight: 800;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.add-listing-btn:hover {
    background: var(--gold-dark);

    transform: translateY(-1px);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 52px 0 56px;

    background:
        linear-gradient(
            rgba(7, 29, 48, 0.92),
            rgba(7, 29, 48, 0.92)
        ),
        linear-gradient(
            135deg,
            #163b5b,
            #071d30
        );

    color: var(--white);
}

.hero-content {
    max-width: 1180px;

    margin: 0 auto;

    text-align: center;
}

.hero h1 {
    margin-bottom: 12px;

    font-size: clamp(31px, 4vw, 48px);

    line-height: 1.3;
    font-weight: 900;
}

.hero p {
    max-width: 780px;

    margin: 0 auto 27px;

    color: #e6edf3;

    font-size: 17px;
}


/* =========================================================
   SEARCH - DESKTOP
   ========================================================= */

.property-search {
    width: 100%;

    padding: 14px;

    display: grid;

    /*
       على الكمبيوتر:
       بيع/إيجار | نوع العقار | الدولة | المدينة | زر البحث
       كلها في صف واحد
    */
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 1fr)
        145px;

    gap: 10px;

    background: var(--white);

    border-radius: 14px;

    box-shadow:
        0 15px 36px rgba(0, 0, 0, 0.18);
}

.property-search select,
.property-search input {
    width: 100%;
    min-width: 0;
    height: 48px;

    padding: 0 13px;

    border: 1px solid var(--border);
    border-radius: 9px;

    outline: none;

    background: var(--white);

    color: var(--text);

    font-family: inherit;
    font-size: 14px;
}

.property-search select:focus,
.property-search input:focus {
    border-color: var(--gold);
}

.search-btn {
    width: 100%;
    height: 48px;

    padding: 0 15px;

    border: 0;
    border-radius: 9px;

    background: var(--gold);

    color: var(--white);

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    white-space: nowrap;

    transition: background 0.2s ease;
}

.search-btn:hover {
    background: var(--gold-dark);
}


/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

.section {
    padding: 40px 0;
}

.section-header {
    margin-bottom: 20px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;
}

.section-header h2 {
    margin-bottom: 3px;

    color: var(--primary);

    font-size: 27px;
    line-height: 1.35;
}

.section-header p {
    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   CATEGORIES
   ========================================================= */

.category-grid {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 13px;
}

.category-card {
    min-height: 125px;

    padding: 17px 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    color: var(--text);

    text-decoration: none;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);

    border-color: var(--gold);

    box-shadow: var(--shadow);
}

.category-icon {
    margin-bottom: 7px;

    font-size: 29px;
    line-height: 1;
}

.category-card strong {
    font-size: 14px;
    font-weight: 800;
}


/* =========================================================
   PROPERTY CARDS
   ========================================================= */

.properties-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.property-card {
    overflow: hidden;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}

.property-image {
    height: 195px;

    position: relative;

    background:
        linear-gradient(
            135deg,
            #e1e6e9,
            #f1f3f4
        );
}

.property-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}

.property-badge {
    position: absolute;

    top: 11px;
    right: 11px;

    padding: 5px 9px;

    border-radius: 6px;

    background: var(--gold);
    color: var(--white);

    font-size: 12px;
    font-weight: 800;
}

.property-body {
    padding: 16px;
}

.property-price {
    margin-bottom: 4px;

    color: var(--gold-dark);

    font-size: 19px;
    font-weight: 900;
}

.property-title {
    margin-bottom: 5px;

    color: var(--primary);

    font-size: 17px;
    line-height: 1.45;
}

.property-location {
    margin-bottom: 11px;

    color: var(--muted);

    font-size: 13px;
}

.property-meta {
    padding-top: 11px;

    display: flex;
    flex-wrap: wrap;

    gap: 8px 14px;

    border-top: 1px solid var(--border);

    color: #52616e;

    font-size: 13px;
}


/* EMPTY PROPERTIES */

#properties > .container > .property-card {
    width: 100%;
}

#properties
> .container
> .property-card
.property-body {
    padding: 22px;
}


/* =========================================================
   ADD PROPERTY / CTA
   ========================================================= */

.publish-section {
    padding: 36px 0;

    background: var(--primary);

    color: var(--white);
}

.publish-box {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 28px;
}

.publish-box h2 {
    margin-bottom: 5px;

    font-size: 27px;
    line-height: 1.4;
}

.publish-box p {
    color: #dbe5ed;

    font-size: 15px;
}

.publish-btn {
    flex: 0 0 auto;

    padding: 12px 22px;

    border-radius: 9px;

    background: var(--gold);
    color: var(--white);

    text-decoration: none;

    font-size: 14px;
    font-weight: 800;

    transition: background 0.2s ease;
}

.publish-btn:hover {
    background: var(--gold-dark);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 24px 0;

    background: var(--primary-dark);

    color: #bdcad5;

    font-size: 13px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* =========================================================
   MEDIUM COMPUTER / SMALL LAPTOP
   ========================================================= */

@media (max-width: 1050px) {

    .container {
        width: min(1180px, calc(100% - 28px));
    }

    .header-inner {
        min-height: 82px;

        gap: 10px;
    }

    .brand-logo {
        width: 68px;
        height: 68px;
    }

    .main-nav {
        gap: 10px;
    }

    .main-nav a {
        font-size: 12.5px;
    }

    .lang-switch {
        min-width: 100px;
    }

    .add-listing-btn {
        padding: 8px 11px;

        font-size: 13px;
    }

    /*
       مهم:
       لا نحول البحث إلى صفين هنا.
       يبقى صفًا واحدًا على الكمبيوتر واللابتوب.
    */

    .property-search {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr)
            minmax(0, 1fr)
            minmax(0, 1fr)
            125px;

        gap: 8px;
    }

    .property-search select,
    .property-search input,
    .search-btn {
        font-size: 13px;
    }

    .category-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .properties-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   TABLET / MOBILE
   يبدأ هنا فقط التصميم العمودي للبحث
   ========================================================= */

@media (max-width: 760px) {

    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: 70px;

        gap: 8px;
    }

    .main-nav {
        display: none;
    }

    .brand-logo {
        width: 58px;
        height: 58px;
    }

    .header-actions {
        gap: 7px;
    }

    .lang-switch {
        min-width: 92px;
        height: 38px;

        padding: 0 8px;

        font-size: 12px;
    }

    .add-listing-btn {
        min-height: 38px;

        padding: 7px 10px;

        font-size: 12px;
    }


    /* HERO - الهاتف */

    .hero {
        padding: 39px 0 43px;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        margin-bottom: 21px;

        font-size: 14px;
    }


    /* SEARCH - الهاتف */

    .property-search {
        grid-template-columns: 1fr;

        padding: 11px;

        gap: 9px;
    }

    .property-search select,
    .property-search input {
        height: 46px;

        font-size: 14px;
    }

    .search-btn {
        width: 100%;
        height: 46px;

        font-size: 14px;
    }


    /* SECTIONS */

    .section {
        padding: 31px 0;
    }

    .section-header {
        margin-bottom: 16px;

        flex-direction: column;
        align-items: flex-start;

        gap: 3px;
    }

    .section-header h2 {
        font-size: 23px;
    }


    /* CATEGORIES */

    .category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .category-card {
        min-height: 108px;

        padding: 14px 8px;
    }

    .category-icon {
        font-size: 27px;
    }


    /* PROPERTY CARDS */

    .properties-grid {
        grid-template-columns: 1fr;
    }


    /* CTA */

    .publish-box {
        flex-direction: column;

        align-items: flex-start;

        gap: 16px;
    }

    .publish-box h2 {
        font-size: 23px;
    }

    .publish-btn {
        width: 100%;

        text-align: center;
    }


    /* FOOTER */

    .footer-inner {
        flex-direction: column;

        align-items: flex-start;

        gap: 5px;
    }
}


/* =========================================================
   SMALL PHONES
   يحافظ على الشكل الذي اعتمدناه
   ========================================================= */

@media (max-width: 430px) {

    .container {
        width: min(100% - 18px, 1180px);
    }

    .header-inner {
        padding: 9px 0;

        flex-wrap: wrap;
    }

    .brand-logo-link {
        width: 100%;

        justify-content: center;
    }

    .brand-logo {
        width: 66px;
        height: 66px;
    }

    .header-actions {
        width: 100%;

        justify-content: center;
    }

    .lang-switch {
        flex: 1;

        max-width: 130px;
    }

    .add-listing-btn {
        flex: 1;

        max-width: 150px;
    }

    .hero {
        padding: 34px 0 38px;
    }

    .hero h1 {
        font-size: 27px;
    }

    .hero p {
        font-size: 13px;
    }

    .category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .category-card {
        min-height: 102px;
    }
}