/*
Theme Name: Nasser4DMS Cinematic
Theme URI: https://www.nasser4dms.com
Author: Nasser4DMS
Author URI: https://www.nasser4dms.com
Description: ثيم ووردبريس سينمائي ثلاثي الأبعاد للتسويق بالعمولة (برنامج شركاء أمازون السعودية). واجهة فاتحة بألوان هوية Nasser4DMS، متجاوبة بالكامل مع الجوال، RTL عربي، حقن وسم العمولة تلقائيًا، وإفصاح متوافق مع أمازون.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nasser4dms
Tags: rtl-language-support, affiliate, translation-ready, custom-menu, featured-images, threaded-comments
*/

/* ============================================================
   Nasser4DMS Cinematic — Design tokens
   Light palette derived from the brand logo.
   ============================================================ */
:root{
  /* Brand (logo) */
  --navy:   #184878;   /* أساسي: العناوين والنص العميق */
  --teal:   #338AB0;   /* ثانوي: الروابط واللمسات */
  --cyan:   #3DC6DC;   /* لمعان: التمييز و CTA */
  --navy-2: #12395F;   /* عمق أغمق للتدرجات */

  /* Light surfaces */
  --bg:        #F4F8FB;  /* خلفية الصفحة الفاتحة */
  --bg-2:      #EAF2F8;  /* خلفية بديلة للأقسام */
  --card:      #FFFFFF;  /* البطاقات */
  --glass:     rgba(255,255,255,0.62);
  --glass-brd: rgba(24,72,120,0.12);

  /* Ink */
  --ink:    #12222E;
  --text:   #22384A;
  --muted:  #5B7285;
  --line:   #E1ECF3;

  /* Accents */
  --star:   #F2A900;
  --pro:    #2E9E5B;
  --con:    #C0392B;

  /* Gradients */
  --grad-brand: linear-gradient(120deg, var(--navy) 0%, var(--teal) 55%, var(--cyan) 100%);
  --grad-cta:   linear-gradient(120deg, var(--teal) 0%, var(--cyan) 100%);
  --grad-soft:  radial-gradient(120% 120% at 15% 0%, #FFFFFF 0%, var(--bg) 55%, var(--bg-2) 100%);

  /* Shape / depth */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --shadow-1: 0 4px 18px rgba(18,57,95,.06);
  --shadow-2: 0 14px 40px rgba(18,57,95,.10);
  --shadow-3: 0 30px 70px rgba(18,57,95,.16);

  /* Type */
  --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
  --font-head: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;

  --maxw: 1160px;
  --nav-h: 72px;
}

/* ============================================================
   Reset / base
   ============================================================ */
*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body{
  margin:0;
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--text);
  line-height:1.85;
  direction:rtl;
  text-align:right;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--teal); text-decoration:none; transition:color .2s ease; }
a:hover{ color:var(--navy); }
h1,h2,h3,h4{ font-family:var(--font-head); color:var(--navy); line-height:1.35; margin:0 0 .5em; font-weight:800; }
h1{ font-size:clamp(28px,5vw,46px); }
h2{ font-size:clamp(24px,3.4vw,34px); }
h3{ font-size:clamp(19px,2.4vw,23px); }
p{ margin:0 0 1.1em; }
ul,ol{ padding-inline-start:1.4em; }
:focus-visible{ outline:3px solid var(--cyan); outline-offset:3px; border-radius:6px; }

.container{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:20px; }
.section{ padding-block:clamp(48px,7vw,92px); position:relative; }
.section--tint{ background:var(--grad-soft); }
.eyebrow{
  display:inline-block; font-family:var(--font-head); font-weight:700; font-size:13px;
  letter-spacing:.5px; color:var(--teal); background:rgba(51,138,176,.10);
  padding:6px 14px; border-radius:999px; margin-bottom:14px;
}
.lead{ color:var(--muted); font-size:clamp(16px,2vw,19px); max-width:60ch; }
.center{ text-align:center; }
.center .lead{ margin-inline:auto; }

/* ============================================================
   Buttons
   ============================================================ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  font-family:var(--font-head); font-weight:700; font-size:16px;
  padding:14px 26px; border-radius:999px; border:0; cursor:pointer;
  transition:transform .18s ease, box-shadow .25s ease, background .25s ease;
  text-align:center;
}
.btn--cta{ background:var(--grad-cta); color:#fff; box-shadow:0 10px 26px rgba(61,198,220,.35); }
.btn--cta:hover{ color:#fff; transform:translateY(-2px); box-shadow:0 16px 34px rgba(61,198,220,.45); }
.btn--ghost{ background:transparent; color:var(--navy); border:1.5px solid var(--glass-brd); }
.btn--ghost:hover{ background:#fff; border-color:var(--teal); color:var(--navy); }
.btn--block{ width:100%; }
.btn .ico{ width:20px; height:20px; }

/* ============================================================
   Affiliate disclosure bar
   ============================================================ */
.disclosure-top{
  background:var(--navy); color:#EAF3FA; font-size:13.5px; text-align:center;
  padding:9px 16px; line-height:1.6;
}
.disclosure-top strong{ color:var(--cyan); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header{
  position:sticky; top:0; z-index:60;
  background:var(--glass); backdrop-filter:blur(14px) saturate(1.4);
  -webkit-backdrop-filter:blur(14px) saturate(1.4);
  border-bottom:1px solid var(--glass-brd);
}
.nav{ display:flex; align-items:center; gap:20px; height:var(--nav-h); }
.brand{ display:flex; align-items:center; gap:12px; margin-inline-end:auto; }
.brand img{ height:46px; width:auto; }
.brand .brand-name{ font-family:var(--font-head); font-weight:800; color:var(--navy); font-size:19px; line-height:1; }
.brand .brand-tag{ display:block; font-size:11px; color:var(--muted); font-weight:500; margin-top:2px; }
.menu{ display:flex; gap:6px; list-style:none; margin:0; padding:0; align-items:center; }
.menu a{
  font-family:var(--font-head); font-weight:600; font-size:15px; color:var(--ink);
  padding:9px 14px; border-radius:999px; transition:background .2s, color .2s;
}
.menu a:hover, .menu .current-menu-item > a{ background:rgba(51,138,176,.12); color:var(--navy); }
.nav-toggle{
  display:none; width:44px; height:44px; border:0; background:transparent; cursor:pointer;
  flex-direction:column; justify-content:center; gap:5px; align-items:center;
}
.nav-toggle span{ width:24px; height:2.5px; background:var(--navy); border-radius:2px; transition:.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform:translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform:translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   Hero (cinematic 3D)
   ============================================================ */
.hero{ position:relative; min-height:clamp(560px,88vh,820px); display:flex; align-items:center; overflow:hidden; }
#hero-canvas{ position:absolute; inset:0; width:100%; height:100%; z-index:0; display:block; }
.hero::after{ /* light wash so text stays legible over 3D */
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(180deg, rgba(244,248,251,.35) 0%, rgba(244,248,251,.0) 30%, rgba(244,248,251,.55) 100%);
}
.hero-inner{ position:relative; z-index:2; width:100%; }
.hero-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:center; }
.hero-copy h1{ margin-bottom:18px; }
.hero-copy h1 .hl{ background:var(--grad-brand); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero-copy .lead{ margin-bottom:28px; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:14px; }
.hero-trust{ display:flex; gap:26px; margin-top:34px; flex-wrap:wrap; }
.hero-trust .t{ display:flex; flex-direction:column; }
.hero-trust .t b{ font-family:var(--font-head); font-size:24px; color:var(--navy); }
.hero-trust .t span{ font-size:13px; color:var(--muted); }

/* Floating glass product panel in hero */
.hero-panel{
  position:relative; background:var(--glass); border:1px solid var(--glass-brd);
  border-radius:var(--r-lg); box-shadow:var(--shadow-3); padding:22px;
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  transform-style:preserve-3d; will-change:transform;
}
.hero-panel .p-img{ border-radius:var(--r); background:#fff; padding:16px; box-shadow:var(--shadow-1); margin-bottom:14px; }
.hero-panel .p-title{ font-family:var(--font-head); font-weight:700; color:var(--navy); font-size:17px; margin-bottom:4px; }
.hero-panel .p-row{ display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
.hero-panel .p-price{ font-family:var(--font-head); font-weight:800; color:var(--teal); font-size:22px; }
.hero-panel .p-badge{ font-size:12px; color:#fff; background:var(--grad-cta); padding:4px 10px; border-radius:999px; }

/* ============================================================
   Category / feature cards
   ============================================================ */
.grid{ display:grid; gap:22px; }
.grid--3{ grid-template-columns:repeat(3,1fr); }
.grid--4{ grid-template-columns:repeat(4,1fr); }
.grid--2{ grid-template-columns:repeat(2,1fr); }

.tile{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:26px; box-shadow:var(--shadow-1);
  transition:transform .25s ease, box-shadow .3s ease, border-color .3s ease;
  position:relative; overflow:hidden;
}
.tile::before{
  content:""; position:absolute; inset-block-start:0; inset-inline:0; height:4px;
  background:var(--grad-brand); transform:scaleX(0); transform-origin:right; transition:transform .3s ease;
}
.tile:hover{ transform:translateY(-6px); box-shadow:var(--shadow-2); border-color:transparent; }
.tile:hover::before{ transform:scaleX(1); }
.tile .t-ico{
  width:54px; height:54px; border-radius:14px; display:grid; place-items:center;
  background:rgba(61,198,220,.12); color:var(--teal); margin-bottom:16px;
}
.tile .t-ico svg{ width:28px; height:28px; }
.tile h3{ margin-bottom:8px; }
.tile p{ color:var(--muted); font-size:15px; margin:0; }
.tile .t-link{ display:inline-block; margin-top:14px; font-family:var(--font-head); font-weight:700; color:var(--teal); }
.tile .t-link::after{ content:" ←"; transition:margin .2s; }
.tile:hover .t-link::after{ margin-inline-start:6px; }

/* ============================================================
   Post / review cards
   ============================================================ */
.cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.pcard{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg);
  overflow:hidden; box-shadow:var(--shadow-1); display:flex; flex-direction:column;
  transition:transform .25s ease, box-shadow .3s ease;
}
.pcard:hover{ transform:translateY(-6px); box-shadow:var(--shadow-2); }
.pcard .thumb{ aspect-ratio:16/10; overflow:hidden; background:var(--bg-2); }
.pcard .thumb img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.pcard:hover .thumb img{ transform:scale(1.06); }
.pcard .body{ padding:20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.pcard .cat{ font-size:12px; font-weight:700; color:var(--teal); font-family:var(--font-head); }
.pcard h3{ font-size:19px; margin:0; }
.pcard h3 a{ color:var(--navy); }
.pcard .excerpt{ color:var(--muted); font-size:14.5px; margin:0; }
.pcard .meta{ margin-top:auto; display:flex; align-items:center; gap:12px; font-size:13px; color:var(--muted); padding-top:8px; border-top:1px solid var(--line); }
.pcard .stars{ color:var(--star); letter-spacing:1px; }

/* ============================================================
   Single review layout
   ============================================================ */
.article{ max-width:820px; margin-inline:auto; }
.article .kicker{ color:var(--teal); font-weight:700; font-family:var(--font-head); }
.article h1{ margin:8px 0 14px; }
.article .a-meta{ display:flex; gap:16px; color:var(--muted); font-size:14px; margin-bottom:24px; flex-wrap:wrap; }
.article .a-cover{ border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow-2); margin-bottom:28px; }
.entry-content{ font-size:17px; }
.entry-content h2{ margin-top:1.6em; }
.entry-content img{ border-radius:var(--r); margin-block:1em; box-shadow:var(--shadow-1); }
.entry-content blockquote{
  margin:1.4em 0; padding:16px 22px; border-inline-start:4px solid var(--cyan);
  background:var(--bg-2); border-radius:0 var(--r) var(--r) 0; color:var(--navy);
}

/* Product review box */
.product-box{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r-lg);
  box-shadow:var(--shadow-2); padding:26px; margin:28px 0;
}
.product-box .pb-head{ display:flex; gap:20px; align-items:center; flex-wrap:wrap; }
.product-box .pb-img{ width:150px; height:150px; border-radius:var(--r); background:#fff; padding:10px; box-shadow:var(--shadow-1); flex-shrink:0; }
.product-box .pb-img img{ width:100%; height:100%; object-fit:contain; }
.product-box .pb-info{ flex:1; min-width:200px; }
.product-box .pb-info h3{ margin:0 0 8px; }
.rating{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.rating .stars{ color:var(--star); font-size:20px; letter-spacing:2px; }
.rating .rnum{ color:var(--muted); font-size:14px; }
.product-box .price{ font-family:var(--font-head); font-weight:800; color:var(--teal); font-size:28px; }
.product-box .price-note{ font-size:13px; color:var(--muted); margin:4px 0 16px; }

.proscons{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:26px 0; }
.proscons .col{ background:var(--card); border:1px solid var(--line); border-radius:var(--r); padding:18px 20px; }
.proscons h4{ display:flex; align-items:center; gap:8px; margin:0 0 10px; }
.proscons ul{ list-style:none; padding:0; margin:0; }
.proscons li{ padding:6px 0; font-size:15px; color:var(--text); }
.col--pros h4{ color:var(--pro); }
.col--cons h4{ color:var(--con); }
.col--pros li::before{ content:"✓"; color:var(--pro); font-weight:800; margin-inline-end:8px; }
.col--cons li::before{ content:"✕"; color:var(--con); font-weight:800; margin-inline-end:8px; }

/* Comparison table */
.compare-wrap{ overflow-x:auto; margin:26px 0; border-radius:var(--r); box-shadow:var(--shadow-1); }
table.compare{ width:100%; border-collapse:collapse; background:#fff; min-width:560px; }
table.compare thead th{ background:var(--navy); color:#fff; padding:14px; font-family:var(--font-head); font-size:15px; }
table.compare td{ padding:14px; border-bottom:1px solid var(--line); text-align:center; font-size:15px; }
table.compare td:first-child{ text-align:right; font-weight:600; color:var(--navy); }
table.compare tr:hover td{ background:var(--bg); }
.top-pick{ color:var(--teal); font-weight:800; font-size:12px; }

/* FAQ */
.faq details{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  padding:16px 20px; margin-bottom:12px; transition:box-shadow .2s;
}
.faq details[open]{ box-shadow:var(--shadow-1); }
.faq summary{ font-family:var(--font-head); font-weight:700; color:var(--navy); cursor:pointer; list-style:none; display:flex; justify-content:space-between; gap:12px; }
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::after{ content:"+"; color:var(--teal); font-size:22px; line-height:1; transition:transform .2s; }
.faq details[open] summary::after{ transform:rotate(45deg); }
.faq details p{ margin:12px 0 0; color:var(--muted); }

/* Sticky CTA (single) */
.cta-band{
  background:var(--grad-brand); border-radius:var(--r-lg); padding:30px; margin:34px 0;
  text-align:center; color:#fff; box-shadow:var(--shadow-2);
}
.cta-band h3{ color:#fff; margin-bottom:6px; }
.cta-band p{ color:#EAF3FA; margin-bottom:18px; }
.cta-band .btn--cta{ background:#fff; color:var(--navy); }
.cta-band .btn--cta:hover{ color:var(--navy); background:#EAF3FA; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer{ background:var(--navy); color:#C9DBEA; margin-top:60px; }
.footer-top{ padding-block:52px; display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:36px; }
.site-footer img.f-logo{ height:52px; margin-bottom:14px; filter:brightness(0) invert(1); opacity:.95; }
.site-footer h4{ color:#fff; font-size:16px; margin-bottom:14px; }
.site-footer a{ color:#C9DBEA; }
.site-footer a:hover{ color:var(--cyan); }
.f-menu{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:9px; font-size:14.5px; }
.f-about{ font-size:14.5px; color:#A9C2D6; max-width:42ch; }
.f-disclosure{ border-top:1px solid rgba(255,255,255,.12); padding-block:22px; font-size:13px; color:#9FB8CC; line-height:1.9; }
.f-disclosure strong{ color:var(--cyan); }
.f-bottom{ border-top:1px solid rgba(255,255,255,.12); padding-block:18px; text-align:center; font-size:13px; color:#8FAAC0; }

/* ============================================================
   Reveal animation
   ============================================================ */
.reveal{ opacity:0; transform:translateY(26px); transition:opacity .6s ease, transform .6s ease; }
.reveal.in{ opacity:1; transform:none; }

/* WordPress core */
.aligncenter{ margin-inline:auto; }
.alignright{ float:left; margin:0 0 1em 1.5em; }
.alignleft{ float:right; margin:0 1.5em 1em 0; }
.wp-caption-text{ font-size:13px; color:var(--muted); text-align:center; }
.sticky, .gallery-caption, .bypostauthor{ display:block; }
.screen-reader-text{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); }
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"]{
  display:block;
  width:100%;
  max-width:100%;
}
.pagination{ display:flex; gap:8px; justify-content:center; margin-top:40px; flex-wrap:wrap; }
.pagination a, .pagination span{
  min-width:42px; height:42px; display:grid; place-items:center; border-radius:12px;
  background:#fff; border:1px solid var(--line); color:var(--navy); font-family:var(--font-head); font-weight:700;
}
.pagination .current{ background:var(--grad-cta); color:#fff; border-color:transparent; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width:960px){
  .hero-grid{ grid-template-columns:1fr; gap:30px; }
  .hero-panel{ max-width:420px; }
  .grid--4{ grid-template-columns:repeat(2,1fr); }
  .grid--3{ grid-template-columns:repeat(2,1fr); }
  .cards{ grid-template-columns:repeat(2,1fr); }
  .footer-top{ grid-template-columns:1fr 1fr; }
}
@media (max-width:720px){
  .menu{
    position:fixed; inset-block-start:var(--nav-h); inset-inline:0; flex-direction:column;
    background:#fff; border-bottom:1px solid var(--line); padding:14px 18px; gap:4px;
    box-shadow:var(--shadow-2); transform:translateY(-120%); opacity:0; visibility:hidden;
    pointer-events:none; transition:transform .3s ease, opacity .2s ease, visibility 0s linear .3s;
    align-items:stretch;
  }
  .menu.open{
    transform:none; opacity:1; visibility:visible; pointer-events:auto;
    transition-delay:0s;
  }
  .menu a{ padding:12px 14px; }
  .nav-toggle{ display:flex; }
  .grid--4, .grid--3, .grid--2, .cards{ grid-template-columns:1fr; }
  .proscons{ grid-template-columns:1fr; }
  .footer-top{ grid-template-columns:1fr; gap:26px; }
  .hero-trust{ gap:18px; }
  .product-box .pb-head{ flex-direction:column; align-items:flex-start; }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  .reveal{ opacity:1; transform:none; }
}
