/* ===========================================
   ACFカスタムブロック スタイルシート
   =========================================== */

/* -----------------------------------------------
   吹き出しブロック
----------------------------------------------- */
.acf-speech-bubble {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 24px 0;
}

.acf-speech-bubble--right {
    flex-direction: row-reverse;
}

.acf-speech-bubble__avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 72px;
}

.acf-speech-bubble__avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.acf-speech-bubble__avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #e0e0e0;
}

.acf-speech-bubble__name {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
    word-break: break-all;
}

.acf-speech-bubble__bubble {
    position: relative;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 14px 18px;
    flex: 1;
}

.acf-speech-bubble--left .acf-speech-bubble__bubble::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -10px;
    border: 10px solid transparent;
    border-right-color: #f5f5f5;
    border-left: none;
}

.acf-speech-bubble--right .acf-speech-bubble__bubble::before {
    content: '';
    position: absolute;
    top: 16px;
    right: -10px;
    border: 10px solid transparent;
    border-left-color: #f5f5f5;
    border-right: none;
}

.acf-speech-bubble__bubble p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

/* -----------------------------------------------
   関連記事（内部）ブロック
----------------------------------------------- */
.acf-related-post {
    margin: 24px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.acf-related-post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.acf-related-post__link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.acf-related-post__thumbnail {
    flex-shrink: 0;
    width: 160px;
}

.acf-related-post__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acf-related-post__content {
    padding: 16px;
    flex: 1;
}

.acf-related-post__label {
    display: inline-block;
    font-size: 11px;
    color: #fff;
    background: #003F73;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    font-weight: 600;
}

.acf-related-post__title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.5;
}

.acf-related-post__excerpt {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* -----------------------------------------------
   関連記事（外部）ブロック
----------------------------------------------- */
.acf-related-external {
    margin: 24px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.acf-related-external:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.acf-related-external__link {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.acf-related-external__thumbnail {
    flex-shrink: 0;
    width: 160px;
}

.acf-related-external__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acf-related-external__content {
    padding: 16px;
    flex: 1;
}

.acf-related-external__label {
    display: inline-block;
    font-size: 11px;
    color: #fff;
    background: #2888CC;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
    font-weight: 600;
}

.acf-related-external__title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.5;
}

.acf-related-external__description {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px;
    line-height: 1.6;
}

.acf-related-external__domain {
    font-size: 11px;
    color: #999;
}

/* -----------------------------------------------
   CTAボタンブロック
----------------------------------------------- */
.acf-cta-button {
    margin: 32px 0;
    padding: 32px 24px;
    border-radius: 10px;
    text-align: center;
}

.acf-cta-button--navy {
    background-color: #003F73;
    color: #fff;
}

.acf-cta-button--green {
    background-color: #C8E8FF;
    color: #003F73;
}

.acf-cta-button__heading {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.4;
}

.acf-cta-button--navy .acf-cta-button__heading {
    color: #FFC107;
}

.acf-cta-button__text {
    font-size: 15px;
    margin: 0 0 20px;
    line-height: 1.7;
    opacity: 0.9;
}

.acf-cta-button__btn-wrap {
    display: flex;
    justify-content: center;
}

.acf-cta-button__btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    letter-spacing: 0.05em;
}

.acf-cta-button--navy .acf-cta-button__btn {
    background-color: #FFC107;
    color: #003F73;
}

.acf-cta-button--green .acf-cta-button__btn {
    background-color: #003F73;
    color: #fff;
}

.acf-cta-button__btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* -----------------------------------------------
   リンクボタンブロック
----------------------------------------------- */
.acf-link-button {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.acf-link-button__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.acf-link-button--primary .acf-link-button__btn {
    background-color: #003F73;
    color: #fff;
}

.acf-link-button--outline .acf-link-button__btn {
    background-color: transparent;
    color: #003F73;
    border: 2px solid #003F73;
}

.acf-link-button--download .acf-link-button__btn {
    background-color: #2888CC;
    color: #fff;
}

.acf-link-button__btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.acf-link-button__icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.acf-link-button__icon-download {
    font-size: 16px;
}

/* -----------------------------------------------
   目次ブロック
----------------------------------------------- */
.acf-toc {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #003F73;
    border-radius: 0 8px 8px 0;
    margin: 32px 0;
    overflow: hidden;
}

.acf-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #003F73;
    cursor: pointer;
}

.acf-toc__title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.acf-toc__toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.acf-toc__toggle-icon {
    display: block;
    width: 12px;
    height: 12px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    transition: transform 0.3s;
    margin-top: -4px;
}

.acf-toc--collapsed .acf-toc__toggle-icon {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.acf-toc__content {
    padding: 16px 24px;
    transition: all 0.3s;
}

.acf-toc--collapsed .acf-toc__content {
    display: none;
}

.acf-toc__nav {
    /* nav wrapper */
}

.acf-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.acf-toc__item {
    margin: 0;
    padding: 0;
}

.acf-toc__item a {
    display: block;
    padding: 6px 0;
    font-size: 14px;
    color: #003F73;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    transition: color 0.2s;
}

.acf-toc__item a:hover {
    color: #2888CC;
}

.acf-toc__item--h2 a {
    font-weight: 600;
}

.acf-toc__item--h3 a {
    padding-left: 16px;
    font-size: 13px;
    color: #555;
}

/* 管理画面プレビュー用 */
.acf-block-placeholder {
    padding: 20px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    text-align: center;
    color: #666;
    border-radius: 6px;
}

/* レスポンシブ */
@media (max-width: 640px) {
    .acf-related-post__link,
    .acf-related-external__link {
        flex-direction: column;
    }

    .acf-related-post__thumbnail,
    .acf-related-external__thumbnail {
        width: 100%;
        height: 180px;
    }

    .acf-speech-bubble {
        gap: 12px;
    }

    .acf-speech-bubble__avatar {
        width: 56px;
    }

    .acf-speech-bubble__avatar-img,
    .acf-speech-bubble__avatar-placeholder {
        width: 48px;
        height: 48px;
    }
}


/* ==============================================
   修正版クラス名対応スタイル
   render.php の出力クラスに合わせた新規追加
   ============================================== */

/* ----------------------------------------------- 
   吹き出しブロック (.sb)
----------------------------------------------- */
.sb {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 24px 0;
}
.sb--right {
    flex-direction: row-reverse;
}
.sb__avatar {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 72px;
}
.sb__avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}
.sb__avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: block;
}
.sb__name {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 6px;
    line-height: 1.3;
    word-break: break-all;
    display: block;
}
.sb__content {
    position: relative;
    background: #f5f5f5;
    border-radius: 12px;
    padding: 14px 18px;
    flex: 1;
}
.sb:not(.sb--right) .sb__content::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -10px;
    border: 10px solid transparent;
    border-right-color: #f5f5f5;
    border-left: none;
}
.sb--right .sb__content::before {
    content: '';
    position: absolute;
    top: 16px;
    right: -10px;
    border: 10px solid transparent;
    border-left-color: #f5f5f5;
    border-right: none;
}
.sb__content p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

/* ----------------------------------------------- 
   関連記事カード (.related-card)
----------------------------------------------- */
.related-card {
    display: flex;
    margin: 24px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}
.related-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.related-card__thumb {
    flex-shrink: 0;
    width: 160px;
}
.related-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.related-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.related-card__label {
    display: inline-block;
    font-size: 11px;
    color: #fff;
    background: #003F73;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 600;
    width: fit-content;
}
.related-card--external .related-card__label {
    background: #2888CC;
}
.related-card__date {
    font-size: 12px;
    color: #999;
}
.related-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
}
.related-card__desc {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.related-card__url {
    font-size: 0.75rem;
    color: #999;
    word-break: break-all;
}

/* ----------------------------------------------- 
   CTAボタンブロック (.cta)
----------------------------------------------- */
.cta {
    margin: 32px 0;
    padding: 32px 24px;
    border-radius: 10px;
    text-align: center;
}
.cta--navy {
    background-color: #003F73;
    color: #fff;
}
.cta--green {
    background-color: #C8E8FF;
    color: #003F73;
}
.cta__heading {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.4;
}
.cta--navy .cta__heading {
    color: #fff;
}
.cta__text {
    font-size: 15px;
    margin: 0 0 20px;
    line-height: 1.7;
    opacity: 0.9;
}
.cta__btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    letter-spacing: 0.05em;
}
.cta--navy .cta__btn {
    background-color: #2888CC;
    color: #fff;
}
.cta--green .cta__btn {
    background-color: #003F73;
    color: #fff;
}
.cta__btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* ----------------------------------------------- 
   リンクボタンブロック (.link-btn)
----------------------------------------------- */
.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    background-color: #003F73;
    color: #fff;
    margin: 20px auto;
}
.link-btn--outline {
    background-color: transparent;
    color: #003F73;
    border: 2px solid #003F73;
}
.link-btn--download {
    background-color: #2888CC;
    color: #fff;
}
.link-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
a.link-btn {
    display: block;
    width: fit-content;
}

/* ----------------------------------------------- 
   目次ブロック (.toc)
----------------------------------------------- */
.toc {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #003F73;
    border-radius: 0 8px 8px 0;
    margin: 32px 0;
    overflow: hidden;
}
.toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #003F73;
}
.toc__title {
    font-size: 15px;
    font-weight: 700;
    color: #fff !important;
}
.toc__toggle {
    background: none;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
}
.toc__toggle-text {
    color: #fff;
}
.toc__nav {
    padding: 16px 24px;
    transition: all 0.3s;
}
.toc__nav--collapsed {
    display: none;
}
.toc__list {
    list-style: none !important;
    margin: 0;
    padding-left: 0 !important;
}
.toc__list ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin-top: 4px;
}
.toc__list li {
    list-style: none !important;
    margin: 4px 0;
}
.toc__list li a {
    font-size: 14px;
    color: #003F73;
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.6;
}
.toc__list li a:hover {
    color: #2888CC;
    text-decoration: underline;
}
.toc__list > li > a {
    font-weight: 600;
}
.toc__list ol li a {
    font-size: 13px;
    color: #555;
    font-weight: normal;
}

/* .single-content内の目次タイトル修正 */
.single-content .toc .toc__title {
    color: #fff !important;
    font-size: 15px !important;
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
    .related-card {
        flex-direction: column;
    }
    .related-card__thumb {
        width: 100%;
        height: 180px;
    }
    .sb {
        gap: 12px;
    }
    .sb__avatar {
        width: 56px;
    }
    .sb__avatar img,
    .sb__avatar-placeholder {
        width: 48px;
        height: 48px;
    }
}

/* 目次: article-parts.css の ol カウンター上書きを無効化 */
.toc .toc__list,
.toc .toc__list ol {
    counter-reset: none;
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0;
}
.toc .toc__list > li,
.toc .toc__list ol > li {
    counter-increment: none;
    padding-left: 1em !important;
    list-style: none !important;
}
.toc .toc__list > li::before,
.toc .toc__list ol > li::before {
    content: none !important;
    display: none !important;
}
