.main-header .logo {
    height: 54px;
}

.main-sidebar, .right-sidebar, .notice-wrapper {
    display: none;
}

.active-sidebar {
    display: block;
}

.content-wrapper {
    width: 100%;
    margin-left: 0;
    margin: 60px 0 0 0;
}

.content-wrapper .content {
    margin: 0;
}

footer.main-footer {
    margin-left: 0;
    margin-right: 0;
    padding: 20px;
}

/* ==================== Home Header Styles ==================== */
.main-header.home-header {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    height: 60px;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* Left Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.home-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

.nav-item a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 19px 0;
    display: block;
    font-weight: 400;
}

.nav-item a:hover {
    color: var(--primary);
}

.nav-item.active a {
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.badge-new {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Search Box */
.search-container {
    position: relative;
    width: 400px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 36px;
    background: #f5f5f5;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0 40px 0 15px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    background: #fff;
    border-color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Search Suggest */
.search-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-top: 2px;
    z-index: 1001;
}

.suggest-list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.suggest-list li a {
    display: block;
    padding: 8px 15px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggest-list li a:hover {
    background: #f5f5f5;
    color: var(--primary);
}

/* User Menu */
.user-menu-container {
    position: relative;
    padding: 10px 0;
}

.user-avatar-wrapper {
    cursor: pointer;
    padding: 5px;
}

.user-avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1002;
}

/* User Dropdown visibility */
.user-menu-container.open .user-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Optional: Giữ hover cho desktop nếu muốn, nhưng mobile bắt buộc dùng click/tap */
@media (min-width: 992px) {
    .user-menu-container:hover .user-dropdown {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 14px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.05));
}

.user-info-header {
    padding: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f5f5f5;
    gap: 12px;
}

.user-avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    display: block;
}

.logout-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logout-link:hover {
    color: var(--primary);
}

.user-actions {
    display: flex;
    padding: 20px 10px;
    justify-content: space-between;
}

.action-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    gap: 8px;
    text-align: center;
}

.action-item:hover span {
    color: var(--primary);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.action-item:hover .action-icon {
    transform: scale(1.1);
}

.action-item span {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    max-width: 80px;
    line-height: 1.3;
}

/* Mobile Header Styles */
.mobile-menu-toggle,
.mobile-search-toggle,
.mobile-nav-header,
.mobile-overlay {
    display: none;
}

@media (max-width: 991px) {
    .header-container {
        padding: 0 15px;
    }

    /* Mobile Logo */
    .logo-divider,
    .logo-text {
        display: none;
    }

    .home-header .logo img {
        height: 20px;
        width: auto;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex;
        background: none;
        border: none;
        padding: 0;
        margin-right: 10px;
        cursor: pointer;
        color: var(--primary);
    }

    /* Mobile Navigation */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .home-header.mobile-menu-open .mobile-overlay {
        opacity: 1;
        visibility: visible;
    }

    .header-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: #fff;
        z-index: 1002;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
    }

    .home-header.mobile-menu-open .header-nav {
        transform: translateX(280px);
    }

    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }

    .mobile-nav-title {
        font-weight: 600;
        font-size: 18px;
    }

    .mobile-nav-close {
        background: none;
        border: none;
        padding: 5px;
        cursor: pointer;
    }

    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .nav-item {
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-item a {
        padding: 15px 20px;
        font-size: 15px;
    }

    .nav-item.active a::after {
        left: 0;
        width: 4px;
        height: 100%;
        bottom: auto;
        top: 0;
    }

    /* Mobile Search */
    .mobile-search-toggle {
        display: block;
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        color: #333;
    }

    .search-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #fff;
        padding: 10px 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        display: none;
        border-top: 1px solid #f0f0f0;
    }

    .home-header.search-open .search-container {
        display: block;
        animation: slideDown 0.2s ease-out;
    }

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

    .search-input {
        background: #f5f5f5;
        border: none;
    }

    .search-suggest {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        margin-top: 10px;
    }

    /* Mobile User Menu */
    .user-menu-container {
        position: static;
    }

    .user-dropdown {
        position: fixed;
        top: 54px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0 0 12px 12px;
        border: none;
        border-top: 1px solid #eee;
        transform: translateY(-10px);
    }
    
    .user-dropdown::before {
        display: none;
    }

    .user-actions {
        padding: 15px;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .header-right {
        gap: 5px;
    }

    .skin-blue .main-header.mobile-menu-open .logo {
        z-index: 1;
    }

    .skin-blue .main-header .logo {
        left: 45px;
    }

    .main-header.home-header {
        height: 54px;
    }

    .user-avatar-wrapper {
        padding: 0;
    }
}

#headerSearch {
    display: none;
}

#headerSearch.blog-search-visible {
    display: block;
}

@media (max-width: 767px) {
    #headerSearch.blog-search-visible {
        display: none;
    }
    
    .home-header.search-open #headerSearch {
        display: block;
    }
    .mobile-search-toggle {
        display: block;
    }
}