/* static/css/lp-custom.css */

/* --- 基本・コンテナ --- */
body {
    /* 基本的なフォント設定は共通CSSに任せる想定 */
    /* font-family: sans-serif; */
    line-height: 1.7; /* 少し広めの行間 */
    color: #333;
}

.container {
    width: 90%; /* スマホも考慮して%指定 */
    max-width: 1000px; /* PCでの最大幅 */
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px; /* 左右に少し余白 */
    padding-right: 15px;
}

.contact-page-container {
    /* コンタクトページを囲む要素のクラス */
    padding-bottom: 60px; /* ← この数値 (60px) を調整 */
}

/* --- ヒーローセクション (shortcode: hero.html) --- */
.hero {
    padding: 60px 0;
    text-align: center;
    background-color: #f4f4f4; /* デフォルトの背景色 */
    /* 背景画像はショートコード側でインラインスタイルで設定する想定 */
    /* background-size: cover; */
    /* background-position: center; */
}

.hero-content {
    /* 必要に応じてヒーロー内のコンテナ設定 */
}

.hero-image {
    max-width: 80%; /* ヒーロー画像の最大幅 */
    height: auto;
    margin-bottom: 30px;
    border-radius: 8px; /* お好みで角丸 */
}

.hero-title {
    font-size: 2.4em; /* やや大きめに */
    color: #006093; /* テーマ色 */
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: bold;
}

.hero-description {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

.hero-text-content {
    /* 必要に応じてテキストコンテンツ全体の幅を制限 */
    /* max-width: 700px; */
    /* margin-left: auto;  */ /* max-width と合わせて中央寄せする場合 */
    /* margin-right: auto; */

    /* 必要に応じてパディングやマージンを追加 */
    /* padding: 0 15px; */

    /* デフォルトでは親要素の text-align: center が継承される */
    /* 左寄せにしたい場合などはここで指定 */
    /* text-align: left; */
}

.hero-cta {
    /* ヒーロー内のCTAボタン */
    margin-top: 10px;
}

/* --- コンテンツセクション (shortcode: section.html) --- */
.section {
    padding: 60px 0;
    border-bottom: 1px solid #eee; /* セクション間の区切り線 */
}
.section:last-of-type {
    /* 最後のセクションの下線は消す */
    border-bottom: none;
}

.section-container {
    display: flex;
    gap: 40px; /* テキストと画像の間の余白 */
    align-items: center;
}

.section-text {
    flex: 1; /* テキストエリアが可変幅 */
}

.section-image-container {
    flex: 0 0 45%; /* 画像エリアの幅を約45%に固定 */
    text-align: center; /* 画像を中央寄せ */
}

.section-image {
    max-width: 100%;
    height: auto;
    display: block; /* 余計な余白を防ぐ */
    margin: 0 auto; /* コンテナ内で中央寄せ */
    border-radius: 8px; /* お好みで角丸 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* お好みで影 */
}

/* セクション内の見出し・テキスト */
.section-text h2,
.section-text h3 {
    /* ショートコード内の見出しレベルに合わせて調整 */
    font-size: 1.8em;
    color: #006093; /* テーマ色 */
    margin-bottom: 20px;
    font-weight: bold;
}

.section-text p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.section-text ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 15px;
}
.section-text ul li {
    margin-bottom: 8px;
}
.section-text strong {
    font-weight: bold;
}

/* 画像レイアウト切り替え */
.layout-image_right .section-container {
    flex-direction: row;
}
.layout-image_right .section-text {
    flex: 1;
}
.layout-image_right .section-image-container {
    flex: 0 0 45%;
}

/* 既存: Left Layout (Flex Row Reverse) */
.layout-image_left .section-container {
    flex-direction: row-reverse;
}
.layout-image_left .section-text {
    flex: 1;
}
.layout-image_left .section-image-container {
    flex: 0 0 45%;
}

/* ★ NEW: Bottom Layout (Flex Column) ★ */
.layout-image_bottom .section-container {
    flex-direction: column; /* ★ 要素を縦積みに変更 */
    gap: 30px; /* テキストと画像の間の縦の隙間 */
    align-items: stretch; /* 子要素の幅をコンテナに合わせる（必要なら center などに変更） */
}
.layout-image_bottom .section-text {
    flex-basis: auto; /* flex-basis をリセット（縦積みなので不要） */
    width: 100%; /* テキストエリアの幅を100%に */
    order: 1; /* テキストを先に表示（HTML構造順） */
    text-align: left; /* 必要ならテキスト揃えを指定 */
}
.layout-image_bottom .section-image-container {
    flex-basis: auto; /* flex-basis をリセット */
    width: 100%; /* 画像コンテナの幅を100%に */
    order: 2; /* 画像をテキストの後に表示 */
    text-align: center; /* 画像自体を中央寄せ */
    margin-top: 10px; /* 画像の上のマージン（gapでも調整可） */
}
.layout-image_bottom .section-image {
    /* 画像自体の最大幅など */
    max-width: 700px; /* 画像が横に広がりすぎないように最大幅を指定（任意） */
    width: 100%; /* コンテナに対しては100% */
}

/* --- CTAセクション (shortcode: cta.html) --- */
.cta-section {
    background-color: #e9f5ff; /* 淡い青系の背景 */
    padding: 50px 0;
    text-align: center;
    margin-top: 40px; /* 上のセクションとの間隔 */
}

.cta-title {
    font-size: 1.8em;
    color: #006093; /* テーマ色 */
    margin-bottom: 15px;
    font-weight: bold;
}

.cta-description {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 30px;
}

/* --- 共通ボタンスタイル --- */
.cta-button {
    display: inline-block;
    background-color: #f28b00; /* アクセントカラー（オレンジ） */
    color: #fff !important; /* 強制的に文字色を白に */
    padding: 15px 35px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        transform 0.1s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #cf7800; /* ホバー時の色を少し濃く */
    text-decoration: none;
    transform: translateY(-1px); /* 少し浮き上がる効果 */
}
.cta-button:active {
    transform: translateY(1px); /* クリック時に沈む効果 */
    box-shadow: none;
}

/* --- レスポンシブ対応 (例: 768px以下) --- */
@media (max-width: 768px) {
    .container {
        width: 95%; /* スマホでは幅を広げる */
    }

    .hero-title {
        font-size: 1.8em;
    }
    .hero-description {
        font-size: 1em;
    }
    .hero-image {
        max-width: 90%;
    }

    .section-container {
        flex-direction: column !important; /* 縦積みに変更 */
        gap: 30px;
    }
    .section-image-container {
        flex-basis: auto; /* 幅固定解除 */
        width: 90%; /* 画像コンテナの幅 */
        margin-top: 20px;
        order: -1; /* 必要なら画像をテキストの上に */
    }
    .layout-image_left .section-container,
    .layout-image_right .section-container {
        flex-direction: column !important;
    }
    /* 必要ならテキストと画像の順番を layout ごとに調整 */
    .layout-image_left .section-image-container {
        order: -1; /* 画像を上に */
    }
    .layout-image_right .section-image-container {
        order: 1; /* 画像を下に（デフォルトはテキストが先） */
    }
    .layout-image_bottom .section-container {
        gap: 25px; /* スマホでの縦の隙間を少し詰めるなど */
    }
    .section-text h2,
    .section-text h3 {
        font-size: 1.5em;
    }

    .cta-title {
        font-size: 1.5em;
    }
    .cta-description {
        font-size: 1em;
    }
    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
    }
}

/* --- フォーム関連 (contact.html のスタイルを一部抜粋・調整) --- */
/* LP内でフォームを使う場合や、問い合わせページに適用 */
.form-group {
    margin-bottom: 25px;
}
.contact-form .privacy-manager {
    display: table; /* 中身の幅に縮めてブロック自体を右寄せ */
    margin-left: auto;
    margin-right: 0;
    max-width: 100%;
    text-align: left; /* ブロック内のテキストは左寄せ */
}

.contact-form .privacy-notice {
    padding-left: 1em; /* labelより少しインデント */
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"], /* 電話番号用 */
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    color: #333;
}
.form-group textarea {
    min-height: 150px; /* 最小高さを指定 */
    resize: vertical; /* 縦方向のリサイズのみ許可 */
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: #006093; /* フォーカス時にテーマ色に */
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 96, 147, 0.2); /* フォーカス時の影 */
}

.checkbox-group {
    /* 複数選択 */
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 4px;
    background-color: #f9f9f9;
}
.checkbox-group div {
    /* 各チェック項目 */
    margin-bottom: 12px;
}
.checkbox-group div:last-child {
    margin-bottom: 0;
}
.checkbox-group input[type='checkbox'] {
    margin-right: 8px;
    vertical-align: middle;
    width: 16px; /* チェックボックスのサイズ指定 */
    height: 16px;
}
.checkbox-group label {
    display: inline-block; /* チェックボックスと同じ行に */
    margin-bottom: 0;
    font-weight: normal;
    vertical-align: middle;
    cursor: pointer;
}

/* 送信ボタン (CTAボタンのスタイルを流用・調整) */
button[type='submit'] {
    display: block; /* 幅100%にする */
    width: 100%;
    max-width: 400px; /* 最大幅を設定 */
    margin: 30px auto 0; /* 上に余白、中央寄せ */
    /* .cta-button のスタイルを継承 */
    background-color: #f28b00;
    color: #fff !important;
    padding: 15px 35px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        transform 0.1s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
button[type='submit']:hover {
    background-color: #cf7800;
    transform: translateY(-1px);
}
button[type='submit']:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* 必須マークなど (必要に応じて) */
.required-mark {
    color: red;
    font-size: 0.9em;
    margin-left: 5px;
}

/* --- LP用カスタムチェックボックス --- */

.lp-checkbox-item {
    position: relative; /* 子要素の絶対配置の基準点 */
    padding-left: 30px; /* チェックボックスの表示スペース確保 */
    margin-bottom: 15px; /* 各項目間の縦の余白 */
    cursor: pointer; /* カーソルをポインターに */
    display: block; /* 項目を縦に並べる */
    -webkit-user-select: none; /* テキスト選択を無効化 (操作性向上のため) */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 元のチェックボックスinputを隠す */
.lp-checkbox-input {
    position: absolute;
    opacity: 0; /* 透明にする */
    cursor: pointer;
    height: 0;
    width: 0;
}

/* チェックボックスの「枠」を作成 (::before) */
.lp-checkbox-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em; /* ラベルテキストとの縦位置を微調整 */
    width: 18px; /* 枠の幅 */
    height: 18px; /* 枠の高さ */
    border: 2px solid #bbb; /* 通常時の枠の色 (やや濃い灰色) */
    background-color: #fff; /* 背景色 */
    border-radius: 3px; /* 枠の角丸 */
    box-sizing: border-box; /* borderを含めてサイズ計算 */
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease; /* アニメーション効果 */
}

/* マウスホバー時の枠の色 */
.lp-checkbox-item:hover .lp-checkbox-label::before {
    border-color: #888;
}

/* チェックが入った時の枠のスタイル */
.lp-checkbox-input:checked + .lp-checkbox-label::before {
    border-color: #006093; /* ★ テーマ色に変更 */
    background-color: #fff; /* 必要なら背景色も変更 (白のままが見やすいかも) */
}

/* チェックマークを作成 (::after) */
.lp-checkbox-label::after {
    content: '';
    position: absolute;
    display: none; /* 通常は非表示 */
    left: 6px; /* 枠内の左からの位置 */
    top: 0.3em; /* 枠内の上からの位置 (微調整) */
    width: 5px; /* チェックマークの幅 */
    height: 10px; /* チェックマークの高さ */
    border: solid #006093; /* ★ テーマ色に変更 */
    border-width: 0 3px 3px 0; /* 右と下のボーダーだけ表示してL字型に */
    transform: rotate(45deg); /* 45度回転させてチェックマークに見せる */
    box-sizing: border-box;
}

/* チェックが入った時にチェックマークを表示 */
.lp-checkbox-input:checked + .lp-checkbox-label::after {
    display: block;
}

/* キーボードフォーカス時のスタイル */
.lp-checkbox-input:focus + .lp-checkbox-label::before {
    outline: none; /* デフォルトのアウトラインは消す */
    border-color: #006093; /* ★ テーマ色 */
    box-shadow: 0 0 0 2px rgba(0, 96, 147, 0.3); /* フォーカスリング */
}

/* ラベル自体のスタイル (任意) */
.lp-checkbox-label {
    display: inline-block; /* labelがinputのクリックを受け持つ */
    vertical-align: middle;
    line-height: 1.5; /* チェックボックスとの縦位置合わせ */
    color: #333; /* ラベルの色 */
}

/* --- FAQセクション --- */
.faq-section {
    padding: 60px 0;
    background-color: #f9f9f9; /* 必要なら背景色を設定 */
    border-top: 1px solid #eee;
}

.faq-section-title {
    text-align: center;
    font-size: 1.8em;
    color: #006093; /* テーマ色 */
    margin-bottom: 40px;
    font-weight: bold;
}

.faq-list {
    max-width: 800px; /* FAQリストの最大幅 */
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #ddd; /* 各項目の区切り線 */
}
.faq-item:first-of-type {
    border-top: 1px solid #ddd;
}

/* 質問部分 (summary) */
.faq-question {
    padding: 20px 40px 20px 45px; /* アイコン分のスペース確保 */
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    position: relative; /* アイコン配置の基準 */
    list-style: none; /* Safariでのデフォルトマーカー消去 */
    display: block; /* ブロック要素にしてクリックしやすく */
    transition: background-color 0.2s ease;
}
/* summary のデフォルトマーカー (三角) を非表示にする */
.faq-question::-webkit-details-marker,
.faq-question::marker {
    display: none;
    content: '';
}
.faq-question:focus {
    outline: none; /* デフォルトのアウトラインを消す */
    background-color: #eee; /* フォーカス時に背景色 */
}
.faq-item[open] > .faq-question {
    /* 開いている時の質問のスタイル */
    background-color: #f0f0f0; /* 少し背景色を変えるなど */
}

/* Qアイコン */
.faq-q-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #006093; /* テーマ色 */
    font-weight: bold;
    font-size: 1.2em;
}

/* 開閉アイコン (+/- や v/^ など) */
.faq-toggle-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-right: 2px solid #555; /* アイコンの色 */
    border-bottom: 2px solid #555;
    transform: translateY(-70%) rotate(45deg); /* 下向き矢印 (v) */
    transition: transform 0.3s ease;
}

.faq-item[open] > .faq-question .faq-toggle-icon {
    transform: translateY(-40%) rotate(-135deg); /* 上向き矢印 (^) */
}

/* 回答部分 */
.faq-answer {
    padding: 20px 45px 30px 45px; /* 質問より少しインデント */
    line-height: 1.8;
    background-color: #fff; /* 回答部分の背景色 */
    border-top: 1px dashed #eee; /* 質問との区切り線（任意） */
}
.faq-answer p:first-child {
    margin-top: 0;
}
.faq-answer p:last-child {
    margin-bottom: 0;
}

/* details[open] のアニメーション（滑らかに開閉 - 高さは内容によるので難しい） */
/* 簡単なフェードイン例 */
.faq-item[open] .faq-answer {
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* --- セクション一覧ページ用 (例: layouts/index.html) --- */

/* ボックスを並べるための親コンテナ (Flexboxを使用) */
.sections-grid {
    display: flex;
    flex-wrap: wrap; /* ボックスが幅を超えたら折り返す */
    gap: 30px; /* ボックス間の隙間 (既存の .section-container の gap: 40px と近い値に) */
    margin-top: 30px; /* 上のタイトルとの間隔 */
    /* justify-content: center; */ /* カードが少ない行で中央寄せにしたい場合 */
}

/* 各セクションボックス（カード）のスタイル */
.section-card {
    border: 1px solid #eee; /* 既存の .section の border-bottom と同様の線種 */
    padding: 25px;
    background-color: #ffffff; /* 白背景 */
    border-radius: 8px; /* 既存の .hero-image や .section-image の角丸と合わせる */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07); /* 既存の .section-image の影より少し広がりを抑えめに */

    flex: 1 1 300px; /* 基本幅300pxで、伸び縮み可能 */
    min-width: 280px; /* 最小幅（これより小さくならないように） */

    display: flex; /* カード内部の要素を縦に柔軟に配置するため */
    flex-direction: column;
}

.section-card-header {
    margin-bottom: 15px;
}

.section-card-title {
    margin-top: 0;
    margin-bottom: 0.5rem; /* 既存の .hero-title の margin-bottom と合わせる */
    font-size: 1.6em; /* 既存の .section-text h2/h3 (1.8em) より少し控えめに */
    line-height: 1.4; /* 既存の .hero-title と合わせる */
    font-weight: bold; /* 既存の見出しと合わせる */
}

.section-card-title a {
    text-decoration: none;
    color: #006093; /* 既存のテーマ色 */
}

.section-card-title a:hover {
    text-decoration: underline; /* シンプルなホバー効果 */
}

.section-card-body {
    font-size: 1em; /* 基本フォントサイズ */
    color: #333; /* body のテキスト色 */
    line-height: 1.7; /* body の行間と合わせる */
    flex-grow: 1; /* このエリアを伸ばしてフッターを押し下げる */
    margin-bottom: 20px; /* フッターとの間にしっかり余白 */
}

.section-card-body .text-muted em {
    /* "説明がありません" のスタイル */
    color: #777; /* 少し濃いめのグレー */
    font-size: 0.95em;
}

.section-card-footer {
    margin-top: auto; /* フッターをカードの下部に固定 */
    padding-top: 15px; /* 本文との間に少し余白 */
    border-top: 1px solid #f0f0f0; /* フッター上部に薄い区切り線 */
}

/* 「詳しく見る」ボタンのスタイル */
/* .section-card 内のボタンに限定するか、汎用的なボタンスタイルとして定義するかはお好みで */
.section-card .button-primary {
    /* 既存の .cta-button とは異なるスタイルにする場合の例 */
    display: inline-block;
    background-color: #007bff; /* Bootstrapのプライマリブルーに近い色、またはテーマ色 #006093 */
    color: #fff !important;
    padding: 10px 20px;
    border: none;
    border-radius: 5px; /* 既存の .cta-button の角丸と合わせる */
    font-size: 0.95em; /* .cta-button (1.1em) より少し小さく */
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.section-card .button-primary:hover {
    background-color: #0056b3; /* ホバー時の色を少し濃く */
    text-decoration: none;
}

/* --- レスポンシブ対応 (既存のブレークポイント 768px に合わせる) --- */
@media (max-width: 768px) {
    .sections-grid {
        gap: 20px; /* スマホでは少し隙間を詰める */
    }

    .section-card {
        /* Flexboxの場合、flex-basisを100%にすることで1列表示になります */
        flex-basis: 100%;
        padding: 20px;
    }

    .section-card-title {
        font-size: 1.4em; /* スマホでは少し小さく */
    }

    .section-card .button-primary {
        padding: 8px 18px;
        font-size: 0.9em;
    }
}
