/* ==========================================================================
   legal.css — الصفحات التعريفية والقانونية (من نحن / الخصوصية / الشروط / الاسترجاع / حذف البيانات) — البادئة lg-
   يعتمد على متغيرات header.php: --accent --bg-dark --border-color --text-primary --text-secondary --text-muted
   ========================================================================== */
.lg { --lg-accent: var(--accent, #ffcc00); --lg-surface: rgba(15, 19, 26, 0.62); --lg-border: rgba(255, 255, 255, 0.07); --lg-muted: #94a3b8; font-family: 'Cairo', sans-serif; color: var(--text-primary, #f8fafc); padding-bottom: 40px; }
.lg *, .lg *::before, .lg *::after { box-sizing: border-box; }

/* الهيرو */
.lg-hero { position: relative; overflow: hidden; text-align: center; padding: 54px 20px 40px; border-bottom: 1px solid var(--lg-border); }
.lg-hero::before { content: ''; position: absolute; left: 50%; top: -240px; width: 760px; height: 480px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 204, 0, 0.13), transparent); pointer-events: none; }
.lg-hero > * { position: relative; }
.lg-eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; margin-bottom: 14px; border-radius: 999px; background: rgba(255, 204, 0, 0.10); border: 1px solid rgba(255, 204, 0, 0.30); color: var(--lg-accent); font-size: 12.5px; font-weight: 800; }
.lg-title { margin: 0 0 10px; font-size: clamp(26px, 4vw, 38px); font-weight: 800; color: #fff; line-height: 1.25; }
.lg-sub { max-width: 640px; margin: 0 auto; color: var(--lg-muted); font-size: 15px; line-height: 1.9; }
.lg-updated { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 12.5px; color: var(--text-muted, #64748b); font-weight: 700; }
.lg-updated i { color: var(--lg-accent); }

/* التخطيط */
.lg-wrap { max-width: 1140px; margin: 0 auto; padding: 32px 20px 20px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px; align-items: start; }
.lg-side { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 14px; }
.lg-toc, .lg-related { background: var(--lg-surface); border: 1px solid var(--lg-border); border-radius: 18px; padding: 16px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.lg-side__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.lg-side__title i { color: var(--lg-accent); }
.lg-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; counter-reset: toc; }
.lg-toc a { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 10px; color: var(--lg-muted); text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.5; transition: background .2s, color .2s; counter-increment: toc; }
.lg-toc a::before { content: counter(toc); flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--lg-muted); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.lg-toc a:hover { background: rgba(255, 255, 255, 0.04); color: #fff; }
.lg-toc a.is-active { background: rgba(255, 204, 0, 0.10); color: var(--lg-accent); }
.lg-toc a.is-active::before { background: var(--lg-accent); color: #000; }
.lg-related { display: flex; flex-direction: column; gap: 2px; }
.lg-related a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-secondary, #cbd5e1); text-decoration: none; font-size: 13px; font-weight: 700; transition: background .2s, color .2s; }
.lg-related a i { width: 18px; text-align: center; color: var(--lg-accent); font-size: 13px; }
.lg-related a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

/* البطاقات */
.lg-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lg-card { background: var(--lg-surface); border: 1px solid var(--lg-border); border-radius: 22px; padding: 34px 36px; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35); }
.lg-card__title { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 18px; font-weight: 800; color: #fff; }
.lg-card__title i { color: var(--lg-accent); }

/* المحتوى المحرَّر */
.lg-content { font-size: 16px; line-height: 2; color: #d1d5db; }
.lg-content > :first-child { margin-top: 0; }
.lg-content > :last-child { margin-bottom: 0; }
.lg-content h2 { display: flex; align-items: center; gap: 12px; margin: 30px 0 12px; font-size: 21px; font-weight: 800; color: #fff; line-height: 1.4; scroll-margin-top: 150px; }
.lg-content h2::before { content: ''; flex: 0 0 auto; width: 6px; height: 24px; border-radius: 4px; background: var(--lg-accent); box-shadow: 0 0 12px rgba(255, 204, 0, 0.4); }
.lg-content h3 { margin: 22px 0 8px; font-size: 17px; font-weight: 800; color: #f1f5f9; }
.lg-content h4 { margin: 16px 0 6px; font-size: 15px; font-weight: 800; color: #f1f5f9; }
.lg-content p { margin: 0 0 14px; }
.lg-content strong, .lg-content b { color: #fff; font-weight: 800; }
.lg-content a { color: var(--lg-accent); text-decoration: underline; text-underline-offset: 3px; }
.lg-content ul, .lg-content ol { margin: 0 0 16px; padding-inline-start: 26px; }
.lg-content ul { list-style: disc; }
.lg-content ol { list-style: decimal; }
.lg-content li { margin-bottom: 8px; padding-inline-start: 4px; }
.lg-content li::marker { color: var(--lg-accent); font-weight: 800; }
.lg-content blockquote { margin: 0 0 16px; padding: 14px 18px; border-inline-start: 3px solid var(--lg-accent); background: rgba(255, 204, 0, 0.05); border-radius: 0 12px 12px 0; color: #e2e8f0; }
.lg-content hr { border: 0; border-top: 1px dashed rgba(255, 255, 255, 0.12); margin: 22px 0; }
.lg-content img { max-width: 100%; height: auto; border-radius: 12px; }
.lg-content table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 14px; }
.lg-content th, .lg-content td { padding: 10px 12px; border: 1px solid rgba(255, 255, 255, 0.08); text-align: right; }
.lg-content th { background: rgba(255, 255, 255, 0.04); color: #fff; }

/* الماركات (من نحن) */
.lg-brands__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.lg-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--lg-border); text-decoration: none; color: var(--text-secondary, #cbd5e1); font-size: 12.5px; font-weight: 700; transition: transform .25s, border-color .25s, background .25s; }
.lg-brand img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; }
.lg-brand:hover { transform: translateY(-3px); border-color: rgba(255, 204, 0, 0.35); background: rgba(255, 204, 0, 0.05); color: #fff; }

/* التواصل */
.lg-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, rgba(255, 204, 0, 0.10), rgba(15, 19, 26, 0.7) 60%); border-color: rgba(255, 204, 0, 0.22); }
.lg-cta__text { flex: 1 1 320px; min-width: 0; }
.lg-cta__text p { margin: 0; color: var(--lg-muted); font-size: 14px; line-height: 1.8; }
.lg-cta__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; background: linear-gradient(135deg, var(--lg-accent), #e6b800); color: #0b0f19; font-weight: 800; font-size: 14px; text-decoration: none; box-shadow: 0 6px 16px rgba(255, 204, 0, 0.18); transition: transform .2s, box-shadow .2s; white-space: nowrap; }
.lg-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(255, 204, 0, 0.3); color: #000; }
.lg-btn--wa { background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; box-shadow: 0 6px 16px rgba(37, 211, 102, 0.22); }
.lg-btn--wa:hover { color: #fff; }
.lg-btn--ghost { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary, #cbd5e1); border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: none; }
.lg-btn--ghost:hover { color: #fff; box-shadow: none; }

@media (max-width: 900px) {
    .lg-wrap { grid-template-columns: 1fr; gap: 16px; padding-top: 22px; }
    .lg-side { position: static; }
    .lg-toc { display: none; }
    .lg-related { flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 12px; }
    .lg-related .lg-side__title { width: 100%; margin-bottom: 4px; }
    .lg-related a { padding: 7px 10px; font-size: 12.5px; background: rgba(255, 255, 255, 0.04); }
}
@media (max-width: 600px) {
    .lg-hero { padding: 36px 16px 30px; }
    .lg-card { padding: 22px 18px; border-radius: 18px; }
    .lg-content { font-size: 15px; line-height: 1.9; }
    .lg-content h2 { font-size: 18px; margin-top: 24px; }
    .lg-cta__actions { width: 100%; }
    .lg-btn { flex: 1 1 auto; }
    .lg-brands__grid { grid-template-columns: repeat(3, 1fr); }
}
