@charset "UTF-8";

/* ===================================================
   検索結果ページ用スタイル (search.php)
=================================================== */

/* --- メインコンテナ --- */
.search-main-content {
    max-width: 1000px; /* 横に広がりすぎないように制限 */
    margin-inline: auto;
    float: none !important; /* SANGOの旧レイアウトを解除 */
}

/* --- ヘッダー --- */
.search-page-header {
    margin: 40px 0;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.search-title {
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    color: #333;
}

.search-title span {
    color: #ffd700; /* ロゴのイエロー */
}

/* --- 検索結果リスト --- */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 50px;
}

/* --- 検索結果カード (横長スタイル) --- */
.search-result-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.search-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

/* サムネイル画像エリア */
.search-card-thumb {
    width: 300px; /* PC時の画像の横幅 */
    flex-shrink: 0;
    background-color: #f9f9f9;
}

.search-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 画像を絶対に切らない（はみ出させない） */
    aspect-ratio: 1200 / 630; /* 1200x630の比率を維持 */
    display: block;
}

/* No Image（画像がない記事用）のボックス */
.search-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #aaa;
    font-size: 1rem;
    font-weight: bold;
    aspect-ratio: 1200 / 630;
    letter-spacing: 1px;
}

/* テキストエリア */
.search-card-body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-card-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
}

.search-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* --- ページネーション（SANGO競合・左寄り・崩れ対策 最終版） --- */
/* 1. 大枠を画面幅いっぱいにして中央に構える */
.search-pagination {
    margin: 50px 0 !important;
    display: block !important;
    width: 100% !important;
    clear: both !important;
    text-align: center !important;
}

/* 2. WordPressが自動出力する内部navタグの横幅・配置制限を解除 */
.search-pagination .navigation {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin: 0 !important;
}

/* 3. ボタンを囲むコンテナを確実なFlexboxにして、中央に一列に並べる */
.search-pagination .nav-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important; 
    gap: 10px !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    float: none !important;
}

/* 4. 各ボタンの個別装飾（テーマのフロート等の回り込みをリセット） */
.search-pagination .page-numbers {
    display: inline-flex !important; 
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 15px !important;
    margin: 0 !important;
    white-space: nowrap !important; 
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    color: #666 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    float: none !important;
}

/* 矢印アイコン（＞）単体の余白を強制リセット */
.search-pagination .page-numbers i {
    margin: 0 !important;
    line-height: 1 !important;
}

/* ホバー時の装飾 */
.search-pagination .page-numbers:hover {
    background: #f0f0f0 !important;
    border-color: #ccc !important;
    color: #333 !important;
}

/* 現在のページ（カレント）の装飾：ピラティスライフ専用ブルーグレー */
.search-pagination .page-numbers.current {
    background: #708090 !important; 
    color: #fff !important;
    border-color: #708090 !important;
    font-weight: bold !important;
}

/* ドット（...）の装飾 */
.search-pagination .page-numbers.dots {
    border: none !important;
    background: transparent !important;
    color: #999 !important;
}

/* --- レスポンシブ (スマホ表示) --- */
@media screen and (max-width: 768px) {
    /* スマホでは縦積みカードに変更 */
    .search-card-link {
        flex-direction: column;
    }
    
    .search-card-thumb {
        width: 100%; /* 画像を横幅いっぱいにする */
    }
    
    .search-card-body {
        padding: 20px;
    }
    
    .search-card-title {
        font-size: 1.1rem;
    }
    
    .search-card-excerpt {
        font-size: 0.9rem;
    }
}

