/* ============================================
   IDAA+ Master Stylesheet - Qidaa Brand
   (Navy Blue & Gold - Governmental AI Style)
   ============================================ */

:root {
    --primary: #0A1C3D; /* الأزرق الداكن من الشعار */
    --primary-light: #16316A; /* أزرق أفتح للتدرجات */
    --accent: #F5A623; /* الأصفر الذهبي من الشعار */
    --accent-hover: #D48C1A;
    --bg: #F8F9FA;
    --text: #1A1A1A;
    --muted: #666666;
    --border: #E0E0E0;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(10, 28, 61, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* ضروري جداً لمنع تداخل العناصر */
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    display: block !important;
}

/* ============================================
   NAVBAR (رسمي داكن)
   ============================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--primary);
    padding: 15px 5%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1300px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 900;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-brand .logo-plus {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: #E0E0E0;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: .3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    background: var(--accent);
    color: var(--primary) !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 700;
    transition: .3s;
}

.nav-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* زر الموبايل */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: 0.3s;
}

/* ============================================
   HERO SECTION (الرئيسية مع الروبوت التفاعلي)
   ============================================ */
.hero-ai-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 80px;
    background: linear-gradient(135deg, #F8F9FA 0%, #E8EDF5 100%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    max-width: 1300px;
    margin: auto;
    align-items: center;
    width: 100%;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: .3s;
    box-shadow: 0 4px 15px rgba(10, 28, 61, 0.3);
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    border: 2px solid var(--primary);
    transition: .3s;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* --- تصميم الروبوت والحركة --- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px; /* لتفعيل التأثير ثلاثي الأبعاد */
}

.robot-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    /* حركة الطفو */
    animation: floatRobot 4s ease-in-out infinite;
    transition: transform 0.3s ease-out;
    transform-style: preserve-3d;
}

.robot-image {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 30px rgba(10, 28, 61, 0.15));
}

/* هالة مضيئة خلف الروبوت */
.robot-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.2), transparent 70%);
    border-radius: 50%;
    z-index: -1;
    animation: pulseGlow 3s ease-in-out infinite alternate;
}

@keyframes floatRobot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes pulseGlow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.9; }
}

/* فقاعة الحوار (Chat Bubble) */
.chat-bubble {
    position: absolute;
    top: 10%;
    left: -20px;
    background: #fff;
    padding: 15px 25px;
    border-radius: 20px 20px 20px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
    border: 2px solid var(--accent);
    z-index: 3;
    animation: floatBubble 3s ease-in-out infinite alternate;
}

.chat-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    border-width: 10px 10px 0 0;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

@keyframes floatBubble {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

/* ============================================
   SECTIONS & CARDS
   ============================================ */
.section-padding {
    padding: 100px 5%;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 15px;
}

.section-desc {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: auto;
}

/* البطاقات الوزارية (تدرج أزرق داكن) */
.card-ministerial {
    background: linear-gradient(135deg, #f5a62329 0%, #f5a6237a 100%);
    color: #ffffff;
    border-radius: var(--radius);
    padding: 35px 25px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(10, 28, 61, 0.15);
    transition: all 0.4s ease;
    text-align: center;
}

.card-ministerial:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(10, 28, 61, 0.3);
    border-color: var(--accent);
}

.card-ministerial::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
    pointer-events: none;
}

.card-ministerial > * {
    position: relative;
    z-index: 1;
}

.card-ministerial h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff;
}

.card-ministerial p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.card-ministerial .icon-wrapper {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.card-ministerial:hover .icon-wrapper {
    background: var(--accent);
    color: var(--primary);
    transform: scale(1.1) rotate(5deg);
}

/* شبكات العرض */
.stats-grid, .services-grid, .grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: auto;
}

/* ============================================
   FORMS (الاستمارات)
   ============================================ */
.form-section {
    padding: 120px 5% 80px;
    background-color: #F8F9FA;
    min-height: 100vh;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-top: 5px solid var(--primary);
}

.field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--primary);
}

.field-group input, 
.field-group select, 
.field-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: #FAFAFA;
    transition: .3s;
}

.field-group input:focus, 
.field-group select:focus, 
.field-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 28, 61, 0.1);
}

/* ============================================
   FOOTER (تذييل الصفحة)
   ============================================ */
.footer {
    background-color: var(--primary);
    color: #ffffff;
    padding: 70px 5% 20px;
    border-top: 5px solid var(--accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: #fff;
}

.footer-brand .logo-plus {
    color: var(--accent);
}

.footer-desc {
    color: #A0B0C8;
    line-height: 1.8;
    margin-bottom: 25px;
    max-width: 350px;
}

.footer-col h4 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: var(--accent);
    transform: translateX(-5px);
    display: inline-block;
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    padding-top: 25px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE (التجاوب مع الهواتف)
   ============================================ */
@media (max-width: 900px) {
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        padding: 80px 30px 30px;
        transition: right 0.4s ease;
        gap: 20px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    }

    .nav-links.open { right: 0; }
    .nav-links a { padding: 12px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
    
    /* حركة زر القائمة (X) */
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-cta { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .chat-bubble { display: none; } /* إخفاء الفقاعة على الهاتف لتوفير المساحة */
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .form-container { padding: 25px 20px; }
    form { grid-template-columns: 1fr !important; }
    .robot-container { max-width: 300px; }
}



/* ============================================
   معالجة الشعار ليتناسب مع الخلفية الداكنة
   ============================================ */

.nav-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 5px;
}

.custom-logo {
    height: 50px; /* التحكم بحجم الشعار */
    width: auto;
    
    /* 1. إزالة الخلفية البيضاء ودمج الشعار */
    /* هذه الخاصية تجعل الأبيض شفافاً وتبرز الألوان الداكنة */
    mix-blend-mode: screen; 
    
    /* 2. جعل الشعار يضيء (تأثير الإضاءة) */
    filter: drop-shadow(0 0 8px rgba(245, 166, 35, 0.4));
    
    transition: all 0.4s ease;
}

/* عند تمرير الماوس على الشعار */
.nav-brand:hover .custom-logo {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(245, 166, 35, 0.8)); /* زيادة التوهج */
}
















/* ============================================
   تنسيق شريط التنقل (خلفية فاتحة كما في الصورة)
   ============================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    /* خلفية بتدرج فضي/رمادي فاتح جداً */
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 10px 5%;
    transition: all 0.3s ease;
    border-bottom: 1px solid #d1d5db;
}

.nav-container {
    max-width: 1300px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* الشعار */
.custom-logo {
    height: 55px; /* حجم مناسب */
    width: auto;
    object-fit: contain;
    /* إزالة أي خلفية بيضاء إذا كانت الصورة غير شفافة */
    mix-blend-mode: multiply; 
    transition: transform 0.3s ease;
}

.nav-brand:hover .custom-logo {
    transform: scale(1.05);
}

/* روابط التنقل */
.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: #1e293b; /* لون نص داكن (أزرق داكن) */
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #d97706; /* لون ذهبي/برتقالي عند التمرير */
}

/* زر سجل الآن */
.nav-cta {
    /* لون الزر كما في صورتك (تدرج بنفسجي/برتقالي داكن) */
    background: linear-gradient(135deg, #0b6775 0%, #f9c766 100%);
    color: #ffffff !important;
    padding: 10px 24px;
    border-radius: 20px; /* حواف دائرية أكثر */
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(76, 29, 149, 0.3);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 65, 12, 0.4);
}

/* ============================================
   التجاوب مع الهواتف (قائمة جانبية)
   ============================================ */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px; height: 3px;
    background: #1e293b; /* لون أيقونة القائمة داكن */
    border-radius: 3px;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .menu-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: #ffffff; /* خلفية القائمة الجانبية بيضاء */
        flex-direction: column;
        padding: 100px 30px;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }
    
    .nav-links a {
        color: #1e293b; /* النص داكن في القائمة الجانبية */
    }
    
    .nav-links.open { right: 0; }
    
    /* تأثير علامة (X) عند فتح القائمة */
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}