/* 優化搜索框樣式 */
.search {
    position: relative;
    z-index: 9;
    margin-top: 5px;
}

/* 新增：讓 chenggong 和 search 在同一行 */
.header-right {
    display: flex;
    align-items: center; /* 保持垂直居中 */
    justify-content: space-between;
    width: calc(100% - 240px); /* 減去 logo 的寬度 */
    margin-left: 20px;
    height: 70px; /* 設置固定高度與 logo 一致 */
}

/* 覆蓋原始的 chenggong 樣式 */
.indextop .chenggong {
    line-height: 70px;
    font-size: 14px;
    color: #333;
    padding-left: 30px;
    position: relative;
    z-index: 9;
    border-left: 1px solid #ddd;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 0; /* 覆蓋原始樣式 */
    height: 70px; /* 設置固定高度 */
    display: flex;
    align-items: center; /* 垂直居中 */
}

.indextop .chenggong b {
    font-weight: bold;
    color: #014898;
    font-size: 32px;
}

/* 覆蓋原始的 search 樣式 */
.indextop .search {
    margin-top: 0;
    flex: 1;
    margin-left: 30px;
    height: 70px; /* 設置固定高度 */
    display: flex;
    align-items: center; /* 垂直居中 */
}

.header-right .chenggong {
    line-height: 70px;
    font-size: 14px;
    color: #333;
    padding-left: 30px;
    position: relative;
    z-index: 9;
    border-left: 1px solid #ddd;
    white-space: nowrap;
    flex-shrink: 0;
    height: 70px; /* 設置固定高度 */
    display: flex;
    align-items: center; /* 垂直居中 */
}

.header-right .chenggong b {
    font-weight: bold;
    color: #014898;
    font-size: 32px;
}

.header-right .search {
    margin-top: 0;
    flex: 1;
    margin-left: 30px;
    height: 70px; /* 設置固定高度 */
    display: flex;
    align-items: center; /* 垂直居中 */
}

.s-find {
    margin-bottom: 5px;
    border: 2px solid #e1e5e9;
    height: 40px; /* 從 48px 調整為 40px */
    border-radius: 20px; /* 從 24px 調整為 20px */
    background: #fff;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.s-find:hover {
    border-color: #014898;
    box-shadow: 0 4px 12px rgba(1, 72, 152, 0.15);
}

.s-find:focus-within {
    border-color: #014898;
    box-shadow: 0 4px 16px rgba(1, 72, 152, 0.2);
}

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

.s-find .input {
    line-height: 36px; /* 從 44px 調整為 36px */
    height: 36px; /* 從 44px 調整為 36px */
    min-width: 420px;
    padding-left: 20px;
    padding-right: 50px;
    border: none;
    color: #333;
    background: transparent;
    font-size: 14px;
    outline: none;
    border-radius: 20px 0 0 20px; /* 從 24px 調整為 20px */
    transition: all 0.3s ease;
}

.s-find .input::placeholder {
    color: #999;
    font-size: 14px;
}

.s-find .input:focus {
    color: #333;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    transition: color 0.3s ease;
}

.s-find:focus-within .search-icon {
    color: #014898;
}

.s-find .searchBtn {
    height: 36px; /* 從 44px 調整為 36px */
    border: none;
    background: linear-gradient(135deg, #014898 0%, #1a5bb3 100%);
    color: #fff;
    padding: 0 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0 20px 20px 0; /* 從 24px 調整為 20px */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.s-find .searchBtn:hover {
    background: linear-gradient(135deg, #1a5bb3 0%, #014898 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(1, 72, 152, 0.3);
}

.s-find .searchBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(1, 72, 152, 0.2);
}

.s-hot {
    line-height: 25px;
    height: 25px;
    margin-left: 35px;
    font-size: 14px;
    margin-top: 8px;
}

.s-hot * {
    display: inline-block;
}

.s-hot b {
    font-weight: 600;
    color: #555;
    margin-right: 8px;
}

.s-hot a {
    color: #666;
    margin-right: 12px;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 13px;
}

.s-hot a:hover {
    color: #014898;
    background: rgba(1, 72, 152, 0.1);
    text-decoration: none;
}

/* 響應式設計 */
@media screen and (max-width: 1200px) {
    .header-right {
        width: calc(100% - 220px);
    }
    
    .s-find .input {
        min-width: 350px;
    }
}

@media screen and (max-width: 1000px) {
    .header-right {
        flex-direction: column;
        align-items: flex-start;
        width: calc(100% - 220px);
        height: auto; /* 自動高度 */
    }
    
    .header-right .chenggong {
        line-height: 40px;
        margin-bottom: 10px;
        border-left: none;
        padding-left: 0;
        height: auto; /* 自動高度 */
        display: block; /* 改回塊級元素 */
    }
    
    .header-right .search {
        margin-left: 0;
        width: 100%;
        height: auto; /* 自動高度 */
        display: block; /* 改回塊級元素 */
    }
    
    .s-find .input {
        min-width: 280px;
    }
    
    .s-find .searchBtn {
        padding: 0 20px;
        min-width: 80px;
    }
}

@media screen and (max-width: 768px) {
    .header-right {
        width: calc(100% - 200px);
        margin-left: 10px;
        height: auto; /* 自動高度 */
    }
    
    .header-right .chenggong {
        font-size: 12px;
        line-height: 30px;
        height: auto; /* 自動高度 */
        display: block; /* 改回塊級元素 */
    }
    
    .header-right .chenggong b {
        font-size: 24px;
    }
    
    .header-right .search {
        height: auto; /* 自動高度 */
        display: block; /* 改回塊級元素 */
    }
    
    .s-find {
        height: 36px; /* 從 44px 調整為 36px */
        border-radius: 18px; /* 從 22px 調整為 18px */
    }
    
    .s-find .input {
        min-width: 200px;
        font-size: 13px;
        padding-left: 15px;
        padding-right: 40px;
        height: 32px; /* 從 44px 調整為 32px */
        line-height: 32px; /* 從 44px 調整為 32px */
    }
    
    .s-find .searchBtn {
        padding: 0 15px;
        min-width: 70px;
        font-size: 13px;
        height: 32px; /* 從 44px 調整為 32px */
    }
    
    .search-icon {
        right: 12px;
    }
    
    .search-icon svg {
        width: 14px;
        height: 14px;
    }
}

/* 動畫效果 */
@keyframes searchPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.s-find:focus-within {
    animation: searchPulse 0.3s ease;
}

/* 加載狀態 */
.searchBtn.loading {
    position: relative;
    pointer-events: none;
}

.searchBtn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 