/* Header Layout Styles */
.header-main-content {
    display: flex;
    align-items: center;
    padding: 15px 0;
    min-height: 70px;
}

/* Mobile Header */
.header-mobile {
    justify-content: space-between;
}

.header-mobile-menu {
    flex: 0 0 auto;
}

.header-mobile .header-logo {
    flex: 1;
    text-align: center;
    display: block;
}

.header-mobile .header-user-status {
    flex: 0 0 auto;
    margin-right: 15px;
}

.header-mobile .header-user-menu {
    flex: 0 0 auto;
}

/* Desktop Header */
.header-desktop {
    justify-content: space-between;
    display: none;
}

.header-desktop .header-logo {
    flex: 0 0 auto;
    display: block;
}

.header-desktop .header-main-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 30px;
}

.header-desktop .header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-desktop .header-user-status {
    margin-right: 0;
}

/* Main Navigation Styles */
.main-navigation {
    width: 100%;
}

.main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: visible;
}

.main-menu li {
    position: relative;
}

.main-menu li:first-child a {
    border-radius: 12px 0 0 12px;
}

.main-menu li:last-child a {
    border-radius: 0 12px 12px 0;
}

.main-menu a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #000;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.main-menu a:hover {
    color: #0048d8;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    transform: translateY(-1px);
}

.main-menu li.current-menu-item > a,
.main-menu li.current_page_item > a {
    color: #0048d8;
    background: linear-gradient(135deg, #e8f0ff 0%, #d6e4ff 100%);
    font-weight: 700;
}

.main-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 12px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border: 1px solid #e5e7eb;
    overflow: visible;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-top: 8px;
}

.main-menu li:hover .sub-menu,
.main-menu li:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Ensure submenu stays visible when hovering over it */
.main-menu .sub-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}
.border-bottom-1{border-bottom: 1px solid #e1e1e1;}
.main-menu .sub-menu li {
    border-bottom: 1px solid #f0f0f0;
    display: block;
    position: relative;
}

.main-menu .sub-menu li:last-child {
    border-bottom: none;
}

.main-menu .sub-menu a {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 0;
    color: #000;
    transition: all 0.2s ease;
}

.main-menu .sub-menu a:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    color: #0048d8;
    padding-left: 25px;
}

.main-menu .sub-menu li.current-menu-item > a,
.main-menu .sub-menu li.current_page_item > a {
    color: #0048d8;
    background: linear-gradient(135deg, #e8f0ff 0%, #d6e4ff 100%);
    font-weight: 600;
}

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

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

/* Logo Styles */
.header-logo {
    display: block;
}

.header-logo img {
    max-height: 50px;
    height: 50px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* User Status & Menu */
.header-user-status {
    flex: 0 0 auto;
    margin-right: 15px;
}

.header-user-menu {
    flex: 0 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-mobile {
        display: flex;
        padding: 10px 0;
        min-height: 60px;
        gap:10px;
    }
    
    .header-desktop {
        display: none;
    }
    
    .header-logo {
        display: block !important;
    }
    
    .header-logo img {
        max-height: 40px;
        height: 40px;
        width: auto;
        display: block;
        object-fit: contain;
    }
    
    .header-user-status {
        margin-right: 10px;
    }
    .header-mobile .header-right {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }
}

@media (min-width: 769px) {
    .header-mobile {
        display: none;
    }
    
    .header-desktop {
        display: flex;
        flex-wrap: wrap;
    }
    
    .header-logo {
        display: block !important;
    }
    
    .header-logo img {
        height: 50px;
        width: auto;
        display: block;
        object-fit: contain;
    }
    .header-mobile .header-right {
        flex: 0 0 auto;
        display: flex;
        align-items: center;

    }
}
