:root {
    --color-primary: #3371b2;
    --color-accent: #11c7e6;
    --color-dark: #333333;
    --color-light: #f8f9fa;
    --font-main: 'Cairo', sans-serif;
    
    /* إضافة متغيرات CSS للألوان والخطوط المستخدمة في الفوتر والقوائم */
    --footer-bg-color: #333333;
    --footer-heading-color: #ffd700;
    --footer-text-color: white;
    --footer-link-hover: #ffd700;
    --topnav-bg-color: #333333;
    --mainnav-bg-color: #3371b2;
}

/* Common header styles */
.top-header {
    background-color: var(--topnav-bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 0;
    font-family: var(--font-main);
    height: 60px;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    font-family: var(--font-main);
}

.top-nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

.top-nav-links a {
    color: #f8f9fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    font-family: var(--font-main);
}

.top-nav-links a:hover {
    color: var(--footer-heading-color);
}

.main-header {
    background-color: var(--mainnav-bg-color);
    padding: 0;
    font-family: var(--font-main);
    height: 60px;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
}

.main-nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.main-nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-family: var(--font-main);
}

.main-nav-links a:hover, .main-nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Common footer styles - تنسيقات الفوتر الموحدة */
footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    font-family: var(--font-main);
    letter-spacing: 0.5px;
    padding: 40px 20px 0;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    box-sizing: border-box;
}

.footer-column {
    flex: 1 1 0;
    min-width: 200px;
    text-align: right;
    margin-bottom: 30px;
}

.footer-column h3 {
    color: var(--footer-heading-color);
    margin-bottom: 20px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.footer-column li {
    margin-bottom: 10px;
    display: block;
    width: 100%;
}

.footer-column a {
    color: var(--footer-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.footer-column a:hover {
    color: var(--footer-heading-color);
}

.footer-contact li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-contact i {
    color: var(--footer-heading-color);
    margin-left: 10px;
    font-size: 1.1rem;
}


/* Optional: If the above doesn't work due to specificity, try targeting the footer directly */
footer .footer-column ul li i,
footer .footer-contact i {
    color: #FFD700 !important; /* استخدم !important فقط إذا لم تنجح الطرق الأخرى */
    margin-left: 8px !important;
    vertical-align: middle;
}
.copyright {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: var(--footer-text-color);
    box-sizing: border-box;
    padding-bottom: 20px;
}

/* تعديل الاستجابة للشاشات المختلفة */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .footer-column {
        flex: 0 0 48%;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .footer-container {
        flex-direction: column;
    }
    
    .footer-column {
        flex: 0 0 100%;
    }
}

/* تنسيقات إضافية للتأكد من توافق جميع الصفحات */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-main);
}

main, .main-content {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}


/* أنماط النافذة المنبثقة */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}

.modal-content {
    background-color: #001e49;
    color: #fff;
    margin: 10% auto;
    padding: 40px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    position: relative;
    animation: modalFadeIn 0.4s;
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #ffd700;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #11c7e6;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}