/* ==================================================
   1. お悩みカード（WORRIES）
   カード全体をクリックして各見出しへジャンプ
   ================================================== */

.worry-section {
    margin: 50px 0;
}

/* 見出し */
.worry-heading {
    text-align: center;
    margin-bottom: 30px;
}

/* 小さな英字 */
.worry-heading-sub {
    display: block;
    margin-bottom: 6px;
    color: #5d91bb;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.15em;
}

/* メイン見出し */
.worry-heading h2 {
    position: relative;
    display: inline-block;
    margin: 0;
    padding: 0 28px 12px;
    color: #003c78;
    font-size: 28px;
    font-weight: bold;
    line-height: 1.5;
}

/* 見出し下のライン（HTMLに要素がある場合に使用） */
.worry-heading-line {
    display: block;
    width: 60px;
    height: 4px;
    margin: 0 auto;
    background: #5aa3d6;
    border-radius: 4px;
}

/* 4枚のカード */
.worry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* カード全体をリンクにする */
.worry-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    box-sizing: border-box;

    background: #f5f9fc;
    border: 1px solid #d8e4ef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 0;

    color: #333;
    text-decoration: none !important;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

/* ホバー時 */
.worry-card:hover {
    transform: translateY(-5px);
    border-color: #5aa3d6;
    box-shadow: 0 6px 18px rgba(0, 60, 120, 0.12);
    color: #333;
    text-decoration: none !important;
}

/* 訪問済み・クリック時の文字色 */
.worry-card:visited,
.worry-card:active {
    color: #333;
}

/* キーボード操作時のフォーカス */
.worry-card:focus-visible {
    outline: 3px solid #5aa3d6;
    outline-offset: 4px;
}

/* 画像 */
.worry-person {
    width: 120px;
    height: 140px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.worry-person img {
    width: 120px;
    height: auto;
    max-height: 140px;
    object-fit: contain;
    display: block;
}

/* 吹き出し＋本文 */
.worry-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 吹き出し */
.worry-card .balloon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 70px;
    box-sizing: border-box;

    background: #ffffff;
    border: 2px solid #b8d3ea;
    border-radius: 24px;
    padding: 12px 18px;
    margin-bottom: 15px;

    color: #003c78;
    font-weight: bold;
    text-align: center;
    line-height: 1.6;
}

/* 吹き出しの三角（外側） */
.worry-card .balloon:before {
    content: "";
    position: absolute;
    left: 50%;
    top: -14px;
    transform: translateX(-50%);

    border-style: solid;
    border-width: 0 12px 14px 12px;
    border-color: transparent transparent #b8d3ea transparent;
}

/* 吹き出しの三角（内側） */
.worry-card .balloon:after {
    content: "";
    position: absolute;
    left: 50%;
    top: -10px;
    transform: translateX(-50%);

    border-style: solid;
    border-width: 0 10px 12px 10px;
    border-color: transparent transparent #ffffff transparent;
}

/* 本文 */
.worry-card .worry-content p {
    min-height: 72px;
    margin: 0;
    color: #333;
    line-height: 1.8;
    text-decoration: none;
}

/* タブレット */
@media (max-width: 900px) {
    .worry-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worry-heading h2 {
        font-size: 24px;
    }
}

/* スマートフォン */
@media (max-width: 600px) {
    .worry-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .worry-heading {
        margin-bottom: 24px;
    }

    .worry-heading h2 {
        font-size: 21px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .worry-card {
        padding: 18px;
    }

    .worry-person {
        margin-bottom: 12px;
    }

    .worry-card .worry-content p {
        min-height: auto;
    }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
    .worry-card {
        transition: none;
    }
}

/* ページ内ジャンプをスムーズにする */
html {
    scroll-behavior: smooth;
}

/* ジャンプ先の見出しが固定ヘッダーに隠れないようにする */
h2.caption[id="01"],
h2.caption[id="02"],
h2.caption[id="03"],
h2.caption[id="04"] {
    scroll-margin-top: 100px;
}


/* ==================================================
   2. MWS セクション縦並びパッチ
   block-flame2 で限定
   ================================================== */

.block-flame2 {
    display: block !important;
}

.block-flame2 li {
    width: 100% !important;
    margin: 0 0 20px 0 !important;
}

/* dd そのものは縦方向の通常フロー */
.block-flame2 dl > dd {
    display: block !important;
    clear: both !important;
}

/* 上段：画像＋導入文 */
.block-flame2 dl > dd .mws-head {
    display: flex !important;
    gap: 16px !important;
    align-items: flex-start !important;
    margin: 0 0 16px 0 !important;
    float: none !important;
}

.block-flame2 dl > dd .mws-head img {
    height: auto !important;
    max-width: 100px !important;
    display: block !important;
}

.block-flame2 dl > dd .mws-head p {
    flex: 1 1 auto !important;
    margin: 0 !important;
    line-height: 1.7 !important;
}

/* 下段：リンク集 */
.block-flame2 dl > dd .mws-links {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
}

.block-flame2 dl > dd .mws-links ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.block-flame2 dl > dd .mws-links li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    border: 1px solid #cfd7e6;
    padding: 12px !important;
    box-sizing: border-box !important;
}

.block-flame2 dl > dd .mws-links li + li {
    margin-top: 12px !important;
}

.block-flame2 dl > dd .mws-links a {
    text-decoration: underline;
    display: inline-block;
}

.block-flame2 dl > dd .mws-links .mws-desc {
    margin: 4px 0 0 !important;
    line-height: 1.7 !important;
}


/* ==================================================
   3. box01
   ================================================== */

.box01 {
    position: relative;
    margin: 2em 0;
    padding: 0.5em 1em;
    border: solid 2px #004ea2;
    box-sizing: border-box;
}

.box01 .box-title {
    position: absolute;
    display: inline-block;
    top: -26px;
    left: -2px;
    padding: 0 9px;
    height: 25px;
    line-height: 25px;
    font-size: 17px;
    background: #004ea2;
    color: #ffffff;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
}


/* ==================================================
   4. ジャンプリンクの間隔調整
   ================================================== */

.mt-5 {
    margin-top: 20px !important;
}


/* ==================================================
   5. 青いボタン
   ================================================== */

a.bt.bt-blue,
button.bt.bt-blue {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: #fff !important;
    text-decoration: none;
    padding: 0.6em 1em;
    white-space: nowrap;
    border: none;
    line-height: 0.8;
}


/* ==================================================
   6. MWS 後半3リンク
   ================================================== */

/* 枠線・余白・影を削除 */
.block-flame2 dl > dd .mws-links ul.mws-secondary-links li {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* アイコン＋リンクの配置 */
.mws-secondary-links .links-item {
    background: url(/WebRelease2/r.9114018336031642263.r882sa000000006p/s13dha000000002p/dv669v0000000cqi/dv669v0000001374/common/img/ico_boxarrow.png)
        no-repeat 0 4px;
    background-size: 20px auto;
    padding-left: 30px;
    min-height: 20px;
    line-height: 1.6;
    margin-top: 16px;
}

/* リンク */
.mws-secondary-links .links-item a {
    display: block;
    color: #000 !important;
    text-decoration: underline;
    padding: 0 !important;
    line-height: 1.6;
}

/* 下段3リンクの余白を無効化 */
.block-flame2 dl > dd .mws-links ul.mws-secondary-links > li.links-item {
    padding: 0 !important;
}


/* ==================================================
   7. block-flame の下部ボタン
   ================================================== */

.block-flame .bt-content-bottom2 {
    width: 30%;
    position: absolute;
    bottom: 22px;
    right: 20px;
}

.block-flame .bt-content-bottom2 span {
    padding: 7px 30px;
    background-size: 40px auto;
    font-size: 1rem;
    font-weight: normal;
    min-height: auto;
}

.bt-content-bottom2 {
    width: 30%;
}


/* ==================================================
   8. block-flame の見出し
   ================================================== */

.block-flame li dt {
    background: #7bcfb945;
    font-size: 1.125rem;
    font-weight: bold;
    padding: 10px;
}

/* =========================================
   お悩みカード：4枚それぞれの色
   ========================================= */

/* 1枚目：ブルー */
.worry-grid > .worry-card:nth-child(1) {
    background-color: #f0f7fd;
    border-color: #b8d5ee;
}

/* 2枚目：グリーン */
.worry-grid > .worry-card:nth-child(2) {
    background-color: #f0f8f3;
    border-color: #b8ddc7;
}

/* 3枚目：オレンジ */
.worry-grid > .worry-card:nth-child(3) {
    background-color: #fff6ed;
    border-color: #f0d0ae;
}

/* 4枚目：パープル */
.worry-grid > .worry-card:nth-child(4) {
    background-color: #f6f2fc;
    border-color: #d4c5eb;
}

/* ホバー時：各カードの色を少し強調 */
.worry-grid > .worry-card:nth-child(1):hover {
    background-color: #e4f1fc;
    border-color: #78b2e0;
}

.worry-grid > .worry-card:nth-child(2):hover {
    background-color: #e3f3e9;
    border-color: #80c49b;
}

.worry-grid > .worry-card:nth-child(3):hover {
    background-color: #ffedda;
    border-color: #e8b477;
}

.worry-grid > .worry-card:nth-child(4):hover {
    background-color: #eee6fa;
    border-color: #b49bdf;
}

/* =========================================
   吹き出しの枠線・三角形をカードの色に合わせる
   ========================================= */

/* 1枚目：ブルー */
.worry-grid > .worry-card:nth-child(1) .balloon {
    border-color: #b8d5ee;
}

.worry-grid > .worry-card:nth-child(1) .balloon::before {
    border-color: transparent transparent #b8d5ee transparent;
}

/* 2枚目：グリーン */
.worry-grid > .worry-card:nth-child(2) .balloon {
    border-color: #b8ddc7;
}

.worry-grid > .worry-card:nth-child(2) .balloon::before {
    border-color: transparent transparent #b8ddc7 transparent;
}

/* 3枚目：オレンジ */
.worry-grid > .worry-card:nth-child(3) .balloon {
    border-color: #f0d0ae;
}

.worry-grid > .worry-card:nth-child(3) .balloon::before {
    border-color: transparent transparent #f0d0ae transparent;
}

/* 4枚目：パープル */
.worry-grid > .worry-card:nth-child(4) .balloon {
    border-color: #d4c5eb;
}

.worry-grid > .worry-card:nth-child(4) .balloon::before {
    border-color: transparent transparent #d4c5eb transparent;
}

/* =========================================
   お悩みカード：アクセントカラー・円形背景・影
   ========================================= */

/* 共通設定 */
.worry-grid > .worry-card {
    position: relative;
    overflow: hidden;
    border-top-width: 5px;
    box-shadow: 0 3px 10px rgba(0, 45, 85, 0.07);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease;
}

/* 1枚目：ブルー */
.worry-grid > .worry-card:nth-child(1) {
    border-top-color: #5a9bd5;
    background-color: #f0f7fd;
    border-color: #b8d5ee;
    border-top-color: #5a9bd5;
}

/* 2枚目：グリーン */
.worry-grid > .worry-card:nth-child(2) {
    border-top-color: #55a879;
    background-color: #f0f8f3;
    border-color: #b8ddc7;
    border-top-color: #55a879;
}

/* 3枚目：オレンジ */
.worry-grid > .worry-card:nth-child(3) {
    border-top-color: #e5a052;
    background-color: #fff6ed;
    border-color: #f0d0ae;
    border-top-color: #e5a052;
}

/* 4枚目：パープル */
.worry-grid > .worry-card:nth-child(4) {
    border-top-color: #9b80ce;
    background-color: #f6f2fc;
    border-color: #d4c5eb;
    border-top-color: #9b80ce;
}


/* =========================================
   人物画像の円形背景
   ========================================= */

/* 円形背景の土台 */
.worry-grid > .worry-card .worry-person {
    position: relative;
    isolation: isolate;
    align-items: flex-end;
    justify-content: center;
}

/* 円を人物の背後に表示 */
.worry-grid > .worry-card .worry-person::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 112px;
    height: 112px;
    border-radius: 50%;
}

/* 人物画像を円の前面に */
.worry-grid > .worry-card .worry-person img {
    position: relative;
    z-index: 1;
    width: 120px;
    max-height: 140px;
    object-fit: contain;
    object-position: center bottom;
}

/* 1枚目：淡いブルーの円 */
.worry-grid > .worry-card:nth-child(1) .worry-person::before {
    background-color: #d9ebfa;
}

/* 2枚目：淡いグリーンの円 */
.worry-grid > .worry-card:nth-child(2) .worry-person::before {
    background-color: #d9eee1;
}

/* 3枚目：淡いオレンジの円 */
.worry-grid > .worry-card:nth-child(3) .worry-person::before {
    background-color: #ffead4;
}

/* 4枚目：淡いパープルの円 */
.worry-grid > .worry-card:nth-child(4) .worry-person::before {
    background-color: #e8def8;
}


/* =========================================
   吹き出しの枠線・三角形
   ========================================= */

/* 1枚目：ブルー */
.worry-grid > .worry-card:nth-child(1) .balloon {
    border-color: #b8d5ee;
}

.worry-grid > .worry-card:nth-child(1) .balloon::before {
    border-color: transparent transparent #b8d5ee transparent;
}

/* 2枚目：グリーン */
.worry-grid > .worry-card:nth-child(2) .balloon {
    border-color: #b8ddc7;
}

.worry-grid > .worry-card:nth-child(2) .balloon::before {
    border-color: transparent transparent #b8ddc7 transparent;
}

/* 3枚目：オレンジ */
.worry-grid > .worry-card:nth-child(3) .balloon {
    border-color: #f0d0ae;
}

.worry-grid > .worry-card:nth-child(3) .balloon::before {
    border-color: transparent transparent #f0d0ae transparent;
}

/* 4枚目：パープル */
.worry-grid > .worry-card:nth-child(4) .balloon {
    border-color: #d4c5eb;
}

.worry-grid > .worry-card:nth-child(4) .balloon::before {
    border-color: transparent transparent #d4c5eb transparent;
}


/* =========================================
   ホバー時：少し浮き上がる演出
   ========================================= */

.worry-grid > .worry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 9px 22px rgba(0, 45, 85, 0.14);
}

/* ブルー */
.worry-grid > .worry-card:nth-child(1):hover {
    background-color: #e4f1fc;
    border-color: #78b2e0;
    border-top-color: #5a9bd5;
}

/* グリーン */
.worry-grid > .worry-card:nth-child(2):hover {
    background-color: #e3f3e9;
    border-color: #80c49b;
    border-top-color: #55a879;
}

/* オレンジ */
.worry-grid > .worry-card:nth-child(3):hover {
    background-color: #ffedda;
    border-color: #e8b477;
    border-top-color: #e5a052;
}

/* パープル */
.worry-grid > .worry-card:nth-child(4):hover {
    background-color: #eee6fa;
    border-color: #b49bdf;
    border-top-color: #9b80ce;
}


/* =========================================
   動きを減らす設定
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    .worry-grid > .worry-card {
        transition: none;
    }
}

/* お悩みカードの案内文 */
.worry-heading-guide {
    margin: 8px 0 0;
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

@media (max-width: 600px) {
    .worry-heading-guide {
        font-size: 13px;
        padding: 0 10px;
    }
}

/* =========================================
   お悩みカード：「詳しく見る →」
   文字化け対策版
   ========================================= */

.worry-card .worry-content::after {
    content: "\8A73\3057\304F\898B\308B \2192";
    display: block;
    margin-top: 16px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 60, 120, 0.15);

    color: #286a9f;
    font-size: 14px;
    font-weight: bold;
    text-align: right;
    line-height: 1.5;

    transition: color 0.2s ease;
}

.worry-card:hover .worry-content::after {
    color: #003c78;
}

.worry-card:focus-visible .worry-content::after {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .worry-card .worry-content::after {
        margin-top: 12px;
        padding-top: 8px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .worry-card .worry-content::after {
        transition: none;
    }
}

/* =========================================
   お悩みカード：詳しく見るの位置を統一
   ========================================= */

/* カード内のコンテンツを縦方向に伸ばす */
.worry-grid > .worry-card .worry-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    width: 100%;
}

/* 吹き出しの高さを揃える */
.worry-grid > .worry-card .balloon {
    flex: 1 0 auto;
}

/* 説明文の高さを統一 */
.worry-grid > .worry-card .worry-content p {
    flex: 1 0 auto !important;
    min-height: 100px !important;
    margin: 0 !important;
}

/* 詳しく見るをカードの下部に揃える */
.worry-grid > .worry-card .worry-content::after {
    flex: 0 0 auto !important;
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(0, 60, 120, 0.15);
    line-height: 1.5 !important;
}

/* スマートフォンでは説明文の高さを固定しない */
@media (max-width: 600px) {
    .worry-grid > .worry-card .worry-content p {
        min-height: 0 !important;
        flex: 0 0 auto !important;
    }
}