/*
Theme Name: Lightning Child
Theme URI:
Template: lightning
Description:
Author:
Tags:
Version: 0.6.1
*/
/* ================================
 Kanesen Kamaboko - Theme Styles
 ================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* 基本スタイル */
body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #fdfcf8;
    color: #3a3a3a;
    /* BootstrapのScrollspy用 */
    position: relative;
}

/* カスタムカラー変数 */
:root {
    --brand-red: #c0392b;
}

/* セクション見出し */
.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: #333333;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* ヘッダー */
.navbar {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: background-color 0.3s;
}

/* ナビゲーションリンク */
.nav-link {
    color: #6c757d;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--brand-red);
}

.nav-link.active {
    color: var(--brand-red) !important;
    font-weight: 700;
}

/* ボタン */
.btn-brand {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
}

.btn-brand:hover {
    background-color: #a53125;
    border-color: #a53125;
    color: #fff;
}

.recipe-filter-btn.active {
    background-color: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

/* チャートラッパー */
.chart-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: auto;
    min-height: 300px;
    margin: 0 auto;
}

/* ヒーローセクション */
#hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    color: #fff;
    background-image: url('https://placehold.co/1200x800/a98c73/ffffff?text=Kamaboko');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* パララックス効果 */
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .4);
}

#hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
}

/* 特集記事プレースホルダー */
.article-placeholder {
    height: 160px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border-radius: .25rem;
}

/* レシピカード */
.recipe-card {
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.recipe-card .img-placeholder {
    height: 220px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* 自作モーダル用のCSSを修正 */

/* モーダルの背景（backdrop） */
.custom-modal-backdrop {
    display: none;
    /* 初期状態は非表示 */
    position: fixed;
    z-index: 1050;
    /* Bootstrapのモーダルより高い値 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明の黒背景 */
    align-items: center;
    justify-content: center;
}

/* jQueryのfadeInで表示される際のdisplay設定を削除 */
/* この記述が原因でページ読み込み時にモーダルが表示されていました */
/*
.custom-modal-backdrop:not([style*="display: none"]) {
    display: flex !important;
}
*/

/* モーダルが表示状態の時のスタイル */
.custom-modal-backdrop[style*="display: block"],
.custom-modal-backdrop.show {
    display: flex !important;
}

/* モーダルのコンテンツ */
.custom-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 800px;
    /* PCでの最大幅 */
    max-height: 90vh;
    /* 画面の高さに対する最大値 */
    overflow-y: auto;
    /* 内容が多い場合はスクロール可能 */
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* モーダルヘッダー */
.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

/* モーダルタイトル */
.custom-modal-title {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

/* 閉じるボタン */
.close-button {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    background-color: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    opacity: 0.8;
}

/* モーダルボディ */
.custom-modal-body {
    /* 必要に応じて追加のスタイルを設定 */
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .custom-modal-content {
        width: 95%;
        margin: 10px;
        padding: 15px;
    }

    .custom-modal-title {
        font-size: 1.1rem;
    }
}

/* レシピフィルターボタンを横並びにする */
.btn-group-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    /* ボタン間の隙間をなくす */
}

.btn-group-horizontal .recipe-filter-btn {
    flex: 0 0 auto;
    /* flexアイテムのサイズを自動調整しない */
    white-space: nowrap;
    /* テキストの改行を防ぐ */
    border-radius: 0;
    /* 中間のボタンの角を丸くしない */
    margin-left: -1px;
    /* 隣接するボタンのボーダーを重ねる */
}

/* 最初のボタンの左側だけ角を丸くする */
.btn-group-horizontal .recipe-filter-btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    margin-left: 0;
}

/* 最後のボタンの右側だけ角を丸くする */
.btn-group-horizontal .recipe-filter-btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* アクティブなボタンのz-indexを上げる */
.btn-group-horizontal .recipe-filter-btn.active {
    z-index: 2;
}

/* ホバー状態のz-indexも上げる */
.btn-group-horizontal .recipe-filter-btn:hover {
    z-index: 1;
}

/* スマートフォンでも横並びを維持 */
@media (max-width: 576px) {
    .btn-group-horizontal {
        flex-wrap: nowrap;
        /* 小さい画面でも横並びを維持 */
    }

    .btn-group-horizontal .recipe-filter-btn {
        font-size: 0.875rem;
        /* 文字サイズを少し小さくする */
        padding: 0.375rem 0.5rem;
        /* パディングを調整 */
        flex: 1;
        /* 均等な幅にする */
    }
}

/* badge 2025/9/5 */
.badge {
    display: inline-block;
    padding: .25em .4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.badge-pill {
    padding-right: .6em;
    padding-left: .6em;
    border-radius: 10rem;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

/* Custom Styles for Kamaboko Page */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    height: 60vh;
    min-height: 400px;
}

.hero-section .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-section .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem;
}