:root {
    --primary-color: #d4a820;
    --secondary-color: #1a4fbe;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --bg-gradient: linear-gradient(-45deg, #061c48, #0a2460, #071530, #0d2b5e);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #050d2e;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* خلفية متحركة */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: -2;
}

/* Particles Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* تصميم الزجاج الأساسي */
.glass-panel, .glass-card, .glass-footer, .navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-panel {
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    color: white;
}

/* القائمة العلوية */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0 0 16px 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

.logo-txt {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-links a:hover, .nav-links a.active {
    background: rgba(255, 255, 255, 0.2);
    color: var(--primary-color);
}

/* القائمة المنسدلة */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(15, 32, 39, 0.95);
    min-width: 200px;
    border-radius: 10px;
    top: 100%;
    right: 0;
    padding: 10px 0;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.3s;
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
}

/* الأقسام والمحتوى */
.tab-content {
    display: none;
    padding: 20px 0;
    animation: slideUp 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* البطاقات */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.glass-card {
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s;
    cursor: pointer;
}

.glass-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.glass-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* الأزرار */
.btn-primary, .btn-outline, .btn-highlight {
    padding: 10px 25px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-highlight {
    background: #ff0055;
    color: white;
}

/* الفوتر */
.glass-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    border-radius: 16px 16px 0 0;
}

/* النماذج */
input, select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
}

.dept-box {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 10px;
    border-right: 4px solid var(--primary-color);
    margin-bottom: 1rem;
}

/* --- وضع الإضاءة (Light Mode) --- */
body.light-mode {
    background-color: #f4f7f6;
    color: #333;
}

body.light-mode .animated-bg {
    background: linear-gradient(-45deg, #ffffff, #e3e3e3, #b8c6db, #f5f7fa);
    background-size: 400% 400%;
}

body.light-mode .glass-panel, 
body.light-mode .glass-card, 
body.light-mode .glass-footer, 
body.light-mode .navbar,
body.light-mode .dropdown-content {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

body.light-mode .nav-links a {
    color: #333;
}

body.light-mode .nav-links a:hover, 
body.light-mode .nav-links a.active {
    background: rgba(0, 0, 0, 0.05);
    color: var(--secondary-color);
}

body.light-mode input, 
body.light-mode select {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

/* --- قسم الإحصائيات (Stats Section) --- */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 4rem;
    padding: 2rem;
    background: var(--glass-bg);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.stat-item {
    text-align: center;
}

.stat-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.stat-item .counter-number {
    font-size: 2.8rem;
    font-weight: bold;
    display: block;
    margin: 0.5rem 0;
}

.stat-item h4 {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

body.light-mode .stat-item h4 { color: #555; }


/* --- تأثيرات التمرير (Scroll Animations) --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تأخير ظهور العناصر المتجاورة (Staggering) */
.features-grid .glass-card:nth-child(2),
.dept-details .dept-box:nth-child(2) {
    transition-delay: 0.2s;
}

.features-grid .glass-card:nth-child(3) {
    transition-delay: 0.4s;
}

/* --- زر العودة للأعلى --- */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollTopBtn:hover {
    background: white;
    transform: translateY(-5px);
}

/* --- شريط الأخبار (News Ticker) --- */
.news-ticker {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    font-size: 0.9rem;
    position: relative;
    z-index: 1001;
}

.ticker-label {
    background: var(--primary-color);
    color: #000;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    z-index: 2;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: tickerMove 35s linear infinite;
}

.ticker-content span {
    margin-left: 50px;
    display: inline-block;
}

@keyframes tickerMove {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100vw); }
}

/* إيقاف الحركة عند تمرير الماوس */
.news-ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* تنسيق شريط الأخبار في الوضع المضيء */
body.light-mode .news-ticker {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    color: #333;
}

/* --- صفحة اتصل بنا --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.map-box {
    min-height: 350px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    overflow: hidden;
}

textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    resize: vertical;
    font-family: inherit;
}

body.light-mode textarea {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* --- أيقونات التواصل الاجتماعي --- */
.social-icons {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icons a {
    color: white;
    border: 2px solid var(--glass-border);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: #000;
    transform: translateY(-5px);
}

body.light-mode .social-icons a {
    color: #333;
    border-color: rgba(0,0,0,0.15);
}

/* --- قائمة الهامبرغر (Mobile Nav) --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

body.light-mode .hamburger span {
    background: #333;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: rgba(15, 32, 39, 0.97);
        backdrop-filter: blur(16px);
        padding: 1rem;
        border-top: 1px solid var(--glass-border);
        gap: 5px;
        z-index: 999;
    }

    body.light-mode .nav-links {
        background: rgba(255, 255, 255, 0.97);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 10px 15px;
    }

    .dropdown-content {
        position: static;
        background: rgba(0,0,0,0.2);
        border-radius: 8px;
        min-width: unset;
    }

    .navbar {
        position: relative;
    }

    .nav-wrapper {
        position: relative;
        flex-wrap: wrap;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- تنسيقات صفحات المحتوى --- */
.content-section-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.vision-card {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s;
}

.vision-card:hover {
    transform: translateY(-5px);
}

.vision-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.vision-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

body.light-mode .vision-card {
    background: rgba(58, 123, 213, 0.05);
    border-color: rgba(58, 123, 213, 0.2);
}

.strategy-timeline {
    position: relative;
    padding-right: 2rem;
    margin-top: 1.5rem;
}

.strategy-timeline::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -2.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 3px solid #050d2e;
}

body.light-mode .timeline-item::before {
    border-color: #f4f7f6;
}

.timeline-item h4 {
    color: var(--primary-color);
    margin-bottom: 0.4rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.guide-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: 0.3s;
}

.guide-card:hover {
    background: rgba(0, 210, 255, 0.1);
}

.guide-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.library-search {
    display: flex;
    gap: 10px;
    margin: 1.5rem 0;
}

.library-search input {
    flex: 1;
    margin: 0;
}

.library-search button {
    padding: 12px 25px;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.book-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    transition: 0.3s;
}

.book-card:hover {
    background: rgba(0, 210, 255, 0.08);
    transform: translateY(-3px);
}

.book-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.book-card h5 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.book-card small {
    opacity: 0.7;
    font-size: 0.8rem;
}

/* --- تحسينات نموذج النتائج --- */
.result-card-full {
    margin-top: 20px;
    padding: 25px;
    border: 1px solid var(--primary-color);
    border-radius: 15px;
    background: rgba(0, 210, 255, 0.05);
    animation: fadeInUp 0.5s;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.result-table th, .result-table td {
    padding: 10px 15px;
    border: 1px solid var(--glass-border);
    text-align: right;
}

.result-table th {
    background: rgba(0, 210, 255, 0.1);
    color: var(--primary-color);
}

.result-table tr:hover td {
    background: rgba(255,255,255,0.05);
}

.result-status-pass { color: #00ff88; font-weight: bold; }
.result-status-fail { color: #ff5c5c; font-weight: bold; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- تحسين نموذج التسجيل --- */
.register-steps {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    justify-content: center;
}

.step-badge {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    transition: 0.3s;
}

.step-badge.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

/* --- تنسيقات التحقق من صحة النماذج --- */
.error-message {
    color: #ffaeae;
    font-size: 0.85rem;
    display: block;
    height: 1rem;
    margin-top: -5px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

input.invalid, textarea.invalid {
    border-color: #ff5c5c !important;
}

body.light-mode .error-message { color: #d93030; }

/* ===================================================
   التحسينات الجديدة — Preloader, Toast, Particles...
   =================================================== */

/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    background: #0a0e2a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}
#preloader.hidden {
    opacity: 0;
    pointer-events: none;
}
.preloader-inner {
    text-align: center;
}
.preloader-logo {
    width: 90px;
    animation: pulseLogo 1.5s ease-in-out infinite;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(0, 210, 255, 0.5));
}
@keyframes pulseLogo {
    0%, 100% { transform: scale(1);   opacity: 1;   }
    50%       { transform: scale(1.08); opacity: 0.85; }
}
.preloader-bar {
    width: 220px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 1rem;
}
.preloader-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.15s ease;
}
.preloader-text {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* --- Toast Notifications --- */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    backdrop-filter: blur(16px);
    color: white;
    font-size: 0.95rem;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.15);
    transform: translateX(-120%);
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.toast.show { transform: translateX(0); }
.toast-success { background: rgba(0, 200, 100, 0.25); border-color: rgba(0,200,100,0.4); }
.toast-error   { background: rgba(255, 80, 80, 0.25); border-color: rgba(255,80,80,0.4); }
.toast-info    { background: rgba(0, 180, 255, 0.25); border-color: rgba(0,180,255,0.4); }
.toast-warning { background: rgba(255, 190, 0, 0.25); border-color: rgba(255,190,0,0.4); }
.toast i:first-child { font-size: 1.2rem; flex-shrink: 0; }
.toast span { flex: 1; }
.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.2s;
}
.toast-close:hover { color: white; }

/* --- شريط تقدم التمرير --- */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #ff0055);
    z-index: 2000;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px var(--primary-color);
}

/* --- تأثير الكتابة في Hero --- */
.hero-subtitle {
    min-height: 2rem;
    font-size: 1.15rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
}
.typing-cursor {
    color: var(--primary-color);
    animation: blink 1s step-end infinite;
    font-weight: 100;
    font-size: 1.3rem;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* --- معاينة الأخبار في الرئيسية --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2.5rem 0 1rem;
}
.section-header h2 { font-size: 1.5rem; }
.see-all-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}
.see-all-link:hover { opacity: 0.7; }
.news-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.news-mini-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}
.news-mini-card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.15);
}
.news-mini-card .news-date {
    font-size: 0.8rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}
.news-mini-card h4 { font-size: 0.95rem; line-height: 1.5; }

/* --- صفحة الأخبار --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.news-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(10px);
}
.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.news-card-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(255,255,255,0.9);
}
.news-card-body { padding: 1.5rem; }
.news-card-body h3 { font-size: 1.1rem; margin: 0.6rem 0; line-height: 1.5; }
.news-card-body p  { font-size: 0.9rem; opacity: 0.75; line-height: 1.7; margin-bottom: 1rem; }
.news-category {
    font-size: 0.75rem;
    background: rgba(212,168,32,0.15);
    color: var(--primary-color);
    border: 1px solid rgba(212,168,32,0.3);
    border-radius: 20px;
    padding: 2px 10px;
    margin-left: 8px;
}
.news-date { font-size: 0.8rem; opacity: 0.6; }
.news-read-more {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 7px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
}
.news-read-more:hover {
    background: var(--primary-color);
    color: #000;
}
body.light-mode .news-card { background: rgba(255,255,255,0.8); color: #333; }
body.light-mode .news-mini-card { background: rgba(255,255,255,0.8); color: #333; }

/* --- معرض الصور --- */
.gallery-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1rem 0 1.5rem;
}
.filter-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}
body.light-mode .filter-btn { color: #333; }
body.light-mode .filter-btn.active { color: #000; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 768px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    transition: transform 0.3s;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { color: white; font-size: 0.95rem; font-weight: 600; }

/* --- Lightbox --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(8px);
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-content {
    max-width: 85vw;
    text-align: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    display: block;
    margin: 0 auto;
}
#lightbox-caption {
    color: rgba(255,255,255,0.8);
    margin-top: 1rem;
    font-size: 1rem;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: fixed;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s;
    backdrop-filter: blur(8px);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 20px; left: 20px; }
.lightbox-prev  { top: 50%; transform: translateY(-50%); right: 20px; }
.lightbox-next  { top: 50%; transform: translateY(-50%); left: 20px; }

/* --- هيئة التدريس --- */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.staff-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
}
.staff-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
}
.staff-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.staff-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.staff-title { font-size: 0.85rem; opacity: 0.7; margin-bottom: 0.5rem; }
.staff-dept { font-size: 0.85rem; color: var(--primary-color); margin-bottom: 1rem; }
.staff-social { display: flex; justify-content: center; gap: 10px; }
.staff-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.9rem;
}
.staff-social a:hover { background: var(--primary-color); color: #000; border-color: var(--primary-color); }
body.light-mode .staff-card { background: rgba(255,255,255,0.85); color: #333; }
body.light-mode .staff-social a { color: #333; }

/* --- الأسئلة الشائعة --- */
.faq-list { margin-top: 1rem; }
.faq-item {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.3s;
}
.faq-item.open { border-color: var(--primary-color); }
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    background: rgba(255,255,255,0.03);
    transition: background 0.3s;
    user-select: none;
}
.faq-question:hover { background: rgba(255,255,255,0.08); }
.faq-item.open .faq-question { background: rgba(212,168,32,0.08); }
.faq-question span { font-weight: 600; font-size: 1rem; }
.faq-question i { transition: transform 0.35s ease; flex-shrink: 0; color: var(--primary-color); }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s;
    padding: 0 1.5rem;
}
.faq-item.open .faq-answer { padding: 1rem 1.5rem; }
.faq-answer p { line-height: 1.8; opacity: 0.85; }
body.light-mode .faq-question { color: #333; }
body.light-mode .faq-answer p  { color: #555; }

/* --- Footer المحسّن --- */
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    gap: 2rem;
    padding: 2.5rem 2rem;
    text-align: right;
}
@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}
.footer-logo img { height: 40px; }
.footer-logo span { font-weight: bold; font-size: 1rem; }
.footer-about { font-size: 0.88rem; opacity: 0.7; line-height: 1.7; margin-bottom: 1rem; }
.footer-col h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-links a:hover { color: var(--primary-color); }
.footer-links a i { width: 16px; }
.footer-contact-info p {
    font-size: 0.88rem;
    opacity: 0.75;
    margin-bottom: 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.footer-contact-info i { color: var(--primary-color); margin-top: 3px; flex-shrink: 0; }
.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    font-size: 0.85rem;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}
body.light-mode .footer-links a { color: #555; }
body.light-mode .footer-contact-info p { color: #555; }
body.light-mode .footer-about { color: #555; }

/* --- عنوان الصفحة الحديث --- */
.title-modern {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--primary-color), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
body.light-mode .title-modern {
    background: linear-gradient(90deg, var(--secondary-color), #333);
    -webkit-background-clip: text;
    background-clip: text;
}

/* --- Hero أزرار أفضل --- */
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 1.5rem; }
.hero { text-align: center; padding: 4rem 0 2rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }

/* --- Dept box أفضل --- */
.dept-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}
.dept-box {
    position: relative;
    padding-top: 3.2rem;
}
.dept-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.dept-badge .divider { opacity: 0.5; margin: 0 2px; }
.dept-badge-both {
    background: linear-gradient(135deg, rgba(212,168,32,0.25), rgba(26,79,190,0.25));
    border: 1px solid rgba(212,168,32,0.4);
    color: #00d2ff;
}
.dept-badge-morning {
    background: rgba(255,165,0,0.15);
    border: 1px solid rgba(255,165,0,0.4);
    color: #ffb347;
}
.dept-info-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.dept-info-row span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    background: rgba(212,168,32,0.08);
    border: 1px solid rgba(212,168,32,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    color: var(--primary-color);
}

/* 5-card features grid */
.features-grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
@media (min-width: 900px) {
    .features-grid-5 { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 900px) and (min-width: 600px) {
    .features-grid-5 { grid-template-columns: repeat(3, 1fr); }
}

/* Light mode dept badge */
body.light-mode .dept-badge-both { color: #0077aa; border-color: rgba(0,119,170,0.4); }
body.light-mode .dept-badge-morning { color: #cc6600; border-color: rgba(204,102,0,0.4); }
body.light-mode .dept-info-row span { color: #0077aa; }

/* --- تعديلات Light Mode للعناصر الجديدة --- */
body.light-mode .news-category {
    background: rgba(26,79,190,0.1);
    color: var(--secondary-color);
    border-color: rgba(26,79,190,0.3);
}
body.light-mode .news-read-more {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}
body.light-mode .news-read-more:hover {
    background: var(--secondary-color);
    color: white;
}
body.light-mode .filter-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.15); }
body.light-mode .faq-item { border-color: rgba(0,0,0,0.1); }
body.light-mode .faq-question:hover { background: rgba(0,0,0,0.04); }
body.light-mode .faq-item.open .faq-question { background: rgba(26,79,190,0.06); }

/* ═══════════════════════════════════════════
   الأقسام الجديدة — امتثال وزارة التعليم العالي
   ═══════════════════════════════════════════ */

/* كلمة العميد */
.dean-panel { display:flex; gap:2rem; flex-wrap:wrap; align-items:flex-start; }
.dean-photo-wrap { flex:0 0 160px; text-align:center; }
.dean-avatar {
    width:140px; height:140px; border-radius:50%;
    background:linear-gradient(135deg,var(--primary-color),var(--secondary-color));
    display:flex; align-items:center; justify-content:center;
    margin:0 auto 1rem;
    border:3px solid rgba(212,168,32,.4);
    font-size:3.5rem; color:#fff;
}
.dean-name { color:var(--primary-color); font-size:1rem; margin-bottom:.3rem; }
.dean-title { font-size:.85rem; opacity:.7; }
.dean-msg-body { flex:1; min-width:260px; }
.dean-msg-body p { line-height:2; opacity:.88; margin-top:1rem; }

/* تأريخ الكلية */
.history-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:1rem; }
.history-card {
    background:rgba(212,168,32,.08); border:1px solid rgba(212,168,32,.2);
    border-radius:12px; padding:1.2rem; text-align:center;
    transition:transform .2s, box-shadow .2s;
}
.history-card:hover { transform:translateY(-4px); box-shadow:0 8px 20px rgba(212,168,32,.15); }
.history-card i { font-size:2rem; color:var(--primary-color); display:block; margin-bottom:.5rem; }
.history-val { font-size:1.3rem; font-weight:700; color:var(--primary-color); margin-top:.3rem; }

/* مجلس الكلية */
.council-table { width:100%; border-collapse:collapse; }
.council-table thead tr { background:rgba(212,168,32,.12); }
.council-table th { padding:.75rem 1rem; text-align:right; color:var(--primary-color); font-weight:600; }
.council-table td { padding:.7rem 1rem; border-bottom:1px solid rgba(255,255,255,.07); }
.council-table tbody tr:hover { background:rgba(212,168,32,.05); }

/* الهيكل التنظيمي */
.org-tree { display:flex; flex-direction:column; align-items:center; padding:1rem 0; }
.org-level { display:flex; justify-content:center; }
.org-row { gap:1.5rem; flex-wrap:wrap; }
.org-branch { display:flex; flex-direction:column; align-items:center; }
.org-box {
    border-radius:10px; padding:.65rem 1.4rem; text-align:center;
    font-weight:600; font-size:.9rem; min-width:140px;
    transition:transform .2s;
}
.org-box:hover { transform:scale(1.04); }
.org-top    { background:linear-gradient(135deg,var(--primary-color),var(--secondary-color)); color:#fff; min-width:200px; }
.org-dean   { background:rgba(212,168,32,.25); border:2px solid var(--primary-color); color:var(--primary-color); min-width:180px; }
.org-deputy { background:rgba(26,79,190,.2); border:1px solid var(--secondary-color); color:#a0b8ff; }
.org-dept   { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.2); color:#ccc; min-width:130px; font-size:.82rem; padding:.5rem .8rem; }
.org-dept i { display:block; font-size:1.4rem; margin-bottom:.3rem; color:var(--primary-color); }
.org-connector-v { width:2px; height:28px; background:rgba(212,168,32,.4); margin:.2rem 0; }
.org-depts-row { gap:1rem; }

/* ضمان الجودة */
.quality-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1.2rem; }
.quality-card {
    background:rgba(255,255,255,.04); border:1px solid rgba(212,168,32,.15);
    border-radius:12px; padding:1.4rem; transition:transform .2s, border-color .2s;
}
.quality-card:hover { transform:translateY(-4px); border-color:rgba(212,168,32,.4); }
.quality-card i { font-size:2rem; color:var(--primary-color); display:block; margin-bottom:.8rem; }
.quality-card h4 { margin-bottom:.5rem; color:#fff; }
.quality-card p { opacity:.75; font-size:.9rem; line-height:1.7; }

/* البحث العلمي */
.research-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:1.2rem; }
.research-card {
    background:rgba(255,255,255,.04); border:1px solid rgba(212,168,32,.15);
    border-radius:12px; padding:1.4rem; display:flex; flex-direction:column;
    transition:transform .2s, border-color .2s;
}
.research-card:hover { transform:translateY(-4px); border-color:rgba(212,168,32,.4); }
.research-card i { font-size:2rem; color:var(--primary-color); margin-bottom:.8rem; }
.research-card h4 { margin-bottom:.5rem; }
.research-card p { opacity:.75; font-size:.9rem; line-height:1.7; flex:1; }
.research-link { display:inline-block; margin-top:1rem; color:var(--primary-color); font-size:.88rem; text-decoration:none; font-weight:600; }
.research-link:hover { text-decoration:underline; }
.ext-research-btn {
    padding:.4rem 1rem; border-radius:20px; font-size:.85rem; text-decoration:none;
    background:rgba(212,168,32,.1); border:1px solid rgba(212,168,32,.3); color:var(--primary-color);
    transition:background .2s;
}
.ext-research-btn:hover { background:rgba(212,168,32,.25); }

/* دليل القبول */
.admission-req-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:.8rem; }
.adm-req-item {
    display:flex; align-items:flex-start; gap:.75rem;
    background:rgba(212,168,32,.06); border:1px solid rgba(212,168,32,.15);
    border-radius:10px; padding:.9rem 1rem;
}
.adm-req-item i { color:var(--primary-color); font-size:1.1rem; margin-top:.15rem; flex-shrink:0; }
.adm-steps { display:flex; flex-direction:column; gap:.9rem; }
.adm-step {
    display:flex; align-items:flex-start; gap:1rem;
    background:rgba(255,255,255,.04); border-radius:10px; padding:1rem 1.2rem;
    border-right:3px solid var(--primary-color);
}
[dir="ltr"] .adm-step { border-right:none; border-left:3px solid var(--primary-color); }
.step-num {
    width:36px; height:36px; border-radius:50%; flex-shrink:0;
    background:linear-gradient(135deg,var(--primary-color),var(--secondary-color));
    color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center;
}
.adm-step h4 { margin-bottom:.25rem; color:var(--primary-color); }
.adm-step p { opacity:.8; font-size:.9rem; }

/* التقويم الأكاديمي */
.calendar-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:1.5rem; }
.cal-semester h3 { }
.cal-sem-title { margin-bottom:1rem; color:var(--primary-color); display:flex; align-items:center; gap:.5rem; }
.cal-table { width:100%; border-collapse:collapse; font-size:.9rem; }
.cal-table thead tr { background:rgba(212,168,32,.12); }
.cal-table th { padding:.6rem .9rem; text-align:right; color:var(--primary-color); }
.cal-table td { padding:.55rem .9rem; border-bottom:1px solid rgba(255,255,255,.06); }
.cal-table tr:hover td { background:rgba(212,168,32,.04); }
.cal-important td { color:var(--primary-color); font-weight:600; }
.cal-holiday td { color:#f7971e; opacity:.9; }

/* روابط وزارية */
.mohe-links-bar {
    display:flex; flex-wrap:wrap; gap:.75rem; justify-content:center;
    padding:1rem 0; border-top:1px solid rgba(212,168,32,.2); margin-top:1.5rem;
}

/* وسائل التواصل الاجتماعي في الفوتر */
.footer-social { display:flex; gap:.75rem; margin-top:1rem; flex-wrap:wrap; }
.social-btn {
    width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center;
    text-decoration:none; font-size:1rem; transition:transform .2s, box-shadow .2s;
    background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.15); color:#fff;
}
.social-btn:hover { transform:translateY(-3px); box-shadow:0 6px 16px rgba(212,168,32,.3); background:rgba(212,168,32,.2); }
.social-btn.fb  { } .social-btn.yt  { } .social-btn.tw  { } .social-btn.li  { } .social-btn.tg  { }

/* روابط رسمية في الفوتر */
.footer-bottom-links { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.footer-bottom-links a { color:rgba(255,255,255,.55); font-size:.8rem; text-decoration:none; transition:color .2s; }
.footer-bottom-links a:hover { color:#d4a820; }
.footer-bottom-links span { color:rgba(255,255,255,.25); font-size:.75rem; }

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .staff-grid { grid-template-columns: repeat(2, 1fr); }
    .title-modern { font-size: 1.5rem; }
    .dean-panel { flex-direction:column; align-items:center; }
    .org-row { gap:.6rem; }
    .org-box { min-width:100px; font-size:.8rem; padding:.5rem .7rem; }
    .calendar-grid { grid-template-columns:1fr; }
}
@media (max-width: 480px) {
    .staff-grid { grid-template-columns: 1fr; }
    #toast-container { left: 15px; right: 15px; bottom: 15px; }
    .toast { min-width: unset; width: 100%; }
}