/* blog.css */
.blog-content {
    flex: 1;
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

/* 文章卡片、搜尋框、訂閱表單等樣式 */

/* blog.css 新增搜尋相關樣式 */

/* 搜尋容器 */
.search-container {
    position: relative;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.search-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
}

.search-icon {
    font-size: 0.9rem;
}

.category-select {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: white;
    cursor: pointer;
    min-width: 150px;
}

.category-select:focus {
    border-color: #3498db;
    outline: none;
}

/* 搜尋建議 */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.search-suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-category {
    font-size: 0.8rem;
    color: #3498db;
    background-color: #f0f7ff;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    margin-right: 0.5rem;
}

/* 搜尋結果資訊 */
.search-results-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

#resultsCount {
    font-weight: bold;
    color: #3498db;
    font-size: 1.2rem;
}

.clear-search-btn {
    padding: 0.5rem 1rem;
    background-color: #e9ecef;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-search-btn:hover {
    background-color: #dee2e6;
}

/* 搜尋關鍵字高亮 */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: bold;
}

/* 無結果訊息 */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: 2rem 0;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 搜尋篩選標籤 */
.search-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.filter-tag {
    background-color: #f0f7ff;
    color: #3498db;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

/* 動畫效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }
    
    .search-btn, .category-select {
        width: 100%;
    }
}