
/* ==========================================================================
   レシピ一覧ページ専用：左右2カラムレイアウト（強制固定版）
   ========================================================================== */
.site-header {
    width: 100% !important;
    box-sizing: border-box !important;
}

.header-inner {
    width: min(calc(100% - 80px), 1050px) !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}


.recipes-main {
    padding: 40px 0 100px;
}



.recipes-container {
    display: flex !important;
    flex-direction: row !important; 
    align-items: flex-start !important;
    text-align: left !important;
    gap: 30px !important;
    margin-top: 30px;
    width: 100% !important;
    box-sizing: border-box;
}

/* 左側サイドバー（絞り込み）のデザイン */
.recipes-sidebar {
    width: 240px !important;
    flex-shrink: 0 !important;
    background-color: #ffffff;
    border: 1px solid #e5ddd2;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(60, 40, 20, 0.02);
}

.sidebar-widget h3 {
    margin: 0 0 20px;
    color: #3b2a20;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 2px solid #70421f;
    padding-bottom: 8px;
}

/* チェックボックスを確実に「縦並び」にするお守り 💡 */
.sidebar-widget form {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0 !important;
}

/* チェックボックス単体の並び */
.checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    font-size: 14px;
    color: #332820;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 絞り込みボタン */
.filter-button {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    border: none;
    border-radius: 6px;
    background-color: #70421f;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.filter-button:hover {
    background-color: #3b2a20;
}

/* 右側メインコンテンツ（カードエリア）の設定 */
.recipes-main-content {
    flex: 1 !important;
}

/* 横2列に綺麗に並べます */
.recipes-main-content .recipe-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 24px !important;
}

/* ==========================================================================
   レシピ一覧ページ：スマホ・タブレット用レスポンシブ（画面幅 1024px 以下）
   ========================================================================== */
@media screen and (max-width: 1024px) {
    
    .recipes-main {
        padding: 20px 20px 60px;
        width: 100%;
        box-sizing: border-box;
    }

    /* 💡 スマホの時はチェックボックスを横並び（または2列）にしてコンパクトに配置 */
    .sidebar-widget form {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }

    .checkbox-label {
        margin-bottom: 0 !important;
        font-size: 13px;
    }

    /* 絞り込みボタンを中央に配置 */
    .filter-button {
        width: auto !important;
        padding: 10px 30px;
        margin: 10px auto 0 !important;
    }

    /* レシピカードエリアを横幅いっぱいに広げる */
    .recipes-main-content {
        width: 100% !important;
    }

    /* 💡 スマホの画面幅に合わせて、カードを縦横2列に維持（極端に狭いスマホ用に調整） */
    .recipes-main-content .recipe-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

/* 💡 最も画面幅が狭いスマホ（560px以下）のときの最終調整 */
@media screen and (max-width: 560px) {
    /* チェックボックスをスマホ用に2列にスッキリ並べる */
    .checkbox-label {
        width: calc(50% - 10px);
    }
    
    /* スマホではカードを1列にして、料理写真を大きく見せます */
    .recipes-main-content .recipe-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}


/* ==========================================================================
   💡 【ここを修正】最も画面幅が狭いスマホ（600px以下）のときの最終調整
   ========================================================================== */
@media screen and (max-width: 600px) {

    .recipes-container {
        flex-direction: column !important; 
    }

    /* （絞り込み）のデザイン */
    .recipes-sidebar {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* ➔ レシピ一覧（チェックボックスとカード）の600px以下用調整 */
    /* チェックボックスをスマホ用にキレイな2列（田の字）にする */
    .checkbox-label {
        width: calc(50% - 10px) !important;
        flex: none !important;              
    }
    
    /* スマホではカードを1列にして、料理写真を大きく見せます */
    .recipes-main-content .recipe-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

}





/* ==========================================================================
   レシピ詳細ページ専用（recipe.php）のデザイン
   ========================================================================== */
.recipe-detail-main {
    padding: 60px 0 100px;
    width: 100%;
    box-sizing: border-box;
}

/* タイトルエリア */
.recipe-detail-header {
    margin-bottom: 40px;
    text-align: left;
}

.recipe-detail-header .recipe-season {
    display: inline-block; /* 💡 縦の余白を効かせるため追加 */
    margin-bottom: 12px;
}

.recipe-detail-header h2 {
    margin: 0;
    color: #3b2a20;
    font-size: 36px;
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 1.4;
}

/* 2カラムレイアウトのコンテナ */
.recipe-detail-container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    margin-bottom: 60px;
}

/* 左側：料理写真 */
.recipe-detail-image {
    flex: 1;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5ddd2;
    box-shadow: 0 6px 16px rgba(60, 40, 20, 0.04);
    position: -webkit-sticky; /* Safari用の古いブラウザ対策 */
    position: sticky;
    top: 40px;
}

.recipe-detail-image img {
    width: 100%;
    height: auto;
    display: block; /* 💡 画像の下に謎の隙間ができるのを防ぐ */
    object-fit: cover;
}

/* 右側：コンテンツ（紹介、材料、作り方） */
.recipe-detail-content {
    flex: 1;
}

/* 紹介文（💡 HTMLとクラス名を一致させました） */
.recipe-detail-description {
    font-size: 15px;
    color: #554538;
    line-height: 2.0;
    margin: 0 0 35px 0;
    padding-bottom: 25px;
    border-bottom: 1px dashed #e5ddd2;
}

/* 材料・作り方の共通見出し */
.recipe-ingredients h3,
.recipe-instructions h3 {
    margin: 0 0 15px 0;
    color: #3b2a20;
    font-size: 18px;
    font-weight: 500;
    padding-left: 12px;
    border-left: 3px solid #70421f;
    letter-spacing: 0.05em;
}

/* 材料ボックス */
.recipe-ingredients {
    background-color: #ffffff;
    border: 1px solid #e5ddd2;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 0 4px 12px rgba(60, 40, 20, 0.02);
}

.recipe-ingredients p {
    margin: 0;
    font-size: 14px;
    color: #332820;
    line-height: 2.1;
}

/* 作り方ボックス */
.recipe-instructions {
    background-color: #ffffff;
    border: 1px solid #e5ddd2;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(60, 40, 20, 0.02);
}

.recipe-instructions p {
    margin: 0;
    font-size: 14px;
    color: #332820;
    line-height: 2.2;
}

/* 戻るボタンの配置 */
.back-button-container {
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #e5ddd2;
    padding-top: 40px;
}


/* ==========================================================================
   レシピ詳細ページ：スマホ用レスポンシブ（画面幅 768px 以下）
   ========================================================================== */
@media screen and (max-width: 768px) {
    .recipe-detail-main {
        padding: 30px 20px 60px; /* 💡 左右に20pxのパディングを入れて文字のはみ出しを防止 */
        box-sizing: border-box;
    }
    
    /* タイトルエリアを中央寄せ */
    .recipe-detail-header {
        text-align: center;
        margin-bottom: 30px;
    }

    .recipe-detail-header h2 {
        font-size: 24px;
    }

    /* 縦並びにして中央に揃える */
    .recipe-detail-container {
        flex-direction: column;
        align-items: center; 
        gap: 30px;
        margin-bottom: 40px;
    }

    /* 料理写真を中央に配置（stickyを解除） */
    .recipe-detail-image {
        max-width: 100%;
        width: 100%;
        position: static; /* 💡 スマホ時は追従をオフにする */
    }

    /* コンテンツ全体の幅を100%に */
    .recipe-detail-content {
        width: 100%;
    }

    /* 紹介文のテキスト（💡 クラス名をHTMLに統一） */
    .recipe-detail-description {
        text-align: center !important;
        font-size: 14px;
        line-height: 1.9;
        margin-bottom: 25px;
        padding-bottom: 20px;
    }

    /* 材料と作り方のボックス（💡 左寄せにしつつ、読みやすく中央配置に見せる設定） */
    .recipe-ingredients,
    .recipe-instructions {
        padding: 24px 20px;
    }

    /* 💡 ボックス内の見出しを中央寄せにする正しい指定 */
    .recipe-ingredients h3,
    .recipe-instructions h3 {
        display: block;
        text-align: center;
        padding-left: 0;
        border-left: none;
        border-bottom: 2px solid #70421f;
        padding-bottom: 6px;
        margin: 0 auto 20px;
        max-width: 120px; /* 💡 見出しの下線の長さを文字幅に固定して綺麗に見せる */
    }

    /* 💡 レシピのテキストはスマホでも「左寄せ」の方が行頭が揃って圧倒的に読みやすいです！ */
    .recipe-ingredients p,
    .recipe-instructions p {
        text-align: left; 
        font-size: 14px;
        line-height: 2.0;
    }
}





/* ==========================================================================
   コラム詳細ページ（article.php）専用のデザイン
   ========================================================================== */

   .article-detail-main {
    padding: 60px 0 100px;
    background-color: #fcfaf6;
    width: 100%;
    box-sizing: border-box;
    }

.article-detail-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-detail-date {
    font-size: 13px;
    color: #9a8e82;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.article-detail-header h1 {
    font-size: clamp(24px, 4vw, 32px);
    color: #3b2a20;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 800px;
}

/* アイキャッチ画像 */
.article-detail-eyecatch {
    max-width: 800px;
    margin: 0 auto 50px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(60, 40, 20, 0.04);
}

.article-detail-eyecatch img {
    width: 100%;
    height: auto;
    display: block;
}

/* 本文エリアのベース */
.article-detail-content {
    max-width: 700px;
    margin: 0 auto;
    font-size: 15px;
    color: #332820;
    line-height: 1.9;
    letter-spacing: 0.03em;
}

/* 本文の中の通常の段落の隙間を開ける */
.article-detail-content p {
    margin-bottom: 25px;
}

/* ==========================================================================
   💡 ユーザーの希望：記事ごとに自由なレイアウトを可能にする個別CSSクラス
   ========================================================================== */
/* 🛠️ パターン1：画像を右側に寄せて、左側に文章を回り込ませるレイアウト */
.article-detail-content .column-layout-right {
    display: flex;
    gap: 25px;
    margin: 35px 0;
    align-items: flex-start;
}

.article-detail-content .column-layout-right img {
    width: 45%;               /* 💡 横幅の45%を画像にします */
    border-radius: 8px;
    order: 2;                 /* 💡 右側に配置する命令 */
}

.article-detail-content .column-layout-right p {
    flex: 1;
    margin: 0;
}

/* 📱 スマホ画面のときは、画像を右に寄せずに縦並びに戻して読みやすくする優しいレスポンシブ */
@media screen and (max-width: 600px) {
    .article-detail-content .column-layout-right {
        flex-direction: column;
        gap: 15px;
    }
    .article-detail-content .column-layout-right img {
        width: 100%;
        order: 1;             /* スマホでは画像を上に持ってくる */
    }
}

/* フッターの戻るボタン */
.article-detail-footer {
    text-align: center;
    margin-top: 60px;
    border-top: 1px solid #e5ddd2;
    padding-top: 40px;
}
.btn-back-to-top {
    background-color: #9a8e82 !important;
    padding: 12px 30px;
}
.btn-back-to-top:hover {
    background-color: #75685d !important;
}