:root {
    --primary-color: #8d6206f6;
    --secondary-color: #7a4d06;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gold-color: #8d6206f6;
    --dark-gold: #7a4d06;
    --white: #ffffff;
    --shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    --menu-bg: #2e5b5a;
    --menu-hover: #976a16;
}

/* ======== القواعد العامة والتهيئة ======== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    font-family: 'Tajawal', 'El Messiri', Tahoma, Arial, sans-serif;
}

html {
    direction: rtl;
}

body {
    font-size: 18px;
    color: var(--dark-color);
    background-color: var(--light-color);
    direction: rtl;
    line-height: 1.6;
    padding-top: 180px; /* لمنع تداخل المحتوى مع القائمة الثابتة */
}

/* ======== Header Styles ======== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.login-link {
    background: var(--gold-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.login-link:hover {
    background: var(--dark-gold);
}

.logo-img {
    height: 60px;
}

/* ======== Navigation Styles ======== */
.main-nav {
    background-color: var(--gold-color);
    position: fixed;
    top: 80px;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 15px 20px;
    display: block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--white);
    min-width: 250px;
    box-shadow: var(--shadow);
    display: none;
    z-index: 1000;
    border-radius: 5px;
}

.dropdown-menu li {
    padding: 10px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.dropdown-menu li a {
    color: var(--gold-color);
    text-decoration: none;
    display: block;
    transition: color 0.3s;
}

.dropdown-menu li a:hover {
    color: var(--dark-gold);
}

.submenu {
    position: absolute;
    right: 100%;
    top: 0;
    background-color: var(--white);
    min-width: 250px;
    box-shadow: var(--shadow);
    display: none;
    border-radius: 5px;
    z-index: 1001;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li:hover > .submenu {
    display: block;
}

/* ======== Main Content ======== */
.main-container {
    max-width: 1200px;
    margin: 160px auto 20px;
    padding: 0 20px;
}

#MainContent {
    margin-bottom: 100px;
    min-height: 250px;
    padding: 15px;
}

/* ======== Hero Section ======== */
.hero-section {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("images/q.png");
    background-position: center;
    background-size: cover;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 10px;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

/* ======== News Section ======== */
.news-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.news-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
}

.news-date {
    color: var(--gold-color);
    font-size: 14px;
    margin-bottom: 10px;
}

.news-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.news-excerpt {
    color: #666;
    margin-bottom: 15px;
}

.read-more {
    color: var(--gold-color);
    text-decoration: none;
    font-weight: bold;
}

/* ======== Stats Section ======== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 40px;
    color: var(--gold-color);
    margin-bottom: 15px;
}

.stat-number {
    font-size: 30px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
}

/* ======== News Ticker ======== */
.news-ticker {
    background-color: var(--gold-color);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

.ticker-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.ticker-content {
    display: flex;
    align-items: center;
}

.ticker-label {
    background-color: var(--dark-gold);
    padding: 5px 10px;
    border-radius: 5px;
    margin-left: 10px;
}

.ticker-items {
    flex: 1;
    overflow: hidden;
}

.ticker-item {
    white-space: nowrap;
    animation: ticker 20s linear infinite;
    display: inline-block;
    padding-right: 50px;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ======== Footer ======== */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px; /* لحساب شريط الأخبار الثابت */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--gold-color);
}

.footer-section p, .footer-section a {
    color: #ddd;
    margin-bottom: 10px;
    display: block;
    text-decoration: none;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    color: white;
    font-size: 20px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--gold-color);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
}

/* ======== تخصيصات القوائم القديمة ======== */
.menu-bar {
    background-color: var(--menu-bg);
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.menu-bar > ul {
    display: flex;
    list-style: none;
    height: 100%;
    align-items: center;
    padding: 0;
    margin: 0;
}

.menu-bar ul li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 15px;
}

.menu-bar ul li a {
    color: #e9e9e9;
    text-decoration: none;
    font-size: 16px;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.menu-bar ul li a:hover {
    color: var(--menu-hover);
}

/* القوائم المنسدلة */
.menu-bar ul ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--menu-bg);
    min-width: 220px;
    list-style: none;
    border: 1px solid var(--menu-hover);
    z-index: 1001;
}

.menu-bar ul li:hover > ul {
    display: block;
}

.menu-bar ul ul li {
    width: 100%;
    border-bottom: 1px solid rgba(151, 106, 22, 0.3);
}

.menu-bar ul ul li:last-child {
    border-bottom: none;
}

.menu-bar ul ul li a {
    padding: 12px 20px;
    display: block;
    font-size: 15px;
}

.menu-bar ul ul li a:hover {
    background: rgba(151, 106, 22, 0.2);
    padding-right: 25px;
}

/* القوائم متعددة المستويات */
.menu-bar ul ul ul {
    top: 0;
    right: 100%;
    left: auto;
}

/* ======== تخصيصات النماذج ======== */
input[type=text],
input[type=password],
input[type=email],
.select {
    color: #000000;
    border: 1px solid #C2C2C2;
    box-shadow: 1px 1px 4px #EBEBEB;
    width: 100%;
    padding: 10px 10px !important;
    margin: 8px 0;
    height: 38px !important;
    font-size: 16px !important;
    border-radius: 0 !important;
}

/* ======== تخصيصات الأزرار ======== */
.btn {
    background-color: rgb(66, 110, 225);
    color: #fff;
    border-radius: 0 !important;
    padding: 8px 15px;
    font-size: 15px;
    min-height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background-color: rgb(66, 163, 225);
    color: #fff;
    border: #ffffff;
}

/* ======== تخصيصات الجداول ======== */
table {
    background-color: white;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    text-transform: none;
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #c2c2c2;
}

table tr,
table th,
table td {
    text-align: center !important;
    border: 1px solid #ddd;
    padding: 6px;
}

table th {
    background-color: #f2f2f2;
    color: #333;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #e9e9e9;
}

table.signatureTable {
    border: 1px solid var(--menu-hover);
}

table.signatureTable th,
table.signatureTable tr,
table.signatureTable td {
    border: 1px solid var(--menu-hover);
    padding: 4px;
    background-color: white;
}

/* ======== تخصيصات الشريط الجانبي ======== */
.wrapper .sidebar {
    background: var(--menu-bg);
    position: fixed;
    top: 180px;
    right: 0;
    width: 225px;
    height: 100%;
    padding: 20px 0;
    transition: all 0.5s ease;
}

.wrapper .sidebar .profile img {
    display: block;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
}

.wrapper .sidebar ul li a {
    display: block;
    padding: 13px 30px;
    color: rgb(241, 237, 237);
    font-size: 16px;
    position: relative;
}

.wrapper .sidebar ul li a:hover,
.wrapper .sidebar ul li a.active {
    color: #f7f5fc;
    background: rgba(75, 107, 143, 0.541);
    border-right: 2px solid var(--menu-hover);
}

/* ======== تخصيصات أخرى ======== */
.appName {
    font-weight: bold;
}

.message, .jsMessage {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

.theFooter p {
    font-size: 18px !important;
    color: #000;
}

.paginationNumbers {
    font-size: 16px !important;
    color: #000;
}

.activePage {
    font-weight: bold !important;
    color: #000 !important;
    background-color: #eee !important;
}

.theText p {
    font-weight: bold;
}

.logo {
    color: #e9e9e9;
    font-size: 18px;
}

.logo span {
    color: #c4943b;
}

.result {
    border-width: 0px;
    background-color: white;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    text-transform: none;
}

.acqoua .scrollable {
    height: 200px;
    width: 300px;
    overflow: auto;
}

.acqoua {
    margin: 5px;
    padding-right: 20%;
    padding-left: 10%;
    text-align: center;
}

/* تخصيصات اللغة */
#ar, #en {
    background-color: #dee4ec;
    border: none;
    color: rgb(240, 177, 6);
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 10px;
}

#ar {
    margin-left: 60px;
}

/* ======== Responsive Design ======== */
@media (max-width: 768px) {
    body {
        padding-top: 160px;
    }

    .header-container {
        flex-direction: column;
        gap: 10px;
    }

    .main-nav {
        top: 120px;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        width: 100%;
        display: none;
    }

    .submenu {
        position: static;
        box-shadow: none;
        width: 100%;
        padding-right: 20px;
        display: none;
    }

    .main-container {
        margin-top: 180px;
    }

    .hero-section {
        height: 300px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .wrapper .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
    }

    .menu-bar {
        height: auto;
        flex-direction: column;
        padding: 10px;
    }

    .menu-bar > ul {
        flex-direction: column;
        height: auto;
    }

    .menu-bar ul li {
        height: auto;
        padding: 5px 0;
    }
}.nav-menu .login-item {
    margin-right: auto; /* لدفعه إلى أقصى اليمين */
}

.login-item .login-link {
    background-color: #2c3e50;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.login-item .login-link:hover {
    background-color: #3498db;
    text-decoration: none;
}

@media (max-width: 768px) {
    .nav-menu .login-item {
        margin-right: 0;
        margin-top: 10px;
    }
}