/**
 * 西小山歯科 投稿ページ専用CSS
 * - ブログパーツ187（電話番号 + WEB予約ボタン）を記事内では左右統一デザインに
 * - PCヘッダー（.w-header.pc_）には影響しない（.l-content スコープ）
 */

/* ボタンを中央寄せ */
.l-content .p-blogParts[data-partsID="187"] .wp-block-buttons.is-content-justification-right {
    justify-content: center;
}

/* 左右ボタンを同一デザイン（青塗り + 白文字 + 2pxボーダー）に統一 */
.l-content .p-blogParts[data-partsID="187"] .wp-block-button__link {
    background: #033E8C !important;
    color: #fff !important;
    border: 2px solid #033E8C !important;
    padding: 0.5em 1.2em !important;
    line-height: 1.4 !important;
}

/* インラインstyle="color:#033e8c"対策（テキスト・アイコンを白に） */
.l-content .p-blogParts[data-partsID="187"] .wp-block-button__link strong,
.l-content .p-blogParts[data-partsID="187"] .wp-block-button__link span {
    color: #fff !important;
}

/* ============================================================
 * 投稿本文の見出し階層を強調（H2 > H3）
 * - H2：途中で色が切り替わる2トーン下線で目立たせる
 * - H3：細い下線のみで控えめに
 * ============================================================ */

/* H2：濃い青 → 薄い青に途中で切り替わる下線 */
.l-content .post_content > h2,
.l-content .post_content h2.wp-block-heading {
    position: relative;
    margin-top: 2.4em;
    margin-bottom: 1em;
    padding-bottom: 0.4em;
    padding-left: 0.3em;
    font-size: 1.6em;
    font-weight: 700;
    border-bottom: none;
    background-image: linear-gradient(
        to right,
        #033E8C 0%,
        #033E8C 40%,
        #6FA8E0 40%,
        #6FA8E0 100%
    );
    background-repeat: no-repeat;
    background-size: 100% 4px;
    background-position: left bottom;
}

/* SWELLデフォルトの::before/::afterが付く場合の打ち消し */
.l-content .post_content > h2::before,
.l-content .post_content > h2::after,
.l-content .post_content h2.wp-block-heading::before,
.l-content .post_content h2.wp-block-heading::after {
    content: none !important;
    display: none !important;
}

/* H3：H2より控えめ。細めの単色下線 */
.l-content .post_content > h3,
.l-content .post_content h3.wp-block-heading {
    margin-top: 2em;
    margin-bottom: 0.8em;
    padding-bottom: 0.3em;
    padding-left: 0.6em;
    font-size: 1.25em;
    font-weight: 700;
    border-bottom: 1px solid #cfd9eb;
    border-left: 4px solid #033E8C;
    background: none;
}

.l-content .post_content > h3::before,
.l-content .post_content > h3::after,
.l-content .post_content h3.wp-block-heading::before,
.l-content .post_content h3.wp-block-heading::after {
    content: none !important;
    display: none !important;
}

/* ============================================================
 * SP（959px以下）：見出しサイズを縮小
 * SWELLのSPブレークポイントに合わせる
 * ============================================================ */
@media screen and (max-width: 959px) {
    .l-content .post_content > h2,
    .l-content .post_content h2.wp-block-heading {
        font-size: 1.3em;
        margin-top: 2em;
        margin-bottom: 0.8em;
        padding-bottom: 0.35em;
        padding-left: 0.25em;
        background-size: 100% 3px;
    }

    .l-content .post_content > h3,
    .l-content .post_content h3.wp-block-heading {
        font-size: 1.1em;
        margin-top: 1.6em;
        margin-bottom: 0.6em;
        padding-left: 0.5em;
        border-left-width: 3px;
    }
}

/* さらに狭い画面（599px以下＝スマホ縦） */
@media screen and (max-width: 599px) {
    .l-content .post_content > h2,
    .l-content .post_content h2.wp-block-heading {
        font-size: 1.2em;
    }

    .l-content .post_content > h3,
    .l-content .post_content h3.wp-block-heading {
        font-size: 1.05em;
    }
}
