/* TOPボタン */
/* #to-top-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #9F8E61;
    color: white;
    padding: 10px 16px;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: background-color 0.3s;
    text-align: center;
}

#to-top-button:hover {
    background-color: #B0A173;
} */

/* 個別診断科目スタイル */
@media screen and (min-width: 770px) {
    :target {
        scroll-margin-top: 117px;
        /* scroll-margin-top: 217px; */
        /* 固定ヘッダーの高さ + 余白 */
    }
}

@media screen and (max-width: 770px) {
    #primary {
        margin-top: 0px !important;
    }
}

/* ヘッダー */
.entry-header {
    background-image: url('https://mitsudaclinic.com/wp-content/uploads/2025/03/header-back-e1742089852488.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 250px;
    position: relative;
    margin-top: -130px;
}

.entry-header::before {
    content: "";
    /* 擬似要素の中身は空 */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-color: rgba(255, 255, 255, 0.7); */
    z-index: 1;
}

.entry-title {
    height: 100%;
    position: relative;
    text-align: center;
    font-size: 26px;
    font-weight: 900;
    padding-top: 166px;
    z-index: 10;
}

@media screen and (max-width: 1250px) {
    .entry-header {
        background-image: url('https://mitsudaclinic.com/wp-content/uploads/2025/03/header-back-e1742089852488.png');
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        height: 250px;
        position: relative;
        margin-top: -117px;
    }

    .entry-title {
        height: 100%;
        text-align: center;
        font-size: 26px;
        font-weight: 900;
        padding-top: 159px;
        position: relative;
        z-index: 100;
    }

}

@media screen and (max-width: 770px) {
    .entry-header {
        background-image: url(https://mitsudaclinic.com/wp-content/uploads/2025/03/header-back-e1742089852488.png);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;
        height: 50px;
        position: relative;
        margin-top: 0px;
    }

    .entry-title {
        height: 86%;
        text-align: center;
        font-size: 18px;
        font-weight: 900;
        padding-top: 11px;
        position: relative;
        z-index: 100;
    }
}

/* ヘッダーここまで */


/* 診療科目ページ */
.department-article-wrapper {
    max-width: 1030px;
    width: 80%;
    margin: 0 auto;
}

/* パンくずリスト */
.breadcrumbs {
    margin: 6px 2%;
}

.breadcrumbs a {
    text-decoration: none;
}

/* 目次 */
.toc-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    list-style: none;
    padding: 3% 5%;
    margin: 0;
    background: #f7f7f5;
}

.toc-list li {
    flex: 1 1 calc(50% - 10px);
    margin-bottom: 10px;
}

.toc-list a {
    display: block;
    font-size: 0.9rem;
    text-decoration: none;
    background-color: #C9B57E;
    color: white;
    padding: 5px 13px;
    position: relative;
    text-align: left;
    font-weight: bold;
    transition: background-color 0.3s ease, padding-right 0.3s ease;
}

.toc-list a::after {
    content: "→";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: right 0.3s ease;
}

.toc-list a:hover {
    background-color: #ffff;
    padding-right: 20px;
    color: #b08a5b;
    border: 1px solid #b08a5b;
}

.toc-list a:hover::after {
    right: 20px;
}

.toc-list-item-text {
    display: block;
    width: 80%;
}

.toc-highlight {
    border: solid 4px #f500ff;
    padding: 3px 12px !important;
}


@media screen and (max-width: 770px) {
    .toc-list li {
        flex: 1 1 90%;
        margin-bottom: 4px;
    }
}

/* 目次ここまで */

.styled-list {
    list-style: disc;
}

.article-header {
    text-align: center;
    margin-bottom: 5%;
}

.article-title {
    display: flex;
    margin: 20px auto;
    font-size: 24px;
    justify-content: center;
}

.article-title>span {
    height: fit-content;
    margin: auto 5px;
}

.article-lead {
    font-size: 16px !important;
}

@media only screen and (max-width: 768px) {
    .article-lead {
        text-align: left;
        font-size: 16px !important;
    }
}

.img-container {
    text-align: center;
    margin-top: 15px;
}

.section-title {
    position: relative;
    width: fit-content;
    font-size: 24px;
    margin: 55px auto;
    text-align: center;
}


.section-title::after {
    content: "";
    position: absolute;
    left: 50%;
    /* 左端を親要素の中央に */
    bottom: -10px;
    transform: translateX(-50%);
    /* 幅の半分だけ左に移動して中央揃え */
    width: 60%;
    /* 下線の幅を指定 */
    height: 0.5px;
    background-color: #9B8C6C;
}

.subsection-title {
    font-size: 20px;
    position: relative;
    margin-bottom: 3%;
    width: fit-content;
    padding-left: 20px;
    padding-bottom: 6px;
}

/* 縦線 */
.subsection-title::before {
    content: "";
    position: absolute;
    left: 4px;
    top: -3px;
    width: 0.5px;
    height: 150%;
    background-color: #9B8C6C;
}

.subsection-title::after {
    content: "";
    position: absolute;
    left: -10px;
    bottom: 0;
    width: 120%;
    min-width: 360px;
    height: 0.5px;
    background-color: #9B8C6C;
}

/* サブセクションサブタイトルと下線 */
.subsection-subtitle {
    position: relative;
    width: fit-content;
    font-weight: 900;
    margin: 1.5% 0 1% 0;
}

.subsection-subtitle::after {
    content: "";
    position: absolute;
    left: 0px;
    bottom: 0;
    width: 100%;
    height: 0.5px;
    background-color: #9B8C6C;
}

/* サブセクションサブタイトルと下線ここまで */

/* サブセクションのサブタイトル */
.subsection-subtitle-colored {
    background-color: #e1ca8985;
    position: relative;
    width: fit-content;
    font-weight: 900;
    padding: 0.3% 3% 0.3% 3%;
}

.subsection-subtitle-child {
    position: relative;
    width: fit-content;
    font-weight: 900;
    margin: 0.5% 1% 0.5% 0%;
}

/* サブセクションのサブタイトルここまで */

.subsection-content {
    padding: 8px 0 0px 30px;
    margin-bottom: 15px;
}

.paragraph-container {
    margin-bottom: 7%;
}

#intro-img {
    width: 55%;
    min-width: 350px;
}

#om-intro-img {
    width: 25%;
    min-width: 260px;
}

#intro-text {
    width: 70%;
    padding-left: 15px;
}

/* テキスト横並びイメージ */
.sc-text-img-container {
    display: flex;
    justify-content: space-between;
}

.sc-text-img-container-reverse {
    display: flex;
    justify-content: space-between;
}

.sc-text-left {
    width: 60%;
}

.sc-text-left-80 {
    width: 80%;
}

.sc-img-right {
    width: 38%;
}

.sc-img-right-20 {
    width: 20%;
}

.sc-img-left {
    width: 35%;
}

.sc-text-right {
    width: 60%;
}

/* テキスト横並びイメージここまで */

/* テキスト下表示のイメージ */
.sc-img-row {
    display: flex;
    max-height: 250px;
    margin: 1.5% 0;
}

.img-row-center {
    text-align: center;
}

.sc-img-row>img,
.sc-img-row>.img {
    /* margin-right: 20px;
    max-width: 49%;
    height: auto; */
    object-fit: contain;
}

.sir-img-half {
    margin-right: 20px;
    max-width: 49%;
    height: auto;
}

/* テキスト下表示のイメージここまで */

/* テキストと縦並び画像左詰め */
.left-justified-img-container>img {
    max-height: 300px;
    padding: 1% 0% 1% 0%;
}

/* テキストと縦並び画像左詰めここまで */

/* テーブルここから */
.table-in-single-department tr td {
    border: 1px dotted #957C56 !important;
}

.table-in-single-department tr:first-child td {
    border-top: none !important;
    border-left: none !important;
}

/* 最終行の下の枠線を実線に設定 */
.table-in-single-department tr:last-child {
    border-bottom: 1px solid #957C56;
}

.table-in-single-department tr td:first-child,
.table-in-single-department tr th:first-child {
    border-left: none !important;
}

.table-in-single-department tr td:last-child,
.table-in-single-department tr th:last-child {
    border-right: none !important;
}


/* 最終行の下の枠線は保持 */
.table-in-single-department tr:last-child td {
    border-bottom: 1px solid #957C56;
}

/* テーブルここまで */

/* Q&A */
.qa-q {
    font-weight: bold;
}

.qa-a {
    margin-bottom: 15px;
}

/* Q&Aここまで */

/* 特徴 */
.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0% auto 5% auto;
}

.feature {
    display: flex;
    align-items: center;
    background: white;
    border: 3px double #9B8C6C;
    /* 外側の太い枠線 */
    padding: 15px;
    position: relative;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.feature::before {
    content: "";
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    right: 5px;
    border: 2px solid #e1ca89;
    /* 内側の細い枠線 */
}

.feature:hover {
    transform: translateX(5px);
    /* ホバー時に少し右に動く */
    border-color: #e1ca89;
}

.feature-number {
    background: #9B8C6C;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    /* 横幅が変わらないように固定 */
    z-index: 1;
}

.feature-text {
    flex-grow: 1;
}

.features-container a {
    font-size: 16px;
    color: #5a4e3b;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
    z-index: 1;
}

.feature-text a:hover {
    color: #9B8C6C;
    text-decoration: underline;
}

.feature-arrow {
    margin-left: auto;
    font-size: 20px;
    color: #9B8C6C;
    font-weight: bold;
    z-index: 1;
    transition: transform 0.3s ease-in-out;
}

.feature:hover .feature-arrow {
    transform: translateX(3px);
}

/* 特徴ここまで */

/* デザインリンク */
.designed-link {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    background-image: url('https://mitsudaclinic.com/wp-content/uploads/2025/02/link-back.png');
    padding: 1% 2% 1% 2%;
    margin: 1% 0% 1% 0%;
    border-radius: 8px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.designed-link-in {
    display: inline-block;
    color: #fff;
    text-decoration: none;
    background-image: url('https://mitsudaclinic.com/wp-content/uploads/2025/02/link-back.png');
    padding: 0% 1% 0% 1%;
    margin: 0.1% 0.5% 0.1% 0.5%;
    border-radius: 8px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.designed-link-in:visited,
.designed-link:visited {
    color: #fff;
}

.designed-link-in:hover,
.designed-link:hover {
    transform: scale(1.01);
    color: #fff;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.designed-link-arrow {
    display: inline-block;
    margin-left: auto;
    font-size: 20px;
    color: #fff;
    font-weight: bold;
    z-index: 1;
    transition: transform 0.3s ease-in-out;
}

.designed-link:hover .designed-link-arrow {
    transform: translateX(3px);
}

/* デザインリンクここまで */


@media screen and (max-width: 1250px) {
    .department-article-wrapper {
        width: 90%;
        margin: 0 auto;
        object-fit: contain;
    }

}

@media screen and (max-width: 800px) {
    #media {
        display: block;
        /* flex-wrap: wrap;         */
        /* margin: 0 auto; */
    }

    #blog-posts-inner {
        margin: 0 auto;
        padding: 3px;
        width: fit-content;
        background: white;
    }

}

@media screen and (max-width: 770px) {
    .toc-list li {
        flex: 1 1 90%;
        margin-bottom: 4px;
    }

    .sc-text-img-container {
        display: flex;
        flex-wrap: wrap;
    }

    .sc-text-img-container-reverse {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column-reverse;
    }

    .sc-text-left {
        width: 100%;
    }

    .sc-img-right {
        width: 100%;
        margin: 5% auto 0 0;
    }

    .sc-img-left {
        width: 100%;
    }

    .sc-text-right {
        width: 100%;
        margin: 5% auto 0 0;
    }
}

/* inputを非表示 */
.on-off {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

@media screen and (max-width: 428px) {
    .sc-img-row {
        display: flex;
        flex-wrap: wrap;
        margin: 1.5% 0;
        height: auto;
        max-height: fit-content;
    }

    .sc-img-row>img,
    .sc-img-row>.img {
        /* margin: 1% auto 1% auto !important;
        max-width: 90%;
        height: auto !important; */
        object-fit: contain;
    }

    .sir-img-half {
        margin: 1% auto 1% auto !important;
        max-width: 90%;
        height: auto !important;
    }


    /* 全体のレスポンシブ */
    .subsection-content {
        padding: 8px 0 0px 15px;
        margin-bottom: 15px;
    }

    /* 折りたたみボタン */
    .open-label {
        margin: 0 20%;
        padding: 0.1em 0.3em;
        display: block;
        color: #fff;
        text-align: center;
        background: #C9B57E;
        opacity: 0.8;
        cursor: pointer;
        position: relative;
    }

    /* ボタンのホバー・クリック効果 */
    .open-label:active {
        box-shadow: 0 0 0 0;
    }

    .open-label:hover {
        /* background: -webkit-linear-gradient(bottom, #fff4e0 1%, orange 80%); */
        /* background: #fcbe11; */
    }

    /* ボタンの表示切り替え */
    .open-label::after {
        content: 'タップで開く↓';
    }

    .on-off:checked~.open-label::after {
        content: 'タップで閉じる↑';
    }

    /* 開閉エリア */
    .open {
        height: 150px;
        overflow: hidden;
        transition: .5s;
        position: relative;
    }

    /* チェックが入ると開く */
    .on-off:checked~.open {
        height: auto;
    }

    /* ぼかし効果 */
    .open::before {
        content: '';
        background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 90px;
        /* ぼかしの高さ */
        z-index: 3;
        pointer-events: none;
        /* クリックを透過 */
    }

    /* 開いたらぼかしを消す */
    .on-off:checked~.open::before {
        background: none;
        z-index: -1;
    }

    .designed-link {
        margin: 4% 0% 4% 0%;
    }

}