/*
Theme Name: My original Theme
Author: Tomoki Yamakawa
Description: PHP練習用の自作テーマ
Version: 1.0
*/

/* style.css */
body {
    font-family: sans-serif;
    margin: 0;
    color: #333;
}

header {
    background-color: #333;
    color: white;
    padding: 20px;
    text-align: center;
}

/* メインビジュアル全体の囲い */
.main-visual {
    position: relative;
    width: 100%;
    height: 400px; /* お好みの高さに */
    overflow: hidden;
    background-color: #000; /* 画像がない時の保険 */
}

/* 中の画像 */
.main-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 枠いっぱいに綺麗に収める */
    opacity: 0.6; /* 画像を少し暗くして文字を見やすくする */
}

/* 画像の上に重なる文字セット */
.main-visual-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 真ん中に配置 */
    text-align: center;
    color: white;
    z-index: 1;
    width: 80%;
}

.main-visual-content h2 {
    font-size: 2.5rem;
    border: none; /* 前回のh2の下線を消す */
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* 文字に影をつけて読みやすく */
}

/* ヘッダーメニューのスタイル */
.header-list {
    list-style: none; /* 点を消す */
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* 中央寄せ */
    gap: 20px;
}

.header-list li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
}

.header-list li a:hover {
    text-decoration: underline; /* ホバーで下線 */
}

main {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

h2 {
    border-left: 5px solid #004488;
    padding-left: 15px;
}

/* 記事一覧のコンテナ */
.post-list {
    display: flex;
    flex-wrap: wrap; /* 折り返しを許可 */
    gap: 20px;       /* 記事同士の間隔 */
    margin-top: 20px;
}

/* 各記事カードの幅（3カラムにする場合） */
.post-item {
    width: calc(33.333% - 14px); /* 隙間を引いた3分割 */
    border: 1px solid #eee;
    background: #fff;
}

/* 画像のサイズを統一する */
.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* 枠に合わせて切り抜き */
    display: block;
}

.post-meta {
    padding: 15px;
}

.post-title {
    margin: 10px 0 0;
    font-size: 1rem;
}

/* スマホでは1列にする */
@media (max-width: 768px) {
    .post-item {
        width: 100%;
    }
}

/* 記事詳細のコンテナ */
.single-post-container {
    max-width: 800px; /* 読みやすい横幅に絞る */
    margin: 40px auto;
    padding: 0 20px;
}

.entry-title {
    font-size: 2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.post-date {
    color: #888;
    margin-bottom: 10px;
}

.post-hero-image {
    margin-bottom: 30px;
}

.post-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px; /* 少し角を丸く */
}

/* 本文の中の装飾（見出しなど） */
.post-body {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-body h2 {
    background: #f4f4f4;
    padding: 10px 15px;
    border-left: 5px solid #004488;
    margin-top: 40px;
}

.post-body p {
    margin-bottom: 1.5em;
}

/* 前後の記事リンク */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-navigation a {
    color: #004488;
    text-decoration: none;
}

/* お問い合わせフォームの調整 */
.wpcf7-form {
    max-width: 600px;
    margin: 0 auto;
}

.wpcf7-form p {
    margin-bottom: 20px;
}

/* 入力欄の見た目 */
.wpcf7-text, .wpcf7-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* 枠線を含めた幅にする */
}

/* 送信ボタン */
.wpcf7-submit {
    background: #004488;
    color: #fff;
    border: none;
    padding: 12px 30px;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 4px;
    transition: 0.3s;
}

.wpcf7-submit:hover {
    background: #002244;
}

.wpcf7-text, .wpcf7-textarea, .wpcf7-tel {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* ラジオボタンの選択肢を少し広げる */
.wpcf7-list-item {
    margin-right: 15px;
    margin-left: 0;
}

/* ラジオボタン自体のサイズを少し調整（お好みで） */
.wpcf7-list-item input {
    margin-right: 5px;
}

footer {
    text-align: center;
    padding: 20px;
    background: #f4f4f4;
}

/* フッター全体の装飾 */
.site-footer {
    background-color: #333; /* 濃いグレーで引き締める */
    color: #fff;
    padding: 60px 20px 20px;
    margin-top: 100px; /* 前のコンテンツとの余白 */
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.footer-info h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border: none; /* 前回のh2の下線を消す */
}

.footer-info p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #ccc;
}

/* コピーライト部分 */
.footer-copy {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #555;
    font-size: 0.8rem;
    color: #888;
}