/* ==========================================================================
   PROFESSIONAL HEADER - COMPLETE ADVANCED
   Version: 4.0 - Ultra Professional
   ========================================================================== */

/* ==========================================================================
   1. TOP BAR
   ========================================================================== */

.header-top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 0.85rem;
    padding: 10px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left .current-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-left svg {
    opacity: 0.9;
}

.social-icons-top {
    display: flex;
    gap: 12px;
}

.social-icons-top a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s;
}

.social-icons-top a:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* ==========================================================================
   2. MAIN HEADER
   ========================================================================== */

.professional-header {
    position: relative;
    z-index: 1000;
}

.header-main {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.header-main[data-sticky="true"] {
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-main.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 30px;
}

/* ==========================================================================
   3. SITE BRANDING
   ========================================================================== */

.site-branding {
    flex-shrink: 0;
}

.custom-logo-wrapper img {
    max-height: 50px;
    width: auto;
    display: block;
}

.site-title-wrapper .site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.site-title-wrapper .site-title a {
    color: #1a1a1a;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-description {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #666;
}

/* ==========================================================================
   4. DESKTOP NAVIGATION
   ========================================================================== */

.desktop-navigation {
    flex: 1;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.nav-menu > li > a::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: translateX(-50%);
    transition: width 0.3s;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.nav-menu > li > a:hover::before,
.nav-menu > li.current-menu-item > a::before {
    width: calc(100% - 36px);
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 15px 0;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}

.nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s;
    border-right: 3px solid transparent;
}

.nav-menu .sub-menu li a:hover {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    border-right-color: #667eea;
    padding-right: 25px;
}

/* Menu Item with Icon */
.nav-menu .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-right: 8px;
    transition: transform 0.3s;
}

.nav-menu .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* ==========================================================================
   5. HEADER ACTIONS
   ========================================================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.search-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ==========================================================================
   6. SEARCH MODAL
   ========================================================================== */

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    max-width: 700px;
    width: 90%;
    position: relative;
    animation: searchSlideIn 0.4s ease;
}

@keyframes searchSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.search-close {
    position: absolute;
    top: -50px;
    left: 0;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.search-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.search-form-wrapper {
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0,0,0,0.3);
}

.search-form {
    display: flex;
    align-items: center;
}

.search-field {
    flex: 1;
    border: none;
    padding: 20px 30px;
    font-size: 1.1rem;
    outline: none;
    background: transparent;
    font-family: 'Noto Nastaliq Urdu', serif;
}

.search-submit {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.search-submit:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ==========================================================================
   7. MOBILE MENU TOGGLE
   ========================================================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
    gap: 5px;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

.toggle-bar {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active .toggle-bar:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* ==========================================================================
   8. MOBILE SIDEBAR MENU
   ========================================================================== */

.mobile-sidebar-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

.mobile-sidebar-menu.active {
    pointer-events: all;
}

.mobile-sidebar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-sidebar-menu.active .mobile-sidebar-overlay {
    opacity: 1;
}

.mobile-sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.3);
}

.mobile-sidebar-menu.active .mobile-sidebar-content {
    transform: translateX(0);
}

/* Sidebar Header */
.mobile-sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo h2 {
    margin: 0;
    font-size: 1.3rem;
}

.sidebar-logo img {
    max-height: 40px;
}

.mobile-sidebar-close {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-sidebar-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Sidebar Search */
.mobile-sidebar-search {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-sidebar-search form {
    display: flex;
    background: #f8f9fa;
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.mobile-sidebar-search form:focus-within {
    border-color: #667eea;
    box-shadow: 0 3px 15px rgba(102, 126, 234, 0.2);
}

.mobile-sidebar-search input {
    flex: 1;
    border: none;
    padding: 12px 18px;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    font-family: 'Noto Nastaliq Urdu', serif;
}

.mobile-sidebar-search button {
    width: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar Navigation */
.mobile-sidebar-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.mobile-sidebar-navigation::-webkit-scrollbar {
    width: 6px;
}

.mobile-sidebar-navigation::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-sidebar-navigation::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-menu > li > a {
    display: block;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border-right: 3px solid transparent;
}

.mobile-nav-menu > li > a:hover,
.mobile-nav-menu > li.current-menu-item > a {
    background: rgba(102, 126, 234, 0.05);
    color: #667eea;
    border-right-color: #667eea;
    padding-right: 30px;
}

/* Mobile Submenu */
.mobile-nav-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
}

.mobile-nav-menu .menu-item-has-children.open > .sub-menu {
    max-height: 500px;
}

.mobile-nav-menu .sub-menu li a {
    display: block;
    padding: 12px 25px 12px 45px;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.mobile-nav-menu .sub-menu li a:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    padding-right: 30px;
}

.mobile-nav-menu .menu-item-has-children > a {
    position: relative;
}

.mobile-nav-menu .menu-item-has-children > a::after {
    content: '';
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-50%) rotate(-45deg);
    transition: transform 0.3s;
}

.mobile-nav-menu .menu-item-has-children.open > a::after {
    transform: translateY(-25%) rotate(135deg);
}

/* Sidebar Footer */
.mobile-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: #f8f9fa;
}

.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.sidebar-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s;
}

.sidebar-social a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
    .desktop-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-content {
        gap: 15px;
    }
    
    .search-toggle {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .header-top-bar {
        font-size: 0.8rem;
        padding: 8px 0;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .site-title-wrapper .site-title {
        font-size: 1.4rem;
    }
    
    .search-modal-content {
        width: 95%;
    }
    
    .search-field {
        font-size: 1rem;
        padding: 16px 20px;
    }
    
    .search-submit {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .site-title-wrapper .site-title {
        font-size: 1.2rem;
    }
    
    .site-description {
        font-size: 0.75rem;
    }
    
    .mobile-sidebar-content {
        width: 280px;
    }
}
