/* إعادة ضبط القيم الافتراضية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* تنسيق الجسم */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    /* تم إزالة height: 100vh و overflow: hidden للسماح بالتمرير */
    display: flex;
    flex-direction: column;
    color: #000; /* تغيير لون النص إلى الأسود لتحسين القراءة */
    direction: rtl; /* لضمان الاتجاه من اليمين لليسار */
    background-color: #f9f9f9; /* خلفية فاتحة لتحسين القراءة */
}

/* تنسيق خلفية الفيديو */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.video-background iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 56.25vw; /* الحفاظ على نسبة العرض إلى الارتفاع 16:9 */
    min-height: 100%; /* ضمان تغطية الفيديو للارتفاع */
    min-width: 177.78vh; /* ضمان تغطية الفيديو للعرض */
}

/* تنسيق العنوان */
header {
    background: linear-gradient(rgba(102,196,222,1), #F0F8FF);
    padding: 10px 20px;
    color: black;
    position: fixed; /* جعل الترويسة ثابتة في أعلى الصفحة */
    width: 100%;
    top: 0;
    z-index: 1000; /* لضمان ظهور الترويسة فوق باقي العناصر */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center; /* محاذاة الروابط في الوسط */
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: black;
    font-size: 16px;
    padding: 8px 16px;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 5px;
}
html, body {
    height: 100%; /* تأكد من أن html و body يمتدان لملء الشاشة */
    margin: 0;
    display: flex;
    flex-direction: column; /* لترتيب العناصر عمودياً */
}


nav ul li a:hover,
nav ul li a.active {
    background-color: #005bb5;
    color: white;
}

/* القسم الرئيسي */
main {
     flex-grow: 1; /* يسمح بتمدد المحتوى الرئيسي لملء الفراغ */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
   
    position: relative;
    z-index: 5;
    padding: 100px 20px 20px; /* إضافة مساحة للترويسة الثابتة */
}

/* محتوى القسم */
.content-container {
    max-width: 1200px;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* أنماط التبويبات */
.tab {
    display: flex;
    justify-content: center; /* محاذاة التبويبات في الوسط */
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    background-color: #f1f1f1;
    border-radius: 5px;
    overflow: hidden;
}

.tab button {
    background-color: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 20px;
    transition: background-color 0.3s;
    font-size: 16px;
    margin: 0 5px;
    border-radius: 5px 5px 0 0; /* زوايا مستديرة في الأعلى */
}

.tab button:hover {
    background-color: #ddd;
}

.tab button.active {
    background-color: #007FFF;
    color: black;
    border-radius: 5px 5px 0 0;
}

/* محتويات التبويبات */
.tabcontent {
    display: none;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
    background-color: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    direction: rtl; /* لضمان اتجاه النص باللغة العربية */
}

/* معرض الصور */
.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.photo-gallery img {
    width: 100%;
    max-width: 300px;
    border-radius: 5px;
    transition: transform 0.3s;
}
/* تنسيق قسم الجوائز والمشاركات */
.award-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.award-item h3 {
    font-size: 20px;
    color: #007FFF;
    margin-bottom: 10px;
}

.award-item p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

.photo-gallery img:hover {
    transform: scale(1.05);
}

/* الفوتر */
footer {
   
    text-align: center;
    background: linear-gradient(rgba(102, 196, 222, 0.7), rgba(240, 248, 255, 0.7));
    color: black;
    height: 50px; /* ارتفاع الفوتر */
    overflow: hidden; /* إخفاء المحتويات الزائدة */
    transition: height 0.5s ease-in-out; /* تأثير ارتفاع الفوتر */
    margin-top: 15px;
    z-index: 1;
}

footer:hover {
    height: 200px; /* الارتفاع عند التأشير */
}

.hover-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%; /* ملء ارتفاع الفوتر بالكامل */
    opacity: 0; /* البداية: مخفي */
    transition: opacity 0.3s ease-in-out; /* تأثير الظهور */
}

footer:hover .hover-box {
    opacity: 1; /* ظهور المحتوى */
}

/* قائمة المربع */
.hover-menu {
    list-style: none; /* إزالة النقاط */
    padding: 7px; /* إضافة مسافة داخلية */
    margin: 7px; /* إضافة مسافة خارجية */
    display: flex;
    justify-content: space-around; /* توزيع العناصر بالتساوي */
    width: calc(100% - 20px); /* تقليل العرض لتجنب الالتصاق بالحواف */
    box-sizing: border-box; /* لضمان أن padding لا يؤثر على العرض */
}

.hover-menu li a {
    text-decoration: none; /* إزالة الخط السفلي */
    color: black; /* لون النص */
    font-size: 16px; /* حجم الخط */
    transition: color 0.3s ease; /* تأثير عند التمرير */
}

.hover-menu li a:hover {
    color: #007FFF; /* تغيير اللون عند التمرير */
}

/* استجابة التصميم */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }

    nav ul li {
        margin: 10px 0;
    }

    .tab {
        flex-direction: column;
    }

    .tab button {
        width: 100%;
        margin: 5px 0;
        border-radius: 5px;
    }

    .photo-gallery {
        flex-direction: column;
        align-items: center;
    }
}
