/* =========================
   RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f3f3;
    color: #222;
    overflow-x: hidden;
}

/* =========================
   HEADER
========================= */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #5621d1;
    text-align: center;
    padding: 10px 15px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.logo {
    width: 130px;
    height: auto;
}

/* =========================
   NAVIGATION
========================= */
.nav-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;              
    min-width: 0;                
    overflow: hidden;            
}

.nav {
    list-style: none;
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    margin: 4px 0;
    padding: 0;
    white-space: nowrap;
}

/* Urdu menu */
.urdu-nav {
    direction: rtl;
    font-family: "Noto Nastaliq Urdu", serif;
}

.urdu-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    padding: 4px 8px;
    transition: color 0.3s ease;
}

/* English menu */
.en-nav a {
    color: gold;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 3px 4px;
    transition: color 0.3s ease;
}

/* =========================
   MENU ACTIVE STATE
========================= */
.urdu-nav a.active {
    color: gold;
    font-weight: bold;
    text-decoration: underline;
}

.en-nav a.active {
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}

/* Hover effects for both menus */
.nav-wrapper .nav a:hover {
    color: #f1e08a;
}

/* =========================
   SEARCH & HAMBURGER
========================= */
.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-search form {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #d4af37;
    overflow: hidden;
}

.header-search input {
    border: none;
    padding: 6px 10px;
    font-size: 14px;
    outline: none;
    width: 140px;
    max-width: 140px;
}

.header-search button {
    border: none;
    background: #ecc646;
    color: #5621d1;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    border-left: 1px solid #d4af37;
}

.header-search button:hover {
    background: #f1e08a;
}

.hamburger {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* =========================
   MOBILE MENU
========================= */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: #5621d1;
    color: #fff;
    padding: 50px 15px 20px; /* adjusted padding-top for close button */
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 2000;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .nav {
    display: block;
}

.mobile-menu .nav li {
    border-bottom: 1px solid rgb(130, 76, 246);
}

.mobile-menu .nav li a {
    display: block;
    padding: 10px 0;
    color: gold;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.mobile-menu .nav li a:hover {
    color: #d4af37;
}

/* Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.3);
    z-index: 1500;
}

.menu-overlay.active {
    display: block;
}

/* Mobile menu close button */
.mobile-menu-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: none;
    border: none;
    color: gold;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 2100;
    transition: color 0.3s ease;
}

.mobile-menu-close:hover {
    color: #d4af37;
}

/* =========================
   FOOTER
========================= */
footer {
    background: #5621d1;
    color: #fff;
    text-align: center;
    padding: 18px;
    margin-top: 19px;
}

/* =========================
   RESPONSIVE (≤768px)
========================= */
@media (max-width: 768px) {

    .nav-wrapper {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .header-search input {
        width: 120px;
        font-size: 14px;
    }

    .header-search .search-btn {
        width: 60px;
        font-size: 14px;
    }

    .header-inner {
        flex-wrap: nowrap;
    }

    .logo {
        max-width: 85px;
    } 

}
