/* Fonts loaded via <link> in header.php for performance */
:root{
  /* Neutral design system — no green, clean and professional */
  --g:#2563eb;    /* accent blue — single accent color */
  --gd:#1d4ed8;   /* accent dark */
  --gl:#eff6ff;   /* accent light bg */
  --gold:#64748b; /* neutral mid */
  --gold-l:#f8fafc;
  --t:#0f172a;    /* primary text — near black */
  --t2:#475569;   /* secondary text */
  --t3:#94a3b8;   /* muted text */
  --bd:#e2e8f0;   /* border */
  --bg:#ffffff;   /* background */
  --bg2:#f8fafc;  /* surface */
  --sh:0 1px 4px rgba(0,0,0,.06);
  --r:10px;
  --f:'IBM Plex Sans Arabic',sans-serif;
  --mx:1200px;
}
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
html,body{overflow-x:hidden}
body{font-family:var(--f);background:#FFFFFF;color:var(--t);line-height:1.7;font-size:15px}
a{text-decoration:none;color:inherit}img{max-width:100%;display:block}ul{list-style:none}

.w{max-width:var(--mx);margin:0 auto;padding:0 32px}

/* CARD BOX — white bg, light shadow, 24px padding, 32px gap */
.card-box{
  background:#FFFFFF;
  border:1px solid var(--bd);
  border-radius:var(--r);
  box-shadow:var(--sh);
  padding:28px;
  margin-bottom:32px;
  max-width:100%;
  min-width:0;
  overflow:hidden;
  box-sizing:border-box;
}

/* ===== HEADER ===== */
.hdr{
  height:64px;
  position:sticky;top:0;z-index:100;
  background:#FFFFFF;
  border-bottom:1px solid var(--bd);
}
.hdr .w{height:100%;display:flex;align-items:center;justify-content:space-between}
.logo{display:flex;align-items:center;gap:10px;min-width:0;flex-shrink:0}
.logo-ic{width:38px;height:38px;background:var(--g);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.logo-ic svg{width:20px;height:20px}
.logo-tx{font-size:18px;font-weight:700;line-height:1.2;color:#111827;white-space:nowrap}
.nav{display:flex;gap:4px}
.nav a{padding:6px 12px;border-radius:6px;font-size:13px;font-weight:500;color:var(--t2);transition:.15s}
.nav a:hover,.nav a.on{color:var(--g);background:var(--gl)}
.hdr-r{display:flex;gap:8px;flex-shrink:0}
.hdr-b{width:38px;height:38px;border:1px solid var(--bd);border-radius:8px;display:flex;align-items:center;justify-content:center;background:#fff;cursor:pointer;color:var(--t3);transition:.15s}
.hdr-b:hover{border-color:var(--g);color:var(--g)}
.hdr-search{position:relative;flex:1;max-width:280px;margin:0 16px}
.hdr-search input{width:100%;height:38px;padding:0 14px 0 38px;border:1.5px solid var(--bd);border-radius:8px;font-size:13px;font-family:var(--f);background:#f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 12px center;background-size:16px;outline:none;transition:.2s;color:var(--t1);line-height:38px}
.hdr-search input:focus{border-color:var(--g);background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23138d4a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E") no-repeat 12px center;background-size:16px}
.hdr-search input::placeholder{color:#9ca3af}

.hdr-search-results{position:absolute;top:calc(100% + 6px);right:0;left:0;background:#fff;border:1.5px solid var(--bd);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.1);display:none;z-index:100;max-height:320px;overflow-y:auto}
.hdr-search-results.active{display:block}
.hsr-item{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #f3f4f6;transition:.1s;cursor:pointer;text-decoration:none;color:var(--t1)}
.hsr-item:last-child{border-bottom:none}
.hsr-item:hover{background:#f9fafb}
.hsr-icon{width:32px;height:32px;border-radius:8px;background:var(--gl);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.hsr-icon svg{width:16px;height:16px;stroke:var(--g);fill:none;stroke-width:2}
.hsr-text strong{font-size:13px;font-weight:600;display:block;margin-bottom:1px}
.hsr-text span{font-size:11px;color:var(--t3)}
.hsr-empty{padding:20px 14px;text-align:center;font-size:13px;color:var(--t3)}

.hdr-results{display:none;position:absolute;top:calc(100% + 6px);right:0;left:0;background:#fff;border:1.5px solid var(--bd);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.1);z-index:100;max-height:320px;overflow-y:auto}
.hdr-results.active{display:block}
.hdr-results a{display:block;padding:10px 14px;font-size:13px;color:var(--t1);border-bottom:1px solid #f3f4f6;transition:.1s}
.hdr-results a:last-child{border-bottom:none}
.hdr-results a:hover{background:var(--gl);color:var(--g)}
.hdr-results .no-res{padding:14px;text-align:center;font-size:12px;color:var(--t3)}
.mmb{display:none}

/* MOBILE */
.mov{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:200;backdrop-filter:blur(2px)}.mov.on{display:block}
.mmn{position:fixed;top:0;right:-300px;width:300px;height:100%;background:#fff;z-index:201;transition:right .35s cubic-bezier(.4,0,.2,1);padding:0;overflow-y:auto;box-shadow:-4px 0 24px rgba(0,0,0,.08)}.mmn.on{right:0}
.mmh{display:flex;justify-content:space-between;align-items:center;padding:20px 24px 16px;border-bottom:1.5px solid #f1f5f9}
.mmx{width:34px;height:34px;border:none;background:#f3f4f6;border-radius:8px;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;color:var(--t2);transition:.15s}.mmx:hover{background:#e5e7eb}
.mmn nav{padding:8px 16px}.mmn nav a{display:flex;align-items:center;gap:10px;padding:13px 12px;font-size:15px;font-weight:500;border-radius:10px;color:var(--t1);transition:.15s;margin-bottom:2px}.mmn nav a:hover,.mmn nav a.on{background:var(--gl);color:var(--g)}

/* BREADCRUMB WRAP */
.bc-wrap{background:#FFFFFF;border:1px solid var(--bd);border-radius:8px;box-shadow:var(--sh);padding:0 16px;margin:10px 0}
/* BREADCRUMB */
.bc{padding:8px 0;font-size:14px;color:var(--t3);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.bc a{color:var(--t2);transition:.15s}.bc a:hover{color:var(--g)}
.bc .s{color:#ddd}.bc .c{color:var(--t);font-weight:600}

/* SECTION HEAD */
.sh{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:24px}
.sh h2{font-size:20px;font-weight:800;color:#111827;letter-spacing:-.01em;line-height:1.3}.sh a{font-size:12px;color:var(--t3);font-weight:500;transition:color .2s}.sh a:hover{color:var(--g)}

/* CATEGORIES (6) */
.cats{display:grid;grid-template-columns:repeat(6,1fr);gap:14px}
.ct{border:1px solid var(--bd);border-radius:var(--r);padding:20px 12px;text-align:center;transition:.15s;cursor:pointer;background:#fff}
.ct:hover{border-color:var(--g)}
.ct-i{width:44px;height:44px;border-radius:8px;display:flex;align-items:center;justify-content:center;margin:0 auto 8px;font-size:22px}
.ct h3{font-size:13px;font-weight:600;margin-bottom:2px}.ct span{font-size:11px;color:var(--t3)}

/* ITEM CARDS — gap:20px, shadow on each */
.g3{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.g4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.cd{border:1px solid var(--bd);border-radius:var(--r);overflow:hidden;transition:.15s;background:#FFFFFF;box-shadow:var(--sh);cursor:pointer;display:flex;flex-direction:column}
.cd:hover{border-color:var(--g)}
.cd-img{display:block;aspect-ratio:16/9;overflow:hidden;position:relative}.cd-img img{width:100%;height:100%;object-fit:cover;display:block}
.cd-b{padding:14px 16px;flex:1;display:flex;flex-direction:column}
.cd-tg{display:inline-block;padding:2px 8px;border-radius:4px;font-size:10px;font-weight:600;margin-bottom:5px;align-self:flex-start}
.cd .cd-b h3{font-size:17px;font-weight:700;line-height:1.4;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cd .cd-b h3 a{color:#111827;text-decoration:none}.cd:hover .cd-b h3 a{color:var(--g)}
.cd-d{font-size:11px;font-weight:500;color:#8b95a5;line-height:1.3;margin-bottom:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cd-f{display:flex;justify-content:space-between;font-size:10.5px;color:var(--t3);padding-top:8px;border-top:1px solid #f3f4f6;margin-top:auto}
.cd-f i{display:flex;align-items:center;gap:3px}

/* PAGINATION */
.pg{display:flex;justify-content:center;gap:5px;margin-top:24px}
.pg a,.pg span{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:8px;font-size:13px;font-weight:600;border:1px solid var(--bd);transition:.15s;color:var(--t1)}
.pg .dots{border:none;color:var(--t3);font-weight:400;width:auto;padding:0 4px}
.pg .prev,.pg .next{font-size:16px;font-weight:400}
.pg a:hover{border-color:var(--g);color:var(--g)}.pg .on,.pg .current{background:var(--g);color:#fff;border-color:var(--g)}

/* ===== HERO ===== */
.hero{background:linear-gradient(180deg,#f0faf4 0%,#fff 100%);padding:40px 0 36px;margin-bottom:40px}
.hero-inner{max-width:680px;margin:0 auto}
.hero h1{font-size:28px;font-weight:800;color:#111827;margin-bottom:6px;line-height:1.5;letter-spacing:-.01em;text-align:center}
.hero p{font-size:14px;color:var(--t2);margin-bottom:24px;text-align:center;line-height:1.6}
.hero-info{display:flex;justify-content:center;gap:20px;margin-top:20px;flex-wrap:wrap}
.hero-info span{font-size:12px;color:var(--t3);display:flex;align-items:center;gap:5px}
.hero-info span b{color:var(--g);font-weight:700}




.hsf{max-width:100%;margin:0 auto;position:relative;display:flex;gap:0;border-radius:12px;overflow:hidden;border:1.5px solid #e2e8f0;transition:all .2s;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.04)}.hsf:focus-within{border-color:var(--g);box-shadow:0 2px 12px rgba(13,90,60,.1)}.hsf:focus-within{border-color:var(--g);box-shadow:0 2px 12px rgba(13,90,60,.1)}
.hsf input{flex:1;height:50px;padding:0 20px;border-radius:0;border:none;font-size:14px;font-family:var(--f);outline:none;background:transparent}
.hs-btn{width:50px;height:50px;background:var(--g);border:none;border-radius:0;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.2s;flex-shrink:0}.hs-btn:hover{background:var(--gd)}.hs-btn:hover{background:var(--gd)}.hs-btn:hover{background:#053321}

/* ===== CATEGORY HEADER ===== */
.cat-hd{text-align:center;padding:8px 0}
.cat-hd h1{font-size:24px;font-weight:700;margin-bottom:6px}
.cat-hd p{font-size:14px;color:var(--t2);line-height:1.65;max-width:640px;margin:0 auto 10px}
.cat-hd .badge{display:inline-block;padding:4px 16px;border-radius:6px;font-size:13px;font-weight:700;color:var(--g);background:var(--gl)}

/* ===== ARTICLE ===== */
.art-grid{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:28px;min-width:0}
.art-grid:not(:has(.side)){grid-template-columns:minmax(0,1fr)}
.art-grid > *{min-width:0;max-width:100%}
.art-h1{font-size:24px;font-weight:700;line-height:1.5;margin-bottom:16px}

/* Author card */
.art-au{font-size:13px;color:var(--t3);margin-bottom:20px}
.art-au strong{font-weight:600;color:var(--t1)}
.art-au strong a{color:var(--t1);text-decoration:none;transition:.15s}
.art-au strong a:hover{color:var(--g)}

/* Featured image — WHITE bg, padding:16px, NOT glued to border */
.art-fi{max-width:700px;margin:0 auto 28px;border:1px solid var(--bd);border-radius:var(--r);padding:12px;box-shadow:var(--sh);background:#FFFFFF}
.art-fi img{width:100%;height:auto;display:block;border-radius:6px;max-height:none;object-fit:contain}

/* Body */
.ab{overflow-wrap:break-word;word-wrap:break-word;overflow:hidden;max-width:100%;min-width:0;box-sizing:border-box}.ab h2{font-size:20px;font-weight:800;color:#111827;letter-spacing:-.01em;margin:32px 0 24px}
.ab p{margin-bottom:14px;color:var(--t2);line-height:1.9}
.ab ul{margin:14px 0;padding-right:22px;list-style:disc}.ab ol{margin:14px 0;padding-right:22px;list-style:decimal}.ab li{margin-bottom:6px;color:var(--t2);line-height:1.85}
.ab blockquote{border-right:4px solid var(--g);background:var(--gl);padding:16px 20px;margin:20px 0;border-radius:0 8px 8px 0;font-size:14px;line-height:1.8;color:#374151}
.ab blockquote p{margin:0}.ab blockquote p:empty{display:none}.ab blockquote p:first-child:empty,.ab blockquote p:last-child:empty{display:none}.ab blockquote br:first-child,.ab blockquote>br:last-child{display:none}
.ab table{width:100%;border-collapse:collapse;margin:20px 0;display:block;overflow-x:auto}.ab th,.ab td{padding:8px 12px;border:1px solid #ddd;text-align:right;white-space:nowrap}

.dl{background:var(--gl);border-radius:var(--r);padding:24px;text-align:center;margin:28px 0}
.dl h3{font-size:15px;color:var(--gd);margin-bottom:4px}.dl p{font-size:13px;color:var(--t2);margin-bottom:12px}
.btn-g{display:inline-flex;align-items:center;gap:6px;padding:10px 24px;background:var(--g);color:#fff;border-radius:8px;font-size:14px;font-weight:600;font-family:var(--f);border:none;cursor:pointer;transition:.15s}.btn-g:hover{background:var(--gd)}
.tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:24px}.tags a{padding:3px 10px;border-radius:5px;font-size:10px;font-weight:500;border:1px solid var(--bd);color:var(--t2);transition:.15s}.tags a:hover{border-color:var(--g);color:var(--g);background:var(--gl)}

/* Related */
.rel h2{font-size:20px;font-weight:800;color:#111827;letter-spacing:-.01em;margin-bottom:24px}

/* Sidebar */
.side{display:flex;flex-direction:column;gap:20px}
.wgt{border:1px solid var(--bd);border-radius:var(--r);padding:20px;box-shadow:var(--sh);background:#FFFFFF}
.wgt h3{font-size:15px;font-weight:800;color:#111827;margin-bottom:16px;padding-bottom:10px;border-bottom:2px solid var(--gl)}
.wgt a{display:flex;justify-content:space-between;align-items:center;padding:12px 0;font-size:14px;font-weight:500;color:var(--t1);border-bottom:1px solid #f1f5f9;transition:.15s}
.wgt a:last-child{border-bottom:none}.wgt a:hover{color:var(--g)}.wgt a span{font-size:13px;color:var(--t3);font-weight:600}

/* ===== SEARCH ===== */
.srch-hd{text-align:center;padding:8px 0}
.srch-hd h1{font-size:22px;font-weight:700;margin-bottom:5px}.srch-hd .kw{color:var(--g)}
.srch-hd .cnt{font-size:13px;color:var(--t3);margin-bottom:20px}.srch-hd .cnt b{color:var(--g)}
.srch-f{position:relative;max-width:520px;margin:0 auto;display:flex;align-items:center}
.srch-f form{flex:1}
.srch-f input{width:100%;padding:13px 18px 13px 18px;border-radius:var(--r);border:1.5px solid var(--bd);font-family:var(--f);font-size:15px;outline:none;transition:.15s;box-shadow:var(--sh)}.srch-f input:focus{border-color:var(--g)}
.srch-f>svg{position:absolute;left:15px;top:50%;transform:translateY(-50%);color:var(--t3);pointer-events:none;z-index:1}

/* ===== AUTHOR ===== */
.au-hd{display:flex;gap:18px;align-items:flex-start;padding:8px 0}
.au-av{width:72px;height:72px;border-radius:50%;background:var(--gl);color:var(--g);display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:700;flex-shrink:0;border:2.5px solid var(--g);overflow:hidden}
.au-av img{width:100%;height:100%;object-fit:cover;display:block}
.au-nf{flex:1}.au-nf h1{font-size:22px;font-weight:700;margin-bottom:2px}
.au-nf .ttl{font-size:12px;color:var(--g);font-weight:600;margin-bottom:6px}
.au-nf p{font-size:13px;color:var(--t2);line-height:1.65;margin-bottom:12px}
.au-st{display:flex;gap:16px;margin-top:8px}
.au-st div{display:flex;align-items:center;gap:4px;font-size:13px;color:var(--t3)}.au-st strong{font-weight:700;color:var(--t1)}.au-st span{font-weight:400}

/* ===== STATIC PAGE ===== */
.pg-hd{padding:8px 0 0}.pg-hd h1{font-size:22px;font-weight:700;margin-bottom:4px}.pg-hd .sub{font-size:13px;color:var(--t2)}
.pg-bd{padding:8px 0}
.pg-bd h2{font-size:18px;font-weight:800;color:#111827;margin:28px 0 12px}.pg-bd h2:first-child{margin-top:0}
.pg-bd p{margin-bottom:14px;color:var(--t2);line-height:1.85}
.pg-bd ul{margin:10px 0;padding-right:20px;list-style:disc}.pg-bd ol{margin:10px 0;padding-right:20px;list-style:decimal}.pg-bd li{margin-bottom:5px;color:var(--t2);line-height:1.7;list-style:inherit}

/* ===== 404 ===== */
.e4{text-align:center;padding:48px 0 24px}
.e4 h1{font-size:80px;font-weight:700;color:var(--g);letter-spacing:-3px;line-height:1}
.e4 h2{font-size:22px;font-weight:800;color:#111827;margin:12px 0 8px}.e4 p{font-size:14px;color:var(--t2);margin-bottom:20px}

/* ===== FOOTER ===== */
.ftr{background:#111827;color:#fff;padding:48px 0 0;margin-top:48px}
.ftr-g{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:32px;padding-bottom:36px}
.ftr-brand p{font-size:14px;color:rgba(255,255,255,.75);margin-top:12px;line-height:1.7}
.ftr .logo-ic{width:46px;height:46px;border-radius:12px}.ftr .logo-ic svg{width:24px;height:24px}.ftr .logo-tx{font-size:22px;color:#fff;font-weight:800}
.ftr h2{font-size:15px;font-weight:700;margin-bottom:16px;color:rgba(255,255,255,.85)}
.ftr ul li{margin-bottom:10px}.ftr ul a{font-size:14px;color:rgba(255,255,255,.75);transition:.15s}.ftr ul a:hover{color:#fff}
.ftr-social{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}
.ftr-social-link{width:36px;height:36px;border-radius:8px;background:rgba(255,255,255,.1);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.7);transition:.2s}
.ftr-social-link:hover{background:rgba(255,255,255,.2);color:#fff}
.ftr-bt{border-top:1px solid rgba(255,255,255,.1);padding:20px 0;text-align:center;font-size:13px;color:rgba(255,255,255,.75)}

/* RESPONSIVE */
@media(max-width:1024px){.cats{grid-template-columns:repeat(3,1fr)}.g3{grid-template-columns:repeat(2,1fr)}.g4{grid-template-columns:repeat(2,1fr)}.art-grid{grid-template-columns:minmax(0,1fr)}.side{order:2}.ftr-g{grid-template-columns:1fr 1fr}.au-hd{flex-wrap:wrap}}
@media(max-width:768px){.nav{display:none}.mmb{display:flex}.hdr-search{max-width:none;flex:1;margin:0 10px}.hdr-search input{font-size:12px;height:34px;line-height:34px;padding:0 12px 0 36px}.hero{margin-bottom:32px;padding:32px 0 28px}.hero h1{font-size:21px}.hero-info{gap:12px}.cats{grid-template-columns:repeat(3,1fr)}.g3{grid-template-columns:1fr;gap:16px}.g4{grid-template-columns:1fr 1fr;gap:12px}.ftr-g{grid-template-columns:1fr;gap:20px}.ftr{padding-top:32px}.w{padding:0 16px;max-width:100%;overflow-x:hidden}
/* Mobile: card-box has vertical padding only — horizontal padding is
   moved inside to content elements. This way, ads (.fa-ad) take the
   FULL width of card-box while text/images keep their visual padding.
   Result: AdSense gets a wider container = larger ad slot = better
   user experience and revenue. */
.card-box{padding:16px 0;margin-bottom:24px;overflow:hidden;max-width:100%}
.card-box > h1.art-h1,
.card-box > .art-au,
.card-box > .art-fi,
.card-box > .ab,
.card-box > .tags{padding-left:16px;padding-right:16px;box-sizing:border-box;max-width:100%}
.card-box > .fa-ad{padding-left:0;padding-right:0}
.art-fi{max-width:100%;padding:8px;margin:0 0 20px}.art-fi img{width:100%;height:auto}.art-h1{font-size:20px;line-height:1.5}.art-au{font-size:12px;margin-bottom:16px;word-wrap:break-word;overflow-wrap:break-word}.ab{overflow-wrap:break-word;word-wrap:break-word;overflow:hidden}.ab h2{font-size:18px;margin:24px 0 16px}.ab p{font-size:14px;line-height:1.85}.ab table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}.copy-tpl{margin:20px 0;max-width:100%;overflow:hidden;box-sizing:border-box}.copy-tpl-head{flex-wrap:wrap;gap:8px}.copy-tpl-head h3{font-size:14px}.copy-tpl-body{padding:14px;font-size:13px;overflow-x:hidden;white-space:pre-line;word-break:normal;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box}.dl-tpl{margin:20px 0;max-width:100%;overflow:hidden}.dl-tpl-head{flex-wrap:wrap;gap:8px}.dl-tpl-body{padding:10px 12px}.dl-grid.cols-2,.dl-grid.cols-3{grid-template-columns:1fr 1fr !important}.dl-item{padding:14px 10px}.dl-item-icon{width:40px;height:40px}.dl-item strong{font-size:13px}.dl-item-btn{font-size:12px !important;padding:8px 12px !important}.logo-tx{font-size:14px}.logo-ic{width:32px;height:32px}.logo-ic svg{width:16px;height:16px}}
@media(max-width:480px){.cats{grid-template-columns:1fr 1fr}.g4{grid-template-columns:1fr}.dl-grid.cols-2,.dl-grid.cols-3{grid-template-columns:1fr !important}.art-h1{font-size:18px}}

/* ===== DESKTOP ENHANCEMENTS (min-width:1200px) ===== */
@media(min-width:1200px){
/* 1) Categories grid - stronger visual */
.cats{gap:28px}
.ct{padding:28px 16px;min-height:140px;display:flex;flex-direction:column;align-items:center;justify-content:center;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.ct-i{width:52px;height:52px;border-radius:10px;font-size:26px;margin-bottom:10px}
.ct h3{font-size:14px;margin-bottom:3px}
.ct span{font-size:12px}
/* 2) Header nav - slightly larger */
.nav a{font-size:14px}
/* 3) Logo - 15-20% bigger */
.logo-ic{width:44px;height:44px;border-radius:12px}
.logo-ic svg{width:24px;height:24px}
.logo-tx{font-size:20px}
.logo-tx small{font-size:11.5px}
/* 4) Footer grid - balanced columns */
.ftr-g{grid-template-columns:1.4fr 1fr 1fr 1fr;gap:40px;align-items:start}
}

/* ===== WORDPRESS NAV FIXES ===== */
.nav{list-style:none;padding:0;margin:0}
.nav li{list-style:none;display:flex;align-items:center}
.nav li::marker{content:none;display:none}
.nav ul{list-style:none;display:flex;gap:4px;padding:0;margin:0}
.ftr ul{list-style:none;padding:0;margin:0}

/* ===== WORDPRESS IMAGE FIXES ===== */
/* WordPress image override — fixed pixel height */
.cd-img img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.art-fi .wp-post-image{width:100%;height:auto;display:block}
.ab img{max-width:100%;height:auto;border-radius:8px;margin:20px 0;display:block}
.ab .wp-block-image,.ab figure{margin:20px 0;text-align:center}
.ab figure img{margin:0 auto}
.ab figcaption{font-size:12px;color:var(--t3);margin-top:8px;text-align:center}
.ab a{color:var(--g);text-decoration:underline}

/* ===== PAGINATION (WordPress paginate_links) ===== */
.pgn{display:flex;justify-content:center;gap:5px;margin:24px 0}
.pgn a,.pgn span{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:6px;font-size:12px;font-weight:500;border:1px solid var(--bd);transition:.15s}
.pgn a:hover{border-color:var(--g);color:var(--g)}
.pgn .current{background:var(--g);color:#fff;border-color:var(--g)}

/* ===== SHORTCODES ===== */
.copy-tpl{margin:28px 0;border:1.5px solid #e2e8f0;border-radius:var(--r);background:#f8fafc;overflow:hidden}
.copy-tpl-head{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:#fff;border-bottom:1px solid #e2e8f0;border-right:none;border-left:none}
.copy-tpl-head h3{font-size:15px;font-weight:700;color:#111827;margin:0}
.copy-tpl-body{padding:18px;font-size:14px;color:var(--t1);line-height:1.7;white-space:pre-wrap;direction:rtl;font-family:var(--f);border:none;background:none;word-break:normal;overflow-wrap:anywhere}
.copy-tpl-body p{margin:0}
.copy-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 16px;border:none;border-radius:8px;background:#0D5A3C;color:#fff;cursor:pointer;font-size:12.5px;font-weight:600;font-family:var(--f);transition:.2s}
.copy-btn:hover{background:var(--gd)}
.copy-btn.copied{background:#059669}
.copy-btn svg{width:14px;height:14px}

.dl-tpl{margin:28px 0;border:1.5px solid #e2e8f0;border-radius:var(--r);background:#f8fafc;overflow:hidden}
.dl-tpl-head{display:flex;justify-content:space-between;align-items:center;padding:12px 18px;background:#fff;border-bottom:1px solid #e2e8f0}
.dl-tpl-head h3{font-size:15px;font-weight:700;color:#111827;margin:0}
.dl-tpl-head span{font-size:12px;color:var(--t3);font-weight:500}
.dl-tpl-body{padding:14px 18px}
.dl-grid{display:grid;gap:10px}
.dl-grid.cols-1{grid-template-columns:1fr;max-width:60%;margin:0 auto}
@media(max-width:768px){.dl-grid.cols-1{max-width:100%}}
.dl-grid.cols-2{grid-template-columns:1fr 1fr}
.dl-grid.cols-3{grid-template-columns:1fr 1fr 1fr}
@media(max-width:768px){.dl-grid.cols-3{grid-template-columns:1fr 1fr !important}}
@media(max-width:480px){.dl-grid.cols-2,.dl-grid.cols-3{grid-template-columns:1fr !important}}
.dl-item{border:1.5px solid #e9ecef;border-radius:10px;background:#f8fafc;padding:20px 16px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;transition:.15s}
.dl-item:hover{border-color:#cbd5e1;box-shadow:0 2px 8px rgba(0,0,0,.04)}
.dl-item-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:800}
.dl-item-icon.word{background:#E3F2FD;color:#1565C0}
.dl-item-icon.pdf{background:#FFEBEE;color:#C62828}
.dl-item-icon.excel{background:#E8F5E9;color:#2E7D32}
.dl-item-icon.jpg{background:#FFF3E0;color:#E65100}
.dl-item-icon.png{background:#E8EAF6;color:#283593}
.dl-item strong{font-size:14px;font-weight:700;color:#111827}
.dl-item-meta{font-size:11.5px;color:var(--t3);line-height:1.6}
.dl-tpl .dl-item-btn,.dl-tpl .dl-item-btn:link,.dl-tpl .dl-item-btn:visited,.dl-tpl a.dl-item-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:10px 16px;border-radius:8px;font-size:13px;font-weight:700;color:#fff !important;background:#0D5A3C !important;border:none;cursor:pointer;font-family:var(--f);transition:.2s;text-decoration:none !important;line-height:1.4}
.dl-tpl .dl-item-btn:hover,.dl-tpl .dl-item-btn:focus,.dl-tpl .dl-item-btn:active,.dl-tpl a.dl-item-btn:hover{background:var(--gd) !important;color:#fff !important;box-shadow:0 2px 8px rgba(0,0,0,.15);text-decoration:none !important}
.dl-tpl .dl-item-btn svg{width:16px;height:16px;min-width:16px;stroke:#fff !important;fill:none;flex-shrink:0}
.dl-tpl .dl-item-btn span{color:#fff !important;font-size:13px;font-weight:700}
.dl-item-preview{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:100%;padding:9px 0;border-radius:8px;font-size:13px;font-weight:600;color:var(--g);background:#fff;border:1.5px solid var(--g);cursor:pointer;font-family:var(--f);transition:.2s;text-decoration:none}
.dl-item-preview:hover{background:var(--gl)}
.dl-item-preview svg{width:14px;height:14px}
.dl-item-actions{width:100%;display:flex;flex-direction:column;gap:6px;margin-top:4px}

/* ===== LOGO CUSTOM IMAGE ===== */
.logo-custom{max-height:38px;width:auto}
.ftr .logo-custom{max-height:46px}

/* ===== BOTTOM WIDGET AREA ===== */
.bottom-widgets{margin-top:32px}

/* ===== WORDPRESS DEFAULT WIDGET OVERRIDES ===== */
/* Make WP default widgets match reference .wgt design */
.wgt ul{list-style:none;padding:0;margin:0}
.wgt li{border-bottom:1px solid #f1f5f9}
.wgt li:last-child{border-bottom:none}
.wgt li a{display:flex;justify-content:space-between;align-items:center;padding:12px 0;font-size:14px;font-weight:500;color:var(--t1);transition:.15s;text-decoration:none}
.wgt li a:hover{color:var(--g)}
.wgt .cat-item a{width:100%}
.wgt .cat-item{display:flex;justify-content:space-between;align-items:center;padding:12px 0;font-size:14px;font-weight:500;color:var(--t1)}
/* WordPress sidebar search widget */
.wgt .wp-block-search__input,.wgt input[type="search"]{width:100%;padding:10px 14px;border:1.5px solid var(--bd);border-radius:8px;font-family:var(--f);font-size:13px;outline:none}
.wgt .wp-block-search__input:focus,.wgt input[type="search"]:focus{border-color:var(--g)}
.wgt .wp-block-search__button,.wgt input[type="submit"]{background:var(--g);color:#fff;border:none;padding:10px 16px;border-radius:8px;cursor:pointer;font-family:var(--f);font-size:13px}

@keyframes fadeInUp{from{opacity:0;transform:translateX(-50%) translateY(20px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}

/* ===================================================
   DESIGNSARABIA — CPT & SECTION STYLES
   =================================================== */

/* ── Section Hub Cards (Category Hub) ── */
.hub-sections{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:16px;margin-bottom:24px}
.hub-sec{display:flex;flex-direction:column;align-items:center;gap:10px;padding:24px 16px;background:#fff;border:1.5px solid var(--bd);border-radius:12px;text-align:center;transition:.2s;cursor:pointer;text-decoration:none;color:var(--t)}
.hub-sec:hover{border-color:var(--g);box-shadow:0 4px 16px rgba(26,107,60,.1);transform:translateY(-2px)}
.hub-sec-icon{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:26px}
.hub-sec-name{font-size:14px;font-weight:600;color:var(--t)}
.hub-sec-count{font-size:12px;color:var(--t3)}

/* ── CPT Badge labels ── */
.type-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;letter-spacing:.3px}
.type-badge.certificate{background:var(--gl);color:var(--g)}
.type-badge.form_template{background:#e3f2fd;color:#1565c0}
.type-badge.design_template{background:var(--gold-l);color:#7a5c00}
.type-badge.interactive_image{background:#fce4ec;color:#880e4f}
.type-badge.smart_tool{background:#ede7f6;color:#4527a0}
.type-badge.post{background:#f3f4f6;color:#374151}

/* ── Certificate Live Editor ── */
.cert-editor-wrap{display:grid;grid-template-columns:1fr 1fr;gap:24px;align-items:start}
@media(max-width:768px){.cert-editor-wrap{grid-template-columns:1fr}}
.cert-fields{display:flex;flex-direction:column;gap:14px}
.cert-field label{font-size:13px;font-weight:600;color:var(--t2);display:block;margin-bottom:4px}
.cert-field input,.cert-field textarea,.cert-field select{width:100%;padding:10px 14px;border:1.5px solid var(--bd);border-radius:8px;font-size:14px;font-family:var(--f);color:var(--t);outline:none;transition:.2s}
.cert-field input:focus,.cert-field textarea:focus{border-color:var(--g)}
.cert-preview-box{position:sticky;top:80px;background:#f9fafb;border:1.5px solid var(--bd);border-radius:12px;overflow:hidden}
.cert-preview-header{padding:12px 16px;background:#fff;border-bottom:1px solid var(--bd);font-size:13px;font-weight:600;color:var(--t2);display:flex;align-items:center;gap:8px}
.cert-preview-inner{padding:16px;min-height:340px;display:flex;align-items:center;justify-content:center}
.cert-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.cert-btn{display:inline-flex;align-items:center;gap:7px;padding:10px 20px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none;transition:.2s}
.cert-btn-primary{background:var(--g);color:#fff}
.cert-btn-primary:hover{background:var(--gd)}
.cert-btn-secondary{background:#fff;color:var(--t);border:1.5px solid var(--bd)}
.cert-btn-secondary:hover{border-color:var(--g);color:var(--g)}
.cert-btn-gold{background:var(--gold);color:#fff}
.cert-btn-gold:hover{background:#b8911f}

/* ── Certificate Preview Canvas ── */
.cert-canvas-wrap{width:100%;max-width:600px;margin:0 auto}
.cert-canvas-wrap canvas{width:100%;height:auto;border-radius:8px;box-shadow:0 2px 12px rgba(0,0,0,.1)}

/* ── Form Template Editor ── */
.form-editor-wrap{display:grid;grid-template-columns:1fr 1fr;gap:24px}
@media(max-width:768px){.form-editor-wrap{grid-template-columns:1fr}}
.form-preview-paper{background:#fff;border:1px solid var(--bd);border-radius:8px;padding:32px;min-height:400px;font-size:14px;line-height:2;direction:rtl}
.form-preview-paper h2{font-size:16px;text-align:center;margin-bottom:24px;color:var(--t)}
.form-line{display:flex;align-items:baseline;gap:8px;margin-bottom:12px;border-bottom:1px solid #e5e7eb;padding-bottom:4px}
.form-line label{min-width:120px;font-weight:600;font-size:13px;color:var(--t2);flex-shrink:0}
.form-line .fv{flex:1;min-height:20px;font-size:13px;color:var(--t)}

/* ── Interactive Image Editor ── */
.img-editor-main{display:grid;grid-template-columns:280px 1fr;gap:24px;align-items:start}
@media(max-width:768px){.img-editor-main{grid-template-columns:1fr}}
.img-controls{background:#fff;border:1.5px solid var(--bd);border-radius:12px;padding:20px;display:flex;flex-direction:column;gap:14px;position:sticky;top:80px}
.img-ctrl-group h4{font-size:13px;font-weight:600;color:var(--t2);margin-bottom:8px}
.img-canvas-area{background:#f3f4f6;border-radius:12px;overflow:hidden;position:relative;min-height:400px;display:flex;align-items:center;justify-content:center}
.img-canvas-area canvas{max-width:100%;height:auto;cursor:crosshair}

/* ── Design Template Grid ── */
.designs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}
.design-card{background:#fff;border:1.5px solid var(--bd);border-radius:12px;overflow:hidden;transition:.2s;cursor:pointer}
.design-card:hover{border-color:var(--g);box-shadow:0 4px 20px rgba(26,107,60,.12);transform:translateY(-2px)}
.design-card-img{aspect-ratio:3/4;background:linear-gradient(135deg,var(--gl),#fff);display:flex;align-items:center;justify-content:center;overflow:hidden}
.design-card-img img{width:100%;height:100%;object-fit:cover}
.design-card-body{padding:14px 16px}
.design-card-title{font-size:14px;font-weight:600;color:var(--t);margin-bottom:6px}
.design-card-meta{display:flex;align-items:center;justify-content:space-between}
.design-card-format{font-size:11px;padding:2px 8px;border-radius:10px;background:var(--gold-l);color:#7a5c00;font-weight:600}
.design-use-btn{font-size:12px;padding:6px 14px;background:var(--g);color:#fff;border:none;border-radius:6px;cursor:pointer;font-weight:600;transition:.15s}
.design-use-btn:hover{background:var(--gd)}

/* ── Start Fill CTA button ── */
.start-fill-cta{display:inline-flex;align-items:center;gap:10px;padding:14px 28px;background:var(--g);color:#fff;border-radius:10px;font-size:15px;font-weight:700;border:none;cursor:pointer;transition:.2s;text-decoration:none}
.start-fill-cta:hover{background:var(--gd);transform:translateY(-1px);box-shadow:0 4px 16px rgba(26,107,60,.3)}
.start-fill-cta svg{flex-shrink:0}

/* ── Related CPT cards (cross-section links) ── */
.related-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:14px}
.related-card{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#fff;border:1px solid var(--bd);border-radius:10px;transition:.15s;text-decoration:none;color:var(--t)}
.related-card:hover{border-color:var(--g);color:var(--g)}
.related-card-thumb{width:48px;height:48px;border-radius:8px;overflow:hidden;flex-shrink:0;background:var(--gl)}
.related-card-thumb img{width:100%;height:100%;object-fit:cover}
.related-card-info{min-width:0}
.related-card-title{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.related-card-type{font-size:11px;color:var(--t3)}

/* ── SEO Hub page header ── */
.hub-header{text-align:center;padding:48px 24px 32px;background:linear-gradient(160deg,var(--gl) 0%,#fff 100%);border-radius:12px;margin-bottom:32px}
.hub-header h1{font-size:28px;font-weight:700;color:var(--t);margin-bottom:10px}
.hub-header p{font-size:15px;color:var(--t2);max-width:560px;margin:0 auto 20px}

/* ── Responsive ── */
@media(max-width:640px){
  .hub-sections{grid-template-columns:repeat(2,1fr)}
  .cert-actions{flex-direction:column}
  .start-fill-cta{width:100%;justify-content:center}
}

/* ===================================================
   PHASE 3 — SEO + TOOLS + INTERNAL LINKING STYLES
   =================================================== */

/* Filter tabs */
.filter-tabs { display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px }
.ftab { padding:6px 16px;border-radius:20px;font-size:13px;font-weight:600;text-decoration:none;transition:.15s;display:inline-block }
.ftab:hover { opacity:.85 }
.ftab.active { background:var(--gl);color:var(--g);border-color:var(--g) }

/* Tools grid in hub */
.tools-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px }
.tool-card { background:#fff;border:1.5px solid var(--bd);border-radius:12px;padding:20px;text-align:center;text-decoration:none;color:var(--t);transition:.2s;display:flex;flex-direction:column;align-items:center;gap:10px }
.tool-card:hover { border-color:var(--g);transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.08) }
.tool-card-icon { width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:26px }
.tool-card-name { font-size:14px;font-weight:700 }
.tool-card-desc { font-size:12px;color:var(--t3);line-height:1.5 }

/* Same-section list */
.same-section-list { list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px }
.same-section-list a { display:flex;align-items:center;gap:8px;font-size:13px;color:var(--t);text-decoration:none;padding:6px 8px;border-radius:6px;transition:.15s }
.same-section-list a:hover { background:var(--gl);color:var(--g) }

/* Cross-section links */
.cross-sec-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px }
.cross-sec-card { display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 12px;background:#fff;border:1.5px solid #e5e7eb;border-radius:10px;text-decoration:none;text-align:center;transition:.2s }
.cross-sec-card:hover { border-color:var(--g);box-shadow:0 4px 12px rgba(0,0,0,.07);transform:translateY(-2px) }
.cross-sec-icon { width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:22px }

/* Text formatter */
.fmt-area { width:100%;padding:12px;border:1.5px solid var(--bd);border-radius:8px;font-family:var(--f);font-size:14px;direction:rtl;resize:vertical;line-height:1.8 }
.fmt-area:focus { border-color:var(--g);outline:none }
.fmt-result { width:100%;min-height:180px;padding:12px;border:1.5px solid var(--g);border-radius:8px;font-family:var(--f);font-size:14px;direction:rtl;background:#f9fff9;white-space:pre-wrap;word-break:break-word;line-height:1.8 }

/* Archive header stats bar */
.archive-stats { display:flex;gap:20px;flex-wrap:wrap;margin-bottom:16px;padding:14px 16px;background:var(--gl);border-radius:10px }
.archive-stat { display:flex;flex-direction:column;align-items:center;gap:2px }
.archive-stat-num { font-size:22px;font-weight:700;color:var(--g) }
.archive-stat-lbl { font-size:11px;color:var(--t2) }

/* Search results page */
.search-results-header { padding:20px 0;border-bottom:1px solid var(--bd);margin-bottom:20px }
.search-results-header h1 { font-size:20px;font-weight:700 }
.search-results-header p { font-size:14px;color:var(--t2);margin-top:4px }

/* Breadcrumb CPT aware */
.bcr-cpt { color:var(--g);font-weight:600 }

/* Jump to editor button */
.jump-editor-btn { display:inline-flex;align-items:center;gap:6px;padding:8px 16px;background:var(--gl);color:var(--g);border:1.5px solid var(--g);border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;text-decoration:none;transition:.15s }
.jump-editor-btn:hover { background:var(--g);color:#fff }

/* Free badge */
.free-badge { display:inline-flex;align-items:center;gap:4px;padding:3px 10px;background:#d1fae5;color:#065f46;border-radius:12px;font-size:11px;font-weight:600 }

/* Responsive Phase 3 */
@media(max-width:640px) {
  .tools-grid { grid-template-columns:repeat(2,1fr) }
  .cross-sec-grid { grid-template-columns:repeat(2,1fr) }
  .archive-stats { gap:12px }
  .archive-stat-num { font-size:18px }
}

/* ===================================================
   PHASE 5 — FINAL POLISH & PRINT CSS
   =================================================== */

/* ── Scroll-to-top button ── */
@keyframes fadeInUp {
  from { opacity:0; transform:translateX(-50%) translateY(10px); }
  to   { opacity:1; transform:translateX(-50%) translateY(0); }
}

/* ── Focus visible (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--g);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Card hover lift ── */
.cd { transition: transform .18s, box-shadow .18s }
.cd:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.09) }

/* ── Smooth transitions on links ── */
a { transition: color .15s }

/* ── Selection color ── */
::selection { background: var(--gl); color: var(--g) }

/* ── Loading skeleton (for future lazy sections) ── */
.skeleton {
  background: linear-gradient(90deg,#f3f4f6 25%,#e5e7eb 50%,#f3f4f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Back-to-top button visible state ── */
button[aria-label="العودة للأعلى"] {
  transition: opacity .2s, transform .2s;
}
button[aria-label="العودة للأعلى"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26,107,60,.35);
}

/* ── Alert / notice boxes ── */
.da-notice {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.da-notice-success { background: #d1fae5; color: #065f46; border-left: 3px solid #10b981 }
.da-notice-info    { background: #dbeafe; color: #1e40af; border-left: 3px solid #3b82f6 }
.da-notice-warning { background: #fef3c7; color: #92400e; border-left: 3px solid #f59e0b }
.da-notice-error   { background: #fee2e2; color: #991b1b; border-left: 3px solid #ef4444 }

/* ── Print styles ── */
@media print {
  .hdr, .ftr, .mmn, .mov, .hdr-search, .cert-actions,
  .related-grid, .cross-sec-grid, .same-section-list,
  button[aria-label="العودة للأعلى"],
  .adv-slot, aside.side { display: none !important }

  body { background: #fff; color: #000; font-size: 12pt }
  .w { max-width: 100%; padding: 0 }
  .card-box { border: none; box-shadow: none; padding: 0 }
  .art-h1 { font-size: 20pt; margin-bottom: 16pt }
  a { text-decoration: underline; color: #000 }
  a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 9pt; color: #666 }

  /* Certificate print — full width */
  #certCanvas { width: 100% !important; height: auto !important; page-break-inside: avoid }
  .cert-editor-wrap { display: block }
  .cert-preview-box { box-shadow: none; border: none }

  /* Form print */
  #formPaperPreview { border: 1px solid #ddd; padding: 20pt }
  .form-editor-wrap { display: block }
}

/* ── RTL-specific refinements ── */
[dir="rtl"] .cert-actions { flex-direction: row-reverse }
[dir="rtl"] .da-notice { border-left: none; border-right: 3px solid currentColor }

/* ── High contrast / dark mode support ── */
@media (prefers-color-scheme: dark) {
  /* Theme stays light by design — just ensure readability */
  .cert-preview-box { background: #1e1e1e }
  .cert-preview-inner { background: #2d2d2d }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── Mobile final fixes (max-width:480px) ── */
@media (max-width:480px) {
  .w { padding: 0 16px }
  .card-box { padding: 18px 16px; margin-bottom: 20px }
  .art-h1 { font-size: 18px }
  .cert-editor-wrap, .form-editor-wrap, .img-editor-main { gap: 16px }
  .cert-btn { font-size: 12px; padding: 8px 14px }
  .hub-sections { grid-template-columns: repeat(2,1fr); gap: 10px }
  .hub-sec { padding: 16px 10px }
  .hub-sec-icon { width: 40px; height: 40px; font-size: 20px }
  .ftr-g { grid-template-columns: 1fr }
  .designs-grid { grid-template-columns: repeat(2,1fr); gap: 12px }
}

/* ===================================================
   REDESIGN — Neutral system + Hero + Footer + Hub
   =================================================== */

/* ── Hero — clean, no search ── */
.hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--bd);
  padding: 64px 0 56px;
}
.hero-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  padding: 5px 16px;
  background: var(--gl);
  color: var(--g);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--t);
  line-height: 1.35;
  margin-bottom: 14px;
}
.hero p {
  font-size: 16px;
  color: var(--t2);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 28px;
}
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: var(--g); color: #fff;
  border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: .15s;
}
.btn-primary:hover { background: var(--gd); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: #fff; color: var(--t);
  border: 1.5px solid var(--bd);
  border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: .15s;
}
.btn-secondary:hover { border-color: var(--g); color: var(--g); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  background: transparent; color: var(--t2);
  border: 1.5px solid var(--bd);
  border-radius: 8px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: .15s;
}
.btn-outline:hover { border-color: var(--bd); color: var(--t); }
.hero-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--t3);
}
.hero-stats b { color: var(--t); font-weight: 700; }

/* ── Section Hub ── */
.section-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 28px 0;
}
.hub-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1.5px solid var(--bd);
  border-radius: 10px;
  text-decoration: none;
  transition: .15s;
  color: var(--t);
}
.hub-card:hover {
  border-color: var(--g);
  box-shadow: 0 4px 16px rgba(37,99,235,.08);
  transform: translateY(-1px);
}
.hub-icon { font-size: 26px; flex-shrink: 0; }
.hub-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hub-name { font-size: 13px; font-weight: 700; color: var(--t); }
.hub-desc { font-size: 11px; color: var(--t3); }
.hub-count {
  margin-right: auto;
  background: var(--bg2);
  color: var(--t3);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  flex-shrink: 0;
}

/* ── Footer ── */
.ftr {
  background: var(--t);
  color: rgba(255,255,255,0.7);
  margin-top: 48px;
}
.ftr-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 52px 0 40px;
}
.ftr-col h3 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.ftr-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ftr-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: .15s;
}
.ftr-col ul li a:hover { color: #fff; }
.ftr-brand-col p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin: 12px 0 16px;
}
.ftr-brand-col .logo-tx { color: #fff !important; }
.ftr-social { display: flex; gap: 10px; }
.ftr-social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6); transition: .15s;
}
.ftr-social a:hover { border-color: rgba(255,255,255,.4); color: #fff; }
.ftr-contact { gap: 12px !important; }
.ftr-contact li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.ftr-contact a { color: rgba(255,255,255,0.6); text-decoration: none; }
.ftr-contact a:hover { color: #fff; }
.ftr-pages {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px;
}
.ftr-pages a {
  font-size: 12px; color: rgba(255,255,255,0.4);
  text-decoration: none; transition: .15s;
}
.ftr-pages a:hover { color: rgba(255,255,255,0.8); }
.ftr-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 16px 0;
}
.ftr-bottom .w {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
.ftr-free { color: rgba(255,255,255,0.5); }

/* ── Main content area ── */
.main-content { padding: 0 0 48px; }

/* ── Responsive ── */
@media(max-width:900px) {
  .ftr-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .section-hub { grid-template-columns: 1fr 1fr; }
}
@media(max-width:560px) {
  .hero h1 { font-size: 22px; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-secondary, .btn-outline { justify-content: center; }
  .ftr-grid { grid-template-columns: 1fr; }
  .section-hub { grid-template-columns: 1fr; }
}

/* ===================================================
   DESIGNSARABIA v2 — Brand Identity + Hero + Footer
   =================================================== */

/* ── Updated brand palette ── */
:root {
  --brand:    #6c47ff;   /* purple — creative, modern */
  --brand-d:  #5535e0;
  --brand-l:  #f0ecff;
  --amber:    #f59e0b;   /* gold accent */
  --amber-l:  #fffbeb;
  --surface:  #ffffff;
  --surface2: #f8f9fc;
  --ink:      #0d0d1a;
  --ink2:     #4a4a6a;
  --ink3:     #9898b8;
  --line:     #e8e8f0;
  --radius:   12px;
  --shadow:   0 2px 16px rgba(108,71,255,.08);
}

/* ═══════════════════════════════════════
   HERO v2 — Animated split layout
   ═══════════════════════════════════════ */
.hero-v2 {
  background: linear-gradient(135deg, #f6f3ff 0%, #ffffff 50%, #fff8f0 100%);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
  overflow: hidden;
  position: relative;
}
.hero-v2::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(108,71,255,.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-v2-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* ── Hero Text ── */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--brand-l);
  color: var(--brand);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-pill-dot {
  width: 7px; height: 7px;
  background: var(--brand);
  border-radius: 50%;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.7); }
}

.hero-h1 {
  font-size: 42px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 16px;
}
.hero-accent {
  color: var(--brand);
  position: relative;
}
.hero-accent::after {
  content: '';
  position: absolute;
  bottom: 2px; right: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--amber));
  border-radius: 2px;
  opacity: .4;
}

.hero-desc {
  font-size: 17px;
  color: var(--ink2);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.hcta-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(108,71,255,.3);
  transition: .18s;
}
.hcta-primary:hover {
  background: var(--brand-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(108,71,255,.35);
}
.hcta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: .18s;
}
.hcta-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-l);
}

.hero-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.htrust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink3);
}
.htrust-item svg { color: #22c55e; flex-shrink: 0; }

/* ── Hero Visual — Animated Cards ── */
.hero-visual {
  position: relative;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hv-card {
  position: absolute;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.10);
  overflow: hidden;
  border: 1px solid var(--line);
}
.hv-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink2);
}
.hv-dot { width:10px;height:10px;border-radius:50%;flex-shrink:0; }
.hv-dot-r { background:#ff5f57; }
.hv-dot-y { background:#febc2e; }
.hv-dot-g { background:#28c840; }
.hv-card-title { font-size:12px;font-weight:600;color:var(--ink2);margin-right:auto; }

/* Card 1 — Certificate */
.hv-card-1 {
  width: 240px;
  right: 20px; top: 30px;
  animation: float1 6s ease-in-out infinite;
  z-index: 2;
}
@keyframes float1 {
  0%,100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-10px) rotate(-1deg); }
}
.hv-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hv-cert-icon {
  font-size: 28px;
  text-align: center;
  margin-bottom: 4px;
}
.hv-line {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}
.hv-line-lg { width: 100%; }
.hv-line-md { width: 75%; }
.hv-line-sm { width: 55%; margin: 0 auto; }
.hv-line-xs { width: 80px; }
.hv-line-xxs { width: 56px; height: 6px; }

.hv-shimmer {
  background: linear-gradient(90deg, #f0ecff 25%, #d8ceff 50%, #f0ecff 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hv-cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 4px;
}
.hv-seal {
  width: 36px; height: 36px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  opacity: .4;
  flex-shrink: 0;
}
.hv-sig { display:flex;flex-direction:column;gap:5px; }

/* Card 2 — Form */
.hv-card-2 {
  width: 200px;
  left: 10px; bottom: 20px;
  animation: float2 7s ease-in-out infinite;
  z-index: 2;
}
@keyframes float2 {
  0%,100% { transform: translateY(0) rotate(1.5deg); }
  50%      { transform: translateY(-8px) rotate(1.5deg); }
}
.hv-form-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.hv-form-label {
  width: 40px; height: 6px;
  background: var(--line);
  border-radius: 3px;
  flex-shrink: 0;
}
.hv-form-field {
  flex: 1; height: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface2);
}
.hv-form-row-wide { flex-direction: column; align-items: stretch; gap: 4px; }
.hv-field-tall { height: 40px; }
.hv-btn {
  height: 28px;
  background: var(--brand);
  border-radius: 6px;
  opacity: .8;
  margin-top: 4px;
}

/* Floating badges */
.hv-floating {
  position: absolute;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  pointer-events: none;
  z-index: 3;
}
.hv-fl-1 {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--brand-l);
  top: 130px; right: -10px;
  animation: floatBadge1 5s ease-in-out infinite;
}
.hv-fl-2 {
  background: #22c55e;
  color: #fff;
  top: 50px; left: 30px;
  animation: floatBadge2 4.5s ease-in-out infinite;
}
.hv-fl-3 {
  background: var(--amber);
  color: #fff;
  bottom: 80px; right: 20px;
  animation: floatBadge3 6s ease-in-out infinite;
}
@keyframes floatBadge1 { 0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)} }
@keyframes floatBadge2 { 0%,100%{transform:translateY(0)}50%{transform:translateY(8px)} }
@keyframes floatBadge3 { 0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)} }

/* ═══════════════════════════════════════
   SECTION HUB v2
   ═══════════════════════════════════════ */
.hub-v2 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 32px 0;
}
.hub-v2-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: .18s;
  text-align: center;
  position: relative;
}
.hub-v2-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.hub-v2-icon {
  font-size: 28px;
  line-height: 1;
}
.hub-v2-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hub-v2-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.hub-v2-desc {
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.4;
}
.hub-v2-count {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--surface2);
  color: var(--ink3);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

/* ═══════════════════════════════════════
   FOOTER v2
   ═══════════════════════════════════════ */
.ftr-v2 {
  margin-top: 56px;
}
.ftr-v2-top {
  background: var(--ink);
  color: rgba(255,255,255,.65);
}
.ftr-v2-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 56px 0 48px;
}
.ftr-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,.5);
  margin: 12px 0 16px;
}
.ftr-email {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: .15s;
}
.ftr-email:hover { color: #fff; }
.ftr-brand .logo-tx { color: #fff !important; }

.ftr-col h4 {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.ftr-col ul {
  display: flex;
  flex-direction: column;
  gap: 11px;
  list-style: none;
}
.ftr-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: .15s;
}
.ftr-col ul li a:hover { color: #fff; }

.ftr-contact-list { gap: 14px !important; }
.ftr-contact-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}
.ftr-contact-list a {
  color: rgba(255,255,255,.55) !important;
  text-decoration: none;
  transition: .15s;
}
.ftr-contact-list a:hover { color: #fff !important; }

.ftr-links-small {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.ftr-links-small a {
  font-size: 12px;
  color: rgba(255,255,255,.3);
  text-decoration: none;
  transition: .15s;
}
.ftr-links-small a:hover { color: rgba(255,255,255,.7); }
.ftr-links-small span { color: rgba(255,255,255,.2); }

.ftr-v2-bottom {
  background: rgba(0,0,0,.2);
  padding: 16px 0;
}
.ftr-v2-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,.28);
}
.ftr-free-badge {
  color: rgba(255,255,255,.4);
}

/* ═══════════════════════════════════════
   CERTIFICATE EDITOR — Type-specific colors
   ═══════════════════════════════════════ */
.cert-editor-wrap .cert-fields {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.cert-btn-primary {
  background: var(--brand) !important;
  box-shadow: 0 4px 16px rgba(108,71,255,.25) !important;
}
.cert-btn-primary:hover {
  background: var(--brand-d) !important;
}
.cert-btn-gold {
  background: var(--amber) !important;
}

/* Type badge colors */
.type-badge.certificate    { background: var(--brand-l); color: var(--brand); }
.type-badge.form_template  { background: #e0f2fe; color: #0369a1; }
.type-badge.design_template{ background: #fef9c3; color: #854d0e; }
.type-badge.interactive_image { background: #fce7f3; color: #9d174d; }
.type-badge.smart_tool     { background: #ede9fe; color: #6d28d9; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media(max-width:1024px) {
  .hub-v2 { grid-template-columns: repeat(3, 1fr); }
  .hero-v2-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-h1 { font-size: 32px; }
}
@media(max-width:760px) {
  .hub-v2 { grid-template-columns: repeat(2, 1fr); }
  .ftr-v2-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero-h1 { font-size: 26px; }
}
@media(max-width:480px) {
  .hub-v2 { grid-template-columns: 1fr 1fr; }
  .ftr-v2-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; }
  .hcta-primary, .hcta-secondary { justify-content: center; }
}
