/* ==========================================================================
   Tawreed — Editorial homepage layer (v2: richer depth & detail).
   Scoped under .ed-home. Cosmetic layout only — no fields/logic changed.
   ========================================================================== */
.ed-home{
  --ed-bg:#EEECF8; --ed-surface:#FFFFFF; --ed-ink:#171232; --ed-muted:#5E5980; --ed-faint:#918DA6;
  --ed-line:#E7E4F1; --ed-line2:#D8D4EA; --ed-ind:#5F54A4; --ed-ind-bright:#7A6EC8; --ed-ind-deep:#4A4184;
  --ed-ind-soft:#ECEAF7; --ed-grn:#8FBE45; --ed-grn-deep:#79AE3E; --ed-grn-soft:#EDF4DD; --ed-grn-ink:#3B5216;
  --ed-info:#5A63C0; --ed-info-soft:#ECEDF9; --ed-warn:#B4740F; --ed-warn-soft:#F8EEDA;
  --ed-sh:0 12px 34px -18px rgba(60,52,120,.42); --ed-sh-lg:0 30px 70px -34px rgba(60,52,120,.55);
  --ed-font:"SF Arabic","Geeza Pro","Segoe UI","Noto Sans Arabic",Tahoma,system-ui,sans-serif;
  background:var(--ed-bg); color:var(--ed-ink); font-family:var(--ed-font); direction:rtl; line-height:1.65; -webkit-font-smoothing:antialiased;
}
.ed-home *{ box-sizing:border-box; }
.ed-home h1,.ed-home h2,.ed-home h3,.ed-home h4{ margin:0; font-weight:800; letter-spacing:-.025em; color:var(--ed-ink); line-height:1.2; }
.ed-home p{ margin:0; }
.ed-home a{ color:inherit; text-decoration:none; }
.ed-home img{ max-width:100%; }
.ed-home .ed-wrap{ max-width:1120px; margin:0 auto; padding:0 28px; }
.ed-home .ed-num{ font-variant-numeric:tabular-nums; }
.ed-home .ed-label{ font-size:12px; font-weight:800; letter-spacing:.16em; color:var(--ed-grn-deep); }
.ed-home .ed-rule{ display:none; }

.ed-home .ed-btn{ display:inline-flex; align-items:center; justify-content:center; gap:9px; font-family:inherit; font-weight:700; font-size:15px; padding:14px 28px; border-radius:999px; border:0; cursor:pointer; transition:transform .12s,background .16s,color .16s,box-shadow .2s; }
.ed-home .ed-btn:hover{ transform:translateY(-2px); }
.ed-home .ed-btn i{ font-size:16px; }
.ed-home .ed-btn-ind{ background:var(--ed-ind); color:#fff; box-shadow:0 12px 26px -12px var(--ed-ind); }
.ed-home .ed-btn-ind:hover{ background:var(--ed-ind-deep); color:#fff; box-shadow:0 16px 30px -12px var(--ed-ind); }
.ed-home .ed-btn-out{ background:var(--ed-surface); border:1px solid var(--ed-line2); color:var(--ed-ink); }
.ed-home .ed-btn-out:hover{ border-color:var(--ed-ind); color:var(--ed-ind); }
.ed-home .ed-arrow{ display:inline-flex; align-items:center; gap:8px; font-weight:700; color:var(--ed-ind); cursor:pointer; }
.ed-home .ed-arrow i{ transition:transform .18s; } .ed-home .ed-arrow:hover i{ transform:translateX(-4px); }

/* ---------- HERO — colored panel ---------- */
.ed-home .ed-hero{ position:relative; overflow:hidden; text-align:center; padding:84px 0 70px; margin-bottom:20px;
  background:radial-gradient(720px 300px at 78% -8%, rgba(95,84,164,.22), transparent 60%),
            radial-gradient(560px 260px at 12% 108%, rgba(143,190,69,.24), transparent 60%),
            linear-gradient(165deg, #F4F2FC 0%, #EDF0E6 100%);
  border-bottom:1px solid var(--ed-line); }
.ed-home .ed-hero::before{ content:""; position:absolute; width:320px; height:320px; border-radius:50%; background:rgba(95,84,164,.16); filter:blur(60px); top:-150px; inset-inline-start:-60px; }
.ed-home .ed-hero .ed-wrap{ position:relative; z-index:1; }
.ed-home .ed-hero .ed-eye{ display:inline-flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--ed-line); padding:7px 15px; border-radius:999px; margin-bottom:24px; box-shadow:var(--ed-sh); }
.ed-home .ed-hero .ed-eye::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--ed-grn); }
.ed-home .ed-hero h1{ font-size:clamp(36px,6vw,68px); line-height:1.12; letter-spacing:-.04em; max-width:16ch; margin:0 auto; }
.ed-home .ed-hero h1 .hl{ color:var(--ed-ind); position:relative; white-space:nowrap; }
.ed-home .ed-hero h1 .hl::after{ content:""; position:absolute; inset-inline:0; bottom:.06em; height:.20em; background:var(--ed-grn); border-radius:3px; z-index:-1; opacity:.85; }
.ed-home .ed-hero .ed-lead{ font-size:clamp(16px,1.7vw,19px); color:var(--ed-muted); max-width:50ch; margin:26px auto 34px; line-height:1.7; }
.ed-home .ed-actions{ display:flex; gap:16px; justify-content:center; align-items:center; flex-wrap:wrap; }

.ed-home .ed-search{ margin:44px auto 0; max-width:640px; }
.ed-home .ed-search form{ display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--ed-line2); border-radius:999px; padding:8px 8px 8px 20px; box-shadow:var(--ed-sh-lg); margin:0; }
.ed-home .ed-search form > div{ margin:0 !important; padding:0 !important; float:none !important; width:auto !important; }
.ed-home .ed-search input[type=text]{ border:0; background:transparent; outline:0; font-family:inherit; font-size:15.5px; color:var(--ed-ink); width:100%; min-width:120px; }
.ed-home .ed-search .ed-fgrow{ flex:1; }
.ed-home .ed-search .ed-fsel{ min-width:150px; border-inline-start:1px solid var(--ed-line); padding-inline-start:14px !important; }
.ed-home .ed-search .select2-container{ width:150px !important; }
.ed-home .ed-search button{ background:var(--ed-ind); color:#fff; border:0; border-radius:999px; padding:12px 26px; font-family:inherit; font-weight:700; font-size:15px; cursor:pointer; white-space:nowrap; transition:background .15s; }
.ed-home .ed-search button:hover{ background:var(--ed-ind-deep); }

/* ---------- section shell ---------- */
.ed-home .ed-sec{ padding:66px 0; }
.ed-home .ed-sec-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.ed-home .ed-sec-head .ed-eye{ display:block; margin-bottom:12px; }
.ed-home .ed-sec-head h2{ font-size:clamp(26px,3.2vw,40px); letter-spacing:-.03em; max-width:18ch; }

/* ---------- featured tenders — defined card with rows ---------- */
.ed-home .ed-list{ margin-top:32px; background:var(--ed-surface); border:1px solid var(--ed-line); border-radius:22px; box-shadow:var(--ed-sh); padding:8px 20px; }
.ed-home .ed-item{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:24px; padding:24px 12px; border-bottom:1px solid var(--ed-line); border-radius:14px; transition:background .16s; }
.ed-home .ed-item:last-child{ border-bottom:0; }
.ed-home .ed-item:hover{ background:var(--ed-ind-soft); }
.ed-home .ed-idx{ font-size:22px; color:var(--ed-ind); font-variant-numeric:tabular-nums; font-weight:800; opacity:.55; }
.ed-home .ed-item h3{ font-size:clamp(18px,1.8vw,23px); letter-spacing:-.02em; line-height:1.35; }
.ed-home .ed-item h3 a{ color:var(--ed-ink); } .ed-home .ed-item:hover h3 a{ color:var(--ed-ind); }
.ed-home .ed-item .ed-meta{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px; margin-top:10px; font-size:13.5px; color:var(--ed-muted); }
.ed-home .ed-item .ed-meta .sep{ color:var(--ed-line2); }
.ed-home .ed-item .ed-meta .tag{ color:var(--ed-grn-ink); background:var(--ed-grn-soft); font-weight:700; padding:3px 10px; border-radius:999px; font-size:12px; }
.ed-home .ed-item .ed-desc{ font-size:13px; color:var(--ed-faint); margin-top:8px; max-width:72ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ed-home .ed-item .ed-side{ display:flex; align-items:center; gap:16px; min-width:150px; justify-content:flex-end; }
.ed-home .ed-item .ed-days{ font-size:15px; font-weight:800; color:var(--ed-ind); font-variant-numeric:tabular-nums; text-align:end; }
.ed-home .ed-item .ed-days small{ color:var(--ed-faint); font-weight:600; display:block; font-size:11px; }
.ed-home .ed-item .ed-go{ width:46px; height:46px; border-radius:999px; background:var(--ed-ind-soft); border:1px solid var(--ed-line); display:grid; place-items:center; color:var(--ed-ind); flex:0 0 46px; transition:background .16s,color .16s; }
.ed-home .ed-item:hover .ed-go{ background:var(--ed-ind); color:#fff; }
.ed-home .ed-item .ed-go i{ font-size:19px; }

/* ---------- how it works — cards ---------- */
.ed-home .ed-steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:36px; }
.ed-home .ed-step{ background:var(--ed-surface); border:1px solid var(--ed-line); border-radius:20px; padding:30px; box-shadow:var(--ed-sh); }
.ed-home .ed-step .n{ display:inline-grid; place-items:center; width:56px; height:56px; border-radius:16px; background:var(--ed-ind-soft); font-size:24px; font-weight:800; color:var(--ed-ind); letter-spacing:-.04em; font-variant-numeric:tabular-nums; margin-bottom:16px; }
.ed-home .ed-step .n b{ color:var(--ed-grn-deep); }
.ed-home .ed-step h4{ font-size:20px; margin:0 0 8px; letter-spacing:-.02em; }
.ed-home .ed-step p{ color:var(--ed-muted); font-size:15px; }

/* ---------- categories — cards with colored icon ---------- */
.ed-home .ed-cats{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:36px; }
.ed-home .ed-cat{ display:flex; align-items:center; gap:15px; padding:20px 22px; border:1px solid var(--ed-line); border-radius:18px; background:var(--ed-surface); box-shadow:var(--ed-sh); transition:border-color .18s,transform .18s,box-shadow .2s; }
.ed-home .ed-cat:hover{ border-color:var(--ed-ind); transform:translateY(-4px); box-shadow:var(--ed-sh-lg); }
.ed-home .ed-cat .ic{ width:50px; height:50px; border-radius:14px; background:var(--ed-ind-soft); display:grid; place-items:center; font-size:23px; flex:0 0 50px; }
.ed-home .ed-cat:nth-child(3n+2) .ic{ background:var(--ed-grn-soft); }
.ed-home .ed-cat h4{ font-size:16.5px; letter-spacing:-.01em; }
.ed-home .ed-cat .go{ margin-inline-start:auto; color:var(--ed-faint); transition:color .16s,transform .16s; }
.ed-home .ed-cat:hover .go{ color:var(--ed-ind); transform:translateX(-4px); }

/* ---------- cta — light panel (avoids clashing with the purple footer) ---------- */
.ed-home .ed-cta{ text-align:center; padding:70px 40px; margin:24px 0 48px; border-radius:28px;
  background:radial-gradient(520px 220px at 50% -20%, rgba(143,190,69,.16), transparent 60%), linear-gradient(160deg, #F5F3FC 0%, #EEF1E7 100%);
  border:1px solid var(--ed-line); box-shadow:var(--ed-sh); }
.ed-home .ed-cta .ed-eye{ display:block; margin-bottom:18px; color:var(--ed-grn-deep); }
.ed-home .ed-cta h2{ font-size:clamp(28px,4.2vw,50px); letter-spacing:-.035em; line-height:1.14; max-width:20ch; margin:0 auto 30px; color:var(--ed-ink); }
.ed-home .ed-cta h2 .hl{ color:var(--ed-ind); }
.ed-home .ed-cta .ed-btn-out{ background:#fff; border-color:var(--ed-line2); color:var(--ed-ink); }
.ed-home .ed-cta .ed-btn-out:hover{ border-color:var(--ed-ind); color:var(--ed-ind); }

/* ==========================================================================
   Header tidy (GLOBAL, all pages) — clean flex row so actions sit neatly
   ========================================================================== */
.member-head > .container{ display:flex; align-items:center; gap:26px; }
.member-head .mobile-menu-container{ display:flex; align-items:center; gap:26px; flex:1; }
.member-head [class*="col-md-"]{ float:none !important; width:auto !important; padding-inline:0 !important; }
.member-head .main-menu > ul{ display:flex; align-items:center; gap:22px; margin:0; padding:0; list-style:none; }
.member-head .main-menu > ul > li{ margin:0; }
.member-head .side-menu{ margin-inline-start:auto !important; display:flex; align-items:center; gap:16px !important; }
.member-head .side-menu > li{ margin:0 !important; }
.member-head .side-menu .sign-btn a{ background:#5F54A4; color:#fff; padding:10px 20px; border-radius:999px; font-weight:700; display:inline-block; }
.member-head .side-menu .sign-btn a:hover{ background:#4A4184; }
.member-head .member-side > ul{ display:flex; align-items:center; gap:16px; margin:0; padding:0; list-style:none; }

/* premium box */
.ed-home .ed-premium{ border:1px solid var(--ed-line); border-radius:20px; background:var(--ed-surface); padding:32px; margin:20px 0 40px; box-shadow:var(--ed-sh); }
.ed-home .ed-premium h1{ font-size:26px; } .ed-home .ed-premium h2{ font-size:20px; color:var(--ed-ind); } .ed-home .ed-premium p{ color:var(--ed-muted); }
.ed-home .ed-premium a{ display:inline-block; margin-top:14px; background:var(--ed-ind); color:#fff; padding:11px 22px; border-radius:999px; font-weight:700; }

@media (max-width:860px){
  .ed-home .ed-search form{ flex-wrap:wrap; border-radius:22px; }
  .ed-home .ed-search .ed-fsel{ border-inline-start:0; padding-inline-start:0 !important; }
  .ed-home .ed-steps{ grid-template-columns:1fr; }
  .ed-home .ed-cats{ grid-template-columns:1fr; }
  .ed-home .ed-item{ grid-template-columns:auto 1fr; } .ed-home .ed-item .ed-side{ grid-column:1/-1; justify-content:space-between; min-width:0; margin-top:6px; }
}
@media (prefers-reduced-motion:reduce){ .ed-home *{ transition:none !important; } }

/* ==========================================================================
   Internal pages — editorial polish (GLOBAL, safe). Restyles the existing
   markup only (no fields/JS touched). Homepage uses .ed-* so no conflict.
   ========================================================================== */
body:not(:has(.ed-home)){ background:#F4F3FB; }

/* section titles / breadcrumb */
.filter-cont .title h1, .Tender-home .title h1, .categories-main .title h1,
.content-page .title h1{ font-weight:800 !important; letter-spacing:-.02em; color:#171232; }

/* tender cards (internal listings + details) */
.Tender-item{
  background:#fff !important; border:1px solid #E7E4F1 !important; border-radius:18px !important;
  box-shadow:0 10px 30px -18px rgba(60,52,120,.30) !important;
  transition:transform .18s, box-shadow .22s, border-color .18s !important; padding:22px !important;
}
.Tender-item:hover{ transform:translateY(-4px); box-shadow:0 20px 44px -20px rgba(60,52,120,.42) !important; border-color:#5F54A4 !important; }
.Tender-item h4 a{ color:#171232 !important; font-weight:800; } .Tender-item h4 a:hover{ color:#5F54A4 !important; }
.Tender-item .tender-link{
  background:#5F54A4 !important; color:#fff !important; border-radius:999px !important;
  padding:9px 18px !important; font-weight:700 !important; display:inline-block; transition:background .15s;
}
.Tender-item .tender-link:hover{ background:#4A4184 !important; }
.Tender-item .award{ color:#79AE3E !important; }

/* filter sidebar */
.filter-main{ background:transparent; }
.filter-item{
  background:#fff !important; border:1px solid #E7E4F1 !important; border-radius:16px !important;
  box-shadow:0 6px 20px -14px rgba(60,52,120,.24) !important; padding:16px 18px !important; margin-bottom:14px !important;
}
.filter-item p, .filter-item h5{ color:#171232; }
.filter-item input[type=checkbox]{ accent-color:#5F54A4; width:16px; height:16px; }
.btn-filter, #apply_filter{
  background:#5F54A4 !important; color:#fff !important; border:0 !important; border-radius:999px !important;
  padding:10px 22px !important; font-weight:700 !important; cursor:pointer; transition:background .15s;
}
.btn-filter:hover, #apply_filter:hover{ background:#4A4184 !important; }
.filter-search input, .filter-item input[type=number], .filter-item input[type=text]{
  border:1px solid #D8D4EA !important; border-radius:11px !important; padding:9px 12px !important; background:#fff !important;
}
.filter-search input:focus, .filter-item input:focus{ outline:0; border-color:#7A6EC8 !important; box-shadow:0 0 0 3px rgba(95,84,164,.15) !important; }

/* generic form controls / cards on internal pages */
body:not(:has(.ed-home)) .card{ border:1px solid #E7E4F1; border-radius:16px; box-shadow:0 8px 24px -16px rgba(60,52,120,.28); }
body:not(:has(.ed-home)) .form-control:focus{ border-color:#7A6EC8; box-shadow:0 0 0 3px rgba(95,84,164,.15); }
body:not(:has(.ed-home)) .btn-primary{ background:#5F54A4; border-color:#5F54A4; border-radius:999px; }
body:not(:has(.ed-home)) .btn-primary:hover{ background:#4A4184; border-color:#4A4184; }

/* static content pages (about/privacy/terms) — readable editorial column */
.content-page, .privacy-content, .terms-content, .about-content{ line-height:1.9; }
.content-page h3, .privacy-content h3, .terms-content h3{ color:#5F54A4; margin:26px 0 10px; font-weight:800; }
