/* --- لوحة متغيرات الألوان الافتراضية (الوضع الداكن الفاخر) --- */
:root {
    --bg-deep: #030712;        
    --bg-surface: #0f172a;     
    --bg-surface-hover: #1e293b;
    --navbar-bg: rgba(3, 7, 18, 0.75);
    --border-color: rgba(255, 255, 255, 0.03);
    
    --primary: #3b82f6;        
    --primary-glow: rgba(59, 130, 246, 0.2);
    --accent: #06b6d4;         
    --accent-glow: rgba(6, 182, 212, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --success: #10b981;        
    --danger: #ef4444;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- لوحة متغيرات الألوان البديلة (الوضع الفاتح الأنيق) --- */
body.light-theme {
    --bg-deep: #f1f5f9;        
    --bg-surface: #ffffff;     
    --bg-surface-hover: #f8fafc;
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(15, 98, 254, 0.08);
    
    --primary: #2563eb;        
    --primary-glow: rgba(37, 99, 235, 0.15);
    --accent: #0891b2;         
    --accent-glow: rgba(8, 145, 178, 0.2);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
}

/* تخصيص شريط التمرير */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-surface-hover); border-radius: 10px; }

* {
    box-sizing: border-box;
    margin: 0; padding: 0;
    font-family: 'Cairo', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- Header & Navbar --- */
header {
    position: fixed; top: 0; left: 0; right: 0;
    background: var(--navbar-bg);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    max-width: 1300px; margin: 0 auto; padding: 16px 24px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo-box { display: flex; align-items: center; gap: 14px; text-decoration: none; }

.logo-image {
    width: 54px; height: 54px; object-fit: cover; border-radius: 12px;
    background: #000; box-shadow: 0 0 15px var(--accent-glow);
}

.logo-text { font-size: 22px; font-weight: 950; color: var(--text-main); }
.logo-text span { color: var(--primary); }

.nav-actions-wrapper { display: flex; align-items: center; gap: 20px; }
.nav-menu { display: flex; gap: 8px; list-style: none; }
.menu-toggle {
    display: none; width: 42px; height: 42px; border: 1px solid var(--border-color);
    border-radius: 12px; background: var(--bg-surface); color: var(--text-main);
    font-size: 18px; cursor: pointer;
}

.nav-menu a {
    text-decoration: none; color: var(--text-muted); font-weight: 700; font-size: 14.5px;
    transition: var(--transition); padding: 10px 18px; border-radius: 12px;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--text-main); background: rgba(148, 163, 184, 0.08); }

/* زر تحويل المود التفاعلي */
.theme-toggle-btn {
    background: rgba(148, 163, 184, 0.1); border: 1px solid var(--border-color);
    color: var(--text-main); width: 42px; height: 42px; border-radius: 12px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 18px; transition: var(--transition);
}
.theme-toggle-btn:hover {
    background: var(--primary); color: white; transform: scale(1.05);
    box-shadow: 0 5px 15px var(--primary-glow);
}

/* --- Hero Section --- */
.hero {
    padding: 220px 24px 160px;
    background: radial-gradient(circle at 10% 20%, var(--primary-glow) 0%, transparent 45%),
                radial-gradient(circle at 90% 80%, var(--accent-glow) 0%, transparent 45%);
    text-align: center; position: relative;
}

.hero-badge {
    background: rgba(148, 163, 184, 0.06); border: 1px solid var(--border-color);
    padding: 6px 16px; border-radius: 100px; font-size: 13px; font-weight: 700;
    color: var(--accent); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px;
}

.hero h1 { font-size: 3.5rem; font-weight: 950; line-height: 1.2; margin-bottom: 24px; }
.hero h1 span { background: linear-gradient(135deg, var(--accent), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 750px; margin: 0 auto 40px; line-height: 1.7; }

.btn-premium {
    display: inline-flex; align-items: center; gap: 10px; background: var(--primary);
    color: #fff; text-decoration: none; padding: 14px 36px; border-radius: 14px;
    font-weight: 700; font-size: 16px; transition: var(--transition);
    box-shadow: 0 8px 30px var(--primary-glow); border: 1px solid rgba(255,255,255,0.1);
}
.btn-premium:hover { transform: translateY(-3px); box-shadow: 0 15px 40px var(--primary-glow); }

/* --- Sections Layout --- */
.wrapper { max-width: 1300px; margin: 0 auto 120px; padding: 0 24px; }
.section-intro { text-align: center; margin-bottom: 60px; }
.section-intro h2 { font-size: 2.4rem; font-weight: 900; color: var(--text-main); }
.section-intro p { color: var(--text-muted); margin-top: 10px; font-size: 16px; }

/* --- 1️⃣ قسم العروض التفاعلية --- */
.offers-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 30px; }

.card-glow {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: 28px; padding: 35px; position: relative; overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(0,0,0,0.1); transition: var(--transition);
}
.card-glow:hover {
    transform: translateY(-8px); border-color: var(--accent);
    box-shadow: 0 30px 60px -15px var(--accent-glow);
}

.tag-live {
    position: absolute; top: 24px; left: 24px; background: rgba(239, 68, 68, 0.1);
    color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 4px 14px; border-radius: 8px; font-size: 12px; font-weight: 700;
}

.discount-big { font-size: 45px; font-weight: 950; color: var(--accent); margin-bottom: 15px; }
.card-glow h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.card-glow p { color: var(--text-muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 25px; }

/* --- 2️⃣ قسم هندسة الجودة والخطوات --- */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.process-node {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    padding: 30px; border-radius: 24px; position: relative; transition: var(--transition);
}
.process-node:hover { border-color: var(--primary); background: var(--bg-surface-hover); }

.node-step {
    position: absolute; top: -15px; right: 25px; width: 35px; height: 35px;
    background: var(--primary); color: #fff; font-weight: 950; font-size: 14px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.process-node h3 { font-size: 18px; font-weight: 800; margin: 15px 0 10px; }
.process-node p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* --- 3️⃣ معرض الأجهزة الفاخر --- */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 32px; }
.device-card {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: 28px; overflow: hidden; transition: var(--transition); display: flex; flex-direction: column;
}
.device-card:hover { transform: translateY(-10px); border-color: var(--primary); }

.device-visual {
    width: 100%; height: 210px; background: rgba(148, 163, 184, 0.05);
    display: flex; align-items: center; justify-content: center; font-size: 55px; color: var(--text-muted);
}

.device-tag {
    position: absolute; top: 20px; right: 20px; background: rgba(59, 130, 246, 0.1);
    color: var(--primary); border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 700;
}

.device-info { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.device-info h3 { font-size: 21px; font-weight: 800; margin-bottom: 15px; }

.specs-list { list-style: none; margin-bottom: 25px; }
.specs-list li {
    padding: 8px 0; font-size: 13.5px; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between;
}
.specs-list li span:first-child { color: var(--text-muted); }
.specs-list li span:last-child { color: var(--text-main); font-weight: 600; }

.action-row {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(148, 163, 184, 0.05); padding: 12px 20px; border-radius: 16px; margin-top: auto;
}
.action-row strong { color: var(--accent); font-size: 17px; font-weight: 800; }

.btn-whatsapp {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--success); color: white; text-decoration: none; padding: 12px 24px;
    border-radius: 12px; font-weight: 700; transition: var(--transition);
}
.btn-whatsapp:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* --- 4️⃣ قسم الخدمات الاستراتيجية --- */
.services-matrix { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.matrix-box {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    padding: 35px; border-radius: 24px; transition: var(--transition);
}
.matrix-box:hover { background: var(--bg-surface-hover); border-color: var(--accent); }
.matrix-box i { font-size: 36px; color: var(--accent); margin-bottom: 20px; display: inline-block; }
.matrix-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 12px; }
.matrix-box p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* --- Footer Framework --- */
footer { background: var(--bg-surface); border-top: 1px solid var(--border-color); padding: 80px 24px 30px; transition: var(--transition); }
.footer-grid {
    max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 50px;
    padding-bottom: 60px; border-bottom: 1px solid var(--border-color);
}
.footer-brand h3 { font-size: 24px; font-weight: 950; margin-bottom: 15px; }
.footer-brand p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }

.footer-col h4 { font-size: 17px; font-weight: 800; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--text-muted); text-decoration: none; transition: var(--transition); font-size: 14px; }
.footer-col a:hover { color: var(--accent); padding-right: 6px; }

.meta-item { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; color: var(--text-muted); font-size: 14px; }
.meta-item i { color: var(--primary); }

.footer-copyright {
    max-width: 1300px; margin: 30px auto 0; display: flex; justify-content: space-between;
    align-items: center; font-size: 13px; color: var(--text-muted);
}

/* --- صفحات الموقع الداخلية --- */
.page-main { min-height: 65vh; padding-top: 120px; }
.page-hero { padding: 70px 24px 55px; text-align: center; background: radial-gradient(circle at 50% 0, var(--primary-glow), transparent 65%); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.25; margin-bottom: 18px; }
.page-hero p { max-width: 760px; margin: 0 auto; color: var(--text-muted); line-height: 1.8; font-size: 1.05rem; }
.breadcrumb { max-width: 1300px; margin: 0 auto; padding: 0 24px; color: var(--text-muted); font-size: 13px; }
.breadcrumb a, .text-link { color: var(--accent); text-decoration: none; font-weight: 700; }
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.content-card, .stat-card, .empty-state, .contact-panel {
    background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 22px; padding: 28px;
}
.content-card h2, .content-card h3 { margin-bottom: 12px; }
.content-card p, .content-card li, .prose p, .prose li { color: var(--text-muted); line-height: 1.85; }
.content-card i { color: var(--accent); font-size: 28px; margin-bottom: 15px; }
.prose { max-width: 900px; margin: 0 auto; }
.prose h2 { margin: 32px 0 12px; font-size: 1.5rem; }
.prose p, .prose li { margin-bottom: 14px; }
.prose ul, .prose ol { padding-right: 24px; }
.stats-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.stat-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.stat-card strong { font-size: 2.3rem; color: var(--accent); }
.stat-card span { color: var(--text-muted); }
.center-action { text-align: center; margin-top: 28px; }
.service-link-card { color: inherit; text-decoration: none; }
.service-link-card .text-link { display: inline-block; margin-top: 18px; }
.empty-state { text-align: center; max-width: 760px; margin: 0 auto; color: var(--text-muted); }
.empty-state > i { display: block; font-size: 38px; color: var(--accent); margin-bottom: 15px; }
.contact-banner { padding: 36px; border-radius: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--bg-surface); border: 1px solid var(--border-color); }
.contact-banner p { color: var(--text-muted); margin-top: 8px; }
.faq-list { max-width: 900px; margin: 0 auto; display: grid; gap: 12px; }
.faq-list details { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 18px 22px; }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list details p { color: var(--text-muted); line-height: 1.8; padding-top: 12px; }
.faq-list a { color: var(--accent); }
.contact-layout { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr); gap: 24px; }
.contact-panel h2 { margin-bottom: 18px; }
.contact-form { display: grid; gap: 15px; }
.contact-form label { display: grid; gap: 7px; font-weight: 700; }
.contact-form input, .contact-form textarea, .contact-form select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: 12px;
    background: var(--bg-deep); color: var(--text-main); font: inherit;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form button { border: 0; cursor: pointer; }
.map-frame { width: 100%; min-height: 320px; border: 0; border-radius: 18px; }
.article-meta { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.article-card { display: flex; flex-direction: column; gap: 12px; }
.article-card p { flex-grow: 1; }
.notice { border-right: 4px solid var(--accent); padding: 14px 18px; background: var(--bg-surface); color: var(--text-muted); line-height: 1.8; }
.site-nav-link { white-space: nowrap; }

/* === Responsive: لابتوب صغير وتابلت أفقي === */
@media (max-width: 1024px) {
    .navbar { padding: 14px 20px; }
    .nav-actions-wrapper { gap: 10px; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .nav-menu { display: none; position: absolute; top: 100%; right: 12px; left: 12px; padding: 12px; flex-direction: column; gap: 4px; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: 0 18px 45px rgba(0,0,0,.25); }
    .nav-menu.is-open { display: flex; }
    .nav-menu a { display: block; }
    .hero { padding: 180px 20px 120px; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1.1rem; }
    .wrapper { margin: 0 auto 80px; padding: 0 20px; }
    .section-intro h2 { font-size: 2rem; }
    .offers-container { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
    .showcase-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
    .footer-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 35px; }
}

/* === Responsive: تابلت عمودي === */
@media (max-width: 768px) {
    .nav-actions-wrapper { gap: 10px; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .hero { padding: 160px 18px 100px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; max-width: 100%; }
    .hero-badge { font-size: 12px; padding: 5px 12px; }
    .btn-premium { padding: 12px 28px; font-size: 15px; }
    .section-intro h2 { font-size: 1.7rem; }
    .section-intro p { font-size: 14px; }
    .section-intro { margin-bottom: 40px; }
    .offers-container { grid-template-columns: 1fr; }
    .card-glow { padding: 28px; border-radius: 22px; }
    .discount-big { font-size: 38px; }
    .process-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .showcase-grid { grid-template-columns: 1fr; }
    .services-matrix { grid-template-columns: 1fr 1fr; gap: 20px; }
    .device-visual { height: 180px; font-size: 45px; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-copyright { flex-direction: column; gap: 15px; text-align: center; }
    footer { padding: 50px 18px 25px; }
    .contact-layout { grid-template-columns: 1fr; }
    .contact-banner { flex-direction: column; align-items: stretch; text-align: center; padding: 26px 20px; }
}

/* === Responsive: موبايل === */
@media (max-width: 480px) {
    .navbar { padding: 12px 16px; }
    .logo-image { width: 42px; height: 42px; }
    .logo-text { font-size: 18px; }
    .logo-box { gap: 10px; }
    .theme-toggle-btn { width: 38px; height: 38px; font-size: 16px; }
    .hero { padding: 140px 16px 80px; }
    .hero h1 { font-size: 1.7rem; line-height: 1.35; }
    .hero p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 30px; }
    .hero-badge { font-size: 11px; margin-bottom: 20px; }
    .btn-premium { padding: 12px 24px; font-size: 14px; width: 100%; justify-content: center; border-radius: 12px; }
    .wrapper { margin: 0 auto 60px; padding: 0 16px; }
    .section-intro h2 { font-size: 1.4rem; }
    .section-intro p { font-size: 13px; }
    .section-intro { margin-bottom: 30px; }
    .offers-container { grid-template-columns: 1fr; gap: 18px; }
    .card-glow { padding: 22px; border-radius: 18px; }
    .card-glow h3 { font-size: 18px; }
    .card-glow p { font-size: 13.5px; }
    .discount-big { font-size: 32px; margin-bottom: 10px; }
    .tag-live { top: 18px; left: 18px; font-size: 11px; padding: 3px 10px; }
    .btn-whatsapp { padding: 10px 18px; font-size: 14px; width: 100%; justify-content: center; }
    .process-grid { grid-template-columns: 1fr; gap: 18px; }
    .process-node { padding: 24px; border-radius: 18px; }
    .process-node h3 { font-size: 16px; }
    .process-node p { font-size: 13px; }
    .node-step { width: 30px; height: 30px; font-size: 12px; top: -12px; right: 20px; }
    .showcase-grid { grid-template-columns: 1fr; gap: 18px; }
    .device-card { border-radius: 20px; }
    .device-visual { height: 150px; font-size: 40px; }
    .device-info { padding: 22px; }
    .device-info h3 { font-size: 18px; margin-bottom: 12px; }
    .device-tag { top: 14px; right: 14px; font-size: 11px; padding: 3px 10px; }
    .specs-list li { font-size: 12.5px; padding: 6px 0; }
    .action-row { flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 14px; text-align: center; }
    .action-row strong { font-size: 15px; }
    .services-matrix { grid-template-columns: 1fr; gap: 18px; }
    .matrix-box { padding: 24px; border-radius: 18px; }
    .matrix-box i { font-size: 30px; margin-bottom: 14px; }
    .matrix-box h3 { font-size: 17px; }
    .matrix-box p { font-size: 13px; }
    footer { padding: 40px 16px 20px; }
    .footer-grid { gap: 25px; padding-bottom: 30px; }
    .footer-brand h3 { font-size: 20px; }
    .footer-brand p { font-size: 13px; }
    .footer-col h4 { font-size: 15px; margin-bottom: 14px; }
    .footer-col a { font-size: 13px; }
    .meta-item { font-size: 13px; gap: 8px; }
    .footer-copyright { font-size: 11.5px; gap: 10px; }
    .page-main { padding-top: 96px; }
    .page-hero { padding: 48px 16px 38px; }
    .breadcrumb { padding: 0 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 20px; }
    .contact-panel { padding: 22px; }
    .map-frame { min-height: 260px; }
}
