@charset "UTF-8";

/* 全体の幅と余白 */
.container {
  max-width: 1000px; /* 全体の幅 */
  margin: 0 auto;    /* 真ん中寄せ */
  padding: 20px;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #333;
}

/* 3列のグリッドレイアウト */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3等分 */
  gap: 30px; /* カード同士の隙間 */
}

/* =========================================
   アニメーション設定 (works.cssに追加)
   ========================================= */

/* --- 1. ページ遷移時のフェードイン --- */

/* 各カードの初期状態（隠しておく） */
.work-item {
    padding: 25px;
    opacity: 0;                /* 透明にする */
    transform: translateY(40px); /* 40px下に配置 */
    /* アニメーションの速度設定（0.8秒かけてふわっと） */
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* JSでこのクラスが付くと表示される */
.work-item.fade-in {
    opacity: 1;
    transform: translateY(0); /* 元の位置に戻る */
}

/* 順番に表示させるための「遅延（ディレイ）」設定 */
/* 1つ目は0.1秒後、2つ目は0.2秒後...とずらしていく */
.work-item:nth-child(1) { transition-delay: 0.2s; }
.work-item:nth-child(2) { transition-delay: 0.2s; }
.work-item:nth-child(3) { transition-delay: 0.2s; }
.work-item:nth-child(4) { transition-delay: 0.4s; }
.work-item:nth-child(5) { transition-delay: 0.4s; }
.work-item:nth-child(6) { transition-delay: 0.4s; }
/* 記事が増えた時のために、もう少し多めに書いておいてもOKです */
.work-item:nth-child(7) { transition-delay: 0.6s; }
.work-item:nth-child(8) { transition-delay: 0.6s; }
.work-item:nth-child(9) { transition-delay: 0.6s; }


/* --- 2. ホバー時の画像移動 --- */

/* 画像を囲む枠（はみ出した部分を隠すために必要） */
.work-thumb {
    overflow: hidden; /* 重要：これが無いと画像が枠外に出てしまいます */
    border-radius: 8px; /* 画像の角丸（お好みで調整してください） */
}

/* 画像自体の動き設定 */
.work-thumb img {
    display: block;
    width: 100%;
    height: auto;
    /* ホバー時の動きをなめらかにする（0.3秒） */
    transition: transform 0.3s ease;
}

/* カード全体(.work-item)にマウスが乗った時、その中の画像(img)を動かす */
.work-item:hover .work-thumb img {
    /* 10px上に移動させる */
    transform: translateY(-10px);
}

/* =========================================
   ホームに戻るボタンエリア
   ========================================= */

.works-page-footer {
    margin-top: 100px;
    margin-bottom: 60px;

    /* ▼▼▼ 確実に中央に配置する魔法のコード ▼▼▼ */
    display: flex;
    justify-content: center; /* 左右の真ん中にする */
    align-items: center;     /* 上下の真ん中にする（念のため） */
    width: 100%;             /* 横幅いっぱいに広げておく */
}

/* ボタン自体のデザイン（前回と同じですが、念のため載せておきます） */
.back-home-btn {
    display: block; /* inline-block から block に変更してもOK */
    text-decoration: none;
    color: #5e4b35;
    border: 1px solid #5e4b35;
    padding: 18px 60px;
    border-radius: 50px;
    background-color: transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center; /* 文字も真ん中に */
}

/* （以下、.en や .ja のスタイルはそのまま変更なしでOKです） */
.back-home-btn .en {
    display: block;
    font-size: 14px;
    letter-spacing: 0.2em;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: bold;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.back-home-btn .ja {
    display: block;
    font-size: 10px;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.back-home-btn:hover {
    background-color: #5e4b35;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(94, 75, 53, 0.2);
}

.back-home-btn:hover .en {
    transform: scale(1.1);
}

/* スマホの時は1列にする */
@media (max-width: 768px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}

/* カード個別のデザイン */
.work-item {
  background: #fff;
  /* 枠線などが欲しければここに追加 */
}

/* サムネイル画像 */
.work-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;       /* 角丸 */
  box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* ふんわり影 */
}

/* タイトル */
.work-title {
  color: #5e4b35;
  font-size: 18px;
  font-weight: bold;
  margin: 25px 0 10px 0;
}

/* 説明文 */
.work-desc {
    color: #5e4b35 ; /* 強制的に茶色 */
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 15px;
    opacity: 0.8; /* 少しだけ薄くしてメリハリをつける */
}

/* カテゴリータグ共通設定 */
.cat-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 4px;
  color: #fff;
  font-weight: bold;
}

/* カテゴリーごとの色（ここで色を変えられます） */
.tag-movie { background-color: #a8d5ba; } /* 動画：緑 */
.tag-post  { background-color: #f4aeba; } /* 投稿：ピンク */
.tag-hp    { background-color: #aebbf4; } /* HP：青 */
.tag-banner { background-color: #f7cdaa; } /* バナー：薄オレンジ */
.tag-lp     { background-color: #f5b7d9; } /* LP：ピンク */
.tag-line-richmenu {background-color: #6fe3bb;}
.tag-flyer {background-color: #c8bfe7;}


/* -----------------------------------
   制作実績 絞り込みボタンのデザイン
----------------------------------- */
.filter-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* スマホで折り返す */
    gap: 15px;
    margin-bottom: 50px; /* 一覧との隙間 */
}

.filter-btn {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid #5e4b35;
    border-radius: 50px;
    text-decoration: none;
    color: #5e4b35; /* 文字色：ブラウン */
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.05em;
    background-color: transparent;
    transition: all 0.3s ease;
}

/* ホバーした時 ＆ 選択されている時 */
.filter-btn:hover,
.filter-btn.is-active {
    background-color: #5e4b35; /* 背景：ブラウン */
    color: #ffffff; /* 文字：白 */
}


/* -----------------------------------
   詳細ページ (single-works.php)
----------------------------------- */

.single-work-section {
    padding: 120px 0 80px; /* ヘッダーとかぶらないよう余白 */
    background-color: #fcfbf8;
}

/* パンくず */
.work-breadcrumb {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}
.work-breadcrumb a {
    color: #5e4b35;
    text-decoration: none;
}

/* ヘッダーエリア */
.work-header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.work-cat-label {
    display: inline-block;
    background-color: #5e4b35;
    color: #fff;
    font-size: 12px;
    padding: 5px 15px;
    border-radius: 50px;
    margin-bottom: 15px;
    letter-spacing: 0.1em;
}

.work-main-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #5e4b35;
}

.work-catchphrase {
    font-size: 18px;
    color: #888;
    font-weight: bold;
}

/* メイン画像 */
.work-main-visual {
    margin-bottom: 60px;
    border-radius: 10px;
    overflow: hidden;
}

.work-main-visual img {
    width: 70%;
    margin: 0 auto;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* 概要データテーブル */
.work-data-table {
    max-width: 800px;
    margin: 0 auto 80px;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(94, 75, 53, 0.05);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.work-data-table dl {
    width: 30%; /* 3列並び */
    margin: 0;
    text-align: center;
}

.work-data-table dt {
    font-size: 12px;
    color: #999;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.work-data-table dd {
    margin: 0;
    font-size: 16px;
    color: #5e4b35;
    font-weight: bold;
}

/* 本文エリア */
.work-body-content {
    max-width: 800px;
    margin: 0 auto 100px;
    font-size: 16px;
    line-height: 2;
    color: #5e4b35;
}

/* 本文内の見出し調整 */
.work-body-content h2 {
    font-size: 24px;
    border-bottom: 2px solid #5e4b35;
    padding-bottom: 10px;
    margin-top: 60px;
    margin-bottom: 30px;
}
.work-body-content h3 {
    font-size: 20px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 5px solid #5e4b35;
    padding-left: 15px;
}
.work-body-content img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    border-radius: 5px;
}

/* 下部ボタン */
.work-footer-nav {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.back-btn, .contact-btn-small {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.back-btn {
    border: 1px solid #5e4b35;
    color: #5e4b35;
}
.back-btn:hover {
    background: #5e4b35;
    color: #fff;
}

.contact-btn-small {
    background: #5e4b35;
    color: #fff;
}
.contact-btn-small:hover {
    background: #7a634a;
    transform: translateY(-3px);
}

/* --- もっと見るボタンのエリア --- */
.load-more-wrapper {
    text-align: center;
    margin-top: 120px; /* グリッドとの隙間調整 */
    margin-bottom: 60px;
}

/* ボタンのスタイル（既存の view-more-btn を上書き調整） */
#loadMoreBtn {
    cursor: pointer;
    border: 1px solid #5e4b35;
    background: transparent;
    color: #5e4b35;
    padding: 12px 60px;
    border-radius: 50px;
    font-size: 14px;
    transition: 0.3s;
    /* ボタンっぽさを消してリンク風に見せるなら以下 */
    display: inline-block;
    appearance: none; 
    -webkit-appearance: none;
}

#loadMoreBtn:hover {
    background: #5e4b35;
    color: #fff;
}

/* -----------------------------------
   もっと見るボタン用 フェードインアニメーション
----------------------------------- */

/* アニメーションの動きを定義（下から上にフェードイン） */
@keyframes fadeInUpItem {
    from {
        opacity: 0;
        transform: translateY(30px); /* 少し下から */
    }
    to {
        opacity: 1;
        transform: translateY(0); /* 定位置へ */
    }
}

/* このクラスがつくとアニメーションが始まる */
.work-item.is-fading-in {
    display: block !important; /* JSでnoneになっていたのを強制解除 */
    animation: fadeInUpItem 0.8s ease-out forwards;
}

/* スマホ対応 */
@media screen and (max-width: 768px) {
    .work-data-table {
        display: block; /* 縦積みに */
        padding: 30px 20px;
    }
    .work-data-table dl {
        width: 100%;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }
    .work-data-table dl:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
    
    .work-footer-nav {
        flex-direction: column;
        gap: 20px;
    }
}