/* ============================================================================
   MZT – Frontend Stylesheet
   خلفية بيضاء · تصميم احترافي · دعم كامل للاتجاهين LTR/RTL
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #7c3aed;
    --gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --bg-tint: #eff6ff;
    --success: #16a34a;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 10px 40px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, .12);
    --font-latin: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-arabic: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-latin);
    background: var(--bg);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body, body:lang(ar), [dir="rtl"] { font-family: var(--font-arabic); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; }

.container { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

.skip-link {
    position: absolute; inset-inline-start: -999px; top: 8px;
    background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 200;
}
.skip-link:focus { inset-inline-start: 8px; }

/* ------------------------------------------------------------------ أزرار */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px; border-radius: 12px; font-weight: 700; font-size: 15px;
    border: 1.5px solid transparent; cursor: pointer; transition: all .22s ease;
    font-family: inherit; white-space: nowrap;
}
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 24px rgba(37, 99, 235, .28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 99, 235, .36); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--bg-tint); }
.btn-ghost { color: var(--primary); background: var(--bg-tint); }
.btn-ghost:hover { background: #dbeafe; }
.btn-sm { padding: 9px 18px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn svg { flex-shrink: 0; }
[dir="rtl"] .btn svg.flip, [dir="rtl"] .arrow-icon { transform: scaleX(-1); }

/* ------------------------------------------------------------------ الهيدر */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(15, 23, 42, .06); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 12px; background: var(--gradient);
    color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .5px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
}
.brand-logo { height: 46px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 17px; font-weight: 800; }
.brand-text small { font-size: 11px; color: var(--muted); }

.main-nav { margin-inline-start: auto; }
.main-nav > ul { display: flex; gap: 2px; align-items: center; }
.main-nav a {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 15px;
    color: var(--ink-soft); transition: color .18s, background .18s;
}
/* منع الالتفاف على روابط المنيو العلوية فقط — عناوين الدروب داون تلتف بحرّية */
.main-nav > ul > li > a { white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); background: var(--bg-tint); }
.main-nav .chev { transition: transform .2s; }
.has-dropdown:hover .chev { transform: rotate(180deg); }

/* القائمة المنسدلة للمشروعات */
.has-dropdown { position: relative; }
.dropdown {
    position: absolute; top: calc(100% + 10px); inset-inline-start: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 560px; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px;
    opacity: 0; visibility: hidden; transition: all .22s ease; z-index: 90;
}
[dir="rtl"] .dropdown { transform: translateX(50%) translateY(8px); }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
[dir="rtl"] .has-dropdown:hover .dropdown, [dir="rtl"] .has-dropdown:focus-within .dropdown {
    transform: translateX(50%) translateY(0);
}
.dropdown::before {
    content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 12px;
}
.dropdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.dropdown-title {
    display: block; font-size: 12px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted); margin-bottom: 8px;
    padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.dropdown-col a {
    display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--ink-soft); transition: all .15s;
}
.dropdown-col a:hover { background: var(--bg-tint); color: var(--primary); }
.dropdown-col a svg { color: var(--primary); flex-shrink: 0; }
.dropdown-all {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
    font-size: 13.5px; font-weight: 700; color: var(--primary);
}
[dir="rtl"] .dropdown-all svg { transform: scaleX(-1); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
    display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 10px; padding: 3px; gap: 2px;
}
.lang-switch a {
    padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.lang-switch a.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2.5px; background: var(--ink); margin: 4.5px 0; border-radius: 2px; transition: .25s; }

/* ------------------------------------------------------------------ الهيرو */
.hero { position: relative; overflow: hidden; padding: 90px 0 70px; }
.hero-bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(600px 300px at 85% 10%, rgba(124, 58, 237, .08), transparent 65%),
        radial-gradient(700px 380px at 10% 90%, rgba(37, 99, 235, .09), transparent 65%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px;
    background: var(--bg-tint); border: 1px solid #dbeafe; color: var(--primary-dark);
    border-radius: 999px; font-size: 13.5px; font-weight: 700; margin-bottom: 22px;
}
.hero-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 20px; }
.hero h1 .grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17.5px; color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-trust { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-trust svg { color: var(--success); }

/* لوحة توضيحية مرسومة بالكود داخل الهيرو */
.hero-visual { position: relative; }
.mock-window {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow-lg); overflow: hidden;
    animation: floaty 7s ease-in-out infinite;
}
.mock-bar { display: flex; gap: 6px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; }
.mock-bar i:nth-child(1) { background: #fca5a5; } .mock-bar i:nth-child(2) { background: #fcd34d; } .mock-bar i:nth-child(3) { background: #86efac; }
.mock-body { display: grid; grid-template-columns: 88px 1fr; min-height: 300px; }
.mock-side { border-inline-end: 1px solid var(--line); padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-soft); }
.mock-side i { height: 9px; border-radius: 6px; background: #e2e8f0; }
.mock-side i.on { background: var(--primary); opacity: .85; }
.mock-main { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.mock-card i { display: block; height: 8px; width: 55%; background: #e2e8f0; border-radius: 6px; margin-bottom: 8px; }
.mock-card b { display: block; height: 13px; width: 75%; background: linear-gradient(90deg, #bfdbfe, #ddd6fe); border-radius: 6px; }
.mock-chart { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; align-items: flex-end; gap: 8px; min-height: 130px; }
.mock-chart i { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #93c5fd, #2563eb); opacity: .85; animation: grow 1.2s ease both; }
.mock-chart i:nth-child(1) { height: 45%; } .mock-chart i:nth-child(2) { height: 70%; animation-delay: .1s; }
.mock-chart i:nth-child(3) { height: 55%; animation-delay: .2s; } .mock-chart i:nth-child(4) { height: 88%; animation-delay: .3s; }
.mock-chart i:nth-child(5) { height: 62%; animation-delay: .4s; } .mock-chart i:nth-child(6) { height: 95%; animation-delay: .5s; }
.mock-chip {
    position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow); padding: 12px 16px; display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 700;
}
.mock-chip svg { color: var(--success); }
.mock-chip.chip-1 { top: -18px; inset-inline-end: -14px; animation: floaty 6s ease-in-out infinite .6s; }
.mock-chip.chip-2 { bottom: -16px; inset-inline-start: -14px; animation: floaty 6.5s ease-in-out infinite .3s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes grow { from { transform: scaleY(0); transform-origin: bottom; } }

/* --------------------------------------------------------------- إحصائيات */
.stats { border-block: 1px solid var(--line); background: var(--bg-soft); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 34px 12px; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat b { display: block; font-size: 38px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------------ أقسام */
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head .kicker {
    display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .08em;
    text-transform: uppercase; color: var(--primary); background: var(--bg-tint);
    padding: 5px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 16.5px; }
.section-foot { text-align: center; margin-top: 40px; }

/* ------------------------------------------------------------ بطاقات الخدمات */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.service-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px 24px; transition: all .25s ease; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}
.service-card::after {
    content: ''; position: absolute; inset-inline-start: 0; top: 0; width: 100%; height: 3px;
    background: var(--gradient); transform: scaleX(0); transform-origin: 0 0; transition: transform .3s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #dbeafe; }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
    width: 54px; height: 54px; border-radius: 14px; background: var(--bg-tint);
    color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.service-card h3 { font-size: 18px; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.service-card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 14px; font-weight: 700; color: var(--primary); }
[dir="rtl"] .service-card .more svg { transform: scaleX(-1); }

/* ---------------------------------------------------------- بطاقات المشروعات */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; transition: all .25s ease; display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project-cover { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--bg-soft); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .4s ease; }
.project-card:hover .project-cover img { transform: scale(1.05); }
.project-badge {
    position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
    background: rgba(255, 255, 255, .95); color: var(--primary-dark);
    font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
}
.project-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.project-body h3 { font-size: 17.5px; margin-bottom: 8px; }
.project-body p { color: var(--muted); font-size: 14px; flex: 1; }
.project-links { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.project-links .btn { flex: 1; min-width: 120px; }

/* فلاتر التصنيف */
.filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.filters a {
    padding: 9px 20px; border-radius: 999px; border: 1.5px solid var(--line);
    font-size: 14px; font-weight: 700; color: var(--ink-soft); transition: all .18s;
}
.filters a:hover { border-color: var(--primary); color: var(--primary); }
.filters a.active { background: var(--gradient); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .3); }

/* ------------------------------------------------------- قسم أنظمة الإدارة */
.systems-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.system-card {
    display: flex; gap: 20px; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 26px; transition: all .25s ease; align-items: flex-start;
}
.system-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #dbeafe; }
.system-icon {
    flex-shrink: 0; width: 60px; height: 60px; border-radius: 16px;
    background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .3);
}
.system-card h3 { font-size: 18px; margin-bottom: 6px; }
.system-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.system-card .links { display: flex; gap: 14px; flex-wrap: wrap; }
.system-card .links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.system-card .links a.demo { color: var(--accent); }
[dir="rtl"] .system-card .links svg.arrow-icon { transform: scaleX(-1); }

/* --------------------------------------------------------------- خطوات العمل */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.process-step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.process-step::before {
    counter-increment: step; content: '0' counter(step);
    display: inline-block; font-size: 30px; font-weight: 800; margin-bottom: 14px;
    background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.process-step h3 { font-size: 17px; margin-bottom: 8px; }
.process-step p { color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------- آراء العملاء */
.testimonials-slider { position: relative; max-width: 860px; margin-inline: auto; overflow: hidden; }
.testimonials-track { display: flex; transition: transform .45s ease; }
.testimonial { flex: 0 0 100%; padding: 8px; }
.testimonial-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 38px; text-align: center; box-shadow: 0 6px 24px rgba(15, 23, 42, .05);
}
.testimonial-stars { color: #f59e0b; display: flex; justify-content: center; gap: 3px; margin-bottom: 18px; }
.testimonial-card blockquote { font-size: 17px; color: var(--ink-soft); line-height: 1.9; margin-bottom: 22px; }
.testimonial-who { display: flex; align-items: center; justify-content: center; gap: 12px; }
.testimonial-avatar {
    width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: var(--gradient);
    color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-who b { display: block; font-size: 15px; }
.testimonial-who span { font-size: 13px; color: var(--muted); }
.testimonials-nav { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.testimonials-nav button {
    width: 10px; height: 10px; border-radius: 999px; border: 0; background: #cbd5e1; cursor: pointer; transition: all .2s; padding: 0;
}
.testimonials-nav button.active { width: 26px; background: var(--primary); }

/* ------------------------------------------------------------------ الشركاء */
.partners-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 48px; }
.partners-row a, .partners-row span { opacity: .55; filter: grayscale(1); transition: all .25s; }
.partners-row a:hover { opacity: 1; filter: none; }
.partners-row img { height: 40px; width: auto; }

/* ---------------------------------------------------------------- شريط CTA */
.cta-band { padding: 0 0 84px; }
.cta-inner {
    position: relative; overflow: hidden; border-radius: 24px; padding: 64px 40px; text-align: center;
    background: var(--gradient); color: #fff; box-shadow: 0 24px 60px rgba(37, 99, 235, .35);
}
.cta-inner::before, .cta-inner::after {
    content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.cta-inner::before { width: 220px; height: 220px; top: -80px; inset-inline-start: -60px; }
.cta-inner::after { width: 300px; height: 300px; bottom: -140px; inset-inline-end: -80px; }
.cta-inner h2 { font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 12px; position: relative; }
.cta-inner p { opacity: .92; max-width: 520px; margin: 0 auto 28px; position: relative; }
.cta-inner .btn { background: #fff; color: var(--primary-dark); position: relative; }
.cta-inner .btn:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------------ الفوتر */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 36px; padding-bottom: 44px; }
.footer-col h4 { font-size: 15px; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: var(--muted); font-size: 14px; transition: color .15s; }
.footer-col a:hover { color: var(--primary); }
.footer-about p { color: var(--muted); font-size: 14px; margin: 16px 0 18px; max-width: 300px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
    display: inline-flex; align-items: center; justify-content: center; color: var(--muted); transition: all .2s;
}
.footer-social a:hover { color: #fff; background: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.footer-contact ul li { display: flex; gap: 9px; align-items: flex-start; color: var(--muted); font-size: 14px; }
.footer-contact svg { flex-shrink: 0; margin-top: 4px; color: var(--primary); }
.footer-bottom {
    border-top: 1px solid var(--line); padding: 20px 0; display: flex; justify-content: space-between;
    align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--muted); } .footer-legal a:hover { color: var(--primary); }

/* زر واتساب عائم */
.whatsapp-float {
    position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 95;
    width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(37, 211, 102, .45); transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ------------------------------------------------------------ رأس الصفحات */
.page-hero { background: linear-gradient(180deg, var(--bg-tint), #fff); padding: 60px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 10px; }
.page-hero p { color: var(--muted); font-size: 16.5px; max-width: 640px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb .sep { opacity: .5; }

/* ---------------------------------------------------------- تفاصيل المشروع */
.project-detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.project-main img { display: block; border-radius: var(--radius); border: 1px solid var(--line); width: auto; max-width: 100%; max-height: 640px; margin-inline: auto; object-fit: contain; } /* صور الموبايل الطولية لا تتضخم */
.project-main h2 { font-size: 22px; margin: 30px 0 12px; }
.project-main .prose { color: var(--ink-soft); font-size: 15.5px; line-height: 1.9; }
.project-aside { position: sticky; top: 96px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 6px 24px rgba(15, 23, 42, .05); }
.info-card h3 { font-size: 16px; margin-bottom: 16px; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.info-list li:last-child { border-bottom: 0; }
.info-list li span { color: var(--muted); }
.info-list li b { text-align: end; }
.info-card .btn { width: 100%; margin-top: 10px; }

/* ------------------------------------------------------- تفاصيل الخدمة */
.service-detail { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.prose { color: var(--ink-soft); font-size: 15.5px; line-height: 1.95; }
.prose h2, .prose h3 { margin: 26px 0 10px; }
.prose p { margin-bottom: 14px; }
.prose ul { list-style: disc; padding-inline-start: 22px; margin-bottom: 14px; }

/* --------------------------------------------------------- العرض التقديمي */
.presentation-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #312e81 100%);
    color: #fff; padding: 70px 0 150px; text-align: center; position: relative; overflow: hidden;
}
.presentation-hero::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(500px 240px at 80% 20%, rgba(124, 58, 237, .35), transparent 60%),
                radial-gradient(500px 240px at 15% 80%, rgba(37, 99, 235, .3), transparent 60%);
}
.presentation-hero > .container { position: relative; z-index: 2; }
.presentation-hero .kicker { display: inline-block; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 18px; }
.presentation-hero h1 { font-size: clamp(28px, 4.4vw, 46px); margin-bottom: 12px; }
.presentation-hero p { opacity: .85; font-size: 17px; max-width: 560px; margin-inline: auto; }
.presentation-actions { display: flex; justify-content: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.deck-wrap { margin-top: -90px; position: relative; z-index: 5; padding-bottom: 30px; }
.deck {
    background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.deck-viewport { position: relative; min-height: 400px; }
.slide {
    position: absolute; inset: 0; padding: 56px 64px; display: none;
    grid-template-columns: auto 1fr; gap: 30px; align-items: center;
}
.slide.active { display: grid; position: relative; animation: slideIn .4s ease; } /* الشريحة الظاهرة تأخذ ارتفاعها الطبيعي فلا تخرج عن البطاقة */
@keyframes slideIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.slide-icon {
    width: 110px; height: 110px; border-radius: 28px; background: var(--gradient); color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 18px 40px rgba(37, 99, 235, .35);
    flex-shrink: 0;
}
.slide-num { font-size: 13px; font-weight: 800; color: var(--primary); letter-spacing: .08em; margin-bottom: 8px; display: block; }
.slide h2 { font-size: clamp(22px, 3vw, 32px); margin-bottom: 14px; }
.slide p { color: var(--muted); font-size: 16.5px; line-height: 1.9; max-width: 640px; }
.slide-img { display: block; width: auto; max-width: min(100%, 680px); max-height: 560px; margin-top: 18px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; box-shadow: var(--shadow); } /* الصورة كاملة بدون قص (أفقية أو طولية) */
.slide > div { min-width: 0; }
.deck-controls {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    border-top: 1px solid var(--line); padding: 18px 26px; background: var(--bg-soft);
}
.deck-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px;
    border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
    transition: all .18s; font-family: inherit; color: var(--ink);
}
.deck-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.deck-btn:disabled { opacity: .4; cursor: default; }
[dir="rtl"] .deck-btn svg { transform: scaleX(-1); }
.deck-progress { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.deck-count { font-size: 13px; font-weight: 700; color: var(--muted); }
.deck-dots { display: flex; gap: 7px; }
.deck-dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; background: #cbd5e1; cursor: pointer; transition: all .2s; padding: 0; }
.deck-dots button.active { width: 24px; background: var(--primary); }
.deck-hint { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 14px; }

/* ------------------------------------------------------------------ من نحن */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; height: 100%; }
.about-card .icon { width: 50px; height: 50px; border-radius: 13px; background: var(--bg-tint); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.about-card h3 { font-size: 18px; margin-bottom: 10px; }
.about-card p { color: var(--muted); font-size: 14.5px; }
.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.locations-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.location-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
    display: flex; gap: 18px; align-items: flex-start;
}
.location-card .pin { width: 52px; height: 52px; border-radius: 14px; background: var(--gradient); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.location-card h3 { font-size: 17px; margin-bottom: 6px; }
.location-card p { color: var(--muted); font-size: 14.5px; margin-bottom: 4px; }
.location-card a { color: var(--primary); font-weight: 700; font-size: 14.5px; }

/* ------------------------------------------------------------------ التواصل */
.contact-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: 0 6px 24px rgba(15, 23, 42, .05); }
.form-card h2 { font-size: 20px; margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14.5px; margin-bottom: 20px; font-weight: 600; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.contact-cards { display: flex; flex-direction: column; gap: 18px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; gap: 16px; align-items: flex-start; }
.contact-card .icon { width: 46px; height: 46px; border-radius: 12px; background: var(--bg-tint); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.contact-card p, .contact-card a { color: var(--muted); font-size: 14.5px; }
.contact-card a:hover { color: var(--primary); }
.contact-card .wa-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: #16a34a; font-weight: 700; }

/* -------------------------------------------------------------- صفحة قانونية */
.legal-body { max-width: 780px; margin-inline: auto; }
.legal-body h2 { font-size: 22px; margin: 28px 0 12px; }
.legal-body h3 { font-size: 17px; margin: 22px 0 8px; }
.legal-body p { color: var(--ink-soft); margin-bottom: 12px; line-height: 1.9; }

/* ------------------------------------------------------------------ 404 */
.error-page { text-align: center; padding: 110px 24px; }
.error-page b { font-size: 90px; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; line-height: 1; }
.error-page h1 { font-size: 26px; margin: 16px 0 8px; }
.error-page p { color: var(--muted); margin-bottom: 26px; }

/* ---------------------------------------------------------- ظهور عند التمرير */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .mock-window, .mock-chip { animation: none; }
}

/* ------------------------------------------------------------------ استجابة */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-grid { grid-template-columns: 1fr; gap: 44px; }
    .hero-visual { max-width: 560px; margin-inline: auto; }
    .project-detail, .service-detail, .contact-grid, .about-grid { grid-template-columns: 1fr; }
    .project-aside { position: static; }
}

/* القائمة تتحول لهامبرغر مبكرًا حتى لا تلتف الروابط الألمانية الطويلة على سطرين */
@media (max-width: 1160px) {
    .nav-toggle { display: block; }
    /* absolute أسفل الهيدر الملاصق بدل fixed:
       الـ backdrop-filter على الهيدر يجعله الحاوية المرجعية للعناصر fixed
       فتنهار اللوحة لارتفاع صفري */
    .main-nav {
        position: absolute; top: 100%; inset-inline: 0; background: #fff; z-index: 99;
        height: calc(100vh - 76px); height: calc(100dvh - 76px);
        padding: 24px; overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden;
        transition: all .25s ease; border-top: 1px solid var(--line); margin: 0;
    }
    .main-nav.open { transform: none; opacity: 1; visibility: visible; }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .main-nav a { padding: 14px; font-size: 16px; justify-content: space-between; }
    .dropdown {
        position: static; transform: none !important; opacity: 1; visibility: visible; min-width: 0;
        border: 0; box-shadow: none; padding: 0 10px 10px; display: none; border-radius: 0;
    }
    .has-dropdown.open .dropdown { display: block; }
    .dropdown-grid { grid-template-columns: 1fr; gap: 12px; }
    body.nav-locked { overflow: hidden; }
}

@media (max-width: 820px) {
    .header-cta { display: none; }
}

@media (max-width: 640px) {
    .section { padding: 60px 0; }
    .hero { padding: 56px 0 50px; }
    .services-grid, .projects-grid, .process-grid, .systems-grid, .values-grid, .locations-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(3) { border-inline-start: 0; }
    .stat { padding: 24px 8px; }
    .stat b { font-size: 30px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .slide { padding: 34px 24px; grid-template-columns: 1fr; text-align: center; }
    .slide-icon { margin-inline: auto; width: 84px; height: 84px; border-radius: 22px; }
    .slide p { margin-inline: auto; }
    .deck-viewport { min-height: 480px; }
    .deck-controls { flex-wrap: wrap; justify-content: center; }
    .system-card { flex-direction: column; }
    .cta-inner { padding: 44px 24px; }
}

/* ---------------------------------------------------------------- صور قابلة للفتح + عارض الصور */
.lb-trigger { cursor: zoom-in; transition: transform .2s ease, box-shadow .2s ease; }
.lb-trigger:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.lb-trigger:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.lb {
    position: fixed; inset: 0; z-index: 1000; background: rgba(8, 12, 24, .94);
    display: flex; flex-direction: column; color: #fff; user-select: none; -webkit-user-select: none;
}
.lb[hidden] { display: none; }
body.lb-open { overflow: hidden; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 12px; position: relative; z-index: 2; }
.lb-count { font-weight: 700; font-size: 14px; opacity: .85; min-width: 48px; }
.lb-tools { display: flex; gap: 8px; }
.lb-btn {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08); color: #fff; display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.2); }
.lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-btn[hidden] { display: none; }
.lb-stage {
    flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
    overflow: hidden; touch-action: none; padding: 0 72px;
}
.lb-img {
    max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5); cursor: zoom-in; transform-origin: center center; will-change: transform;
}
.lb-zoomed .lb-img { cursor: grab; border-radius: 0; }
.lb-zoomed .lb-img:active { cursor: grabbing; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 999px; z-index: 2; }
.lb-prev { inset-inline-start: 14px; }
.lb-next { inset-inline-end: 14px; }
.lb-caption { text-align: center; padding: 12px 16px 18px; font-size: 14.5px; opacity: .85; min-height: 20px; }
@media (max-width: 760px) {
    .lb-stage { padding: 0 8px; }
    .lb-nav { top: auto; bottom: 10px; transform: none; width: 46px; height: 46px; background: rgba(0,0,0,.45); }
    .lb-caption { padding: 18px 64px 22px; }
    .lb-btn { width: 40px; height: 40px; }
    .slide-img { max-height: 70vh; margin-inline: auto; }
}
/* العدّاد «2 / 8» يُقرأ من اليسار لليمين حتى في الصفحات العربية */
.deck-count, .lb-count { direction: ltr; unicode-bidi: isolate; }
