:root {
    --primary-red: #ce1126;
    --primary-black: #1a1a1a;
    --primary-green: #007a3d;
    --primary-white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Cairo', sans-serif; background-color: #fff; direction: rtl; color: var(--primary-black); }
html { scroll-behavior: smooth; }

/* الهيدر */
.top-bar { background: var(--primary-black); color: #fff; padding: 8px 0; font-size: 0.85em; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.navbar { background: var(--primary-white); box-shadow: 0 2px 15px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 55px; }
.logo h1 { font-size: 1.1rem; font-weight: 700; color: var(--primary-black); }
.nav-links { display: flex; list-style: none; gap: 20px; }
.nav-links li a { text-decoration: none; color: var(--dark-gray); font-weight: 600; font-size: 0.95rem; transition: 0.3s; padding: 8px 12px; border-radius: 4px; }
.nav-links li a:hover, .nav-links li a.active { color: var(--primary-red); background: rgba(206,17,38,0.05); }
.menu-toggle { display: none; font-size: 24px; cursor: pointer; color: var(--primary-black); }

/* Modern Hero */
.modern-hero { position: relative; width: 100%; height: 85vh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
#heroSliderContainer { position: absolute; top:0; left:0; width:100%; height:100%; z-index: 1; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease-in-out; }
.hero-bg.active { opacity: 1; animation: kenBurns 20s infinite alternate; }
@keyframes kenBurns { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, rgba(0,0,0,0.6) 0%, rgba(206,17,38,0.2) 100%); z-index: 2; }
.hero-content { position: relative; z-index: 3; width: 90%; max-width: 800px; text-align: center; }
.glass-box { background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.3); padding: 50px; border-radius: 20px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); color: white; }
.badge { background: var(--primary-green); color: white; padding: 5px 15px; border-radius: 50px; font-size: 0.85rem; margin-bottom: 15px; display: inline-block; }
.glass-box h1 { font-size: 2.8rem; margin-bottom: 20px; font-weight: 800; }
.glass-box p { font-size: 1.1rem; line-height: 1.6; margin-bottom: 30px; color: #f0f0f0; }
.hero-btns { display: flex; justify-content: center; gap: 15px; }
.btn-primary { background: var(--primary-red); color: white; padding: 12px 35px; border-radius: 50px; text-decoration: none; font-weight: bold; transition: 0.3s; border: 2px solid var(--primary-red); }
.btn-primary:hover { background: #a50e1e; border-color: #a50e1e; }
.btn-secondary { background: transparent; border: 2px solid white; color: white; padding: 12px 35px; border-radius: 50px; text-decoration: none; font-weight: bold; transition: 0.3s; }
.btn-secondary:hover { background: white; color: var(--primary-black); }

/* أقسام عامة */
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--light-gray); }
.section-title { text-align: center; margin-bottom: 50px; color: var(--primary-black); position: relative; font-size: 2rem; }
.section-title::after { content: ''; display: block; width: 80px; height: 4px; background: var(--primary-red); margin: 15px auto 0; border-radius: 2px; }

/* قسم النبذة */
.about-container { display: flex; align-items: center; gap: 50px; }
.about-text { flex: 1; }
.about-text p { font-size: 1.1rem; line-height: 1.8; color: #555; margin-bottom: 20px; }
.check-list { list-style: none; }
.check-list li { margin-bottom: 10px; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.check-list li i { color: var(--primary-green); }
.about-image { flex: 1; }
.about-image img { width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }

/* الإنجازات */
.stats-section { background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80'); background-size: cover; background-attachment: fixed; color: white; padding: 60px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); text-align: center; gap: 30px; }
.stat-item i { font-size: 3rem; color: var(--primary-red); margin-bottom: 15px; }
.stat-item h3 { font-size: 2.5rem; font-weight: 700; margin-bottom: 5px; }
.stat-item p { font-size: 1.1rem; opacity: 0.9; }

/* الخدمات */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card { background: white; padding: 30px; border-radius: 10px; text-align: center; box-shadow: 0 5px 20px rgba(0,0,0,0.05); transition: 0.3s; border-bottom: 4px solid transparent; }
.service-card:hover { transform: translateY(-10px); border-bottom-color: var(--primary-red); }
.icon-box { width: 70px; height: 70px; background: #fdf2f3; color: var(--primary-red); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 20px; }
.service-card h3 { margin-bottom: 15px; font-size: 1.3rem; }
.service-card p { color: #666; line-height: 1.6; }

/* الأقسام */
.depts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.dept-item { background: white; padding: 20px; text-align: center; border: 1px solid #eee; border-radius: 8px; font-weight: 600; color: var(--primary-black); transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.dept-item:hover { background: var(--primary-green); color: white; border-color: var(--primary-green); }

/* الهيكلية */
.org-chart { text-align: center; max-width: 800px; margin: 0 auto; }
.org-box { background: white; border: 2px solid var(--primary-black); padding: 15px 30px; display: inline-block; border-radius: 8px; font-weight: bold; position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.level-1 { background: var(--primary-red); color: white; border: none; font-size: 1.2rem; }
.org-lines { height: 30px; width: 2px; background: #ccc; margin: 0 auto; }
.org-row { display: flex; justify-content: space-around; position: relative; margin-top: 0; }
.org-row::before { content: ''; position: absolute; top: -30px; left: 25%; right: 25%; height: 30px; border: 2px solid #ccc; border-bottom: none; }
.level-2 { width: 180px; }
.org-lines-2 { height: 30px; width: 2px; background: #ccc; margin: 0 auto; }
.org-row-bottom { display: flex; justify-content: center; gap: 20px; border-top: 2px solid #ccc; padding-top: 20px; }
.org-small { background: #eee; padding: 10px 20px; border-radius: 50px; font-size: 0.9rem; }

/* الأخبار */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.news-card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); transition: transform 0.3s; }
.news-card:hover { transform: translateY(-5px); }
.news-img { width: 100%; height: 220px; object-fit: cover; }
.news-content { padding: 25px; }
.news-content h3 { color: var(--primary-red); margin-bottom: 12px; font-size: 1.2rem; line-height: 1.4; }
.news-content p { color: #666; font-size: 0.95rem; line-height: 1.7; }

/* الفوتر */
footer { background: #111; color: white; padding-top: 70px; border-top: 5px solid var(--primary-red); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 50px; }
.footer-section h3 { font-size: 1.3rem; margin-bottom: 25px; color: var(--primary-white); border-right: 3px solid var(--primary-red); padding-right: 15px; }
.footer-section p { color: #bbb; line-height: 1.8; margin-bottom: 15px; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 12px; }
.footer-section ul li a { color: #bbb; text-decoration: none; transition: 0.3s; }
.footer-section ul li a:hover { color: var(--primary-red); padding-right: 5px; }
.contact-info p { display: flex; align-items: center; gap: 10px; }
.social-icons { display: flex; gap: 15px; margin-top: 20px; }
.social-icons a { width: 40px; height: 40px; background: #333; color: white; display: flex; align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; transition: 0.3s; }
.social-icons a:hover { background: var(--primary-red); transform: rotate(360deg); }
.copyright { background: black; text-align: center; padding: 20px 0; color: #777; font-size: 0.9rem; border-top: 1px solid #222; }

@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-toggle { display: block; }
    .about-container { flex-direction: column; }
    .org-row { flex-direction: column; gap: 20px; align-items: center; }
    .org-row::before { display: none; }
}