@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

/* ===== البورد الأبيض — خط أبيض داخل جميع الأزرار الداكنة ===== */
button[style*="background:#0a2463"],
button[style*="background:#1e3a8a"],
button[style*="background:#3b82f6"],
button[style*="background:#0891b2"],
button[style*="background:#075e54"],
button[style*="background:#059669"],
button[style*="background:#065f46"],
button[style*="background:#16a34a"],
button[style*="background:#25d366"],
button[style*="background:#ef4444"],
button[style*="background:#dc2626"],
button[style*="background:#a21caf"],
button[style*="background:#c9a84c"],
button[style*="background:#1da1f2"],
a[style*="background:#0a2463"],
a[style*="background:#075e54"],
a[style*="background:#059669"],
a[style*="background:#065f46"],
a[style*="background:#ef4444"],
a[style*="background:#c9a84c"],
.sell-wa-btn {
    outline: 2px solid #fff !important;
    outline-offset: -4px !important;
}

/* ===== البورد الداكن — خط داكن داخل الأزرار الفاتحة ===== */
button[style*="background:#eef2ff"],
button[style*="background:#86efac"],
button[style*="background:#eff6ff"],
button[style*="background:#fff"],
a[style*="background:#eef2ff"],
a[style*="background:#86efac"],
a[style*="background:#eff6ff"],
a[style*="background:#fff"] {
    border-width: 4px !important;
    outline: 1px solid #0a2463 !important;
    outline-offset: -9px !important;
}

/* ===== السوشيل ميديا العائم ===== */
#social-float {
    position: fixed;
    left: 12px;
    top: max(237px, 50%) !important;
    transform: translateY(-50%);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
#social-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: radial-gradient(circle at 35% 30%, #4a8de0, #1a56b0 55%, #0d3270);
    box-shadow: 3px 3px 10px rgba(0,0,0,0.35),
                inset -2px -2px 6px rgba(0,0,0,0.25),
                inset 2px 2px 6px rgba(255,255,255,0.25);
}
#social-float a:hover {
    transform: translateX(8px);
    box-shadow: 4px 4px 16px rgba(0,0,0,0.3);
}
#social-float a svg { width: 18px; height: 18px; }

/* ===== المتغيرات الأساسية ===== */
html {
    background-color: #0a2463;
    scrollbar-gutter: stable;
}

#contact-modal {
    border: none;
    border-radius: 20px;
    padding: 0;
    width: 780px;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    position: fixed;
    inset: unset;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    margin: 0;
}
#contact-modal::backdrop {
    background: rgba(0, 0, 0, 0.82);
}

:root {
    --primary: #0a2463;
    --primary-light: #1e3a8a;
    --primary-dark: #061539;
    --white: #ffffff;
    --gray-light: #f4f6f9;
    --gray: #e2e8f0;
    --text-dark: #1a202c;
    --text-gray: #64748b;
    --gold: #c9a84c;
}

/* ===== إعادة الضبط ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    direction: rtl;
}

#page-content {
}

body.en {
    direction: ltr;
}

/* ===== الهيدر ===== */
header {
    background-color: var(--primary);
    padding: 0 40px 0 5px;
    position: sticky;
    top: 0;
    z-index: 10001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 82px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.logo-img-wrap {
    display: flex;
    align-items: center;
    height: 66px;
    border-radius: 10px;
    overflow: hidden;
    background: #0a2463;
    padding: 7px 16px;
}

.logo-img-wrap img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

/* شعار CSS احتياطي يظهر إذا لم يُحمَّل ملف الصورة */
.logo-css {
    background: #0a2463;
    border-radius: 10px;
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-decoration: none;
}
.logo-css .logo-ar {
    font-size: 31px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 2px;
}
.logo-css .logo-sub {
    font-size: 13px;
    color: #c9a84c;
    font-weight: 600;
    white-space: nowrap;
}

.logo-img-wrap img {
    filter: invert(1);
    mix-blend-mode: screen;
    height: 85px;
    width: auto;
    object-fit: contain;
    transform: translateX(40px);
}

.footer-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    color: var(--primary);
}

.logo-text {
    color: var(--white);
    line-height: 1.2;
}

.logo-text .brand {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text .tagline {
    font-size: 11px;
    color: var(--gold);
    opacity: 0.9;
}

/* ===== القائمة الرئيسية ===== */
nav {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 60px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 18px;
    transition: background 0.2s;
}

nav a:hover {
    background: var(--primary-light);
}

nav a.nav-active,
.nav-dropdown-toggle.nav-active {
    color: #ffe866 !important;
    font-weight: 800;
}

/* ===== Dropdown الخدمات ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border: 2px solid #0a2463;
    border-radius: 12px;
    padding: 16px;
    min-width: 560px;
    z-index: 9999;
    box-shadow: 0 12px 40px rgba(10,36,99,0.18);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.dropdown-group-title {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: #0a2463;
    border-bottom: 2px solid #0a2463;
    padding-bottom: 6px;
    margin-bottom: 8px;
    text-align: right;
}

.nav-dropdown-menu a {
    display: block;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 6px;
    text-decoration: none;
    text-align: right;
    background: transparent;
    transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
    background: #f0f4ff;
    color: #0a2463;
}

/* ===== أزرار الهيدر ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-lang {
    background: transparent;
    border: 1px solid #ffe866;
    color: #ffe866;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-lang:hover {
    background: var(--gold);
    color: var(--primary);
}

.btn-login {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 7px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-login:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-register {
    background: var(--gold);
    border: none;
    color: var(--primary);
    padding: 7px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-register:hover {
    background: #b8922e;
    color: var(--white);
}


/* ===== قسم الهيرو ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    padding: 90px 40px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201,168,76,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero h1 span {
    color: var(--gold);
}

.hero p {
    font-size: 18px;
    opacity: 0.85;
    max-width: 650px;
    margin: 0 auto 35px;
    line-height: 1.7;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn-primary {
    background: var(--gold);
    color: var(--primary);
    padding: 14px 35px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.hero-btn-primary:hover {
    background: #b8922e;
    color: var(--white);
    transform: translateY(-2px);
}

.hero-btn-secondary {
    background: transparent;
    color: var(--white);
    padding: 14px 35px;
    border-radius: 8px;
    font-size: 16px;
    border: 2px solid var(--white);
    text-decoration: none;
    transition: all 0.2s;
}

.hero-btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ===== إحصائيات ===== */
.stats {
    background: var(--white);
    padding: 40px;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--gray);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.stat-item .label {
    font-size: 14px;
    color: var(--text-gray);
    margin-top: 4px;
}

/* ===== قسم الخدمات ===== */
.section {
    padding: 70px 40px 70px 65px;
}

/* مساحة المحتوى المشتركة لجميع صفحات الخدمات */
.service-content {
    background: #f4f6f9;
    padding: 50px 20px 120px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-gray);
    max-width: 550px;
    margin: 0 auto;
}

.section-badge {
    display: inline-block;
    background: rgba(10,36,99,0.08);
    color: var(--primary);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ===== بطاقات الخدمات الأساسية ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(10,36,99,0.08);
}

.service-card:hover {
    box-shadow: 0 8px 30px rgba(10,36,99,0.15);
    transform: translateY(-4px);
}

.service-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s;
}

.services-grid .service-card:nth-child(n+4) img {
    aspect-ratio: 5 / 2;
    object-fit: cover;
    height: auto;
}

.services-grid .service-card:nth-child(6) img {
    object-fit: contain;
    background: #fff;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card-body {
    padding: 18px 20px;
}

.service-icon { display: none; }

.service-card h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.service-card p {
    font-size: 14px;
    color: #000;
    line-height: 1.6;
}

/* ===== قسم الخدمات المساندة ===== */
.supporting-bg {
    background: var(--gray-light);
}

.supporting-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 1200px;
    margin: 0 auto;
}

.supporting-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid var(--primary);
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(10,36,99,0.08);
}

.supporting-card:hover {
    box-shadow: 0 8px 25px rgba(10,36,99,0.15);
    transform: translateY(-4px);
}

.supporting-card img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    transition: transform 0.3s;
    background: #f8faff;
}

.supporting-card:hover img {
    transform: scale(1.05);
}

.supporting-card-body {
    padding: 14px 16px;
}

.supporting-icon { display: none; }

.supporting-card h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.supporting-card p {
    font-size: 12px;
    color: #000;
}

/* ===== قسم لماذا دارك ===== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.why-card {
    background: var(--white);
    border-radius: 14px;
    padding: 28px 25px;
    border-right: 4px solid var(--primary);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.why-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray);
    margin-bottom: 8px;
}

.why-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.why-card p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.7;
}

/* ===== الفوتر ===== */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 50px 40px 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-brand .brand-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 13px;
    opacity: 0.7;
    line-height: 1.7;
}

.footer-brand img {
    filter: invert(1);
    mix-blend-mode: screen;
    margin-left: auto;
    margin-right: 0;
    transform: translateX(140px);
    max-width: 320px !important;
}

.footer-col h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 15px;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== تجاوب الجوال ===== */
@media (max-width: 768px) {
    header { padding: 0 14px; }
    nav { display: none; }
    .header-inner { height: 68px; }
    .btn-lang { display: none; }
    .header-actions { gap: 8px; }
    .btn-login { padding: 6px 12px; font-size: 12px; }
    .hero { padding: 60px 20px; }
    .hero h1 { font-size: 28px; }
    .stats { gap: 30px; padding: 30px 20px; }
    .section { padding: 50px 20px; }
    footer { padding: 40px 20px 20px; }

    /* الشعار */
    .logo-img-wrap { height: 54px; padding: 5px 10px; }
    .logo-img-wrap img { height: 60px; transform: translateX(20px); }

    /* بطاقة الوحدة العقارية */
    .unit-card-body { flex-direction: column !important; }
    .unit-imgs { width: 100% !important; min-width: 0 !important; border-right: none !important; border-top: 2px solid #0a2463 !important; }
    .unit-card-header { flex-wrap: wrap; gap: 8px; }
    .unit-card-header .unit-status-wrap { min-width: 0; width: 100%; justify-content: center; }
    .unit-fields { grid-template-columns: 1fr 1fr !important; }
    .unit-field { min-width: 0; }

    /* شبكات متعددة الأعمدة */
    .sell-info-grid { grid-template-columns: 1fr 1fr !important; }
    .detail-grid { grid-template-columns: 1fr !important; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
    .unit-media-grid { grid-template-columns: 1fr !important; }
    .supporting-grid { grid-template-columns: 1fr 1fr !important; }

    /* الشعار في الفوتر */
    .footer-brand img { transform: translateX(0) !important; max-width: 180px !important; }

    /* الصفحات المساندة */
    #sp-content { padding: 24px 16px 60px !important; }
    .intro-box { margin-left: 0 !important; margin-right: 0 !important; padding: 24px 20px !important; box-shadow: 3px 3px 0 #000 !important; }
    .advantages-grid { grid-template-columns: 1fr 1fr !important; }
    .section-card { padding: 24px 20px !important; }

    /* نماذج صفحات المساندة — شبكة 1fr 1fr → 1fr */
    #pho-form > div:first-child,
    #val-form > div:first-child,
    #arb-form > div:first-child,
    #leg-form > div:first-child,
    #doc-form > div:first-child,
    #waqf-form > div:first-child,
    #fin-form > div:first-child,
    #conditions-grid { grid-template-columns: 1fr !important; }

    /* my-account: شبكة العقارات والأكورديون */
    .units-grid { padding: 0 16px !important; }
    .acc-wrap { grid-template-columns: 1fr 1fr !important; }
    .profile-hero { flex-direction: column !important; align-items: flex-start !important; padding: 20px !important; }
}

@media (max-width: 480px) {
    #social-float { display: none !important; }
    .logo-img-wrap img { transform: translateX(10px); height: 52px; }
    .advantages-grid { grid-template-columns: 1fr !important; }
    .acc-wrap { grid-template-columns: 1fr !important; }
    .profile-name { font-size: 22px !important; }
    .profile-meta { gap: 8px !important; }
}

/* ══════════════════════════════════════════
   بطاقة الوحدة العقارية — مشترك بين جميع الصفحات
   ══════════════════════════════════════════ */
.unit-card { background:#fff; border:2px solid #0a2463; border-radius:16px; overflow:hidden; margin-bottom:28px; }
.unit-card-header { background:#0a2463; color:#fff; padding:16px 20px; display:flex; align-items:center; justify-content:space-between; }
.unit-card-header .unit-num { font-size:20px; font-weight:900; flex:1; text-align:center; }
.unit-card-header .unit-status-wrap { min-width:220px; display:flex; justify-content:center; align-items:center; gap:8px; }
.unit-card-body { display:flex; }
.unit-info { flex:1; padding:20px; min-width:0; }
.unit-imgs { width:220px; min-width:220px; padding:16px; background:#f8faff; border-right:1px solid #e2e8f0; display:flex; flex-direction:column; gap:8px; }
.unit-subtitle { font-size:15px; font-weight:800; color:#0a2463; margin-bottom:18px; letter-spacing:0.3px; }
.unit-fields { display:flex; flex-wrap:wrap; column-gap:8px; row-gap:12px; margin-bottom:14px; }
.unit-field { background:#f8faff; border:1.5px solid #0a2463; border-radius:10px; padding:10px 14px; display:flex; align-items:center; gap:6px; flex:1 1 auto; min-width:120px; }
.unit-field-lbl { font-size:13px; color:#94a3b8; font-weight:700; white-space:nowrap; }
.unit-field-val { font-size:14px; font-weight:800; color:#0a2463; }
.unit-tags { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.unit-tag { background:#f1f5f9; color:#0a2463; border:1.5px solid #0a2463; padding:7px 16px; border-radius:20px; font-size:12px; font-weight:800; white-space:nowrap; }
