/* =========================================================
   منصة PLM — نظام تصميم إبداعي احترافي (RTL) — v3
   ========================================================= */

:root{
  --bg:#ffffff;
  --bg-alt:#f6f7fb;
  --bg-soft:#eef1ff;
  --ink:#0b1020;
  --ink-2:#3b4256;
  --muted:#6b7280;
  --line:#e8eaf2;

  --indigo:#6366f1;
  --violet:#8b5cf6;
  --pink:#ec4899;
  --cyan:#06b6d4;
  --emerald:#10b981;
  --amber:#f59e0b;
  --rose:#f43f5e;

  --brand:#6366f1;
  --brand-2:#4f46e5;
  --brand-ink:#4338ca;

  --grad: linear-gradient(135deg,#6366f1 0%,#8b5cf6 50%,#ec4899 100%);
  --grad-cool: linear-gradient(135deg,#4f46e5,#06b6d4);
  --grad-text: linear-gradient(90deg,#818cf8,#c084fc,#f472b6);

  --radius:18px;
  --radius-sm:12px;
  --radius-lg:26px;
  --shadow-sm:0 1px 2px rgba(11,16,32,.04), 0 4px 12px rgba(11,16,32,.05);
  --shadow-md:0 14px 40px rgba(11,16,32,.10);
  --shadow-lg:0 30px 70px rgba(67,56,202,.22);
  --ring:0 0 0 4px rgba(99,102,241,.14);
  --container:1160px;
  --f-head:"Readex Pro", system-ui, sans-serif;
  --f-body:"IBM Plex Sans Arabic", system-ui, sans-serif;
}

body{ font-family:var(--f-body); color:var(--ink-2); background:var(--bg); font-size:17px; line-height:1.85; -webkit-font-smoothing:antialiased; }
h1,h2,h3,h4,h5,h6{ font-family:var(--f-head); color:var(--ink); line-height:1.28; font-weight:700; }
a{ color:var(--brand-2); text-decoration:none; transition:color .2s; }
a:hover{ color:var(--brand-ink); }
img{ max-width:100%; height:auto; border-radius:var(--radius-sm); }
svg{ display:inline-block; vertical-align:middle; }

/* =========================================================
   HEADER + NAV (custom over Astra)
   ========================================================= */
.site-header, .ast-primary-header-bar{ position:sticky; top:0; z-index:999; }
.main-header-bar{
  background:rgba(255,255,255,.85) !important;
  backdrop-filter:saturate(1.4) blur(14px);
  border-bottom:1px solid var(--line);
  box-shadow:0 4px 24px rgba(11,16,32,.05);
  padding-block:.35rem;
}
/* Brand mark before the site title */
.site-title a{ display:inline-flex !important; align-items:center; gap:.6rem; font-family:var(--f-head); font-weight:700; color:var(--ink) !important; font-size:1.35rem; }
.site-title a::before{
  content:""; width:34px; height:34px; border-radius:10px; flex:0 0 auto;
  background:var(--grad); box-shadow:0 6px 16px rgba(99,102,241,.4);
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M12 2l8 4.5v9L12 20l-8-4.5v-9L12 2z' opacity='.25'/><path d='M12 2l8 4.5-8 4.5-8-4.5L12 2z'/><path d='M12 11v9' stroke='white' stroke-width='0'/></svg>") center/70% no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M12 2l8 4.5v9L12 20l-8-4.5v-9L12 2z'/></svg>") center/100% no-repeat;
}
.site-title a::before{ background:var(--grad); }

/* Menu links */
.main-header-menu .menu-link, .ast-nav-menu .menu-link{
  font-family:var(--f-head); font-weight:500; font-size:1rem; color:var(--ink) !important;
  padding-inline:1rem !important; position:relative;
}
.main-header-menu > .menu-item > .menu-link::after{
  content:""; position:absolute; inset-inline:1rem; bottom:.35rem; height:2px; border-radius:2px;
  background:var(--grad); transform:scaleX(0); transform-origin:right; transition:transform .25s;
}
.main-header-menu > .menu-item > .menu-link:hover::after,
.main-header-menu > .menu-item.current-menu-item > .menu-link::after{ transform:scaleX(1); }
.main-header-menu > .menu-item > .menu-link:hover,
.main-header-menu .current-menu-item > .menu-link{ color:var(--brand-2) !important; }

/* Dropdown submenu */
.main-header-menu .sub-menu{
  background:#fff !important; border:1px solid var(--line) !important;
  border-radius:14px !important; box-shadow:var(--shadow-md) !important;
  padding:.4rem !important; margin-top:.4rem !important; min-width:230px;
}
.main-header-menu .sub-menu .menu-link{
  border-radius:9px; padding:.55rem .8rem !important; font-size:.95rem; color:var(--ink-2) !important;
}
.main-header-menu .sub-menu .menu-item:hover > .menu-link{ background:var(--bg-soft); color:var(--brand-2) !important; }

/* Header CTA button — gradient pill */
.ast-header-button-1 .ast-custom-button,
.main-header-bar .ast-custom-button-link .ast-custom-button,
.main-header-bar-wrap .menu-item.ast-menu-cta-button .menu-link,
.ast-header-button-1 .menu-link{
  background:var(--grad) !important; color:#fff !important; border:0 !important;
  border-radius:100px !important; padding:.6rem 1.4rem !important;
  font-family:var(--f-head); font-weight:600; box-shadow:0 8px 20px rgba(99,102,241,.35) !important;
  transition:transform .15s, box-shadow .2s;
}
.ast-header-button-1 .ast-custom-button:hover{ transform:translateY(-2px); box-shadow:0 12px 26px rgba(99,102,241,.45) !important; color:#fff !important; }

/* Mobile menu */
.ast-mobile-header-wrap .main-header-menu{ background:#fff; }
.ast-mobile-menu-buttons-minimal{ color:var(--brand-2); }
.main-header-menu.submenu-with-border .menu-item{ border-color:var(--line) !important; }

/* =========================================================
   CONTENT TYPOGRAPHY
   ========================================================= */
.entry-content{ font-size:1.06rem; }
.entry-content > *{ margin-block:0 1.15em; }
.entry-content h2{ font-size:clamp(1.5rem,3vw,2rem); margin-top:2.4rem; margin-bottom:1rem; padding-inline-start:.95rem; position:relative; }
.entry-content h2::before{ content:""; position:absolute; inset-inline-start:0; inset-block:.16em .16em; width:6px; border-radius:6px; background:var(--grad); }
.entry-content h3{ font-size:1.28rem; margin-top:1.8rem; margin-bottom:.6rem; color:var(--brand-ink); }
.entry-content strong{ color:var(--ink); font-weight:600; }
.entry-content a{ font-weight:600; text-decoration:underline; text-underline-offset:3px; text-decoration-color:rgba(99,102,241,.35); }
.entry-content a:hover{ text-decoration-color:var(--brand); }

.entry-content ul{ list-style:none; padding-inline-start:0; }
.entry-content ul > li{ position:relative; padding-inline-start:1.9rem; margin-bottom:.6rem; }
.entry-content ul > li::before{
  content:""; position:absolute; inset-inline-start:0; top:.35em; width:1.15rem; height:1.15rem;
  background:var(--grad); border-radius:50%;
  -webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/72% no-repeat;
          mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/72% no-repeat;
}
.entry-content ol{ padding-inline-start:1.3rem; }
.entry-content ol > li{ margin-bottom:.6rem; }
.entry-content ol > li::marker{ color:var(--brand); font-weight:700; }

.entry-content blockquote{ margin:1.6rem 0; padding:1rem 1.3rem; background:var(--bg-alt); border-inline-start:4px solid var(--brand); border-radius:var(--radius-sm); color:var(--ink); }
.entry-content blockquote p:last-child{ margin-bottom:0; }

.entry-content table{ width:100%; border-collapse:separate; border-spacing:0; margin:1.5rem 0; border:1px solid var(--line); border-radius:var(--radius-sm); overflow:hidden; font-size:.98rem; }
.entry-content th,.entry-content td{ padding:.8rem 1rem; text-align:start; border-bottom:1px solid var(--line); }
.entry-content thead th{ background:var(--bg-soft); color:var(--brand-ink); font-family:var(--f-head); }
.entry-content tbody tr:last-child td{ border-bottom:0; }
.entry-content tbody tr:hover{ background:var(--bg-alt); }

/* Inner page header */
.page .entry-header{ text-align:center; max-width:820px; margin:0 auto 2.5rem; padding-bottom:1.6rem; border-bottom:1px solid var(--line); }
.page .entry-title{ font-size:clamp(1.9rem,4vw,2.7rem); margin:0; }
.page .entry-title::before{ display:none; }
.page:not(.plm-wide) .entry-content{ max-width:880px; margin-inline:auto; }

/* =========================================================
   HOME / custom sections
   ========================================================= */
.plm-container{ max-width:var(--container); margin-inline:auto; padding-inline:24px; }

/* Bold gradient/mesh dark hero */
.plm-hero{
  position:relative; text-align:center; padding:96px 24px 104px; overflow:hidden;
  background:
    radial-gradient(720px 380px at 82% -8%, rgba(236,72,153,.30), transparent 60%),
    radial-gradient(680px 420px at 12% 8%, rgba(6,182,212,.28), transparent 60%),
    radial-gradient(900px 500px at 50% 120%, rgba(139,92,246,.35), transparent 60%),
    #0b1020;
  color:#e5e7f5;
}
.plm-hero::after{
  content:""; position:absolute; inset:0; opacity:.4; pointer-events:none;
  background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);
  background-size:44px 44px; -webkit-mask:radial-gradient(600px 300px at 50% 0,#000,transparent 75%); mask:radial-gradient(600px 300px at 50% 0,#000,transparent 75%);
}
.plm-hero > *{ position:relative; z-index:1; }
.plm-hero .kicker{
  display:inline-flex; align-items:center; gap:.5rem; font-family:var(--f-head); font-size:.85rem; font-weight:600;
  color:#c7d2fe; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16);
  padding:.45rem 1rem; border-radius:100px; margin-bottom:1.5rem; backdrop-filter:blur(6px);
}
.plm-hero .kicker svg{ width:16px; height:16px; }
.plm-hero h1{ font-size:clamp(2.1rem,5.4vw,3.6rem); line-height:1.18; margin:0 auto 1.1rem; max-width:16ch; color:#fff; letter-spacing:-.01em; }
.plm-hero h1 .grad{ background:var(--grad-text); -webkit-background-clip:text; background-clip:text; color:transparent; }
.plm-hero .sub{ font-size:1.2rem; color:#aab2d5; max-width:62ch; margin:0 auto 2.2rem; }
.plm-cta-row{ display:flex; gap:.9rem; justify-content:center; flex-wrap:wrap; }

.plm-btn{ display:inline-flex; align-items:center; gap:.55rem; font-family:var(--f-head); font-weight:600; padding:.9rem 1.7rem; border-radius:100px; font-size:1rem; cursor:pointer; border:1.5px solid transparent; transition:transform .15s, box-shadow .2s, background .2s, border-color .2s; }
.plm-btn svg{ width:18px; height:18px; }
.plm-btn-primary{ background:var(--grad); color:#fff; box-shadow:0 10px 26px rgba(99,102,241,.4); }
.plm-btn-primary:hover{ color:#fff; transform:translateY(-2px); box-shadow:0 16px 34px rgba(99,102,241,.5); }
.plm-btn-ghost{ background:rgba(255,255,255,.06); color:#fff; border-color:rgba(255,255,255,.28); }
.plm-btn-ghost:hover{ border-color:#fff; color:#fff; background:rgba(255,255,255,.12); }
/* Ghost button on light sections */
.plm-section .plm-btn-ghost{ background:#fff; color:var(--ink); border-color:var(--line); }
.plm-section .plm-btn-ghost:hover{ border-color:var(--brand); color:var(--brand-2); }

.plm-section{ padding:78px 0; }
.plm-section.alt{ background:var(--bg-alt); border-block:1px solid var(--line); }
.plm-section-head{ text-align:center; max-width:720px; margin:0 auto 3rem; }
.plm-section-head .ey{ display:inline-block; font-family:var(--f-head); font-weight:700; font-size:.82rem; letter-spacing:.06em; text-transform:uppercase; padding:.3rem .8rem; border-radius:100px; background:var(--bg-soft); color:var(--brand-2); margin-bottom:.8rem; }
.plm-section-head h2{ font-size:clamp(1.7rem,3.4vw,2.4rem); margin:0 0 .6rem; }
.plm-section-head h2::before{ display:none; }
.plm-section-head p{ color:var(--muted); font-size:1.1rem; margin:0; }

.plm-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(258px,1fr)); gap:22px; }
.plm-grid-4{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:18px; }

.plm-card{ position:relative; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:28px; box-shadow:var(--shadow-sm); transition:transform .18s, box-shadow .2s, border-color .2s; overflow:hidden; }
.plm-card::before{ content:""; position:absolute; inset:0 0 auto 0; height:4px; background:var(--grad); opacity:0; transition:opacity .2s; }
.plm-card:hover{ transform:translateY(-5px); box-shadow:var(--shadow-md); border-color:#d9ddf7; }
.plm-card:hover::before{ opacity:1; }
.plm-card .ic{ width:52px; height:52px; border-radius:14px; display:grid; place-items:center; margin-bottom:1.1rem; color:#fff; }
.plm-card .ic svg{ width:26px; height:26px; stroke-width:2; }
.plm-card h3{ font-size:1.2rem; margin:0 0 .5rem; color:var(--ink); }
.plm-card p{ margin:0; color:var(--muted); font-size:1rem; }
.plm-card a.more{ display:inline-flex; align-items:center; gap:.3rem; margin-top:1rem; font-weight:600; font-family:var(--f-head); color:var(--brand-2); }
.plm-card a.more:hover{ gap:.6rem; }

/* Multi-accent icon backgrounds */
.ic.c1{ background:linear-gradient(135deg,#6366f1,#8b5cf6); box-shadow:0 8px 18px rgba(99,102,241,.35); }
.ic.c2{ background:linear-gradient(135deg,#06b6d4,#0ea5e9); box-shadow:0 8px 18px rgba(6,182,212,.32); }
.ic.c3{ background:linear-gradient(135deg,#10b981,#22c55e); box-shadow:0 8px 18px rgba(16,185,129,.32); }
.ic.c4{ background:linear-gradient(135deg,#f59e0b,#f97316); box-shadow:0 8px 18px rgba(245,158,11,.32); }
.ic.c5{ background:linear-gradient(135deg,#ec4899,#f43f5e); box-shadow:0 8px 18px rgba(236,72,153,.32); }
.ic.c6{ background:linear-gradient(135deg,#8b5cf6,#a855f7); box-shadow:0 8px 18px rgba(139,92,246,.32); }

/* Steps */
.plm-steps{ display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:16px; }
.plm-step{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:22px; text-align:center; box-shadow:var(--shadow-sm); }
.plm-step .num{ font-family:var(--f-head); font-weight:700; color:#fff; font-size:1.05rem; width:44px; height:44px; border-radius:13px; display:grid; place-items:center; margin:0 auto .8rem; background:var(--grad); box-shadow:0 8px 18px rgba(99,102,241,.32); }
.plm-step h4{ margin:0 0 .3rem; font-size:1.05rem; color:var(--ink); }
.plm-step p{ margin:0; font-size:.9rem; color:var(--muted); }

/* CTA band */
.plm-ctaband{ position:relative; overflow:hidden; text-align:center; color:#fff; border-radius:var(--radius-lg); padding:60px 30px; background:var(--grad); box-shadow:var(--shadow-lg); }
.plm-ctaband::after{ content:""; position:absolute; inset:0; background:radial-gradient(500px 240px at 80% -20%,rgba(255,255,255,.25),transparent 60%); }
.plm-ctaband > *{ position:relative; z-index:1; }
.plm-ctaband h2{ color:#fff; font-size:clamp(1.6rem,3.4vw,2.3rem); margin:0 0 .7rem; }
.plm-ctaband h2::before{ display:none; }
.plm-ctaband p{ color:rgba(255,255,255,.92); font-size:1.12rem; max-width:56ch; margin:0 auto 1.7rem; }
.plm-ctaband .plm-btn-primary{ background:#fff; color:var(--brand-2); box-shadow:0 12px 26px rgba(0,0,0,.2); }
.plm-ctaband .plm-btn-primary:hover{ background:#f2f3ff; color:var(--brand-2); }
.plm-ctaband .plm-btn-ghost{ background:transparent; color:#fff; border-color:rgba(255,255,255,.6); }
.plm-ctaband .plm-btn-ghost:hover{ border-color:#fff; background:rgba(255,255,255,.12); }

/* Contact cards */
.plm-contact{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin:1.8rem 0; }
.plm-contact a{ display:flex; align-items:center; gap:.9rem; padding:18px 20px; background:#fff; border:1px solid var(--line); border-radius:var(--radius); font-weight:600; color:var(--ink); box-shadow:var(--shadow-sm); text-decoration:none; transition:.2s; }
.plm-contact a:hover{ border-color:var(--brand); transform:translateY(-3px); box-shadow:var(--shadow-md); }
.plm-contact .ic{ width:46px; height:46px; border-radius:13px; display:grid; place-items:center; color:#fff; flex:0 0 auto; }
.plm-contact .ic svg{ width:22px; height:22px; }
.plm-contact small{ display:block; color:var(--muted); font-weight:400; font-size:.82rem; }

/* =========================================================
   Blog / archive cards
   ========================================================= */
.blog .ast-article-post, .archive .ast-article-post, .ast-separate-container .ast-article-post{ border:1px solid var(--line) !important; border-radius:var(--radius); box-shadow:var(--shadow-sm); transition:transform .18s, box-shadow .2s; overflow:hidden; }
.blog .ast-article-post:hover, .archive .ast-article-post:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.ast-article-post .entry-title a{ font-family:var(--f-head); color:var(--ink); }
.ast-article-post .entry-title a:hover{ color:var(--brand-2); }
.single-post .entry-header{ text-align:start; border-bottom:1px solid var(--line); }
.single-post .entry-content{ max-width:760px; margin-inline:0; }
.ast-archive-description .ast-archive-title{ font-family:var(--f-head); color:var(--ink); }

/* =========================================================
   Footer (dark, elegant)
   ========================================================= */
.site-footer, .ast-small-footer, [class*="footer-sml-layout"]{ background:#0b1020 !important; color:#aab2d5 !important; }
.site-footer a, .ast-small-footer a{ color:#e2e6f7 !important; }
.site-footer a:hover{ color:#fff !important; }
.ast-small-footer{ border-top:3px solid transparent; border-image:var(--grad) 1; }

/* Motion */
@media (prefers-reduced-motion:no-preference){
  .plm-card, .plm-step, .plm-contact a{ animation:plmIn .55s both; }
  @keyframes plmIn{ from{ opacity:0; transform:translateY(14px);} to{ opacity:1; transform:none; } }
}

/* Responsive */
@media (max-width:600px){
  body{ font-size:16px; }
  .plm-section{ padding:54px 0; }
  .plm-hero{ padding:64px 18px 72px; }
}

/* Robust header CTA button targeting (Astra free markup) */
.ast-button-wrap .ast-custom-button-link,
.ast-button-wrap .ast-custom-button-link .ast-custom-button{
  background:var(--grad) !important; color:#fff !important; border:0 !important;
  border-radius:100px !important; padding:.62rem 1.4rem !important;
  font-family:var(--f-head); font-weight:600;
  box-shadow:0 8px 20px rgba(99,102,241,.35) !important; transition:transform .15s, box-shadow .2s;
}
.ast-button-wrap .ast-custom-button-link:hover{ transform:translateY(-2px); box-shadow:0 12px 26px rgba(99,102,241,.45) !important; color:#fff !important; }
