/* ========== HEADER.CSS - 页头与导航栏专用样式 ========== */

/* 中医药主题色系（与index.css保持一致） */
:root {
    --herbal-green: #2e7d32;
    --herbal-dark-green: #1b5e20;
    --herbal-light-green: #4caf50;
    --herbal-pale-green: #e8f5e9;
    --herbal-gold: #d4a55e;
    --neutral-white: #ffffff;
}

/* 1. 中医药文化顶部装饰 - 调小高度 */
.top-decoration {
    background: linear-gradient(135deg, var(--herbal-dark-green), var(--herbal-green));
    padding: 2px 0; /* 调小高度 */
    position: relative;
}

.herbal-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 1px 0;
}

.herbal-icon {
    font-size: 14px;
    color: var(--herbal-gold);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.herbal-icon:hover {
    transform: scale(1.2);
    opacity: 1;
}

.decoration-line {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--herbal-gold) 30%,
        var(--herbal-gold) 70%,
        transparent 100%);
    margin: 3px auto;
    width: 80%;
}

/* 2. 页面头部 */
.page-header {
    background: var(--neutral-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    border-bottom: 1px solid var(--herbal-pale-green);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* 3. LOGO区域 */
.logo {
    flex-shrink: 0;
    min-width: 180px;
}

logo {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.logo-img {
    height: 65px;
    width: auto;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.logo-img img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* 4. 搜索框区域 */
.header-tools {
    flex: 1;
    max-width: 400px;
    min-width: 300px;
}

.search-box {
    width: 100%;
}

.search-input {
    width: 100%;
    position: relative;
}

.search-input form {
    display: flex;
    width: 100%;
    height: 40px;
}

.search-input input[type="text"] {
    flex: 1;
    padding: 0 15px;
    border: 2px solid var(--herbal-pale-green);
    border-radius: 20px 0 0 20px;
    font-size: 14px;
    background: var(--neutral-white);
    outline: none;
    transition: all 0.3s ease;
    height: 40px;
    font-family: "Microsoft YaHei", sans-serif;
}

.search-input input[type="text"]:focus {
    border-color: var(--herbal-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.search-input input[type="text"]::placeholder {
    color: #999;
}

.search-input button[type="submit"] {
    background: var(--herbal-green);
    color: var(--neutral-white);
    border: none;
    border-radius: 0 20px 20px 0;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 40px;
    min-width: 70px;
}

.search-input button[type="submit"]:hover {
    background: var(--herbal-dark-green);
}

/* 5. 导航栏 */
.navigation-bar {
    background: linear-gradient(135deg, var(--herbal-dark-green), var(--herbal-green));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.navigation-bar ul,
.navigation-bar div {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation-bar li {
    position: relative;
    flex: 1;
    text-align: center;
}

.navigation-bar a {
    color: var(--neutral-white);
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.navigation-bar li:last-child a {
    border-right: none;
}

.navigation-bar a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--herbal-gold);
}

.navigation-bar a.active {
    background: var(--herbal-light-green);
    color: var(--neutral-white);
}

.navigation-bar::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--herbal-gold),
        transparent 20%,
        transparent 80%,
        var(--herbal-gold));
}

/* 6. 响应式设计 */
@media (max-width: 1200px) {
    .header-content {
        gap: 30px;
    }
    
    .logo {
        min-width: 160px;
    }
    
    .header-tools {
        min-width: 280px;
    }
    
    .navigation-bar a {
        padding: 15px 15px;
    }
    
    .herbal-icons {
        gap: 18px;
    }
}

@media (max-width: 992px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .logo {
        width: 100%;
        text-align: center;
        min-width: auto;
    }
    
    .header-tools {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .search-input form {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .navigation-bar ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navigation-bar a {
        padding: 12px 15px;
    }
    
    .herbal-icons {
        gap: 15px;
    }
    
    .herbal-icon {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    .logo-img {
        height: 55px;
    }
    
    .search-input input[type="text"] {
        padding: 0 12px;
        font-size: 13px;
        height: 38px;
    }
    
    .search-input button[type="submit"] {
        padding: 0 15px;
        font-size: 13px;
        height: 38px;
        min-width: 60px;
    }
    
    .navigation-bar {
        position: relative;
    }
    
    .navigation-bar ul {
        flex-direction: column;
        align-items: center;
    }
    
    .navigation-bar a {
        padding: 12px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-align: center;
    }
    
    .herbal-icons {
        gap: 12px;
    }
    
    .herbal-icon {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .search-input form {
        flex-direction: column;
        height: auto;
    }
    
    .search-input input[type="text"] {
        border-radius: 20px;
        margin-bottom: 8px;
        height: 38px;
    }
    
    .search-input button[type="submit"] {
        border-radius: 20px;
        width: 100%;
        height: 38px;
    }
    
    .herbal-icons {
        gap: 10px;
    }
    
    .herbal-icon {
        font-size: 10px;
    }
}