/* ✅ الخط الأساسي */
body {
    font-family: "Calibri", "Tahoma", "Cairo", sans-serif;
    background-color: #f9f9f9;
    direction: rtl;
    text-align: center;
    margin: 0;
}

/* ✅ الهيدر العلوي */
header.topbar {
    direction: rtl;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #003366;
    color: #fff;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible; /* يسمح للقوائم بالظهور */
}
.brand {
    font-weight: bold;
    font-size: 20px;
}

/* ✅ القائمة الرئيسية */
.nav-list {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-item { position: relative; }
.nav-link {
    background-color: #005599;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
}
.nav-link:hover { background-color: #0077aa; }

/* ✅ القوائم المنسدلة */
.dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    padding: 8px;
    list-style: none;
    display: none;
    z-index: 9999;
}
.dropdown li a {
    display: block;
    padding: 8px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}
.dropdown li a:hover { background-color: #f0f0f0; }
.nav-item.open > .dropdown { display: block; }

/* ✅ أقسام المحتوى */
.content-section { display: none; padding: 20px; text-align: right; }
.content-section.active { display: block; }

/* ✅ الكروت */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}
.card h4 {
    margin: 10px 0;
    color: #003366;
}
.card .actions a {
    display: inline-block;
    margin: 5px;
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}
.card .actions a:hover { background-color: #0056b3; }

/* ✅ كارت الامتحانات */
.card.exams {
    border-top: 4px solid #ff5722;
}
.card.exams h4 { color: #d84315; }
.card.exams .actions a { background-color: #ff7043; }
.card.exams .actions a:hover { background-color: #e64a19; }

/* ✅ الجداول الزمنية */
.timetable {
    width: 100%;
    border-collapse: collapse;
    margin: 10px auto;
}
.timetable th, .timetable td {
    border: 1px solid #ccc;
    padding: 8px;
}
.timetable tr:nth-child(even) { background-color: #f2f2f2; }
.holiday { color: red; font-weight: bold; }
.holiday.seasonal { color: green; }
.no-sessions { color: #7f8c8d; font-style: italic; }

/* ✅ زر واتساب عائم */
.whatsapp-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    z-index: 999;
}
.whatsapp-float {
    background-color: #25D366;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float img { width: 40px; height: 40px; }
.whatsapp-text {
    margin-right: 10px;
    background: #25D366;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    animation: fadeSlideIn 1s forwards;
    animation-delay: 0.5s;
}
@keyframes fadeSlideIn {
    to { opacity: 1; transform: translateX(0); }
}

/* ✅ رسائل التنبيه */
.alert {
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-family: 'Cairo', sans-serif;
    animation: fadeUp 0.5s ease;
}
.alert-success { background: #d4edda; color: #155724; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-danger  { background: #f8d7da; color: #721c24; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.stat-card h3 {
  margin: 0 0 10px;
  color: #003366;
  font-size: 16px;
}

.stat-number {
  font-size: 28px;
  font-weight: bold;
  color: #007bff;
}
