/*
Theme Name: المحاسب الشخصي — Personal Accountant
Theme URI: https://example.com/personal-accountant
Author: Mohamed Elesawy
Author URI: https://example.com
Description: ثيم ووردبريس احترافي لنظام حسابات مالي شخصي متكامل: لوحة تحكم تحليلية، معاملات، ميزانيات، أهداف ادخار، ديون، التزامات دورية، تقارير وتصدير Excel/PDF، حاسبة زكاة، ومساعد ذكي داخلي. يعمل التطبيق بالكامل على جهاز الزائر (localStorage) بلا أي خوادم خارجية. عربي RTL / إنجليزي مع وضع ليلي.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: personal-accountant
Tags: rtl-language-support, custom-menu, one-column, finance, dashboard
*/

/* ==========================================================================
   صفحة الهبوط — هوية «الأزرق الليلي والذهب»
   ========================================================================== */
:root {
  --ld-primary: #1B3B6F;
  --ld-primary-2: #12294F;
  --ld-navy-deep: #0B1424;
  --ld-gold: #C9A227;
  --ld-goldl: #E5C563;
  --ld-good: #1F9D61;
  --ld-bad: #C94040;
  --ld-bg: #F4F2EC;
  --ld-card: #FFFFFF;
  --ld-ink: #1A2537;
  --ld-ink-2: #5A6578;
  --ld-line: #E3DFD4;
  --ld-radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body.pa-landing {
  font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--ld-bg);
  color: var(--ld-ink);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}
.pa-landing img, .pa-landing svg { max-width: 100%; }
.pa-landing a { text-decoration: none; color: inherit; }
.ld-container { max-width: 1140px; margin: 0 auto; padding: 0 22px; }

/* ============ Buttons ============ */
.ld-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 13px; padding: 13px 26px; font-size: 15px; font-weight: 700;
  border: 2px solid transparent; cursor: pointer; font-family: inherit;
  transition: transform 0.18s, box-shadow 0.18s;
}
.ld-btn:hover { transform: translateY(-2px); }
.ld-btn.gold { background: var(--ld-gold); color: var(--ld-navy-deep); box-shadow: 0 10px 26px rgba(201,162,39,0.35); }
.ld-btn.outline { border-color: rgba(255,255,255,0.35); color: #fff; }
.ld-btn.navy { background: var(--ld-primary); color: #fff; box-shadow: 0 10px 26px rgba(27,59,111,0.3); }

/* ============ Header ============ */
.ld-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 20, 36, 0.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.ld-header .ld-container { display: flex; align-items: center; gap: 26px; height: 68px; }
.ld-brand, .pa-landing .ld-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 17px; }
.ld-nav { display: flex; gap: 22px; margin-inline-start: auto; }
.ld-nav a { color: #C9D4E8; font-size: 14px; font-weight: 600; transition: color 0.15s; }
.ld-nav a:hover { color: var(--ld-goldl); }
.ld-header .ld-btn { padding: 9px 18px; font-size: 13.5px; }
.ld-lang {
  background: transparent; border: 1.5px solid rgba(255,255,255,0.3); color: #E5C563;
  border-radius: 9px; padding: 7px 13px; font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: border-color 0.15s, color 0.15s;
}
.ld-lang:hover { border-color: var(--ld-goldl); color: #fff; }
.ld-burger { display: none; background: none; border: 1px solid rgba(255,255,255,0.25); color: #fff; border-radius: 9px; width: 40px; height: 40px; font-size: 17px; }

/* ============ Hero ============ */
.ld-hero {
  background:
    radial-gradient(1000px 560px at 88% -10%, rgba(201,162,39,0.18), transparent 55%),
    radial-gradient(800px 500px at -5% 110%, rgba(31,157,97,0.12), transparent 55%),
    linear-gradient(165deg, #0F2244 0%, var(--ld-navy-deep) 100%);
  color: #fff; padding: 84px 0 110px; position: relative; overflow: hidden;
}
.ld-hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px; pointer-events: none;
}
.ld-hero .ld-container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,39,0.14); border: 1px solid rgba(201,162,39,0.4);
  color: var(--ld-goldl); border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 700;
  margin-bottom: 20px;
}
.ld-hero h1 { font-size: 42px; line-height: 1.35; font-weight: 800; margin-bottom: 16px; }
.ld-hero h1 em { font-style: normal; color: var(--ld-goldl); }
.ld-hero .lead { font-size: 17px; color: #B8C6DE; max-width: 520px; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 13px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.hero-stat b { font-size: 24px; color: var(--ld-goldl); display: block; font-variant-numeric: tabular-nums; }
.hero-stat small { color: #93A1B8; font-size: 12.5px; }

/* Hero dashboard mockup */
.hero-mock {
  background: #101E38; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  box-shadow: 0 40px 90px rgba(0,0,0,0.45);
  padding: 18px; transform: rotate(-1.2deg);
}
.hm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.hm-dot { width: 10px; height: 10px; border-radius: 50%; background: #2A3C60; }
.hm-dot:first-child { background: var(--ld-bad); }
.hm-dot:nth-child(2) { background: var(--ld-gold); }
.hm-dot:nth-child(3) { background: var(--ld-good); }
.hm-title { font-size: 11.5px; color: #93A1B8; margin-inline-start: auto; }
.hm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.hm-kpi { background: #16274A; border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 10px 12px; }
.hm-kpi small { font-size: 10px; color: #93A1B8; display: block; }
.hm-kpi b { font-size: 15px; font-variant-numeric: tabular-nums; }
.hm-kpi.gold b { color: var(--ld-goldl); }
.hm-kpi.good b { color: #7BD4A8; }
.hm-chart { background: #16274A; border: 1px solid rgba(255,255,255,0.07); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.hm-bars { display: flex; align-items: flex-end; gap: 7px; height: 90px; }
.hm-bar { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, var(--ld-gold), #8A6E14); animation: hm-grow 1.2s cubic-bezier(0.2, 0.7, 0.3, 1) both; transform-origin: bottom; }
.hm-bar.g { background: linear-gradient(180deg, #34C285, #1F9D61); }
@keyframes hm-grow { from { transform: scaleY(0); } }
.hm-rows .hm-row { display: flex; align-items: center; gap: 9px; padding: 7px 4px; border-bottom: 1px dashed rgba(255,255,255,0.07); font-size: 11.5px; color: #C9D4E8; }
.hm-row em { font-style: normal; margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.hm-row em.in { color: #7BD4A8; }
.hm-row em.out { color: #E58585; }
.hm-chip {
  position: absolute; background: #fff; color: var(--ld-ink); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.35); padding: 11px 15px; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; gap: 8px; animation: hm-float 4s ease-in-out infinite;
}
.hm-chip.c1 { top: 28px; inset-inline-start: -26px; }
.hm-chip.c2 { bottom: 40px; inset-inline-end: -18px; animation-delay: 1.6s; }
.hm-chip small { display: block; font-weight: 400; color: var(--ld-ink-2); font-size: 10.5px; }
@keyframes hm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.hero-mock-wrap { position: relative; }

/* ============ Sections ============ */
.ld-sec { padding: 84px 0; }
.ld-sec.alt { background: var(--ld-card); border-block: 1px solid var(--ld-line); }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.sec-eyebrow {
  display: inline-block; background: rgba(27,59,111,0.07); color: var(--ld-primary);
  border: 1px solid rgba(27,59,111,0.18); border-radius: 999px; padding: 6px 16px;
  font-size: 12.5px; font-weight: 700; margin-bottom: 14px;
}
.sec-eyebrow::before, .hero-eyebrow::before { content: '✦'; color: var(--ld-gold); margin-inline-end: 7px; }
.hm-chip svg { flex-shrink: 0; }
.hero-stat b { font-family: Georgia, 'Times New Roman', serif; }
.sec-head h2 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.sec-head p { color: var(--ld-ink-2); font-size: 15.5px; }

/* Features grid */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat-card {
  background: var(--ld-card); border: 1px solid var(--ld-line); border-radius: var(--ld-radius);
  padding: 24px 22px; transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden;
}
.feat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(27,59,111,0.12); }
.feat-card::before { content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px; background: linear-gradient(90deg, var(--ld-gold), transparent); opacity: 0; transition: opacity 0.2s; }
.feat-card:hover::before { opacity: 1; }
.feat-ic {
  width: 50px; height: 50px; border-radius: 14px; color: var(--ld-primary);
  background: rgba(27,59,111,0.07); border: 1px solid rgba(27,59,111,0.12);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feat-ic svg { width: 24px; height: 24px; }
.feat-card:hover .feat-ic { color: #8A6E14; background: rgba(201,162,39,0.12); border-color: rgba(201,162,39,0.3); }
.feat-card h3 { font-size: 16.5px; margin-bottom: 7px; }
.feat-card p { font-size: 13.5px; color: var(--ld-ink-2); }

/* Analysis showcase */
.show-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: center; }
.show-grid.flip > .show-visual { order: 2; }
.show-txt h2 { font-size: 27px; font-weight: 800; margin-bottom: 12px; }
.show-txt p { color: var(--ld-ink-2); margin-bottom: 18px; font-size: 15px; }
.show-list { list-style: none; }
.show-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 11px; font-size: 14.5px; }
.show-list li::before { content: '✦'; color: var(--ld-gold); font-size: 15px; margin-top: 1px; }
.show-visual {
  background: var(--ld-card); border: 1px solid var(--ld-line); border-radius: 20px;
  padding: 22px; box-shadow: 0 24px 60px rgba(27,59,111,0.1);
}
.sv-insight {
  display: flex; gap: 10px; background: var(--ld-bg); border: 1px solid var(--ld-line);
  border-radius: 12px; padding: 11px 14px; margin-bottom: 9px; font-size: 13px; align-items: flex-start;
}
.sv-insight span { font-size: 17px; }
.sv-insight.warn { border-inline-start: 4px solid #D98E04; }
.sv-insight.good { border-inline-start: 4px solid var(--ld-good); }
.sv-insight.info { border-inline-start: 4px solid var(--ld-primary); }
.sv-donut { display: flex; align-items: center; gap: 18px; }
.sv-donut svg { flex-shrink: 0; }
.sv-leg { flex: 1; font-size: 12.5px; }
.sv-leg div { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.sv-leg i { width: 10px; height: 10px; border-radius: 3px; }
.sv-leg em { font-style: normal; margin-inline-start: auto; color: var(--ld-ink-2); }

/* Chat showcase bubbles */
.sv-chat { display: flex; flex-direction: column; gap: 9px; }
.sv-msg { max-width: 86%; border-radius: 14px; padding: 10px 14px; font-size: 13px; line-height: 1.6; }
.sv-msg.bot { background: var(--ld-bg); border: 1px solid var(--ld-line); align-self: flex-start; border-start-start-radius: 4px; }
.sv-msg.user { background: var(--ld-primary); color: #fff; align-self: flex-end; border-start-end-radius: 4px; }

/* Screens strip */
.screens-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.screen-card {
  background: var(--ld-card); border: 1px solid var(--ld-line); border-radius: 16px; padding: 18px;
  text-align: center; font-size: 13.5px; font-weight: 700; transition: transform 0.18s, box-shadow 0.18s;
}
.screen-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(27,59,111,0.12); }
.screen-card .sc-ic { display: block; margin-bottom: 9px; color: var(--ld-primary); }
.screen-card .sc-ic svg { width: 26px; height: 26px; }
.screen-card small { display: block; font-weight: 400; color: var(--ld-ink-2); font-size: 11.5px; margin-top: 3px; }

/* Privacy band */
.priv-band {
  background: linear-gradient(135deg, var(--ld-primary-2), var(--ld-navy-deep));
  border-radius: 24px; color: #fff; padding: 44px 40px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 26px; align-items: center;
}
.priv-band .big-ic { font-size: 52px; }
.priv-band h3 { font-size: 22px; margin-bottom: 7px; }
.priv-band p { color: #B8C6DE; font-size: 14px; max-width: 560px; }

/* FAQ */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--ld-card); border: 1px solid var(--ld-line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: start; background: none; border: none; font-family: inherit;
  font-size: 15px; font-weight: 700; color: var(--ld-ink); padding: 17px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer;
}
.faq-q::after { content: '+'; font-size: 21px; color: var(--ld-gold); transition: transform 0.2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { padding: 0 20px 17px; color: var(--ld-ink-2); font-size: 14px; }

/* CTA */
.cta-band {
  text-align: center; border-radius: 26px; padding: 62px 30px; color: #fff;
  background:
    radial-gradient(700px 300px at 50% -40%, rgba(201,162,39,0.25), transparent 60%),
    linear-gradient(150deg, var(--ld-primary), var(--ld-navy-deep));
}
.cta-band h2 { font-size: 30px; margin-bottom: 10px; }
.cta-band p { color: #B8C6DE; margin-bottom: 26px; }

/* Footer */
.ld-footer { background: var(--ld-navy-deep); color: #93A1B8; padding: 44px 0 26px; margin-top: 84px; }
.ld-footer .ld-container { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; justify-content: space-between; }
.ld-footer .ld-brand { font-size: 15px; }
.ld-footer small { font-size: 12.5px; }
.pa-landing .ld-footer a:hover { color: var(--ld-goldl); }

/* Reveal on scroll */
.ld-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1); }
.ld-reveal.vis { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ld-reveal { opacity: 1; transform: none; transition: none; }
  .hm-bar, .hm-chip { animation: none; }
}

/* WordPress content pages */
.pa-page-content { max-width: 820px; margin: 40px auto 80px; padding: 0 22px; }
.pa-page-content h1 { margin-bottom: 18px; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .ld-hero h1 { font-size: 34px; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .screens-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .ld-nav { display: none; position: absolute; top: 68px; inset-inline: 0; background: var(--ld-navy-deep); flex-direction: column; padding: 16px 22px; gap: 14px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .ld-nav.open { display: flex; }
  .ld-burger { display: inline-flex; align-items: center; justify-content: center; margin-inline-start: auto; }
  .ld-header .head-cta { display: none; }
  .ld-hero .ld-container { grid-template-columns: 1fr; gap: 40px; }
  .ld-hero { padding: 56px 0 70px; }
  .ld-hero h1 { font-size: 29px; }
  .hero-mock { transform: none; }
  .hm-chip.c1 { inset-inline-start: -6px; }
  .hm-chip.c2 { inset-inline-end: -6px; }
  .show-grid, .show-grid.flip { grid-template-columns: 1fr; gap: 26px; }
  .show-grid.flip > .show-visual { order: 0; }
  .priv-band { grid-template-columns: 1fr; text-align: center; }
  .priv-band .ld-btn { justify-self: center; }
  .ld-sec { padding: 56px 0; }
  .sec-head h2 { font-size: 24px; }
}
@media (max-width: 540px) {
  .feat-grid { grid-template-columns: 1fr; }
  .screens-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 18px; }
}
