@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/
/* サイトトップ */
/* ========================================= */
/* カスタム投稿一覧のスタイル */
/* ========================================= */

/* 全体的なコンテナ */
.custom-post-list {
    display: grid; /* グリッドレイアウトでアイテムを配置 */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* レスポンシブなカラム設定 */
    gap: 30px; /* アイテム間の隙間 */
    margin-top: 30px;
    margin-bottom: 50px;
}

/* 個々の投稿アイテム */
.custom-post-item {
    background-color: #ffffff; /* 背景色 */
    border: 1px solid #e0e0e0; /* 枠線 */
    border-radius: 8px; /* 角の丸み */
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* 軽い影 */
    display: flex; /* アイテム内の要素をフレックスボックスで配置 */
    flex-direction: column; /* 縦方向に並べる */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* ホバーアニメーション */
}

.custom-post-item:hover {
    transform: translateY(-5px); /* 少し上に移動 */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1); /* 影を強調 */
}

/* 投稿タイトル */
.custom-post-item h3 {
    font-size: 1.2em;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
}

.custom-post-item h3 a {
    color: #333333; /* タイトルの文字色 */
    text-decoration: none; /* 下線をなくす */
    transition: color 0.3s ease;
}

.custom-post-item h3 a:hover {
    color: #0073aa; /* ホバー時の文字色（WordPressのデフォルトリンク色） */
}

/* アイキャッチ画像 */
.custom-post-item .post-thumbnail {
    margin-bottom: 15px;
    text-align: center; /* 画像を中央に配置 */
}

.custom-post-item .post-thumbnail img {
    max-width: 100%; /* 親要素の幅に合わせる */
    height: auto; /* 高さは自動調整 */
    border-radius: 4px; /* 画像の角を少し丸める */
    display: block; /* 余分な隙間をなくす */
}

/* 投稿抜粋 */
.custom-post-item .post-excerpt {
    font-size: 0.95em;
    color: #666666;
    line-height: 1.6;
    flex-grow: 1; /* 残りのスペースを埋める（内容の高さが異なる場合でも下に揃える） */
    margin-bottom: 15px;
}

/* ページタイトル (任意) */
/* <h2>最新のカスタム投稿</h2> に適用 */
h2 {
    font-size: 2em;
    color: #333333;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    display: block; /* センター寄せのためにブロック要素化 */
}




/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/* ========================================= */
/* レスポンシブ対応 (スマートフォンの場合) */
/* ========================================= */
@media (max-width: 768px) {
    .custom-post-list {
        grid-template-columns: 1fr; /* 1カラム表示 */
        gap: 20px;
        margin-left: 15px; /* 左右に余白 */
        margin-right: 15px;
    }

    .custom-post-item {
        padding: 15px;
    }

    .custom-post-item h3 {
        font-size: 1.1em;
    }

    .custom-post-item .post-excerpt {
        font-size: 0.9em;
    }

    h2 {
        font-size: 1.6em;
        margin-top: 30px;
        margin-bottom: 20px;
    }
}



/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}


/* 追加CSS　サイトトップ　検索窓 */
p.front-page-search-description {
    margin: 10px auto;
}
button.search-submit {
    left: 3px;
    right: unset;
    top: calc(50% - 10px);
}
input#front-search-keyword {
    width: 100%;
    padding: 9px 0px 12px 38px;
}
form.front-keyword-search-form {
    position: relative;
}


