/* --- Global Styles --- */
body {
    background-color: #f4faff;
    direction: rtl; /* Sets everything to Right-to-Left */
    text-align: right; /* Aligns all text to the right */
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaliq', serif;
    margin: 0;
    padding: 0;
}

/* --- Headings --- */
h1, h2, h3 {
    text-align: right;
}

h1 { color: #555; }
h2 { color: #2e7d32; }
h3 { color: #1565c0; font-size: 1.25rem; }

p {
    font-size: 1.25rem;
    line-height: 1.8;
    text-align: right;
}

/* --- Brand/Logos --- */
#englishlogo, #unicodepenglishlogo, #punjabilogo, #unicodepunjabilogo {
    text-align: right;
    color: #00008b;
}

/* --- Navigation Menu (The fix for your menu) --- */
.menuTemplate1 {
    width: auto;
    float: right; /* Moves the menu block to the right side */
    margin: 1em;
    direction: rtl; 
    list-style: none;
    padding: 0;
}

.menuTemplate1 li {
    float: right; /* Aligns menu items from the right */
}

/* --- Links --- */
a {
    text-decoration: none;
    color: #333;
    transition: 0.3s;
}

a:hover {
    color: #e67e22;
}

/* Sidebar Links */
.sidelist, .sidelisteng {
    display: block;
    padding: 10px;
    font-size: 20px;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.sidelist:hover, .sidelisteng:hover {
    background-color: #eef;
    color: #1565c0;
}

/* --- Top Navigation --- */
#topnav {
    background-color: #668cff;
    padding: 15px 0;
    margin-bottom: 20px;
    text-align: right;
}

/* --- OVERRIDE: Force Dropdown to Right (Add this to the bottom) --- */
.menuTemplate1 li .drop {
    position: absolute !important;
    right: 0 !important; /* Moves dropdown to the right edge */
    left: auto !important; /* Cancels old left-side instructions */
    text-align: right !important;
    min-width: 200px; 
}

/* Ensure the dropdown shows correctly on hover */
.menuTemplate1 li:hover .drop {
    display: block !important;
}

/* Ensure menu items stay right-aligned */
.menuTemplate1 li {
    position: relative !important;
    float: right !important;
}