:root {
    --main_color: var(--wp--preset--color--main);
    --sub_color: var(--wp--preset--color--accent);
    --sub_color2: var(--wp--preset--color--ink);
}

/* 余白サイズ */

/* cardDesign1 */
.wp-block-group.is-style-cardDesign1 {
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}
.wp-block-group.is-style-cardDesign1::before {
    content: "";
    position: absolute;
    top: 1rem;
    left: 0;
    width: 60%;
    height: 15px;
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/bkimg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    /* background-color: #c9e7fd; */
}
.wp-block-group.is-style-cardDesign1::after {
    content: "";
    position: absolute;
    bottom: 1rem;
    right: 0;
    width: 60%;
    height: 15px;
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/bkimg.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    /* background-color: #c9e7fd; */
}

/* cardDesign2 */
.wp-block-group.is-style-cardDesign2 {
    padding: 2rem;
    background-color: #fff;
    box-shadow:
        8px 8px 0px 4px #c9e7fd,
        -8px -8px 0px 4px var(--sub_color);
}
@media screen and (max-width: 768px) {
    .wp-block-group.is-style-cardDesign2 {
        padding: 1rem;
    }
}

/* simplecard */
.wp-block-group.is-style-simplecard {
    border: solid 1px var(--main_color);
    padding: 2rem;
    background-color: #fff;
}
@media screen and (max-width: 768px) {
    .wp-block-group.is-style-simplecard {
        padding: 2rem 1rem;
    }
}

/* full_wide */
.wp-block-group.is-style-full_wide {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-bottom: 80px;
    padding-top: 80px;
}
.wp-block-group.is-style-full_wide .wp-block-group__inner-container {
    max-width: var(--maxWh);
    margin: auto;
}
@media screen and (max-width: 768px) {
    .wp-block-group.is-style-full_wide {
        padding-bottom: 30px !important;
        padding-top: 30px !important;
    }
}

/* tri_background */
.wp-block-group.is-style-tri_background {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 1rem 1rem 80px;
    padding-top: 80px;
}
.wp-block-group.is-style-tri_background::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: calc(100vh / 2);
    width: calc(100vw / 2);
    clip-path: polygon(0% 0, 0% 100%, 100% 0%);
    aspect-ratio: 1;
    background-color: var(--sub_color);
    z-index: -1;
}
.wp-block-group.is-style-tri_background::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    height: calc(100vh / 2);
    width: calc(100vw / 2);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    aspect-ratio: 1;
    background-color: var(--sub_color);
    z-index: -1;
}
.wp-block-group.is-style-tri_background .wp-block-group__inner-container {
    max-width: var(--maxWh);
    margin: auto;
}

@media screen and (max-width: 768px) {
    .wp-block-group.is-style-tri_background::before {
        width: calc(100vw / 1.1);
    }
    .wp-block-group.is-style-tri_background::after {
        width: calc(100vw / 1.1);
    }
}

/* TOCボックス（グループに付ける想定） */
.wp-block-group.is-style-toc_wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 4rem;
    border: solid 4px #c9e7fd;
}

/* ====== List（箇条書き）用スタイル ====== */
.wp-block-list.is-style-list_design {
    list-style-position: inside;
    list-style-image: url("/wp-content/themes/orthopedic-surgery/common/img/check_og.svg");
}
.wp-block-list.is-style-list_design li {
    margin-left: 1em;
    text-indent: -1em;
}

/* ====== アンダーラインリスト ====== */
.wp-block-list.is-style-underline_list_design > li {
    border-bottom: 1px solid #cfcfcf;
    padding: 6px;
}

/* ====== シンプルなドットリスト ====== */
.wp-block-list.is-style-list_design_dot {
    list-style: none;
    padding-left: 0;
}

.wp-block-list.is-style-list_design_dot > li {
    position: relative;
    padding-left: 1em;
}

.wp-block-list.is-style-list_design_dot > li::before {
    content: "⚫︎";
    position: absolute;
    left: 0;
    top: 0.7em;
    color: var(--main_color);
    font-size: 0.75rem;
    line-height: 1;
}

/* ====== カウントリスト（丸背景つき） ====== */
.wp-block-list.is-style-list_design_count {
    list-style: none;
    padding-left: 0;
    counter-reset: count;
}

.wp-block-list.is-style-list_design_count > li {
    counter-increment: count;
    position: relative;
    padding-left: 1.75em;
    margin: 0.4em 0;
}

.wp-block-list.is-style-list_design_count > li::before {
    content: counter(count);
    position: absolute;
    left: 0;
    top: 1em;
    transform: translateY(-50%);

    width: 1.6em;
    height: 1.6em;
    border-radius: 50%;
    background: var(--sub_color2);

    color: #fff;
    display: grid;
    place-items: center;

    font-size: 0.85rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0;
}

/* ========================================
カウント付きタイトル
======================================== */

.wp-block-heading.is-style-count_title {
    background-color: var(--sub_color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.wp-block-heading.is-style-count_title::before {
    content: attr(data-count);
    color: #fff;
    font-weight: bold;
    margin-right: 0.5rem;
    background-color: var(--main_color);
    padding: 1rem;
    border-radius: 50%;
    display: inline-block;
    line-height: 1;
}

/* h2/h3デフォルトスタイル打ち消し */
.wp-block-heading.is-style-count_title_01::after,
.wp-block-heading.is-style-count_title_02::after,
.wp-block-heading.is-style-count_title_03::after,
.wp-block-heading.is-style-count_title_04::after,
.wp-block-heading.is-style-count_title_05::after,
.wp-block-heading.is-style-count_title_06::after,
.wp-block-heading.is-style-count_title_07::after,
.wp-block-heading.is-style-count_title_08::after,
.wp-block-heading.is-style-count_title_09::after,
.wp-block-heading.is-style-count_title_10::after {
    display: none;
}

/* カウント選択 */
.wp-block-heading[class*="is-style-count_title_"] {
    background-color: var(--sub_color);
    padding: 1rem 0.5rem 1rem 3rem;
    border-radius: 20px 8px 8px 8px;
    position: relative;
}

/* 01〜10 */
.wp-block-heading.is-style-count_title_01::before {
    content: "";
    background-image: url("//wp-content/themes/orthopedic-surgery/common/img/count/01.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_02::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/02.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_03::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/03.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_04::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/04.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_05::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/05.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_06::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/06.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_07::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/07.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_08::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/08.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_09::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/09.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}
.wp-block-heading.is-style-count_title_10::before {
    content: "";
    background-image: url("/wp-content/themes/orthopedic-surgery/common/img/count/10.svg");
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 0;
    left: 0;
    width: 2.5rem;
    height: 2.5rem;
}

/* .wp-block-heading[class*="is-style-count_title_"]::before {
    color: #fff;
    font-weight: bold;
    margin-right: 0.5rem;
    background-color: var(--main_color);
    padding: 1rem 0.9rem;
    border-radius: 50%;
    display: inline-block;
    line-height: 1;
} */

/* ========================================
チェックマークの見出し テキスト
======================================== */
.wp-block-heading.is-style-checkmark_title {
    /* position: relative; */
    /* padding-left: 2rem; */
    font-weight: bold;
}
.wp-block-heading.is-style-checkmark_title::before {
    content: url("/wp-content/themes/orthopedic-surgery/common/img/check_og_hed.svg");
    padding-right: 0.3em;
}

/* h2/h3デフォルトスタイル打ち消し */
.wp-block-heading.is-style-checkmark_title::after {
    display: none;
}
.wp-block-heading.is-style-checkmark_title {
    padding-left: 0px !important;
}

/* テキストのチェックマーク */
.is-style-checkmark_text::before {
    content: url("/wp-content/themes/orthopedic-surgery/common/img/check_og.svg");
    padding-right: 0.3em;
}

/* ========================================
* 共通：オーバーレイ用の土台
======================================== */
.wp-block-group.is-style-bg_overlay_dark,
.wp-block-group.is-style-bg_overlay_light {
    position: relative;
    overflow: hidden;
}

.wp-block-group.is-style-bg_overlay_dark > *,
.wp-block-group.is-style-bg_overlay_light > * {
    position: relative;
    z-index: 1;
}

/* 暗く */
.wp-block-group.is-style-bg_overlay_dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

/* 明るく */
.wp-block-group.is-style-bg_overlay_light::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.45);
    z-index: 0;
}

/* 背景画像ズーム用：土台 */
/* 暗くオーバーレイをかける：土台 */
.wp-block-group.is-style-bg_hover_dark {
    position: relative;
    overflow: hidden;
}

/* 中身（テキストなど）は前面に */
.wp-block-group.is-style-bg_hover_dark > * {
    position: relative;
    z-index: 1;
}

/* オーバーレイ本体（通常は透明） */
.wp-block-group.is-style-bg_hover_dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
    transition: 0.5s;
}

/* hoverしたらオーバーレイを表示（暗くなる） */
.wp-block-group.is-style-bg_hover_dark:hover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.652);
    z-index: 0;
}

/* ========================================
* 表示非表示のスイッチ（フロント：非表示）
======================================== */
.is-style-display_none-sp {
    display: none !important;
}
.is-style-display_none-pc {
    display: block !important;
}
.is-style-hihyouzi {
    display: none !important;
}

@media (max-width: 768px) {
    .is-style-display_none-sp {
        display: block !important;
    }
    .is-style-display_none-pc {
        display: none !important;
    }
}

/* ========================================
* 管理画面（ブロックエディター）だけ：薄く表示する
======================================== */

.editor-styles-wrapper .is-style-display_none-pc {
    display: block !important; /* 管理画面では消さない */
    position: relative;
}

.editor-styles-wrapper .is-style-display_none-sp,
.editor-styles-wrapper .is-style-hihyouzi {
    display: block !important; /* 管理画面では消さない */
    position: relative;
    opacity: 0.5;
}

/* 注釈ラベルを出す（任意） */
.editor-styles-wrapper .is-style-hihyouzi::before {
    content: "常に非表示";
}
.editor-styles-wrapper .is-style-display_none-pc::before {
    content: "PC表示";
}
.editor-styles-wrapper .is-style-display_none-sp::before {
    content: "スマホ表示";
}

.editor-styles-wrapper .is-style-hihyouzi::before,
.editor-styles-wrapper .is-style-display_none-pc::before,
.editor-styles-wrapper .is-style-display_none-sp::before {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    padding: 4px 6px;
    margin-bottom: 6px;
    border-radius: 6px;
    border: 1px dashed #999;
    background: #fff;
    color: #333;
}
