/* ==========================================================================
   1. إعدادات الخطوط والألوان العامة (روح التصميم الأول الفخم)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-dark: #071e3d;     /* الأزرق الداكن الفخم جداً للملف الأول */
    --primary-blue: #0b3c5d;     /* الأزرق الملكي للأقسام الرئيسية */
    --accent-gold: #d9b310;      /* الذهبي اللامع للأزرار والتنبيهات */
    --light-bg: #f4f7f6;
    --text-dark: #1d2731;
    --text-light: #ffffff;
    --card-dark: #0f3057;        /* أزرق متوسط للبطاقات داخل الأقسام الداكنة */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

body {
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* عناوين الأقسام المشتركة */
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 2px;
}

/* الأزرار الاحترافية */
.btn-main {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(217, 179, 16, 0.3);
}

.btn-main:hover {
    background-color: var(--text-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   2. القائمة العلوية (Header & Navigation)
   ========================================================================== */
/* ==========================================================================
   2. القائمة العلوية (Header & Navigation)
   ========================================================================== */
.main-header {
    background: linear-gradient(rgba(7, 30, 61, 0.85), rgba(7, 30, 61, 0.85)), url('image/header-bg.jpg') no-repeat center center/cover;
    backdrop-filter: blur(5px);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: 0.5px;
}

.logo img {
    height: 45px;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    font-size: 15px;
    transition: 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--accent-gold);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
}

/* ==========================================================================
   3. الواجهة الرئيسية والتراكب الأزرق الفخم (Hero Section)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    background: url('images/header-bg.jpg') no-repeat center center/cover;
    background-color: var(--primary-dark);
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 30, 61, 0.85) 0%, rgba(11, 60, 93, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--text-light);
    max-width: 800px;
}

.hero-content h1 {
    font-size: 54px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 19px;
    margin-bottom: 35px;
    opacity: 0.9;
    font-weight: 300;
}

/* ==========================================================================
   4. قسم اعتمادات الوزارات والشعارات الرسمية
   ========================================================================== */
.accreditations-section {
    background-color: #05162e;
    padding: 30px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.accreditation-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-gold);
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.logos-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.logo-item {
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.gov-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* تحويل الشعارات للأبيض الفخم ليتماشى مع الخلفية الداكنة */
    opacity: 0.8;
    transition: 0.3s;
}

.logo-item:hover .gov-logo {
    opacity: 1;
    filter: none; /* تظهر الألوان الأصلية للشعار عند مرور الماوس */
}

.logo-item p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* ==========================================================================
   5. قسم الإحصائيات (Stats Section)
   ========================================================================== */
.stats-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    color: var(--text-light);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.stat-card {
    padding: 20px;
}

.stat-card h3 {
    font-size: 42px;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* ==========================================================================
   6. قسم الخدمات (Services Section - داكن وفخم)
   ========================================================================== */
.services-section {
    padding: 100px 0;
    background-color: var(--primary-dark);
    color: var(--text-light);
}

.services-section .section-title {
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background-color: var(--card-dark);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border-color: var(--accent-gold);
}

.service-img {
    height: 220px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.1);
}

.service-card h3 {
    padding: 25px 20px 10px 20px;
    color: var(--accent-gold);
    font-size: 22px;
}

.service-card p {
    padding: 0 20px 25px 20px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* ==========================================================================
   7. قسم أماكن التدخل (Secteurs d'Intervention)
   ========================================================================== */
.secteurs-section {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.section-subtitle {
    text-align: center;
    color: #555;
    max-width: 700px;
    margin: 15px auto 0 auto;
    font-size: 16px;
}

.secteurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.secteur-card {
    background-color: var(--text-light);
    padding: 40px 30px;
    border-radius: 6px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    text-align: center;
    border-bottom: 4px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.secteur-card:hover {
    transform: translateY(-5px);
    border-bottom-color: var(--accent-gold);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.secteur-icon {
    font-size: 45px;
    margin-bottom: 20px;
    display: inline-block;
}

.secteur-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 22px;
}

.secteur-card p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
}

/* ==========================================================================
   8. قسم الضمانات الإدارية والشهادات (حداثة وتناسق)
   ========================================================================== */
.assurance-section {
    padding: 100px 0;
    background-color: var(--text-light);
}

.assurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 60px;
    align-items: center;
}

.assurance-content h2 {
    font-size: 36px;
    color: var(--primary-dark);
    margin-bottom: 25px;
    font-weight: 700;
}

.document-list {
    list-style: none;
    margin-top: 30px;
}

.document-list li {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--accent-gold);
    font-size: 16px;
    color: #333;
}

.document-list li strong {
    color: var(--primary-dark);
    display: block;
    margin-bottom: 5px;
    font-size: 17px;
}

.assurance-box-design {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    color: var(--text-light);
    padding: 60px 40px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(7, 30, 61, 0.2);
}

.badge-cert .badge-icon {
    font-size: 60px;
    display: block;
    margin-bottom: 20px;
}

.badge-cert h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--accent-gold);
}

.badge-cert p {
    font-size: 15px;
    opacity: 0.85;
    line-height: 1.6;
}

/* ==========================================================================
   9. قسم من نحن (About Section)
   ========================================================================== */
.about-section {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 50px;
    align-items: center;
}

.sub-title {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 10px;
}

.about-text h2 {
    font-size: 38px;
    color: var(--primary-dark);
    margin-bottom: 25px;
    font-weight: 700;
}

.about-text p {
    margin-bottom: 20px;
    color: #444;
    font-size: 16px;
    line-height: 1.7;
}

.about-img {
    height: 400px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   10. قسم الاتصال والتذييل (Contact & Footer)
   ========================================================================== */
.contact-section {
    padding: 100px 0;
    background-color: var(--text-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px;
}

.contact-info h2 {
    font-size: 38px;
    color: var(--primary-dark);
    margin-bottom: 25px;
}

.contact-info p {
    margin-bottom: 30px;
    font-size: 16px;
    color: #555;
}

.info-item {
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-dark);
    font-weight: 500;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    background-color: var(--light-bg);
    transition: 0.3s;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-blue);
    background-color: var(--text-light);
    outline: none;
}

/* تذييل الصفحة */
.main-footer {
    background-color: #05162e;
    color: var(--text-light);
    padding: 40px 0;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content p {
    margin-bottom: 8px;
    opacity: 0.8;
}

/* زر الواتساب العائم الحركي */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

/* ==========================================================================
   11. شاشات الهواتف والمحمول (Responsive)
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background-color: var(--primary-dark);
        padding: 20px;
        border-bottom: 2px solid var(--accent-gold);
    }
    .nav-menu.open {
        display: flex;
    }
    .nav-menu a {
        margin: 12px 0;
        margin-left: 0;
    }
    .hero-content h1 {
        font-size: 36px;
    }
    .about-grid, .contact-grid, .assurance-grid {
        grid-template-columns: 1fr;
    }
    .logos-grid {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        padding: 12px;
        border-radius: 50%;
    }
    .wa-text {
        display: none; /* يترك الأيقونة فقط في الهواتف الصغيرة جداً لجمالية المظهر */
    }
}