/* public/static/home/css/header.css */

/* 顶部导航 */
.top-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 8px 0;
    font-size: 12px;
}

.top-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.top-nav-left, .top-nav-right {
    display: flex;
    gap: 20px;
}

.top-nav-item {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s ease;
}

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

.top-nav-item i {
    font-size: 14px;
}

/* 主头部 */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 20px 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Logo */
.logo {
    flex-shrink: 0;
    width: 265px;
}

.logo img {
    height: 75px;
    width: 265px;
    object-fit: contain;
}

/* 搜索区域 */
.search-section {
    flex: 1;
    max-width: 600px;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    height: 60px;
}

.search-box:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 25px;
    font-size: 16px;
    background: transparent;
    height: 100%;
    line-height: 60px;
}

.search-input::placeholder {
    color: #999;
    font-size: 16px;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 0 30px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: var(--secondary-color);
}

.search-btn i {
    font-size: 18px;
}

/* 热门搜索关键词 */
.hot-keywords {
    flex-shrink: 0;
    width: 280px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e9ecef;
    height: 85px;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
    height: 100%;
    align-items: center;
}

.keyword-item {
    color: #666;
    text-decoration: none;
    font-size: 12px; /* 从11px增大到13px */
    padding: 4px 10px; /* 相应增加内边距 */
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    white-space: nowrap;
    line-height: 1.2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.keyword-item:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

/* 菜单导航 */
.main-nav {
    background: var(--primary-color);
    padding: 0;
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 18px 30px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-item.active .nav-link::before {
    width: 80%;
}

.nav-link:hover,
.nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 城市导航 */
.city-nav {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.city-nav-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.city-nav-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
}

.city-nav-title i {
    color: var(--primary-color);
    font-size: 18px;
}

.city-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.city-nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.city-nav-item:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .header-content {
        gap: 30px;
    }
    
    .logo {
        width: 220px;
    }
    
    .logo img {
        width: 220px;
        height: auto;
    }
    
    .search-section {
        max-width: 500px;
    }
    
    .hot-keywords {
        width: 240px;
        height: 65px;
    }
    
    .search-box {
        height: 55px;
    }
    
    .search-input {
        line-height: 55px;
        font-size: 15px;
    }
    
    .search-input::placeholder {
        font-size: 15px;
    }
}

@media (max-width: 1024px) {
    .header-content {
        gap: 25px;
    }
    
    .logo {
        width: 200px;
    }
    
    .logo img {
        width: 200px;
        height: auto;
    }
    
    .search-section {
        max-width: 450px;
    }
    
    .hot-keywords {
        width: 220px;
        padding: 12px;
        height: 60px;
    }
    
    .search-box {
        height: 50px;
    }
    
    .search-input {
        line-height: 50px;
        font-size: 14px;
        padding: 0 20px;
    }
    
    .search-input::placeholder {
        font-size: 14px;
    }
    
    .search-btn {
        padding: 0 25px;
    }
    
    .search-btn i {
        font-size: 16px;
    }
    
    .keywords-list {
        gap: 6px;
    }
    

    
    .nav-link {
        padding: 15px 25px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .top-nav-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .top-nav-left, .top-nav-right {
        gap: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .logo {
        width: 100%;
        text-align: center;
    }
    
    .logo img {
        width: 200px;
        height: auto;
    }
    
    .search-section {
        width: 100%;
        max-width: 100%;
    }
    
    .search-box {
        border-radius: 25px;
        height: 50px;
    }
    
    .search-input {
        padding: 0 20px;
        font-size: 14px;
        line-height: 50px;
    }
    
    .search-input::placeholder {
        font-size: 14px;
    }
    
    .search-btn {
        padding: 0 20px;
    }
    
    .search-btn i {
        font-size: 16px;
    }
    
    .hot-keywords {
        width: 100%;
        text-align: center;
        height: auto;
        min-height: 60px;
    }
    
    .keywords-list {
        justify-content: center;
        gap: 8px;
    }
    
    .nav-list {
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .city-nav-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .city-nav-list {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .top-nav {
        padding: 6px 0;
        font-size: 11px;
    }
    
    .top-nav-left, .top-nav-right {
        gap: 10px;
    }
    
    .top-nav-item {
        gap: 3px;
    }
    
    .top-nav-item i {
        font-size: 12px;
    }
    
    .main-header {
        padding: 15px 0;
    }
    
    .header-content {
        gap: 15px;
        padding: 0 15px;
    }
    
    .logo img {
        width: 180px;
    }
    
    .search-box {
        height: 45px;
    }
    
    .search-input {
        padding: 0 15px;
        font-size: 13px;
        line-height: 45px;
    }
    
    .search-input::placeholder {
        font-size: 13px;
    }
    
    .search-btn {
        padding: 0 15px;
    }
    
    .search-btn i {
        font-size: 14px;
    }
    
    .hot-keywords {
        padding: 10px;
    }
    
    .keywords-list {
        gap: 6px;
    }
    

    
    .nav-link {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .city-nav {
        padding: 12px 0;
    }
    
    .city-nav-content {
        padding: 0 15px;
    }
    
    .city-nav-title {
        font-size: 14px;
    }
    
    .city-nav-title i {
        font-size: 16px;
    }
    
    .city-nav-item {
        padding: 5px 10px;
        font-size: 13px;
    }
}