/* =========================================
   基本レイアウト・背景設定
   ========================================= */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background: #ffffff;
    /* ページ全体を白に設定 */
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* メインタイトル */
h1 {
    margin: 0 auto 10px auto;
    font-size: 2.4rem;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 25px;
    max-width: 500px;
    background: linear-gradient(90deg, #0c3f83 0%, #1953a1 50%, #0c3f83 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   検索・フィルタエリア
   ========================================= */
.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    background: #fafafa;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #14126f;
    background: #ffffff;
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 80%;
    margin: 0 auto 25px auto;
}

.filter-btn {
    background: #fff;
    color: #0c3f83;
    border: 1px solid #0c3f83;
    padding: 6px 18px;
    border-radius: 0px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

/* アクティブ（選択中）ボタン */
.filter-btn.active {
    background: linear-gradient(90deg, #0c3f83 0%, #1953a1 50%, #0c3f83 100%);
    color: #fff;
}

/* =========================================
   カードレイアウト（グリッド）
   ========================================= */
.card-grid {
    display: grid;
    /* レスポンシブ：画面幅に合わせて自動調整 */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

/* カードを包むリンク（全体をクリック可能にする） */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* カード本体 */
.card {
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid #eee;
    /* 白背景に馴染む薄い枠線 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    /* 高さを揃える */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    /* 上部のアクセントライン */
    border-top: 5px solid #0c3f83;
}

/* ホバー時の挙動：浮き上がりと影の強調 */
.card-link:hover .card {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
    border-color: #0c3f83;
}

/* =========================================
   カード内コンテンツ（画像・テキスト）
   ========================================= */
.card-image-box {
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* ズームのはみ出し防止 */
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    /* ズームの滑らかさ */
}

/* ホバー時に画像を10%ズーム */
.card-link:hover .card-image-box img {
    transform: scale(1.1);
}

/* 画像右上のID表示バッジ */
.card-id-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(90deg, #0c3f83 0%, #1953a1 50%, #0c3f83 100%);
    /* テーマカラーに合わせた半透明の紺色 */
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 画像右下の納入日表示 */
.card-date-badge {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    /* 目立ちすぎないよう半透明の黒 */
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    z-index: 10;
}

/* 画像がない場合の「準備中」表示 */
.no-image::after {
    content: "準備中";
    font-size: 14px;
    color: #bbb;
    font-weight: bold;
}

.card-content {
    padding: 18px;
}

.card-name {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #111;
}

/* 名前の横の「さん」：70%サイズ */
.suffix-san {
    font-size: 70%;
    margin-left: 4px;
    font-weight: normal;
    color: #777;
}

/* 複数カテゴリ（タグ）の並び */
.card-category-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.card-category {
    display: inline-block;
    background: #f1f3f4;
    color: #14126f;
    /* タグ内テキストもテーマカラーに */
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-detail {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
}

/* =========================================
   ページネーション（レスポンシブ）
   ========================================= */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 30px 0;
    flex-wrap: wrap;
    /* スマホで折り返し */
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #555;
}

.page-btn:hover:not(:disabled) {
    border-color: #0c3f83;
    color: #0c3f83;
}

.page-btn.active {
    background: linear-gradient(90deg, #0c3f83 0%, #1953a1 50%, #0c3f83 100%);
    color: #fff;
    border-color: #0c3f83;
}

/* 最初へ・最後へボタン */
.nav-btn {
    min-width: 75px;
    font-size: 12px;
    background: #ffffff;
    font-weight: bold;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* 検索結果数表示 */
#resultCount {
    text-align: center;
    margin-bottom: 20px;
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

/* =========================================
   スマホ向け微調整
   ========================================= */
@media (max-width: 768px) {
    .l-main {
        padding-top: 20px;
    }

    .filter-group {
        max-width: 100%;
    }

    .filter-group>button.filter-btn {
        font-size: 12px;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.3rem;
    }

    .card-grid {
        gap: 15px;
    }

    .page-btn {
        min-width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .nav-btn {
        min-width: 60px;
    }
}