/* ======== الأساسيات ======== */
body {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

/* ======== شريط التنقل ======== */
nav {
    background-color: #1C409E;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.logo .logo-text {
    text-decoration: none;
    color: white;
}

.logo img {
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: rotate(-2deg) scale(1.05);
}

.menu-icon {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-left: 20px;
    position: relative;
    transition: background-color 0.3s, transform 0.3s;
}

.nav-links a i {
    margin-left: 5px;
}

.nav-links a::after {
    /* content: attr(data-tooltip); */
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    color: #333;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transition: opacity 0.2s;
}

.nav-links a:hover {
    background-color: #FFD700;
    color: #1C409E;
    border-radius: 5px;
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

.nav-links a:hover::after {
    opacity: 1;
}

/* ======== التخطيط العام ======== */
.container {
    display: flex;
    flex-direction: row-reverse;
    gap: 30px;
    padding: 20px;
    text-align: center;
}

.main-content {
    flex: 3;
    padding: 20px;
    background-color: #f5f7ff;
}

.right-sidebar {
    width: 250px;
    min-width: 250px;
    background-color: #fff;
    padding: 20px;
    margin-left: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 300px;
}

/* ======== الإعلانات ======== */
.ads {
    background: linear-gradient(to right, #e2eaff, #f5f8ff);
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    border-right: 4px solid #1C409E;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* ======== التذييل ======== */
footer {
    background: linear-gradient(135deg, #1C409E, #16357F);
    padding: 30px 10px;
    font-family: 'Cairo', sans-serif;
    border-top: 2px solid #102A66;
    direction: rtl;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    color: #ffffff;
}

.footer-container p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #f0f0f0;
}

.footer-links {
    margin-bottom: 15px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.footer-links a:hover {
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-icons a {
    color: #ffffff;
    font-size: 22px;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icons a:hover {
    color: #FFD700;
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
    background-color: rgba(255, 255, 255, 0.05);
}

.social-links a {
    margin: 0 10px;
    font-size: 24px;
    color: #555;
}

.social-links a:hover {
    color: #000;
}

/* ======== الرسوم المتحركة ======== */
.fade-in {
    opacity: 0;
    animation: fadeIn ease-in 1s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======== استجابة الشاشة ======== */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        width: 100%;
        display: none;
        margin-top: 10px;
    }

    .nav-links.show {
        display: flex;
    }

    .menu-icon {
        display: block;
    }

    .container {
        flex-direction: column;
    }

    .right-sidebar {
        width: 100%;
        margin-left: 0;
        margin-top: 20rem;
        order: 2;
    }

    .main-content {
        order: 1;
    }
}

@media (max-width: 600px) {
    .footer-links a {
        display: block;
        margin: 5px 0;
    }

    .social-icons {
        gap: 10px;
        margin-top: 10px;
    }
}
