/* --------------------------------------------------
   WordPress投稿本文用スタイル (太陽ホーム)
   Target: .single-post .entry-content 配下
   -------------------------------------------------- */

/* ベース設定 */
.single-post .entry-content {
    font-family: "Noto Sans JP", sans-serif;
    color: #333333;
    line-height: 1.8;
    font-size: 16px;
    letter-spacing: 0.05em;
    max-width: 900px; /* 記事の最大幅（サイトに合わせて調整してください） */
    margin: 0 auto;
}

/* 記事エリア全体（タイトル等含む）を中央に寄せる */
.single-post #primary {
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important; /* AstraのPC表示でのフロートを解除 */
}

/* 記事本文の幅と中央寄せ */
.single-post .entry-content {
    max-width: 900px;
    margin-left: auto !important;
    margin-right: auto !important;
    font-family: "Noto Sans JP", sans-serif;
    color: #333333;
    line-height: 1.8;
    font-size: 16px;
    letter-spacing: 0.05em;
    display: block;
}

/* タイトル部分も中央に合わせたい場合 */
.single-post .entry-header {
    max-width: 900px;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: left; /* 文字自体は左揃えを維持 */
}

/* 本文内のすべての直接の要素を最大幅に制限し、中央に揃える */
.single-post .entry-content > * {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 画像比較コンテナや表など、特殊なブロックも強制的に揃える */
.ba-compare-container,
.wp-block-cocoon-blocks-iconlist-box,
.spec-box,
.wp-block-image,
.author-profile-box,
.pc-article-cta {
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box; /* 枠線で幅がズレるのを防ぐ */
}

/* 念のため、画像比較グリッド自体の余白もリセット */
.ba-compare-grid {
    margin: 0 auto !important;
}

/* --------------------------------------------------
   見出し (Headings) - ボックス中央配置・文字左寄せ
   -------------------------------------------------- */

/* H2: 大見出し - 背景色と下線、ボックスごと中央へ */
.single-post .entry-content h2 {
    background-color: #F8F9FA;
    border-bottom: 3px solid #F39C12;
    padding: 1rem 2rem;
    margin: 3.5rem auto 1.5rem;
    color: #2C3E50;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: left;
    display: table; /* 見出しの装飾を文字幅に合わせる場合は継続、不要なら block へ */
    max-width: 100%;
}

/* H3, H4 も同様 */
.single-post .entry-content h3 {
    border-bottom: 2px solid #F39C12;
    padding-bottom: 0.5rem;
    margin: 2.5rem 0 1.25rem;
    color: #2C3E50;
    font-size: 1.25rem;
    font-weight: 700;
}

.single-post .entry-content h4 {
    border-bottom: 1px dashed #2C3E50;
    padding-bottom: 0.5rem;
    margin: 2rem 0 1rem;
    color: #2C3E50;
    font-size: 1.125rem;
    font-weight: 700;
}

/* --------------------------------------------------
   テキスト・装飾 (Text & Decoration)
   -------------------------------------------------- */

.single-post .entry-content p {
    margin-bottom: 1.5rem;
    text-align: left;
}

/* 太字・マーカー */
.single-post .entry-content strong {
    color: #2C3E50;
    background: linear-gradient(transparent 70%, #ffeaa7 70%);
    padding: 0 0.1em;
}

/* --------------------------------------------------
   リスト (Lists) - 他のコンテンツ幅と合わせる
   -------------------------------------------------- */

/* 箇条書き (ul) - コンテンツ幅いっぱいに広げ、左寄せ */
.single-post .entry-content ul {
    list-style: none;
    padding: 1.5rem 1.5rem 1.5rem 2.5rem;
    margin: 2rem 0; /* 左右autoを削除し、左端から開始 */
    background: #fff;
    border: 2px solid #F3F4F6;
    border-radius: 8px;
    display: block; /* 標準のブロック要素に戻す */
    width: 100%; /* コンテンツ幅に合わせる */
    box-sizing: border-box;
}
.single-post .entry-content ul li {
    position: relative;
    margin-bottom: 0.75rem;
    text-align: left;
}
.single-post .entry-content ul li::before {
    content: '';
    position: absolute;
    left: -1.25rem;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background-color: #F39C12;
    border-radius: 50%;
}

/* 番号付きリスト (ol) */
.single-post .entry-content ol {
    counter-reset: my-counter;
    list-style: none;
    padding: 1.5rem 1.5rem 1.5rem 3.5rem;
    margin: 2rem 0;
    background: #fff;
    border: 2px solid #F3F4F6;
    border-radius: 8px;
    display: block;
    width: 100%;
    box-sizing: border-box;
}
.single-post .entry-content ol li {
    position: relative;
    margin-bottom: 1rem;
    text-align: left;
}
.single-post .entry-content ol li::before {
    counter-increment: my-counter;
    content: counter(my-counter);
    position: absolute;
    left: -2.2rem;
    top: 0.1em;
    width: 1.6rem;
    height: 1.6rem;
    background-color: #2C3E50;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 1.6rem;
    font-size: 0.85rem;
    font-weight: bold;
}

/* --------------------------------------------------
   その他ブロック要素 (Blocks)
   -------------------------------------------------- */

/* 引用 (blockquote) - コンテンツ幅に合わせる */
.single-post .entry-content blockquote {
    background-color: #F0F4F8;
    border-left: 5px solid #2C3E50;
    padding: 2rem;
    margin: 2.5rem 0;
    color: #555;
    display: block;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}
.single-post .entry-content blockquote p {
    text-align: left;
}

/* テーブル (table) */
.single-post .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border: 1px solid #ddd;
}
.single-post .entry-content th,
.single-post .entry-content td {
    padding: 1rem;
    border: 1px solid #ddd;
}

/* 画像・図 (figure) */
.single-post .entry-content figure {
    margin: 2.5rem 0;
    text-align: center;
}
.single-post .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* ボタン (wp-block-button) */
.single-post .entry-content .wp-block-button {
    text-align: center; /* ボタン親要素を中央寄せ */
    margin: 2rem 0;
}
.single-post .entry-content .wp-block-button__link {
    background-color: #F39C12;
    color: #fff !important;
    border-radius: 50px;
    padding: 0.8rem 2.5rem;
    text-decoration: none !important;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 2px solid #F39C12;
}
.single-post .entry-content .wp-block-button__link:hover {
    background-color: #fff;
    color: #F39C12 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 区切り線 (hr) */
.single-post .entry-content hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
    margin: 3rem 0;
}

/* 吹き出し風ボックス (カスタムクラス .box-speech がある場合を想定) */
.single-post .entry-content .box-speech {
    position: relative;
    background: #fff;
    border: 2px solid #2C3E50;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem auto; /* 中央寄せ */
    display: table;
    max-width: 90%;
}
.single-post .entry-content .box-speech::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 2rem;
    width: 20px;
    height: 20px;
    background: #fff;
    border-right: 2px solid #2C3E50;
    border-bottom: 2px solid #2C3E50;
    transform: rotate(45deg);
}

/* --- Before/After ショートコード専用スタイル --- */
.ba-compare-container {
    margin: 3rem 0;
    padding: 15px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.ba-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 横に2つ並べる */
    gap: 15px;
}

.ba-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.ba-item img {
    width: 100%;
    height: 300px; /* 高さを統一 */
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.ba-item:hover img {
    transform: scale(1.08);
}

/* ラベルデザイン */
.ba-label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    border-radius: 4px;
}

.ba-before .ba-label { background: #94a3b8; } /* グレー */
.ba-after .ba-label  { background: #F39C12; } /* 太陽ホームオレンジ */

/* スマホでは縦に並べる（重要！） */
@media (max-width: 640px) {
    .ba-compare-grid {
        grid-template-columns: 1fr;
    }
    .ba-item img {
        height: 220px;
    }
}

/* --- 吹き出し：共通設定 --- */
.fuki-container {
    display: flex;
    margin: 2.5rem 0;
    align-items: flex-start;
    gap: 15px;
}

.fuki-icon {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
}

.fuki-icon img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
    margin-bottom: 5px;
}

.fuki-name {
    display: block;
    font-size: 10px;
    font-weight: bold;
    color: #666;
    line-height: 1.2;
}

.fuki-bubble {
    position: relative;
    padding: 1.2rem 1.5rem;
    border-radius: 15px;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- お客様側（左から右） --- */
.fuki-customer .fuki-bubble {
    background: #F8F5F1; /* 柔らかなベージュ */
    color: #333;
}

.fuki-customer .fuki-bubble::before {
    content: "";
    position: absolute;
    top: 20px;
    left: -10px;
    border-style: solid;
    border-width: 10px 10px 10px 0;
    border-color: transparent #F8F5F1 transparent transparent;
}

/* --- 太陽ホーム側（右から左へ反転） --- */
.fuki-staff {
    flex-direction: row-reverse;
}

.fuki-staff .fuki-bubble {
    background: #2C3E50; /* 太陽ホームネイビー */
    color: #ffffff;
}

.fuki-staff .fuki-bubble::before {
    content: "";
    position: absolute;
    top: 20px;
    right: -10px;
    border-style: solid;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent #2C3E50;
}

@media (max-width: 600px) {
    .fuki-icon { width: 60px; }
    .fuki-icon img { width: 50px; height: 50px; }
}

/* 吹き出し内の余白調整：pタグの余計な隙間を消す */
.fuki-bubble p {
    margin: 0 !important; /* 段落の上下余白をゼロに */
    line-height: 1.6;
}

/* 吹き出し自体のパディングを微調整（上下 1rem、左右 1.2remくらいが綺麗です） */
.fuki-bubble {
    position: relative;
    padding: 1rem 1.2rem; /* 上下の 1.2rem を少し削りました */
    border-radius: 15px;
    font-size: 0.95rem;
}

/* --- この記事を書いた人（Author Box） --- */
.author-profile-box {
    margin-top: 5rem;
    padding: 2rem;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
    position: relative;
}

/* 左上の「WRITER」ラベル */
.author-label {
    position: absolute;
    top: -15px;
    left: 20px;
    background: #2C3E50; /* 太陽ホームネイビー */
    color: #fff;
    padding: 4px 15px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 4px;
}

.author-flex {
    display: flex;
    gap: 25px;
    align-items: center;
}

/* アバター画像 */
.author-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #F39C12; /* 太陽ホームオレンジの輪っか */
}

.author-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #2C3E50;
    margin: 0 0 10px 0 !important;
}

.author-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px !important;
}

.author-link {
    font-size: 0.85rem;
    color: #F39C12;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s;
}

.author-link:hover {
    opacity: 0.7;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .author-flex {
        flex-direction: column;
        text-align: center;
    }
    .author-avatar img {
        width: 80px;
        height: 80px;
    }
}

/* --- PC用 記事下CTA --- */
.pc-article-cta {
    display: none; /* デフォルト非表示 */
}

@media (min-width: 768px) {
    .pc-article-cta {
        display: block;
        margin-top: 4rem;
        background: #F9FAFB; /* taiyo-gray */
        border-radius: 20px;
        overflow: hidden;
        border: 1px solid #e5e7eb;
    }

    .cta-inner {
        display: flex;
        align-items: stretch;
    }

    .cta-content {
        flex: 1;
        padding: 3rem;
    }

    .cta-image {
        width: 40%;
        position: relative;
    }

    .cta-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cta-title {
        font-size: 1.8rem !important;
        color: #2C3E50; /* taiyo-navy */
        font-weight: 800;
        line-height: 1.4;
        margin-bottom: 1.5rem !important;
        border: none !important; /* H3のスタイルをリセット */
        padding: 0 !important;
    }
    
    .cta-title::after { display: none; } /* H3のオレンジ線も消す */

    .cta-text {
        font-size: 1rem;
        color: #4B5563;
        margin-bottom: 2rem !important;
    }

    /* ボタンデザイン（TOPページと統一） */
    .btn-quote {
        display: inline-block;
        background: #F39C12; /* taiyo-orange */
        color: #fff;
        padding: 15px 40px;
        border-radius: 50px;
        font-weight: bold;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
        transition: transform 0.3s, background 0.3s;
    }

    .btn-quote:hover {
        background: #e67e22;
        transform: translateY(-3px);
        color: #fff;
    }

    .cta-tel {
        margin-top: 1.5rem;
        font-size: 0.9rem;
        color: #2C3E50;
        font-weight: bold;
    }

    .cta-tel span {
        font-size: 1.4rem;
        margin-left: 5px;
    }
}

/* --- PC用CTA：ボタンの配色を強制上書き --- */
@media (min-width: 768px) {
    /* 1. 通常時：背景オレンジ・文字を「白」に強制 */
    .pc-article-cta .btn-quote {
        display: inline-block;
        background-color: #F39C12 !important; /* 太陽ホームオレンジ */
        color: #ffffff !important;           /* ★ここを白に強制 */
        
        padding: 16px 45px;
        border-radius: 50px;
        font-weight: 800;
        text-decoration: none !important;
        border: 2px solid #F39C12; /* 枠線もオレンジ */
        
        box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
        transition: all 0.3s ease;
    }

    /* 2. ホバー時：白背景・枠オレンジ・文字オレンジに反転 */
    .pc-article-cta .btn-quote:hover {
        background-color: #ffffff !important; /* 背景を白に */
        color: #F39C12 !important;            /* 文字をオレンジに */
        border: 2px solid #F39C12;            /* 枠線はそのまま */
        transform: translateY(-3px);
    }
}

/* --- こだわりポイントボックス --- */
.point-box {
    margin: 3rem 0;
    background: #f9f9f9; /* 非常に薄いグレー */
    border-radius: 12px;
    border-left: 6px solid #F39C12; /* 太陽ホームオレンジのアクセント線 */
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.point-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.2rem;
}

/* 「CHECK」などの小さなラベル */
.point-icon {
    background: #2C3E50; /* 太陽ホームネイビー */
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 1px;
}

/* ボックス内のタイトル（H3を上書き） */
.point-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.4rem !important;
    color: #2C3E50 !important;
    font-weight: 800 !important;
    border: none !important; /* Astraの標準の下線などを消す */
}

.point-title::after {
    display: none !important; /* もしAstraで擬似要素の線が出ていたら消す */
}

.point-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.point-content p {
    margin-bottom: 0 !important;
}

/* スマホ対応 */
@media (max-width: 640px) {
    .point-box {
        padding: 1.5rem;
    }
    .point-title {
        font-size: 1.2rem !important;
    }
}

/* --- 左右対比テーブル --- */
.compare-table-container {
    margin: 3rem 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    background: #fff;
}

.compare-table-row {
    display: flex;
    align-items: stretch; /* 高さを揃える */
}

.compare-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 見出し部分 */
.compare-header {
    padding: 15px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* 左側（お悩み等）の配色 */
.compare-left {
    background: #f1f5f9; /* 薄いグレー */
    border-right: 2px solid #fff;
}
.compare-left .compare-header {
    background: #94a3b8; /* 濃いグレー */
    color: #fff;
}

/* 右側（解決等）の配色 */
.compare-right {
    background: #FFF9F0; /* 非常に薄いオレンジ */
}
.compare-right .compare-header {
    background: #F39C12; /* 太陽ホームオレンジ */
    color: #fff;
}

/* 本文部分 */
.compare-body {
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    flex-grow: 1;
}

.compare-body ul {
    margin: 0;
    padding-left: 1.2rem;
}

.compare-body li {
    margin-bottom: 0.5rem;
}

/* スマホ対応：縦に並べる */
@media (max-width: 767px) {
    .compare-table-row {
        flex-direction: column;
    }
    .compare-left {
        border-right: none;
        border-bottom: 4px solid #fff;
    }
    .compare-body {
        padding: 1.5rem;
    }
}

/* --- 施工概要スペック表 --- */
.spec-box {
    margin: 2rem 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.spec-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 !important;
}

.spec-list dt {
    width: 30%;
    background: #2C3E50; /* 太陽ホームネイビー */
    color: #fff;
    padding: 15px 20px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.spec-list dd {
    width: 70%;
    margin: 0 !important;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1rem;
    color: #333;
}

/* 最後の項目のボーダーを消す */
.spec-list dt:last-of-type,
.spec-list dd:last-of-type {
    border-bottom: none;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .spec-list dt, .spec-list dd {
        width: 100%;
    }
    .spec-list dt {
        padding: 8px 20px;
        background: #34495e; /* 少し明るめのネイビーに */
    }
}