/* بيلد بلس — الإصدار 2: تفاعلات وأقسام إضافية (خريطة، طرز، مقارنة، مقالات) */

/* خريطة المملكة */
.map-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(30px, 5vw, 60px); align-items: center; }
.city-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.city-list a { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); transition: .2s; }
.city-list a:hover, .city-list a.hot { border-color: var(--gold); background: var(--gold-l); }
.city-list b { color: var(--gold-d); }
.ksa { position: relative; }
.ksa svg { width: 100%; height: auto; overflow: visible; }
.ksa-pin { cursor: pointer; }
.ksa-dot { fill: var(--gold); stroke: #fff; stroke-width: 3; transition: .25s; transform-box: fill-box; transform-origin: center; }
.ksa-halo { transform-box: fill-box; transform-origin: center; animation: halo 3s ease-in-out infinite; animation-delay: var(--d); }
@keyframes halo { 0%, 100% { transform: scale(.7); opacity: .3; } 50% { transform: scale(1); opacity: .9; } }
.ksa-n { fill: #fff; font: 800 13px Tajawal, sans-serif; pointer-events: none; }
.ksa-pin:hover .ksa-dot, .ksa-pin.hot .ksa-dot { fill: var(--ink); transform: scale(1.25); }
.ksa-tip { position: absolute; z-index: 5; width: 230px; background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; pointer-events: none; transform: translate(-50%, calc(-100% - 18px)); }
.ksa-tip img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--sand); }
.ksa-tip div { padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.ksa-tip span { color: var(--gold-d); font-weight: 700; font-size: 14px; }

/* أسئلة شائعة في الرئيسية */
.faq-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.faq details { transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); border-color: transparent; }

/* صفحة الطرز */
.style-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.style-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: .3s; }
.style-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.style-card-media { position: relative; aspect-ratio: 16/10; background: var(--sand); overflow: hidden; }
.style-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s, transform 1.2s; }
.style-card-media img.on { opacity: 1; }
.style-card:hover .style-card-media img.on { transform: scale(1.05); }
.style-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.style-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.style-card-top h2 { font-size: 24px; margin: 0 0 8px; }
.style-card-top span { color: var(--gold-d); font-weight: 700; font-size: 14px; white-space: nowrap; }
.style-card p { color: var(--muted); font-size: 15.5px; flex: 1; }

/* مقارنة المخطط بالتصميم */
.compare { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16/10; background: #fff; user-select: none; margin-top: 10px; border: 1px solid var(--line); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-b { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); background: #fff; }
.compare-b img { object-fit: contain; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.1); transform: translateX(-50%); pointer-events: none; }
.compare-handle i { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 20px; box-shadow: var(--shadow); }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; direction: ltr; }
.compare-tag { position: absolute; top: 14px; z-index: 2; background: rgba(17,24,32,.7); color: #fff; font-size: 13px; padding: 4px 12px; border-radius: 999px; pointer-events: none; }
.compare-tag.a { left: 14px; } .compare-tag.b { right: 14px; }

/* مشاركة + تنقّل بين المشاريع */
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.share > span { color: var(--muted); font-size: 15px; }
.share-btn { font: inherit; font-size: 14px; font-weight: 700; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; transition: .2s; }
.share-btn:hover { border-color: var(--gold); color: var(--gold-d); }
.share-btn.wa:hover { border-color: #1FA855; color: #178C46; }
.share-btn.done { background: var(--ink); color: #fff; border-color: var(--ink); }
.prj-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.prj-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); transition: .2s; }
.prj-nav-item:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.prj-nav-item.next { justify-content: flex-end; text-align: end; }
.prj-nav-item img { width: 86px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.prj-nav-item small { display: block; color: var(--gold-d); font-weight: 700; font-size: 13px; }
.prj-nav-item b { font-family: var(--head); font-size: 16px; line-height: 1.4; }

/* المقال */
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 70; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 0; background: linear-gradient(270deg, var(--gold), #F3C77A); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 50px; align-items: start; }
.article-layout .article { max-width: none; margin: 0; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 15px; color: #4A525B; line-height: 1.5; transition: .15s; }
.toc a::before { content: counter(toc); font-family: Tajawal; font-weight: 800; color: var(--gold); min-width: 16px; }
.toc a:hover { background: var(--sand); }
.toc a.on { background: var(--gold-l); color: var(--gold-d); font-weight: 700; }
.article h2 { scroll-margin-top: 100px; padding-top: 6px; }
.article h2::after { content: ""; display: block; width: 44px; height: 3px; background: var(--gold); border-radius: 3px; margin-top: 10px; }
.article ul.ticks li { font-size: 17.5px; margin-bottom: 6px; }
.olist { list-style: none; padding: 0; counter-reset: ol; }
.olist li { counter-increment: ol; position: relative; padding-inline-start: 46px; margin-bottom: 12px; min-height: 32px; }
.olist li::before { content: counter(ol); position: absolute; inset-inline-start: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-l); color: var(--gold-d); font-family: Tajawal; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.article-cta { margin: 32px 0; padding: 26px 28px; border-radius: 18px; background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.article-cta::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(243,199,122,.18) 1.2px, transparent 1.2px); background-size: 20px 20px; }
.article-cta > * { position: relative; }
.article .article-cta p { color: #fff; font-size: 18.5px; font-family: var(--head); }
.svc-link { display: flex; gap: 16px; align-items: center; margin-top: 34px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); transition: .2s; }
.svc-link:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.svc-link img { width: 130px; height: 96px; object-fit: cover; border-radius: 12px; flex: none; }
.svc-link small { display: block; color: var(--gold-d); font-weight: 700; font-size: 13px; }
.svc-link b { display: block; font-family: var(--head); font-size: 20px; }
.svc-link em { font-style: normal; color: var(--muted); font-size: 14.5px; }

/* المدونة: المقال المميز */
.post-feature { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-bottom: 26px; transition: .3s; }
.post-feature:hover { box-shadow: var(--shadow); }
.post-feature .post-img { aspect-ratio: auto; min-height: 320px; }
.post-feature .post-body { padding: clamp(24px, 4vw, 40px); justify-content: center; }
.post-feature h3 { font-size: clamp(24px, 2.6vw, 32px); }
.post-meta { display: flex; gap: 12px; color: var(--muted); font-size: 13.5px; margin-top: 12px; }

/* زر العودة للأعلى */
.to-top { position: fixed; inset-inline-end: 22px; bottom: 22px; z-index: 60; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; font-size: 20px; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

@media (max-width: 1080px) { .article-layout { grid-template-columns: 1fr; } .toc-side { position: static; } }
@media (max-width: 920px) { .map-grid, .faq-grid, .post-feature { grid-template-columns: 1fr; } .post-feature .post-img { min-height: 220px; } }
@media (max-width: 640px) { .prj-nav { grid-template-columns: 1fr; } .prj-nav-item img { width: 64px; height: 50px; } .hero-dots { bottom: 96px; } .ksa-tip { display: none; } .to-top { inset-inline-end: 16px; bottom: 16px; } .style-cards { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ksa-halo { animation: none; } .hero-bg { transition: opacity .3s; transform: none !important; } }
.shot .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* القائمة: بدون التفاف، وتصغير على الشاشات المتوسطة */
.nav > a, .nav .dd > button { white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 921px) { .top .wrap { gap: 14px; } .nav > a, .nav .dd > button { padding: 8px 9px; font-size: 15px; } .brand small { display: none; } .brand b { font-size: 17px; } .top-cta { padding: .7em 1.1em; font-size: 15px; } }
@media (max-width: 1060px) and (min-width: 921px) { .top-cta { display: none; } }
.prj.plain::after { display: none; }
.prj.plain { border: 1px solid var(--line); }
