﻿/* ===== General ===== */
body { font-family: 'Segoe UI', Tahoma, Arial, sans-serif; background: #f5f5f5; color: #333; }
a { color: #1a6496; }
a:hover { color: #0d3c5e; text-decoration: none; }
.mr-20 { margin-right: 20px; }

/* ===== Top Bar ===== */
.top-bar { background: #1a6496; color: #fff; padding: 8px 0; font-size: 13px; position:relative; z-index:1000; overflow:visible; }
.top-bar span { margin-left: 15px; }
.top-bar i { margin-left: 5px; }
.social-icon { color: #fff; margin-left: 10px; font-size: 16px; }
.social-icon:hover { color: #f0c040; }

/* ===== Header ===== */
.site-header { background: #fff; padding: 15px 0; border-bottom: 3px solid #1a6496; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.school-logo { max-height: 90px; max-width: 120px; }
.school-title-wrap { padding-top: 10px; }
.school-name { color: #1a6496; font-size: 28px; font-weight: bold; margin: 0; }
.school-name-en { color: #888; font-size: 16px; margin: 5px 0 0; }

/* ===== Navigation ===== */
.site-nav { background: #1a6496; border: none; border-radius: 0; margin-bottom: 0; }
.site-nav .navbar-nav > li > a { color: #fff !important; font-size: 15px; padding: 15px 18px; }
.site-nav .navbar-nav > li > a:hover,
.site-nav .navbar-nav > li.active > a { background: #0d3c5e !important; color: #f0c040 !important; }
.site-nav .dropdown-menu { background: #0d3c5e; border: none; }
.site-nav .dropdown-menu > li > a { color: #fff !important; }
.site-nav .dropdown-menu > li > a:hover { background: #1a6496 !important; }

/* ===== Slider ===== */
#mainSlider { margin-bottom: 0; }
#mainSlider .item { width: 100%; height: 480px; overflow: hidden; }
#mainSlider .item img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
#mainSlider .carousel-caption { background: rgba(0,0,0,0.5); border-radius: 5px; padding: 15px; bottom: 40px; }
#mainSlider .carousel-caption h2 { color: #fff; font-size: 26px; }
#mainSlider .carousel-control { width: 5%; opacity: 0.7; }
#mainSlider .carousel-control:hover { opacity: 1; }

/* ===== Announcements Bar ===== */
.announcements-bar { background: #f0c040; padding: 10px 0; }
.ticker-label { background: #1a6496; color: #fff; text-align: center; padding: 5px 10px; border-radius: 3px; font-weight: bold; }
.ticker-wrap { overflow: hidden; }
.ticker { white-space: nowrap; animation: ticker 30s linear infinite; }
.ticker-item { margin-left: 60px; font-weight: bold; color: #333; }
@keyframes ticker { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* ===== Main Content ===== */
.main-content { padding: 30px 0; }
.section-title { border-bottom: 2px solid #1a6496; padding-bottom: 10px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.section-title h2 { color: #1a6496; font-size: 22px; margin: 0; }
.section-title h2 i { margin-left: 8px; }
.view-all { font-size: 13px; color: #1a6496; }

/* ===== News ===== */
.news-featured { background: #fff; border-radius: 5px; padding: 15px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.news-featured h3 a { color: #1a6496; font-size: 18px; }
.news-date { color: #888; font-size: 12px; margin: 5px 0; }
.news-img { border-radius: 5px; width: 100%; height: 160px; object-fit: contain; background: #f5f5f5; }
.news-card { background: #fff; border-radius: 5px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); overflow: hidden; }
.news-card img { width: 100%; height: 140px; object-fit: contain; background: #f5f5f5; }
.news-card-body { padding: 10px; }
.news-card-body h4 a { color: #333; font-size: 14px; }
.news-card-body h4 a:hover { color: #1a6496; }

/* ===== Sidebar ===== */
.sidebar-widget { background: #fff; border-radius: 5px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); overflow: hidden; }
.widget-title { background: #1a6496; color: #fff; padding: 10px 15px; }
.widget-title h3 { margin: 0; font-size: 16px; }
.widget-title h3 i { margin-left: 8px; }
.announcement-item { padding: 12px 15px; border-bottom: 1px solid #eee; }
.announcement-item.urgent { border-right: 4px solid #d9534f; }
.announcement-item h5 { margin: 5px 0; font-size: 14px; font-weight: bold; }
.announcement-item p { font-size: 13px; color: #555; margin: 5px 0; }
.announcement-item small { color: #888; }
.quick-links { list-style: none; padding: 10px 15px; margin: 0; }
.quick-links li { padding: 8px 0; border-bottom: 1px solid #eee; }
.quick-links li a { color: #333; font-size: 14px; }
.quick-links li a i { margin-left: 8px; color: #1a6496; }
.quick-links li a:hover { color: #1a6496; }

/* ===== Page Wrapper ===== */
.page-wrapper { min-height: 400px; }

/* ===== Page Header ===== */
.page-header-banner { background: linear-gradient(135deg, #1a6496, #0d3c5e); color: #fff; padding: 30px 0; margin-bottom: 30px; }
.page-header-banner h1 { margin: 0; font-size: 28px; }
.breadcrumb { background: transparent; padding: 5px 0; margin: 5px 0 0; }
.breadcrumb > li + li:before { color: #ccc; }
.breadcrumb a { color: #f0c040; }
.breadcrumb .active { color: #fff; }

/* ===== Footer ===== */
.site-footer { background: #1a3a5c; color: #ccc; padding: 40px 0 20px; margin-top: 40px; }
.site-footer h4 { color: #fff; border-bottom: 1px solid #2a5a8c; padding-bottom: 10px; margin-bottom: 15px; }
.site-footer p { font-size: 13px; line-height: 1.8; }
.site-footer p i { margin-left: 8px; color: #f0c040; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { padding: 5px 0; border-bottom: 1px solid #2a5a8c; }
.footer-links li a { color: #ccc; font-size: 13px; }
.footer-links li a:hover { color: #f0c040; }
.copyright { color: #aaa; font-size: 13px; }
.site-footer hr { border-color: #2a5a8c; }

/* إحصاء الزوار */
.visitor-stats { display:flex; flex-wrap:wrap; gap:15px; align-items:center; }
.stat-item { color:#aaa; font-size:13px; }
.stat-item strong { color:#f0c040; }
.stat-item.online i { color:#5cb85c; font-size:10px; animation:blink 1.5s infinite; }
.stat-item .flag { font-size:15px; margin-left:3px; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ===== Admin ===== */
.admin-wrapper { min-height: 100vh; background: #f0f2f5; }
.admin-sidebar { background: #1a3a5c; min-height: 100vh; padding: 0; width: 240px; position: fixed; top: 0; right: 0; z-index: 1000; overflow-y: auto; overflow-x: hidden; }
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: #0d2a45; }
.admin-sidebar::-webkit-scrollbar-thumb { background: #2a5a8c; border-radius: 2px; }
.admin-sidebar .sidebar-brand { background: #0d2a45; padding: 20px 15px; text-align: center; }
.admin-sidebar .sidebar-brand h3 { color: #fff; margin: 0; font-size: 16px; }
.admin-sidebar ul { list-style: none; padding: 0; margin: 0; }
.admin-sidebar ul li a { display: block; padding: 12px 20px; color: #ccc; font-size: 14px; border-bottom: 1px solid #2a4a6c; }
.admin-sidebar ul li a:hover, .admin-sidebar ul li.active a { background: #1a6496; color: #fff; }
.admin-sidebar ul li a i { margin-left: 10px; width: 16px; }
.admin-content { margin-right: 240px; padding: 20px; }
.admin-topbar { background: #fff; padding: 12px 20px; margin-bottom: 20px; border-radius: 5px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; }
.admin-topbar h4 { margin: 0; color: #1a6496; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.1); margin-bottom: 20px; }
.stat-card .stat-icon { font-size: 36px; margin-bottom: 10px; }
.stat-card .stat-number { font-size: 28px; font-weight: bold; color: #1a6496; }
.stat-card .stat-label { color: #888; font-size: 14px; }
.admin-card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); margin-bottom: 20px; }
.admin-card h3 { color: #1a6496; border-bottom: 2px solid #1a6496; padding-bottom: 10px; margin-bottom: 20px; font-size: 18px; }

/* ===== Login Dropdown ===== */
.btn-login-top { background:rgba(255,255,255,0.2) !important; color:#fff !important; border:1px solid rgba(255,255,255,0.5) !important; font-size:13px; padding:3px 12px; border-radius:4px; }
.btn-login-top:hover, .btn-login-top:focus, .btn-login-top:active { background:rgba(255,255,255,0.35) !important; color:#f0c040 !important; outline:none !important; box-shadow:none !important; }
.login-nav-item > a { background:rgba(255,255,255,0.15) !important; border-radius:4px; margin:8px 5px !important; padding:7px 14px !important; }
.login-nav-item > a:hover { background:rgba(255,255,255,0.3) !important; color:#f0c040 !important; }
.login-nav-menu { border-top:3px solid #f0c040; min-width:170px; }
.login-nav-menu li a { color:#333 !important; font-size:13px; padding:9px 16px !important; }
.login-nav-menu li a:hover { background:#f0f7ff !important; color:#1a6496 !important; }
.login-nav-menu li a i { width:18px; color:#1a6496; margin-left:6px; }
.top-bar .dropdown { position:relative; }
.top-bar .dropdown-menu {
    position:absolute !important;
    top:100% !important;
    left:0 !important;
    right:auto !important;
    min-width:170px;
    margin-top:5px;
    border-top:3px solid #f0c040;
    padding:5px 0;
    z-index:99999 !important;
    display:none;
    background:#fff;
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
}
.top-bar .dropdown.open .dropdown-menu { display:block !important; }
.top-bar .dropdown-menu li a { padding:9px 16px !important; color:#333 !important; font-size:13px; display:block; }
.top-bar .dropdown-menu li a:hover { background:#f0f7ff !important; color:#1a6496 !important; }
.top-bar .dropdown-menu li a i { width:18px; color:#1a6496; margin-left:6px; }
.top-bar .dropdown-menu .divider { margin:4px 0; background:#eee; height:1px; }

/* وسائل التواصل في الفوتر */
.footer-social { margin-top:12px; }
.footer-social-icon { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:50%; background:rgba(255,255,255,0.1); color:#ccc; font-size:16px; margin-left:6px; transition:background 0.2s, color 0.2s; }
.footer-social-icon:hover { background:#1a6496; color:#fff; }
.dept-card { display:block; border-radius:10px; padding:25px 15px; text-align:center; color:#fff; text-decoration:none; transition:transform 0.2s, box-shadow 0.2s; }
.dept-card:hover { transform:translateY(-5px); box-shadow:0 8px 20px rgba(0,0,0,0.2); color:#fff; text-decoration:none; }
.dept-icon { font-size:40px; margin-bottom:12px; opacity:0.9; }
.dept-name { font-size:16px; font-weight:bold; margin-bottom:4px; }
.dept-name-en { font-size:12px; opacity:0.8; margin-bottom:10px; }
.dept-arrow { font-size:14px; opacity:0.7; }
@media (max-width: 768px) {
    .school-name { font-size: 20px; }
    .admin-sidebar { width: 100%; position: relative; min-height: auto; }
    .admin-content { margin-right: 0; }
    #mainSlider .item img { max-height: 250px; }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .school-name { font-size: 20px; }
    .admin-sidebar { width: 100%; position: relative; min-height: auto; }
    .admin-content { margin-right: 0; }
    #mainSlider .item { height: 250px; }
}
