/* =========================================
   HEADER LPRO72 - ISOLATED SCOPE
   ========================================= */

.lpro72-header-scope .navbar-default {
    background-color: #f8f9fa;
    border: none;
    margin-bottom: 0;
}
.lpro72-header-scope .navbar-collapse {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    width: 100%;
}
.lpro72-header-scope .nav.navbar-nav {
    margin-right: 0;
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100%;
}
.lpro72-header-scope .navbar-nav > li > a,
.lpro72-header-scope .navbar-default .navbar-nav > li > a {
    color: #666;
    padding: 16px 18px;
    margin: 0 6px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.2;
}
.lpro72-header-scope .navbar-nav > li > a:hover,
.lpro72-header-scope .navbar-nav > li > a:focus,
.lpro72-header-scope .navbar-nav > .open > a,
.lpro72-header-scope .navbar-nav > .open > a:hover,
.lpro72-header-scope .navbar-nav > .open > a:focus {
    background-color: #e9ecef;
    color: #444;
    border-radius: 20px;
}
.lpro72-header-scope .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    margin-top: 10px;
    position: absolute;
    z-index: 1000;
    min-width: 220px;
    left: 0;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}
.lpro72-header-scope .dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.lpro72-header-scope .dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}
.lpro72-header-scope .dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #dee2e6;
    border-radius: 10px;
}
.lpro72-header-scope .dropdown-menu.dropdown-menu-right {
    right: 0 !important;
    left: auto !important;
}
.lpro72-header-scope .dropdown-menu .divider {
    height: 1px;
    margin: 8px 0;
    overflow: hidden;
    background-color: #e9ecef;
}
.lpro72-header-scope .dropdown-header {
    display: block;
    padding: 5px 20px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.lpro72-header-scope .dropdown.open > .dropdown-menu,
.lpro72-header-scope .dropdown:hover > .dropdown-menu,
.lpro72-header-scope .dropdown-menu:hover,
.lpro72-header-scope .dropdown.show > .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: header-fadeInUp 0.3s ease;
}
@keyframes header-fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.lpro72-header-scope .dropdown-menu > li > a {
    color: #495057 !important;
    padding: 10px 20px;
    border-radius: 8px;
    margin: 2px 8px;
    transition: all 0.2s ease;
    background-color: transparent !important;
    display: flex;
    align-items: center;
    font-size: 14px;
}
.lpro72-header-scope .dropdown-menu > li > a i {
    width: 20px;
    margin-right: 12px;
    font-size: 14px;
    color: #6c757d;
    transition: color 0.2s ease;
}
.lpro72-header-scope .dropdown-menu > li > a:hover {
    background-color: #f1f3f5 !important;
    color: #228be6 !important;
    transform: translateX(3px);
}
.lpro72-header-scope .dropdown-menu > li > a:hover i {
    color: #228be6;
}
.lpro72-header-scope .dropdown-menu > li > a.logout-link:hover {
    background-color: #fff5f5 !important;
    color: #fa5252 !important;
}
.lpro72-header-scope .dropdown-menu > li > a.logout-link:hover i {
    color: #fa5252;
}

/* Auth specific nav items */
.lpro72-header-scope .admin-nav-item > a {
    background-color: #fff4e6 !important;
    color: #fd7e14 !important;
    font-weight: 600 !important;
}
.lpro72-header-scope .admin-nav-item > a:hover {
    background-color: #ffe8cc !important;
}
.lpro72-header-scope .login-nav-item > a {
    background-color: #e7f5ff !important;
    color: #228be6 !important;
    font-weight: 600 !important;
    margin-left: 15px !important;
}
.lpro72-header-scope .login-nav-item > a:hover {
    background-color: #d0ebff !important;
}

/* Fix for potential global element leaks */
.lpro72-header-scope h2, 
.lpro72-header-scope h3, 
.lpro72-header-scope h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.lpro72-header-scope ul, 
.lpro72-header-scope ol {
    margin-top: 0;
    margin-bottom: 1rem;
}

.lpro72-header-scope img {
    vertical-align: middle;
    border-style: none;
}

/* DESKTOP SPECIFIC */
@media (min-width: 769px) {
    .lpro72-header-scope .profile-menu {
        margin-left: 15px;
    }
    .lpro72-header-scope .profile-menu .dropdown-toggle {
        padding: 5px 12px;
        background-color: #f8f9fa;
        border-radius: 30px;
        border: 1px solid #e9ecef;
        transition: all 0.3s ease;
    }
    .lpro72-header-scope .profile-menu:hover .dropdown-toggle {
        background-color: #ffffff;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        border-color: #dee2e6;
    }
    .lpro72-header-scope .profile-container {
        display: flex;
        align-items: center;
    }
    .lpro72-header-scope .profile-image {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        margin-right: 10px;
        object-fit: cover;
        border: 2px solid #ffffff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .lpro72-header-scope .profile-name {
        font-size: 13px;
        font-weight: 600;
        color: #495057;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .lpro72-header-scope .site-title-banner {
        background: linear-gradient(to right, #1a2a3a, #2c3e50, #1a2a3a);
        color: white;
        padding: 15px 0;
        margin-bottom: 0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    .lpro72-header-scope .site-title-banner h2 {
        margin: 0;
        font-weight: 600;
        font-size: 24px;
        background: linear-gradient(90deg, #2c3e50, #3498db, #2c3e50);
        background-size: 200% auto;
        color: transparent;
        -webkit-background-clip: text;
        background-clip: text;
        animation: header-gradientText 8s linear infinite;
        text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }
    
    .lpro72-header-scope .header-carousel {
        position: relative;
        overflow: hidden;
        background: linear-gradient(to right, #f5f5f5, #ffffff, #f5f5f5);
        height: 80px;
        display: flex;
        align-items: center;
    }
    .lpro72-header-scope .partner-item {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 80px;
        padding: 0 20px;
        margin: 0 15px;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        min-width: 160px;
    }
    .lpro72-header-scope .partner-item:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    }
    .lpro72-header-scope .partner-item img {
        max-width: 130px;
        max-height: 65px;
        object-fit: contain;
    }
    
    @keyframes header-gradientText {
        0% { background-position: 0% center; }
        50% { background-position: 100% center; }
        100% { background-position: 0% center; }
    }

    .lpro72-header-scope .partners-container {
        display: flex;
        width: max-content;
    }

    .lpro72-header-scope .partners-title {
        text-align: center;
        width: 100%;
        font-size: 1.2em;
        font-weight: bold;
        color: #666;
        margin-bottom: 10px;
        padding-top: 10px;
    }
}

/* MOBILE SPECIFIC */
@media (max-width: 768px) {
    .lpro72-header-scope.mobile-active-body {
        padding-top: 70px;
    }
    .lpro72-header-scope .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        box-shadow: 0 2px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
    }
    .lpro72-header-scope .mobile-logo {
        height: 50px;
        width: auto;
        object-fit: contain;
    }
    .lpro72-header-scope .mobile-menu-toggle {
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        padding: 10px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .lpro72-header-scope .hamburger {
        width: 20px;
        height: 16px;
        position: relative;
        transform: rotate(0deg);
        transition: .5s ease-in-out;
        cursor: pointer;
    }
    .lpro72-header-scope .hamburger span {
        display: block;
        position: absolute;
        height: 2px;
        width: 100%;
        background: white;
        border-radius: 2px;
        transition: .25s ease-in-out;
    }
    .lpro72-header-scope .hamburger span:nth-child(1) { top: 0px; }
    .lpro72-header-scope .hamburger span:nth-child(2), .lpro72-header-scope .hamburger span:nth-child(3) { top: 7px; }
    .lpro72-header-scope .hamburger span:nth-child(4) { top: 14px; }
    
    .lpro72-header-scope .hamburger.open span:nth-child(1) { top: 7px; width: 0%; left: 50%; }
    .lpro72-header-scope .hamburger.open span:nth-child(2) { transform: rotate(45deg); }
    .lpro72-header-scope .hamburger.open span:nth-child(3) { transform: rotate(-45deg); }
    .lpro72-header-scope .hamburger.open span:nth-child(4) { top: 7px; width: 0%; left: 50%; }

    .lpro72-header-scope .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(5px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .lpro72-header-scope .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .lpro72-header-scope .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: white;
        z-index: 1001;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
        box-shadow: -5px 0 25px rgba(0,0,0,0.2);
    }
    .lpro72-header-scope .mobile-menu.active { right: 0; }
    
    .lpro72-header-scope .mobile-menu-header {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 25px 20px;
        text-align: center;
        position: relative;
    }
    .lpro72-header-scope .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
    }
    
    .lpro72-header-scope .mobile-nav { padding: 0; margin: 0; list-style: none; }
    .lpro72-header-scope .mobile-nav-item { border-bottom: 1px solid #f0f0f0; }
    .lpro72-header-scope .mobile-nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
    }
    .lpro72-header-scope .mobile-nav-link i { margin-right: 12px; color: #667eea; }
    
    .lpro72-header-scope .mobile-submenu {
        background-color: #f8f9fa;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .lpro72-header-scope .mobile-submenu.active { max-height: 800px; }
    .lpro72-header-scope .mobile-submenu-link {
        display: block;
        padding: 12px 20px 12px 60px;
        color: #666;
        text-decoration: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .lpro72-header-scope .mobile-user-section {
        margin-top: 20px;
        padding: 20px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-top: 2px solid #667eea;
    }
    .lpro72-header-scope .mobile-user-profile {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
    }
    .lpro72-header-scope .mobile-user-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        margin-right: 15px;
        border: 3px solid #667eea;
        object-fit: cover;
    }

    /* MOBILE CAROUSEL STYLES */
    .lpro72-header-scope .header-carousel {
        position: relative;
        overflow: hidden;
        background: #fff;
        height: 60px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid #eee;
    }
    .lpro72-header-scope .partners-marquee {
        width: 100%;
        overflow: hidden;
    }
    .lpro72-header-scope .partners-container {
        display: flex;
        width: max-content;
    }
    .lpro72-header-scope .mobile-partner-item {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 50px;
        padding: 0 10px;
        margin: 0 5px;
        background-color: white;
        border-radius: 4px;
        min-width: 100px;
    }
    .lpro72-header-scope .mobile-partner-item img {
        max-width: 80px;
        max-height: 40px;
        object-fit: contain;
    }
    .lpro72-header-scope .partners-title {
        font-size: 14px;
        font-weight: bold;
        color: #666;
        padding: 10px 20px 5px;
        text-align: center;
        background: #fff;
    }
}

/* SKELETON LOADER */
.lpro72-header-scope .header-skeleton {
    animation: header-skeleton-pulse 1.5s infinite ease-in-out;
}
@keyframes header-skeleton-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

