/*
Theme Name: CBI للاستثمار
Theme URI: https://cbi-investment.example
Author: Ashraf
Description: ثيم شركة CBI للاستثمار المحدودة — موقع تعريفي بالشركة ولوحة مساهمين، يعمل مع بلجن CBI Investment Manager.
Version: 1.0.0
Text Domain: cbi-theme
*/

/* ==========================================================================
   الرموز التصميمية (Design Tokens)
   ========================================================================== */

:root {
	--ink: #0d1520;
	--ink-panel: #16212f;
	--ledger-paper: #e3e8e1;
	--ledger-paper-line: #c7cec2;
	--brass: #a9812f;
	--brass-bright: #c49a42;
	--off-white: #edeae0;
	--gain: #3f7d56;
	--loss: #a5473a;
	--ink-text: #1a2029;

	--font-display: 'El Messiri', 'Tahoma', sans-serif;
	--font-body: 'IBM Plex Sans Arabic', 'Tahoma', sans-serif;
	--font-mono: 'IBM Plex Mono', 'Courier New', monospace;

	--content-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	direction: rtl;
	text-align: right;
	margin: 0;
	background: var(--ink);
	color: var(--off-white);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.7;
}

body.cbi-dashboard-page {
	background: var(--ledger-paper);
	color: var(--ink-text);
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.25;
	margin: 0 0 0.5em;
}

a {
	color: inherit;
	text-decoration: none;
}

img { max-width: 100%; display: block; }

.cbi-container {
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 0 24px;
}

/* حروف الأرقام المالية دائماً بخط الدفتر مع أرقام مصفوفة */
.cbi-figure {
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
	direction: ltr;
	unicode-bidi: isolate;
}

.cbi-gain { color: var(--gain); }
.cbi-loss { color: var(--loss); }

/* ==========================================================================
   الهيدر
   ========================================================================== */

.cbi-header {
	background: var(--ink);
	border-bottom: 1px solid rgba(237, 234, 224, 0.12);
	padding: 20px 0;
}

.cbi-header .cbi-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.cbi-logo {
	font-family: var(--font-display);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.5px;
}

.cbi-logo span { color: var(--brass-bright); }

.cbi-nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
	font-size: 15px;
}

.cbi-nav a:hover { color: var(--brass-bright); }

.cbi-btn {
	display: inline-block;
	padding: 10px 22px;
	border: 1px solid var(--brass);
	color: var(--off-white);
	font-size: 15px;
	transition: background 0.2s ease, color 0.2s ease;
}

.cbi-btn:hover {
	background: var(--brass);
	color: var(--ink);
}

.cbi-btn-solid {
	background: var(--brass);
	color: var(--ink);
	border-color: var(--brass);
}

.cbi-btn-solid:hover {
	background: var(--brass-bright);
	border-color: var(--brass-bright);
}

/* ==========================================================================
   البطل (Hero)
   ========================================================================== */

.cbi-hero {
	padding: 90px 0 70px;
	border-bottom: 1px solid rgba(237, 234, 224, 0.12);
}

.cbi-hero .cbi-container {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 48px;
	align-items: center;
}

.cbi-hero h1 {
	font-size: 42px;
	max-width: 14ch;
}

.cbi-hero p.cbi-lede {
	font-size: 18px;
	color: rgba(237, 234, 224, 0.8);
	max-width: 42ch;
	margin-bottom: 28px;
}

.cbi-hero-actions {
	display: flex;
	gap: 14px;
}

.cbi-chart-wrap {
	background: var(--ink-panel);
	border: 1px solid rgba(237, 234, 224, 0.12);
	padding: 20px;
}

.cbi-chart-wrap svg { width: 100%; height: auto; display: block; }

.cbi-chart-caption {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: rgba(237, 234, 224, 0.6);
	margin-top: 12px;
}

/* ==========================================================================
   كيف يعمل الأمر
   ========================================================================== */

.cbi-steps {
	padding: 80px 0;
	border-bottom: 1px solid rgba(237, 234, 224, 0.12);
}

.cbi-steps h2 { font-size: 30px; margin-bottom: 40px; max-width: 20ch; }

.cbi-steps-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	border-top: 1px solid rgba(237, 234, 224, 0.15);
}

.cbi-step {
	padding: 28px 20px 0;
	border-inline-start: 1px solid rgba(237, 234, 224, 0.15);
}

.cbi-step:first-child { border-inline-start: none; }

.cbi-step-num {
	font-family: var(--font-mono);
	color: var(--brass-bright);
	font-size: 14px;
	display: block;
	margin-bottom: 10px;
}

.cbi-step h3 { font-size: 18px; margin-bottom: 8px; }

.cbi-step p { font-size: 14.5px; color: rgba(237, 234, 224, 0.75); margin: 0; }

/* ==========================================================================
   الشفافية
   ========================================================================== */

.cbi-transparency {
	padding: 80px 0;
	border-bottom: 1px solid rgba(237, 234, 224, 0.12);
}

.cbi-transparency .cbi-container {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 56px;
	align-items: start;
}

.cbi-transparency h2 { font-size: 30px; max-width: 16ch; }

.cbi-ledger-list {
	border-top: 1px solid rgba(237, 234, 224, 0.15);
}

.cbi-ledger-row {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 18px 0;
	border-bottom: 1px solid rgba(237, 234, 224, 0.15);
	font-size: 15px;
}

.cbi-ledger-row span:first-child { color: rgba(237, 234, 224, 0.65); }

.cbi-ledger-row span:last-child {
	font-family: var(--font-mono);
	color: var(--off-white);
}

/* ==========================================================================
   دعوة للانضمام
   ========================================================================== */

.cbi-cta {
	padding: 90px 0;
	text-align: center;
}

.cbi-cta h2 { font-size: 32px; max-width: 18ch; margin: 0 auto 12px; }
.cbi-cta p { color: rgba(237, 234, 224, 0.75); margin-bottom: 28px; }

/* ==========================================================================
   الفوتر
   ========================================================================== */

.cbi-footer {
	background: var(--ink);
	border-top: 1px solid rgba(237, 234, 224, 0.12);
	padding: 36px 0;
	font-size: 14px;
	color: rgba(237, 234, 224, 0.6);
}

.cbi-footer .cbi-container {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

/* ==========================================================================
   لوحة المساهم (chrome حول شورت كود البلجن)
   ========================================================================== */

.cbi-dash-topbar {
	background: var(--ink);
	color: var(--off-white);
	padding: 16px 0;
}

.cbi-dash-topbar .cbi-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.cbi-dash-topbar .cbi-logo { font-size: 18px; }

.cbi-dash-user {
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.cbi-dash-user a {
	border-bottom: 1px solid var(--brass);
	padding-bottom: 2px;
}

.cbi-dash-body {
	padding: 40px 0 80px;
}

/* لوحة المساهم مبنية بألواح دفترية بدل بطاقات SaaS مستديرة */
.cbi-dashboard .cbi-card {
	background: #fff;
	border: 1px solid var(--ledger-paper-line);
	border-radius: 0;
}

.cbi-dashboard .cbi-card-value {
	font-family: var(--font-mono);
	color: var(--ink-text);
}

.cbi-dashboard #cbi-profit-chart {
	background: #fff;
	border: 1px solid var(--ledger-paper-line);
	padding: 16px;
}

.cbi-dashboard .cbi-table th {
	background: var(--ledger-paper);
	font-family: var(--font-mono);
	font-weight: 500;
	font-size: 13px;
}

.cbi-dashboard .button,
.cbi-dashboard button[type="submit"] {
	background: var(--ink);
	color: var(--off-white);
	border: 1px solid var(--ink);
	border-radius: 0;
	padding: 8px 18px;
	cursor: pointer;
}

.cbi-dashboard .button:hover,
.cbi-dashboard button[type="submit"]:hover {
	background: var(--brass);
	border-color: var(--brass);
	color: var(--ink);
}

/* ==========================================================================
   استجابة للجوال
   ========================================================================== */

@media (max-width: 780px) {
	.cbi-hero .cbi-container,
	.cbi-transparency .cbi-container {
		grid-template-columns: 1fr;
	}
	.cbi-steps-grid { grid-template-columns: 1fr 1fr; }
	.cbi-step { border-inline-start: none; border-top: 1px solid rgba(237, 234, 224, 0.15); padding-top: 24px; }
	.cbi-nav { display: none; }
	.cbi-hero h1 { font-size: 32px; }
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}

/* وضوح التركيز عبر لوحة المفاتيح */
a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--brass-bright);
	outline-offset: 2px;
}
