/* =========================================
   1. المتغيرات والأساسيات
   ========================================= */
:root {
    --primary-color: #0056b3; 
    --primary-dark: #004494;
    --secondary-color: #c5a059; 
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --font-main: 'Cairo', sans-serif;
    --section-padding: 90px 0;
    --border-radius: 12px;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--white);
    overflow-x: hidden;
}
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* فئات مساعدة مستخرجة من الـ HTML (Utility Classes) */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mt-15 { margin-top: 15px; }
.english-font { font-family: sans-serif; }
.ltr-text { direction: ltr; text-align: right; display: block; }
.text-gold { font-weight: bold; color: var(--secondary-color); }
.action-btn-container { text-align: center; margin-top: 30px; }
.btn-outline-primary { color: var(--primary-color); border-color: var(--primary-color); background: transparent; }
.btn-outline-primary:hover { background: var(--primary-color); color: var(--white); transform: translateY(-3px); }

/* أنماط مستخرجة لجافاسكربت الأخبار والتواصل */
.news-loader { grid-column: 1/-1; text-align: center; color: #1a5276; padding: 40px; }
.news-empty { grid-column: 1/-1; text-align: center; }
.news-error { grid-column: 1/-1; text-align: center; color: red; }
.news-pinned-border { border: 2px solid #d35400 !important; }
.news-pin { position: absolute; top: 10px; right: 10px; background: #d35400; color: white; padding: 5px 10px; border-radius: 5px; z-index: 10; font-size: 12px; }
.form-status-msg { margin-top: 15px; text-align: center; font-weight: bold; font-size: 0.9rem; }
.form-msg-success { color: #27ae60; background: #e9f7ef; padding: 10px; border-radius: 5px; display: block; }
.form-msg-error { color: #e74c3c; }

/* =========================================
   2. الهيدر (Header)
   ========================================= */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 15px 0; transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px); box-shadow: var(--shadow-sm);
}
header.scrolled { padding: 8px 0; box-shadow: var(--shadow-md); background-color: rgba(255, 255, 255, 0.98); }
header .container { max-width: 95%; }
.navbar { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo { display: flex; align-items: center; gap: 12px; font-weight: 900; font-size: 1.5rem; color: var(--primary-color); z-index: 1002; }
.logo img { height: 45px; width: auto; transition: transform 0.3s; }
.logo:hover img { transform: scale(1.05); }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn-nav):not(.staff-login-btn) {
    font-weight: 700; color: var(--text-dark); position: relative;
    padding: 5px 0; font-size: 1rem;
}
.nav-links a:not(.btn-nav):not(.staff-login-btn)::after {
    content: ''; position: absolute; bottom: -2px; right: 0; width: 0; height: 3px;
    background-color: var(--secondary-color); transition: var(--transition); border-radius: 2px;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-color); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.btn-nav {
    background-color: var(--primary-color); color: var(--white) !important;
    padding: 10px 24px; border-radius: 50px; font-size: 0.95rem; font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.25); border: 2px solid var(--primary-color);
}
.btn-nav:hover { background-color: transparent; color: var(--primary-color) !important; transform: translateY(-2px); }

.staff-login-btn {
    width: 42px; height: 42px; border-radius: 50%; background-color: #f1f3f5;
    color: var(--text-light) !important; display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; border: 1px solid #e9ecef;
}
.staff-login-btn:hover {
    background-color: var(--secondary-color); color: var(--white) !important;
    border-color: var(--secondary-color); transform: rotate(15deg);
}

.menu-toggle { display: none; font-size: 1.8rem; background: none; border: none; color: var(--primary-color); z-index: 1002; cursor: pointer; }

/* =========================================
   3. الهيرو (Hero) المطور
   ========================================= */
.hero {
    position: relative; height: 100vh; min-height: 650px;
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: var(--white); overflow: hidden;
}

.hero-slider, .slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.slide {
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1.5s ease-in-out, transform 8s linear; z-index: 1; transform: scale(1.05);
}
.slide.active { opacity: 1; transform: scale(1); }

.slide-1 { background-image: url('../assets/photos/hero/hero1.png'); }
.slide-2 { background-image: url('../assets/photos/hero/hero2.png'); }
.slide-3 { background-image: url('../assets/photos/hero/hero3.png'); }

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 86, 179, 0.8) 100%); z-index: 2;
}

.hero-content { position: relative; z-index: 3; max-width: 850px; padding: 0 15px; }
.hero-badge {
    display: inline-block; background: rgba(197, 160, 89, 0.2); color: var(--secondary-color);
    padding: 8px 20px; border-radius: 30px; font-weight: 800; border: 1px solid rgba(197, 160, 89, 0.5);
    margin-bottom: 25px; letter-spacing: 1px; backdrop-filter: blur(5px);
}
.hero-content h1 { font-size: 3.5rem; font-weight: 900; margin-bottom: 25px; line-height: 1.2; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.hero-content p { font-size: 1.3rem; margin-bottom: 40px; opacity: 0.95; line-height: 1.8; text-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.hero-btns { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 35px; border-radius: 50px; font-weight: 800; font-size: 1.05rem; cursor: pointer; transition: var(--transition); border: 2px solid transparent;}
.btn-primary { background-color: var(--secondary-color); color: var(--white); border-color: var(--secondary-color); box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4); }
.btn-primary:hover { background-color: transparent; color: var(--secondary-color); transform: translateY(-3px); }
.btn-outline { background-color: rgba(255,255,255,0.1); color: var(--white); border-color: rgba(255,255,255,0.5); backdrop-filter: blur(5px); }
.btn-outline:hover { background-color: var(--white); color: var(--primary-color); transform: translateY(-3px); }

.slide-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
    background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white); width: 55px; height: 55px; border-radius: 50%;
    cursor: pointer; font-size: 1.2rem; transition: var(--transition); backdrop-filter: blur(5px);
}
.slide-arrow:hover { background: var(--secondary-color); border-color: var(--secondary-color); transform: translateY(-50%) scale(1.1); }
.prev-arrow { right: 40px; }
.next-arrow { left: 40px; }
.slider-controls { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 10; }
.dot { width: 12px; height: 12px; background-color: rgba(255, 255, 255, 0.4); border-radius: 50%; cursor: pointer; transition: 0.3s; }
.dot.active { background-color: var(--secondary-color); transform: scale(1.4); width: 25px; border-radius: 10px; }

/* تأثيرات الظهور */
.animate-fade-up { animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(40px); }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* =========================================
   4. الأقسام المدمجة (نظرة عامة والجودة)
   ========================================= */
.section-padding { padding: var(--section-padding); }
.bg-light { background-color: #f8fbff; }

.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.modern-title { font-size: 2.2rem; color: var(--primary-color); font-weight: 900; margin-bottom: 10px; }
.title-line { width: 70px; height: 5px; background: var(--secondary-color); border-radius: 3px; margin-bottom: 25px; }
.overview-text .lead-text { font-size: 1.2rem; font-weight: 700; color: #333; margin-bottom: 15px; }
.overview-text p { color: var(--text-light); line-height: 1.8; margin-bottom: 25px; font-size: 1.05rem; text-align: justify; }
.learn-more-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--secondary-color); font-size: 1.1rem; }
.learn-more-link:hover { color: var(--primary-color); gap: 15px; }

.vm-cards-wrapper { display: flex; flex-direction: column; gap: 20px; }
.vm-card-modern {
    display: flex; gap: 20px; background: var(--white); padding: 30px;
    border-radius: var(--border-radius); box-shadow: var(--shadow-md);
    border-right: 4px solid var(--primary-color); transition: var(--transition);
}
.vm-card-modern:hover { transform: translateX(-10px); box-shadow: var(--shadow-lg); }
.vm-card-modern .vm-icon { font-size: 2.5rem; color: var(--primary-color); flex-shrink: 0; }
.vm-card-modern .vm-icon.highlight { color: var(--secondary-color); }
.vm-card-modern h3 { font-size: 1.4rem; margin-bottom: 10px; color: var(--text-dark); }
.vm-card-modern p { font-size: 0.95rem; color: var(--text-light); line-height: 1.6; margin: 0;}

/* قسم ركائز الجودة */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 15px; font-weight: 900; }
.underline { display: block; width: 80px; height: 5px; background-color: var(--secondary-color); margin: 0 auto; border-radius: 3px; }

.quality-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.quality-card {
    background: var(--white); padding: 40px 25px; border-radius: var(--border-radius);
    text-align: center; border: 1px solid #eef2f6; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.quality-card:hover { transform: translateY(-10px); border-color: var(--secondary-color); box-shadow: var(--shadow-md); }
.quality-card .q-icon {
    width: 80px; height: 80px; background: rgba(197, 160, 89, 0.1); color: var(--secondary-color);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 20px; transition: var(--transition);
}
.quality-card:hover .q-icon { background: var(--secondary-color); color: var(--white); }
.quality-card h4 { font-size: 1.3rem; color: var(--text-dark); margin-bottom: 15px; font-weight: 800; }

/* مجالات الاعتماد */
.fields-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 25px; }
.field-card {
    background: #fff; padding: 35px 20px; border-radius: var(--border-radius); text-align: center;
    box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid transparent;
}
.field-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: rgba(0,86,179,0.3); }
.icon-box {
    width: 70px; height: 70px; background: rgba(0, 86, 179, 0.05); color: var(--primary-color);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 20px; transition: var(--transition);
}
.field-card:hover .icon-box { background: var(--primary-color); color: #fff; transform: rotateY(180deg); }
.field-card h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 15px; color: #333; }
.iso-badge { display: inline-block; background: #f1f3f5; color: #495057; padding: 6px 15px; border-radius: 20px; font-size: 0.9rem; font-weight: 700; font-family: monospace; border: 1px solid #e9ecef; }

/* =========================================
   5. الأخبار
   ========================================= */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.news-card {
    background: var(--white); border-radius: var(--border-radius); overflow: hidden;
    box-shadow: var(--shadow-sm); transition: var(--transition); border: 1px solid #f0f0f0;
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-8px); border-color: var(--primary-color);}
.news-img-wrapper { height: 220px; overflow: hidden; position: relative;}
.news-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.news-card:hover .news-img-wrapper img { transform: scale(1.08); }
.news-content { padding: 25px; }
.news-date { display: inline-block; font-size: 0.85rem; color: var(--secondary-color); font-weight:700; margin-bottom: 12px; background: rgba(197,160,89,0.1); padding: 4px 10px; border-radius: 15px;}
.news-content h3 { font-size: 1.3rem; margin-bottom: 15px; line-height: 1.5; color: var(--text-dark); }
.news-content p { 
    color: var(--text-light); font-size: 1rem; margin-bottom: 20px; 
    display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.read-more { color: var(--primary-color); font-weight: 800; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition);}
.read-more:hover { gap: 15px; color: var(--secondary-color);}

/* =========================================
   6. قسم التواصل (المطور كلياً)
   ========================================= */
.contact-section.dark-theme { 
    background-image: url('../assets/photos/hero/hero3.png'); 
    background-size: cover; background-position: center; 
    position: relative; background-attachment: fixed;
}
.contact-bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 30, 60, 0.85); z-index: 1; backdrop-filter: blur(5px);
}
.relative-z { position: relative; z-index: 2; }
.contact-intro { color: #d0d8e0; margin-top: 15px; max-width: 650px; margin-right: auto; margin-left: auto; text-align: center; font-size: 1.1rem;}

/* تصميم البطاقة الحديثة المنقسمة */
.contact-container {
    display: flex; flex-direction: row; background: #ffffff; 
    border-radius: 24px; overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3); border: none; margin-top: 40px;
}

.contact-info { 
    flex: 1; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%); 
    padding: 60px 50px; color: white; position: relative; overflow: hidden;
}
.contact-info::before {
    content: ''; position: absolute; top: -50%; right: -50%; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%); border-radius: 50%;
}
.contact-info h3 { margin-bottom: 20px; color: var(--secondary-color); font-size: 1.8rem; font-weight: 900; position: relative; z-index: 2;}
.contact-desc { color: rgba(255,255,255,0.8); margin-bottom: 40px; font-size: 1.05rem; line-height: 1.6; position: relative; z-index: 2;}
.info-item { display: flex; align-items: flex-start; margin-bottom: 35px; position: relative; z-index: 2;}
.icon-box-small { 
    margin-left: 20px; width: 50px; height: 50px; background: rgba(255,255,255,0.1); 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    color: var(--secondary-color); font-size: 1.2rem; transition: var(--transition);
}
.info-item:hover .icon-box-small { background: var(--secondary-color); color: #fff; transform: scale(1.1); }
.info-text h4 { color: var(--white); font-size: 1.1rem; margin-bottom: 8px; font-weight: 800; }
.info-text p { color: rgba(255,255,255,0.9); font-size: 0.95rem; margin: 0; }

.contact-form-wrapper { flex: 1.5; padding: 60px 50px; background: #ffffff; }
.contact-form-wrapper h3 { margin-bottom: 35px; color: var(--primary-color); font-size: 1.8rem; font-weight: 900;}
.form-group { margin-bottom: 25px; }
.form-control {
    width: 100%; padding: 18px 20px; background: #f8f9fa;
    border: 2px solid #e9ecef; border-radius: 10px;
    color: var(--text-dark); font-family: var(--font-main); font-size: 1rem; transition: var(--transition);
}
.form-control::placeholder { color: #adb5bd; }
.form-control:focus { outline: none; background: #ffffff; border-color: var(--secondary-color); box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15); }

.submit-btn {
    width: 100%; padding: 20px; background-color: var(--primary-color);
    color: var(--white); border: none; border-radius: 10px; font-weight: 800;
    font-size: 1.15rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
    gap: 12px; transition: var(--transition); margin-top: 10px;
}
.submit-btn:hover { background-color: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 86, 179, 0.3);}
.submit-btn:disabled { background-color: #ced4da; cursor: not-allowed; transform: none; box-shadow: none; color: #6c757d;}

/* =========================================
   7. الفوتر 
   ========================================= */
footer { background-color: #0a0e14; color: #a0aab5; padding: 70px 0 20px; font-size: 0.95rem; }
.footer-content {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px;
    margin-bottom: 50px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding-bottom: 50px;
}
.footer-logo { display: flex; align-items: center; gap: 15px; color: var(--white); font-size: 1.8rem; font-weight: 900; margin-bottom: 25px; }
.footer-col h3 { color: var(--white); margin-bottom: 25px; font-size: 1.2rem; font-weight: 800; position: relative; padding-bottom: 10px;}
.footer-col h3::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 3px; background: var(--secondary-color); border-radius: 2px;}
.footer-links li { margin-bottom: 15px; }
.footer-links a:hover { color: var(--secondary-color); padding-right: 8px; }

.social-links { display: flex; gap: 15px; }
.social-icon {
    width: 45px; height: 45px; background: rgba(255, 255, 255, 0.05); color: #fff;
    display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 1.2rem; transition: var(--transition);
}
.social-icon:hover { transform: translateY(-5px); background: var(--secondary-color); }
.copyright { text-align: center; font-size: 0.95rem; color: #666;}


/* =========================================
   8. التجاوب باحترافية (Media Queries)
   ========================================= */

/* شاشات اللابتوب الصغيرة والتابلت العرضي */
@media (max-width: 1200px) {
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 300px; height: 100vh;
        background-color: var(--white); flex-direction: column; align-items: flex-start;
        padding: 90px 25px 30px; gap: 20px; box-shadow: -5px 0 20px rgba(0,0,0,0.15);
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 1000; overflow-y: auto;
    }
    .nav-links.active { right: 0; }
    .nav-links a:not(.btn-nav):not(.staff-login-btn) { width: 100%; padding: 12px 0; border-bottom: 1px solid #f1f3f5; font-size: 1.1rem;}
    .nav-links a::after { display: none; }
    .btn-nav, .btn-decisions { width: 100%; text-align: center; margin-top: 15px; }
    .staff-login-btn { width: 100%; border-radius: 8px; justify-content: flex-start; padding: 12px 20px; gap: 10px; }
    .staff-login-btn::after { content: 'دخول الموظفين'; font-family: 'Cairo'; font-size: 1rem; font-weight: bold;}
    
    .hero-content h1 { font-size: 2.8rem; }
    .overview-grid { gap: 40px;}
}

/* شاشات التابلت العمودية والموبايلات الكبيرة */
@media (max-width: 992px) {
    .overview-grid { grid-template-columns: 1fr; }
    .contact-container { flex-direction: column; }
    .contact-info { order: 2; padding: 40px 30px; } /* نجعل المعلومات تحت الفورم في الموبايل أو العكس */
    .contact-form-wrapper { order: 1; padding: 40px 30px; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* شاشات الموبايل العادية */
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-btns { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    
    .section-padding { padding: 60px 0; }
    .section-header h2 { font-size: 2rem; }
    
    .quality-grid, .fields-grid, .news-grid { grid-template-columns: 1fr; }
    
    .vm-card-modern { flex-direction: column; text-align: center; }
    .vm-card-modern .vm-icon { margin-bottom: 15px; }
    
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-col h3::after { left: 50%; transform: translateX(-50%); right: auto; }
    .social-links { justify-content: center; }
    .footer-logo { justify-content: center; }
    
    .slide-arrow { display: none; } /* إخفاء أسهم السلايدر لتوفير مساحة في الموبايل */
}

/* شاشات الموبايل الصغيرة جداً */
@media (max-width: 480px) {
    .hero-content h1 { font-size: 1.8rem; }
    .modern-title { font-size: 1.8rem; }
    .contact-form-wrapper h3 { font-size: 1.5rem; }
    .contact-info h3 { font-size: 1.5rem; }
    .info-item { flex-direction: column; align-items: center; text-align: center; }
    .icon-box-small { margin-left: 0; margin-bottom: 15px; }
}

.fa, .fas, .fa-solid, .far, .fa-regular, .fab, .fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important; font-weight: 900;
}
.fab, .fa-brands { font-weight: 400; }