
        /* Base styles and variables */
        :root {
            /* Light Mode Colors */
            --primary-color: #2874f0;
            --primary-dark: #1a53bf;
            --background-light: #f9fbff;
            --text-color: #2c3e50;
            --border-color: #d0d7de;
            --shadow-color: rgba(0, 0, 0, 0.1);
            --accent-color: #ff5722;
            --card-bg: #fdfeff;
            --main-bg: #fff;
            --hero-bg-start: #3f51b5;
            --hero-bg-end: #2196f3;
            --footer-bg: #2c3e50;
            --footer-text: #ecf0f1;
            --footer-border: rgba(255, 255, 255, 0.1);
            --placeholder-bg: #e0f2f7;

            /* Dynamic heights, calculated by JS */
            --header-height: 0px;
            --banner-height: 0px;
        }

        /* Dark Mode Colors */
        body.dark-mode {
            --primary-color: #7b9cff;
            --primary-dark: #5a7dff;
            --background-light: #1a1a2e; /* Darker background */
            --text-color: #e0e0e0; /* Light text */
            --border-color: #4a4a5a;
            --shadow-color: rgba(0, 0, 0, 0.4);
            --accent-color: #ff8c42;
            --card-bg: #2a2a3e; /* Darker card background */
            --main-bg: #222233; /* Darker main content background */
            --hero-bg-start: #1e3a8a;
            --hero-bg-end: #0f2c6e;
            --footer-bg: #1c1c2b;
            --footer-text: #cccccc;
            --footer-border: rgba(255, 255, 255, 0.05);
            --placeholder-bg: #3a3a50;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            padding: 0;
            font-family: 'Cairo', sans-serif;
            background-color: var(--background-light);
            color: var(--text-color);
            direction: rtl; /* Default for Arabic */
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            transition: background-color 0.4s ease, color 0.4s ease; /* Smooth transition for dark mode */
        }

        body.en {
            font-family: 'Poppins', sans-serif;
            direction: ltr;
        }

        body.ur {
            font-family: 'Noto Nastaliq Urdu', serif;
            direction: rtl; /* Urdu also reads right-to-left */
        }


        a {
            color: var(--primary-color);
            text-decoration: none;
            transition: color 0.3s ease;
        }
        a:hover, a:focus {
            color: var(--primary-dark);
            outline: none;
        }

        button, .details-btn {
            cursor: pointer;
            background-color: var(--primary-color);
            border: none;
            color: #fff;
            font-weight: 700;
            border-radius: 10px;
            padding: 10px 25px;
            font-size: 16px;
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 4px 10px var(--primary-color);
            user-select: none;
            text-align: center;
            display: inline-block;
            text-decoration: none;
            line-height: 1.3;
        }
        button:hover, button:focus,
        .details-btn:hover, .details-btn:focus {
            background-color: var(--primary-dark);
            box-shadow: 0 6px 15px var(--primary-dark);
            outline: none;
        }

        /* Header */
        header {
            background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
            color: #fff;
            padding: 18px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 4px 12px var(--shadow-color);
            position: fixed;
            width: 100%;
            top: 0;
            left: 0;
            z-index: 1000;
            transition: background 0.4s ease, box-shadow 0.4s ease;
        }
        header .logo {
            font-size: 30px;
            font-weight: 900;
            letter-spacing: 2px;
            user-select: none;
            color: #fff;
            transition: transform 0.2s ease;
        }
        header .logo:hover {
            transform: scale(1.05);
        }

        nav ul {
            list-style: none;
            display: flex;
            gap: 28px;
            margin: 0;
            padding: 0;
        }
        nav ul li a {
            color: #fff;
            text-decoration: none;
            font-weight: 600;
            font-size: 18px;
            position: relative;
            transition: color 0.3s ease, transform 0.3s ease;
            padding: 5px 0;
        }
        nav ul li a:hover,
        nav ul li a:focus {
            color: #b3d4ff;
            transform: translateY(-2px);
            outline: none;
        }
        nav ul li a::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            width: 0%;
            height: 3px;
            background-color: #b3d4ff;
            transition: width 0.3s ease, left 0.3s ease;
        }
        nav ul li a:hover::after,
        nav ul li a:focus::after {
            width: 100%;
            left: 0%;
        }
        nav ul li a[aria-current="page"] {
            font-weight: 800;
            color: #e0f2f7;
        }
        nav ul li a[aria-current="page"]::after {
            width: 100%;
            left: 0%;
            background-color: #e0f2f7;
        }

        /* Language and Theme Switchers */
        .header-controls {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-left: 20px; /* Space from navigation */
        }

        .language-switcher select {
            background-color: var(--primary-dark);
            color: #fff;
            border: 1px solid var(--primary-color);
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 15px;
            cursor: pointer;
            outline: none;
            transition: background-color 0.3s ease, border-color 0.3s ease;
        }
        .language-switcher select:hover {
            background-color: var(--primary-color);
            border-color: #fff;
        }
        body.dark-mode .language-switcher select {
            background-color: #3a3a5a;
            border-color: #5a7dff;
        }
        body.dark-mode .language-switcher select:hover {
            background-color: #5a7dff;
            border-color: #e0e0e0;
        }

        .theme-switcher button {
            background: none;
            border: 2px solid #fff;
            color: #fff;
            padding: 8px 12px;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .theme-switcher button:hover {
            background-color: rgba(255, 255, 255, 0.2);
            border-color: #e0e0e0;
        }
        .theme-switcher button svg {
            fill: #fff;
            width: 20px;
            height: 20px;
        }
        body.dark-mode .theme-switcher button {
            border-color: var(--primary-color);
            color: var(--primary-color);
        }
        body.dark-mode .theme-switcher button svg {
            fill: var(--primary-color);
        }


        /* Flash Banner */
        .flash-banner {
            position: fixed;
            top: var(--header-height);
            background: linear-gradient(270deg, #2874f0, #1a53bf, #2874f0);
            background-size: 600% 600%;
            color: #fff;
            font-weight: 700;
            font-size: 18px;
            padding: 16px 30px;
            border-radius: 0;
            box-shadow: 0 0 20px rgba(40, 116, 240, 0.8);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            animation: glowing 8s ease infinite;
            z-index: 999;
            opacity: 1;
            transform: translateY(0);
            transition: opacity 0.6s ease, transform 0.6s ease, top 0.3s ease, background 0.4s ease, box-shadow 0.4s ease;
            user-select: none;
            width: 100%;
            left: 0;
			margin: 0; /* زادت المسافة من الأعلى */
        }
        body.dark-mode .flash-banner {
            background: linear-gradient(270deg, var(--primary-color), var(--primary-dark), var(--primary-color));
            box-shadow: 0 0 20px var(--primary-color);
        }
        .flash-banner.hide {
            opacity: 0;
            transform: translateY(-100%);
            pointer-events: none;
        }
        .flash-banner p {
            margin: 0;
            flex-grow: 1;
            min-width: 220px;
        }
        .flash-banner .details-btn {
            background-color: var(--accent-color);
            box-shadow: 0 4px 15px rgba(255, 87, 34, 0.6);
            padding: 12px 30px;
            font-size: 17px;
            font-weight: 700;
            border-radius: 8px;
            animation: pulse 1.5s infinite;
            white-space: nowrap;
            min-width: 180px;
            text-align: center;
        }
        .flash-banner .details-btn:hover {
            background-color: #e64a19;
            box-shadow: 0 6px 20px rgba(255, 87, 34, 0.8);
            animation: none;
        }
        body.dark-mode .flash-banner .details-btn {
            box-shadow: 0 4px 15px var(--accent-color);
        }
        body.dark-mode .flash-banner .details-btn:hover {
            box-shadow: 0 6px 20px var(--accent-color);
        }

        @keyframes pulse {
            0% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 87, 34, 0.6); }
            50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 87, 34, 0.8); }
            100% { transform: scale(1); box-shadow: 0 4px 15px rgba(255, 87, 34, 0.6); }
        }
        body.dark-mode @keyframes pulse {
            0% { transform: scale(1); box-shadow: 0 4px 15px var(--accent-color); }
            50% { transform: scale(1.05); box-shadow: 0 6px 20px var(--accent-color); }
            100% { transform: scale(1); box-shadow: 0 4px 15px var(--accent-color); }
        }


        @keyframes glowing {
            0% { background-position: 0% 50%; box-shadow: 0 0 10px rgba(40, 116, 240, 0.5); }
            50% { background-position: 100% 50%; box-shadow: 0 0 28px rgba(40, 116, 240, 1); }
            100% { background-position: 0% 50%; box-shadow: 0 0 10px rgba(40, 116, 240, 0.5); }
        }
        body.dark-mode @keyframes glowing {
            0% { background-position: 0% 50%; box-shadow: 0 0 10px var(--primary-color); }
            50% { background-position: 100% 50%; box-shadow: 0 0 28px var(--primary-color); }
            100% { background-position: 0% 50%; box-shadow: 0 0 10px var(--primary-color); }
        }

        /* Flash Banner close button */
        .flash-banner button.close-btn {
            background: transparent;
            border: none;
            color: white;
            font-size: 24px;
            font-weight: 900;
            line-height: 1;
            padding: 0;
            cursor: pointer;
            transition: color 0.3s ease;
            user-select: none;
            box-shadow: none; /* No shadow for close button */
        }
        .flash-banner button.close-btn:hover,
        .flash-banner button.close-btn:focus {
            color: #ff4d4d;
            outline: none;
            background: none;
            box-shadow: none;
        }

        /* Page Hero Section */
        .page-hero {
            background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
            color: white;
            text-align: center;
            padding: 100px 20px;
            border-radius: 0 0 20px 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            margin-bottom: 60px;
            position: relative;
            overflow: hidden;
            transition: background 0.4s ease, box-shadow 0.4s ease;
			 margin: 12rem auto 2rem; /* زادت المسافة من الأعلى */
        }

        .page-hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.1"><path d="M47.79 38.64L32 62h32L47.79 38.64zM68 62L52.21 38.64 36.42 62H68zM27 75h46l-23 43zM3 75h46L26 118z"/></g></svg>') repeat;
            opacity: 0.1;
            z-index: 0;
        }
        body.dark-mode .page-hero::before {
            background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="%23e0e0e0" fill-opacity="0.05"><path d="M47.79 38.64L32 62h32L47.79 38.64zM68 62L52.21 38.64 36.42 62H68zM27 75h46l-23 43zM3 75h46L26 118z"/></g></svg>') repeat;
            opacity: 0.05;
        }
.no-wrap-list li {
    /* **الخاصية الجديدة لإخفاء النقاط** */
    list-style: none;
    
    /* الخواص السابقة لمنع التفاف النص والإشارة إلى النص المقطوع */
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    
    /* (اختياري) إزالة أي مسافة متروكة افتراضية على اليمين قد تسببها نقاط القائمة */
    padding-right: 0; 
}

/* يمكنك أيضاً إزالة الهامش الافتراضي من القائمة الرئيسية */
.no-wrap-list {
    margin-right: 0;
    padding-right: 0;
}
        .page-hero-content {
            position: relative;
            z-index: 1;
            max-width: 900px;
            margin: 0 auto;
        }

        .page-hero h1 {
            font-size: 3.5em;
            margin-bottom: 25px;
            font-weight: 900;
            line-height: 1.2;
        }

        .page-hero p {
            font-size: 1.3em;
            max-width: 700px;
            margin: 0 auto 40px auto;
            line-height: 1.7;
            opacity: 0.9;
        }

        .btn-main {
            display: inline-block;
            background-color: white;
            color: #3f51b5;
            padding: 18px 45px;
            border-radius: 35px;
            text-decoration: none;
            font-weight: 700;
            font-size: 1.2em;
            transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
        }

        .btn-main:hover {
            background-color: #e8eaf6;
            color: #1a237e;
            transform: translateY(-5px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        }
        body.dark-mode .btn-main {
            background-color: #e0e0e0;
            color: var(--primary-dark);
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
        }
        body.dark-mode .btn-main:hover {
            background-color: #ffffff;
            color: var(--primary-color);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
        }

        /* Main Content */
        main {
            width: 1400px;
            margin: 0 auto 60px;
            padding: 0 30px;
            background-color: var(--main-bg);
            border-radius: 14px;
            box-shadow: 0 8px 24px var(--shadow-color);
            display: flex;
            gap: 35px;
            flex-grow: 1;
            min-height: 600px;
            position: relative;
            z-index: 10;
            user-select: none;
            align-items: stretch;
            transition: background-color 0.4s ease, box-shadow 0.4s ease;
        }

        /* Courses container */
        .courses-container {
            flex-basis: 70%;
            overflow-y: auto;
            padding-right: 20px;
            scrollbar-width: thin;
            scrollbar-color: var(--primary-color) #e1e5eb;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            padding-top: 30px;
            padding-bottom: 20px;
        }
        .courses-container::-webkit-scrollbar {
            width: 10px;
        }
        .courses-container::-webkit-scrollbar-track {
            background: #e1e5eb;
            border-radius: 8px;
        }
        body.dark-mode .courses-container::-webkit-scrollbar-track {
            background: #333344;
        }
        .courses-container::-webkit-scrollbar-thumb {
            background-color: var(--primary-color);
            border-radius: 8px;
            border: 2px solid #e1e5eb;
        }
        body.dark-mode .courses-container::-webkit-scrollbar-thumb {
            border: 2px solid #333344;
        }

        .courses-container h2 {
            text-align: center;
            margin-top: 0;
            margin-bottom: 36px;
            color: var(--text-color);
            font-size: 30px;
            font-weight: 900;
            letter-spacing: 0.8px;
            transition: color 0.4s ease;
        }
        .course {
            display: flex;
            flex-direction: column;
            border: 1.8px solid var(--border-color);
            border-radius: 14px;
            padding: 22px 30px;
            margin-bottom: 22px;
            cursor: pointer;
            transition: all 0.4s ease;
            background-color: var(--card-bg);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
            outline-offset: 3px;
        }
        .course:hover,
        .course:focus {
            background-color: #e9f1ff;
            border-color: var(--primary-color);
            box-shadow: 0 12px 30px rgba(40, 116, 240, 0.2);
            outline: none;
            transform: translateY(-5px);
        }
        body.dark-mode .course {
            background-color: var(--card-bg);
            border-color: var(--border-color);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
        body.dark-mode .course:hover,
        body.dark-mode .course:focus {
            background-color: #3a3a5a;
            border-color: var(--primary-color);
            box-shadow: 0 12px 30px rgba(123, 156, 255, 0.3);
        }

        .course-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            gap: 15px;
        }

        .course-icon {
            width: 60px;
            height: 60px;
            border-radius: 10px;
            object-fit: cover;
            flex-shrink: 0;
            background-color: var(--placeholder-bg);
            padding: 8px;
            transition: background-color 0.4s ease;
        }

        .course h3 {
            margin: 0;
            color: var(--primary-color);
            font-size: 26px;
            font-weight: 800;
            letter-spacing: 0.5px;
            transition: color 0.4s ease;
        }
        .course-meta {
            display: flex;
            gap: 25px;
            margin-bottom: 15px;
            font-size: 16px;
            color: #777;
            font-weight: 600;
            transition: color 0.4s ease;
        }
        body.dark-mode .course-meta {
            color: #b0b0b0;
        }
        .difficulty-level {
            color: var(--primary-dark);
            font-weight: 700;
            transition: color 0.4s ease;
        }

        .course p.details {
            margin: 14px 0 0 0;
            display: none;
            line-height: 1.6;
            color: #555;
            font-size: 17px;
            font-weight: 500;
            margin-top: 20px;
            border-top: 1px dashed #eee;
            padding-top: 20px;
            transition: color 0.4s ease, border-color 0.4s ease;
        }
        body.dark-mode .course p.details {
            color: #c0c0c0;
            border-top: 1px dashed #4a4a5a;
        }
        .course.active p.details {
            display: block;
        }
        .course .details-btn {
            margin-top: 25px;
            display: inline-block;
            background-color: var(--primary-color);
            border-radius: 10px;
            padding: 12px 28px;
            font-size: 17px;
            font-weight: 700;
            box-shadow: 0 5px 15px var(--primary-color);
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
            user-select: none;
            align-self: flex-start;
            min-width: 150px;
        }
        .course .details-btn:hover,
        .course .details-btn:focus {
            background-color: var(--primary-dark);
            box-shadow: 0 6px 18px var(--primary-dark);
            outline: none;
        }

        a.back-link {
            display: inline-block;
            margin-top: 38px;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 900;
            font-size: 20px;
            padding: 10px 20px;
            border-radius: 12px;
            border: 2px solid transparent;
            transition: all 0.4s ease;
            user-select: none;
        }
        a.back-link:hover,
        a.back-link:focus {
            background-color: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
            outline: none;
        }

        /* Sidebar */
        .sidebar {
            flex-basis: 30%;
            border-left: 1.5px solid var(--border-color);
            padding-left: 30px;
            box-sizing: border-box;
            user-select: none;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding-bottom: 20px;
            padding-top: 30px;
            transition: border-color 0.4s ease;
        }
        .sidebar h3 {
            margin-top: 0;
            margin-bottom: 26px;
            color: var(--primary-color);
            border-bottom: 4px solid var(--primary-color);
            padding-bottom: 8px;
            font-size: 26px;
            font-weight: 900;
            letter-spacing: 0.5px;
            transition: color 0.4s ease, border-color 0.4s ease;
        }
        /* Filter Groups */
        .filter-group {
            margin-bottom: 40px;
        }
        .filter-group h3 {
            margin-bottom: 20px;
            color: var(--text-color);
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 6px;
            font-size: 22px;
            font-weight: 800;
            transition: color 0.4s ease, border-color 0.4s ease;
        }

        .search-box input {
            width: 100%;
            padding: 14px 18px;
            font-size: 18px;
            border: 2px solid var(--border-color);
            border-radius: 14px;
            margin-bottom: 40px;
            box-sizing: border-box;
            transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, color 0.4s ease;
            background-color: var(--card-bg);
            color: var(--text-color);
        }
        .search-box input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 12px rgba(40, 116, 240, 0.4);
        }
        body.dark-mode .search-box input:focus {
            box-shadow: 0 0 12px var(--primary-color);
        }

        .categories ul {
            list-style: none;
            padding: 0;
            margin: 0;
            user-select: none;
        }
        .categories li {
            margin-bottom: 18px;
        }
        .categories label {
            cursor: pointer;
            font-weight: 600;
            user-select: none;
            font-size: 18px;
            color: var(--text-color);
            display: flex;
            align-items: center;
            gap: 10px;
            transition: color 0.3s ease;
        }
        .categories label:hover,
        .categories label:focus {
            color: var(--primary-dark);
            outline: none;
        }
        .categories input[type="radio"] {
            cursor: pointer;
            width: 22px;
            height: 22px;
            accent-color: var(--primary-color);
            transform: scale(1.1);
        }

        /* Clear Filters Button */
        .clear-filters-btn {
            background-color: #f44336;
            box-shadow: 0 4px 10px rgba(244, 67, 54, 0.6);
            margin-top: 20px;
            width: 100%;
            text-transform: uppercase;
            font-size: 15px;
        }

        .clear-filters-btn:hover {
            background-color: #d32f2f;
            box-shadow: 0 6px 15px rgba(244, 67, 54, 0.8);
        }
        body.dark-mode .clear-filters-btn {
            background-color: #d32f2f;
            box-shadow: 0 4px 10px rgba(211, 47, 47, 0.6);
        }
        body.dark-mode .clear-filters-btn:hover {
            background-color: #b71c1c;
            box-shadow: 0 6px 15px rgba(211, 47, 47, 0.8);
        }


        /* No Results Message */
        .no-results-message {
            text-align: center;
            font-size: 1.5em;
            color: #777;
            margin-top: 50px;
            padding: 20px;
            border: 2px dashed #ccc;
            border-radius: 10px;
            background-color: #fdfdfd;
            transition: all 0.4s ease;
        }
        body.dark-mode .no-results-message {
            color: #a0a0a0;
            border: 2px dashed #5a5a5a;
            background-color: #2a2a3e;
        }


        /* Footer */
        footer {
            background-color: var(--footer-bg);
            color: var(--footer-text);
            padding: 40px 30px 20px;
            font-size: 16px;
            user-select: none;
            box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
            margin-top: auto;
            text-align: right;
            transition: background-color 0.4s ease, box-shadow 0.4s ease, color 0.4s ease;
        }
        body.en footer {
            text-align: left;
        }
        body.ur footer {
            text-align: right;
        }


        .footer-content {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            max-width: 1200px;
            margin: 0 auto 30px;
            gap: 30px;
        }

        .footer-section {
            flex: 1;
            min-width: 250px;
            margin-bottom: 20px;
        }

        .footer-section h3 {
            color: var(--primary-color);
            font-size: 22px;
            margin-bottom: 20px;
            border-bottom: 2px solid var(--primary-color); /* Changed to primary color for consistency */
            padding-bottom: 10px;
            transition: color 0.4s ease, border-color 0.4s ease;
        }

        .footer-section p,
        .footer-section ul {
            font-size: 15px;
            line-height: 1.8;
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .footer-section ul li {
            margin-bottom: 10px;
        }

        .footer-section a {
            color: var(--footer-text);
            transition: color 0.3s ease;
        }

        .footer-section a:hover {
            color: var(--primary-color);
        }

        .footer-section.contact p {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }
        body.en .footer-section.contact p {
            direction: ltr;
        }


        /* Social Media Icons */
        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 20px;
        }
        body.ar .social-links {
            justify-content: flex-end; /* Align right for Arabic */
        }
        body.en .social-links {
            justify-content: flex-start; /* Align left for English */
        }
        body.ur .social-links {
            justify-content: flex-end; /* Align right for Urdu */
        }


        .social-links a {
            display: inline-block;
            width: 38px;
            height: 38px;
            background-color: var(--primary-dark); /* Using primary-dark for social links */
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: background-color 0.3s ease, transform 0.2s ease;
        }
        .social-links a:hover {
            background-color: var(--primary-color);
            transform: translateY(-3px);
        }
        .social-links img {
            width: 20px;
            height: 20px;
            filter: invert(1);
        }

        .footer-bottom {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid var(--footer-border);
            font-size: 14px;
            color: #bdc3c7;
            transition: border-color 0.4s ease, color 0.4s ease;
        }

        /* Responsive */
        @media (max-width: 1024px) {
            main {
                max-width: 95%;
                padding: 20px;
            }
            .header-controls {
                margin-left: 10px;
                gap: 10px;
            }
        }

        @media (max-width: 900px) {
            header {
                flex-wrap: wrap;
                justify-content: center;
                gap: 15px;
                padding: 15px 20px;
            }
            header .logo {
                flex-basis: 100%;
                text-align: center;
            }
            header nav ul {
                flex-basis: 100%;
                justify-content: center;
                gap: 20px;
                margin-top: 10px;
            }
            .header-controls {
                order: -1; /* Move controls to the top on smaller screens */
                width: 100%;
                justify-content: center;
                margin-left: 0;
                margin-bottom: 10px;
            }
            main {
                flex-direction: column;
                margin: 20px auto 40px;
            }
            .courses-container, .sidebar {
                flex-basis: 100%;
                max-height: none;
                border-left: none;
                padding-left: 0;
            }
            .sidebar {
                margin-top: 35px;
                border-top: 1.5px solid var(--border-color);
                padding-top: 30px;
                justify-content: flex-start;
                padding-bottom: 0;
            }
            .flash-banner {
                position: relative;
                top: auto;
                border-radius: 14px 14px 0 0;
                margin: 25px auto; /* Center the banner */
                max-width: 95%; /* Limit width to align with main content */
                box-shadow: 0 4px 15px var(--shadow-color); /* Adjust shadow for relative positioning */
            }
            .page-hero {
                padding: 80px 15px;
                margin-bottom: 40px;
            }
            .page-hero h1 {
                font-size: 2.8em;
            }
            .page-hero p {
                font-size: 1.1em;
            }
            .btn-main {
                padding: 15px 35px;
                font-size: 1.1em;
            }
            body.ar .footer-section.contact p {
                flex-direction: column; /* Stack contact info */
                align-items: center;
            }
            body.en .footer-section.contact p {
                flex-direction: column;
                align-items: center;
            }
        }

        @media (max-width: 768px) {
            .flash-banner {
                flex-direction: column;
                text-align: center;
                padding: 15px;
                gap: 15px;
            }
            .flash-banner .details-btn {
                width: 90%;
                min-width: unset;
            }
            .footer-content {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }
            .footer-section {
                min-width: unset;
                width: 100%;
            }
            .footer-section ul {
                padding-right: 0;
            }
            .social-links {
                justify-content: center;
            }
        }

        @media (max-width: 450px) {
            header {
                padding: 10px 15px;
            }
            header .logo {
                font-size: 24px;
            }
            header nav ul {
                gap: 15px;
                font-size: 16px;
            }
            .page-hero {
                padding: 60px 15px;
            }
            .page-hero h1 {
                font-size: 2.2em;
            }
            .page-hero p {
                font-size: 1em;
            }
            .btn-main {
                padding: 12px 25px;
                font-size: 1em;
            }

            .flash-banner p {
                font-size: 16px;
            }
            .courses-container h2 {
                font-size: 26px;
            }
            .course h3 {
                font-size: 20px;
            }
            .course-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }
            .course-icon {
                width: 50px;
                height: 50px;
            }
            .course-meta {
                flex-direction: column;
                gap: 8px;
            }

            .sidebar h3 {
                font-size: 22px;
            }
            .details-btn, button {
                padding: 10px 18px;
                font-size: 15px;
            }
            .clear-filters-btn {
                padding: 10px 15px;
                font-size: 14px;
            }
        }
    