/*
Theme Name: NetPulse — نت بالس (نسخة السعودية)
Theme URI: https://example.com
Author: Your Team
Description: قالب ووردبريس لتطبيقات تسريع الشبكة، مصمم خصيصًا للسوق السعودي/الخليجي. تخطيط من اليمين لليسار (RTL)، ونمط بصري داكن مستوحى من الأنماط الهندسية الإسلامية بلمسة ذهبية معاصرة. يشمل مدخلي تحميل: أندرويد و iOS.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: netpulse
*/

/* ============================================================
   0. Design tokens — لوحة الألوان والخطوط
   ============================================================ */
:root {
  --ink: #14110d;
  --ink-2: #1b1712;
  --panel: #211c15;
  --panel-2: #262017;
  --line: #3a3122;
  --line-soft: #2a2419;

  --gold: #c9a227;
  --gold-2: #e8c766;
  --teal: #2fb6a3;
  --teal-2: #57d6c2;

  --text: #f5efe2;
  --text-muted: #b9ad94;
  --text-dim: #7a705a;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --font-display: "Tajawal", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --container: 1140px;
  --shadow-glow: 0 0 0 1px rgba(201, 162, 39, 0.18), 0 20px 60px -20px rgba(201, 162, 39, 0.25);
}

/* ============================================================
   1. Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; margin: 0 0 .5em; }
p { margin: 0 0 1em; color: var(--text-muted); }
button { font-family: inherit; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--teal); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

/* ============================================================
   0.1 Signature: geometric star lattice (نمط هندسي إسلامي)
   Used as a subtle background texture — not decoration for its
   own sake, but a real motif from the region's visual tradition.
   ============================================================ */
.geo-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='0.7' opacity='0.35'%3E%3Cpath d='M42 2 L74 22 L74 62 L42 82 L10 62 L10 22 Z'/%3E%3Cpath d='M42 2 L42 82 M10 22 L74 62 M74 22 L10 62'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 84px 84px;
}

/* ============================================================
   2. Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 17, 13, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.brand img { height: 32px; width: auto; }
.brand .dot { color: var(--gold); }

.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav ul { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  display: inline-block; padding: 10px 16px; border-radius: 999px;
  font-size: 14.5px; color: var(--text-muted); transition: color .2s, background .2s;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: var(--text); background: var(--panel); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 40px; height: 40px; color: var(--text);
}

/* Download dropdown */
.download-menu { position: relative; }
.download-menu__btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  color: var(--ink);
  font-weight: 700; font-size: 14.5px; padding: 10px 20px;
  border-radius: 999px; border: none; transition: transform .15s, box-shadow .15s;
}
.download-menu__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(201, 162, 39, 0.55); }
.download-menu__btn svg { width: 16px; height: 16px; }

.download-menu__panel {
  position: absolute; inset-inline-end: 0; top: calc(100% + 12px);
  width: 280px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 10px; box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.download-menu.is-open .download-menu__panel { opacity: 1; visibility: visible; transform: translateY(0); }
.download-menu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.download-port {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-soft);
  background: var(--ink-2); transition: border-color .18s, background .18s;
}
.download-port:hover { border-color: var(--gold); background: rgba(201,162,39,0.07); }
.download-port__icon {
  width: 34px; height: 34px; border-radius: 8px; background: var(--panel-2);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 1px solid var(--line);
}
.download-port__icon svg { width: 18px; height: 18px; color: var(--gold-2); }
.download-port__label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.download-port__sub { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }

/* ============================================================
   3. Hero
   ============================================================ */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 600px;
  background: radial-gradient(60% 60% at 70% 20%, rgba(201,162,39,0.16), transparent 70%),
              radial-gradient(50% 50% at 20% 10%, rgba(47,182,163,0.16), transparent 70%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.25; margin-bottom: 20px; }
.hero h1 .accent { background: linear-gradient(90deg, var(--gold-2), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lede { font-size: 17px; max-width: 480px; margin-bottom: 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px;
  border-radius: 999px; font-weight: 700; font-size: 15px; border: 1px solid transparent;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn-primary { background: linear-gradient(90deg, var(--gold-2), var(--gold)); color: var(--ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(201,162,39,0.5); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-2); }

.hero__stats { display: flex; flex-wrap: wrap; gap: 20px 28px; }
.hero__stat b { display: block; font-family: var(--font-mono); font-size: 22px; color: var(--text); }
.hero__stat span { font-size: 12.5px; color: var(--text-dim); }

/* Signature: pulse scope panel, framed with geometric motif */
.pulse-panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-glow);
}
.pulse-panel::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg);
  pointer-events: none; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='0.6' opacity='0.25'%3E%3Cpath d='M42 2 L74 22 L74 62 L42 82 L10 62 L10 22 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 84px 84px;
  -webkit-mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,0.6) 60%, transparent);
          mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,0.6) 60%, transparent);
}
.pulse-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; position: relative; }
.pulse-panel__title { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.pulse-panel__status { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--teal-2); }
.pulse-panel__status i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-2); box-shadow: 0 0 8px var(--teal-2); animation: blink 1.6s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

.pulse-ms { font-family: var(--font-mono); font-size: 46px; font-weight: 700; color: var(--text); margin: 10px 0 2px; position: relative; }
.pulse-ms span { font-size: 16px; color: var(--text-dim); font-weight: 500; }
.pulse-caption { font-size: 12px; color: var(--text-dim); margin-bottom: 18px; position: relative; }

.pulse-wave { width: 100%; height: 100px; overflow: hidden; border-radius: var(--radius-sm); background: var(--ink-2); border: 1px solid var(--line-soft); position: relative; }
.pulse-wave svg { width: 200%; height: 100%; animation: scroll-wave 4.5s linear infinite; }
@keyframes scroll-wave { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.pulse-nodes { display: flex; justify-content: space-between; margin-top: 18px; position: relative; }
.pulse-node { text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.pulse-node b { display: block; color: var(--gold-2); font-size: 13px; font-family: var(--font-display); }

/* ============================================================
   4. How it works strip
   ============================================================ */
.steps { padding: 64px 0; border-top: 1px solid var(--line-soft); }
.steps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { padding: 26px; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: var(--panel); }
.step__num { font-family: var(--font-mono); color: var(--teal); font-size: 13px; margin-bottom: 12px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; margin: 0; }

/* ============================================================
   5. Feature grid
   ============================================================ */
.features { padding: 88px 0; }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card { padding: 26px; border-radius: var(--radius-md); border: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--panel), var(--panel-2)); transition: border-color .2s, transform .2s; }
.feature-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.feature-card__icon { width: 44px; height: 44px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--gold-2); }
.feature-card h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature-card p { font-size: 13.5px; margin: 0; }

/* ============================================================
   6. Scenarios grid
   ============================================================ */
.scenario-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; }
.scenario-card { border: 1px solid var(--line-soft); border-radius: var(--radius-md); overflow: hidden; background: var(--panel); }
.scenario-card__media { aspect-ratio: 4/3; background: var(--ink-2); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.scenario-card__media img { width: 100%; height: 100%; object-fit: cover; }
.scenario-card__media svg { width: 40%; height: 40%; color: var(--teal); }
.scenario-card__body { padding: 16px; }
.scenario-card__body h3 { font-size: 15px; margin-bottom: 4px; }
.scenario-card__body p { font-size: 13px; margin: 0; }

/* ============================================================
   7. Download band (CTA)
   ============================================================ */
.download-band { padding: 80px 0; position: relative; }
.download-band__panel {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 56px; text-align: center;
  background: radial-gradient(60% 100% at 50% 0%, rgba(47,182,163,0.14), transparent 70%), var(--panel);
}
.download-band__panel h2 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 14px; }
.download-band__panel p { max-width: 520px; margin: 0 auto 28px; }
.download-band__ports { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; }
.download-band__ports .download-port { width: 240px; justify-content: flex-start; }

/* ============================================================
   8. Generic content pages
   ============================================================ */
.page-hero { padding: 56px 0 32px; border-bottom: 1px solid var(--line-soft); }
.breadcrumb { font-size: 13px; color: var(--text-dim); margin-bottom: 14px; font-family: var(--font-mono); }
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--gold-2); }
.page-hero h1 { font-size: clamp(24px, 3.2vw, 36px); }

.entry-content { padding: 48px 0 96px; max-width: 780px; }
.entry-content h2 { font-size: 21px; margin-top: 2em; }
.entry-content h3 { font-size: 17px; margin-top: 1.6em; }
.entry-content p, .entry-content li { color: var(--text-muted); font-size: 15.5px; }
.entry-content a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; margin-bottom: 1em; }
.entry-content img { border-radius: var(--radius-md); margin: 1.2em 0; }
.entry-content .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 20px; }
.entry-content .wp-block-column { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius-md); padding: 20px; }
.entry-content .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; }

.entry-content.is-wide { max-width: var(--container); margin: 0 auto; }

/* ============================================================
   9. FAQ accordion
   ============================================================ */
.faq { padding: 40px 0 96px; max-width: 780px; }
.faq-group { margin-bottom: 36px; }
.faq-group__title { font-family: var(--font-mono); font-size: 13px; color: var(--teal); margin-bottom: 14px; }
.faq-item { border: 1px solid var(--line-soft); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--panel); overflow: hidden; }
.faq-item__q {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; text-align: start; background: none; border: none; color: var(--text);
  padding: 16px 18px; font-size: 15px; font-weight: 600;
}
.faq-item__q svg { flex-shrink: 0; width: 16px; height: 16px; color: var(--text-dim); transition: transform .2s; }
.faq-item.is-open .faq-item__q svg { transform: rotate(45deg); }
.faq-item__a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-item__a-inner { padding: 0 18px 16px; font-size: 14.5px; color: var(--text-muted); }

/* ============================================================
   10. Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line-soft); padding: 64px 0 28px; background: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand p { font-size: 13.5px; max-width: 260px; }
.footer-col h4 { font-size: 13px; color: var(--text); margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: var(--text-muted); }
.footer-col a:hover { color: var(--gold-2); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--text-dim); flex-wrap: wrap; gap: 10px; }

/* ============================================================
   11. Responsive
   ============================================================ */

/* ---- Tablet / small laptop ---- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 56px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps__grid { grid-template-columns: 1fr; }
  .features { padding: 64px 0; }
  .download-band { padding: 56px 0; }
}

/* ---- Phones: collapse nav into a slide-down panel ---- */
@media (max-width: 720px) {
  .site-header__inner { height: 64px; }

  .primary-nav {
    display: none;
    position: absolute; inset-inline: 0; top: 64px;
    background: var(--panel); border-bottom: 1px solid var(--line-soft);
    padding: 10px 20px 18px; box-shadow: 0 24px 40px -20px rgba(0,0,0,0.55);
    max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .primary-nav a { display: block; padding: 13px 14px; font-size: 15.5px; }

  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

  .download-menu__btn { padding: 9px 16px; font-size: 13.5px; }
  .download-menu__panel { position: fixed; inset-inline: 16px; width: auto; top: 72px; }

  .download-band__panel { padding: 32px 20px; }
  .page-hero { padding: 40px 0 26px; }
  .entry-content, .faq { padding-top: 32px; }
}

/* ---- Small phones: single-column layouts, tighter spacing ---- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero { padding: 56px 0 44px; }
  .hero h1 { line-height: 1.3; }
  .hero__lede { font-size: 15.5px; }
  .hero__ctas .btn { flex: 1 1 auto; justify-content: center; }

  .pulse-panel { padding: 18px; }
  .pulse-ms { font-size: 34px; }
  .pulse-nodes { flex-wrap: wrap; gap: 12px 0; }
  .pulse-node { width: 25%; }

  .steps { padding: 40px 0; }
  .step { padding: 20px; }

  .features { padding: 48px 0; }
  .feature-grid { grid-template-columns: 1fr; }

  .scenario-grid { grid-template-columns: 1fr; }

  .download-band { padding: 40px 0; }
  .download-band__panel { padding: 26px 16px; }
  .download-band__ports { flex-direction: column; align-items: stretch; }
  .download-band__ports .download-port { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .faq-item__q { font-size: 14px; padding: 14px; }
}
