/* =============================================
   works/index.css — 施工事例一覧ページ専用スタイル
   ============================================= */

/* ---- カテゴリフィルター：security.htmlの車種別タブとサイズ感を統一 ---- */
.works-category-nav {
    gap: 12px;
    margin-bottom: 40px;
}

.works-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background: #fff;
    border-color: #ddd;
    padding: 12px 24px;
    color: #222;
    font-size: 13.3333px;
    font-weight: 700;
    line-height: normal;
}

.works-cat-btn.active,
.works-cat-btn:hover {
    background: #111;
    border-color: #111;
}

/* ---- カード全体 ---- */
.work-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    /* カード単体にボックスシャドウは持たせず、
       グリッドコンテナ側でギャップを管理 */
}

.work-card:hover {
    /* ホバー時はサムネイル画像の拡大のみ（下記 .thumb img 参照） */
}

/* ---- サムネイル ---- */
.work-card .thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 4; /* 依頼仕様：5:4 に変更 */
    background: #000;
}

.work-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* ホバー時拡大のためにトランジション設定 */
    transition: transform 0.3s ease;
}

.work-card:hover .thumb img {
    transform: scale(1.04);
}

/* ---- カテゴリチップ（サムネイル左上に絶対配置） ---- */
.card-category-chip {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.03em;
    /* z-index はサムネイルの overflow:hidden の内側なので不要だが念のため */
    z-index: 1;
}

/* ---- メタ情報エリア ---- */
.work-card .meta {
    padding: 14px 16px 16px;
}

/* タイトル */
.work-card .meta .title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
    margin-bottom: 4px;
}

/* サマリー（一言メモ）：最大2行で省略 */
.work-card .meta .summary {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 日付 */
.work-card .meta .date {
    font-size: 0.75rem;
    color: #999;
    text-align: right;
}

/* ---- 「もっと見る」ボタン ---- */
.btn-load-more {
    display: inline-block;
    padding: 14px 48px;
    border: 2px solid #333;
    background: transparent;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-load-more:hover {
    background: #333;
    color: #fff;
}

.works-instagram-cta {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.btn-instagram-works {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 260px;
    padding: 14px 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(225, 48, 108, 0.25);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-instagram-works:hover {
    color: #fff;
    opacity: 0.92;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(225, 48, 108, 0.32);
}

.btn-instagram-works img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* ---- スマホ表示：施工事例一覧を2カラムにする ---- */
@media (max-width: 600px) {
    .works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .work-card .meta {
        padding: 10px 10px 12px;
    }

    .work-card .meta .title {
        font-size: 0.86rem;
        line-height: 1.45;
    }

    .work-card .meta .date {
        font-size: 0.68rem;
    }

    .card-category-chip {
        top: 8px;
        left: 8px;
        padding: 3px 8px;
        font-size: 0.62rem;
    }

    .btn-instagram-works {
        width: 100%;
        min-width: 0;
    }
}
