/*
Theme Name: FXブログ
Theme URI: https://example.com
Description: 海外FXブログ用のシンプルで読みやすいWordPressテーマ
Author: Your Name
Version: 1.0.1
Text Domain: fx-blog
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    line-height: 1.7;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* Header */
.site-header {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 50px 0;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(51, 51, 51, 0.85) 0%, rgba(100, 100, 100, 0.75) 100%);
    z-index: 0;
}

.header-background {
    display: none;
    /* 直接headerに背景を設定したため不要 */
}

.site-header .container {
    position: relative;
    z-index: 1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.site-title {
    font-size: 36px;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.site-title a {
    color: #FFD700;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.site-title a:hover {
    opacity: 0.9;
    text-shadow: 2px 2px 6px rgba(255, 215, 0, 0.6);
}

.site-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: normal;
    line-height: 1.4;
}

/* Navigation */
.main-navigation {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-menu a:hover {
    background-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
    transform: translateY(-2px);
}

.nav-menu .current-menu-item>a,
.nav-menu .current_page_item>a {
    background-color: rgba(255, 215, 0, 0.4);
    color: #FFD700;
    font-weight: bold;
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
}

.header-search form {
    display: flex;
    gap: 5px;
}

.header-search input[type="search"] {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-size: 14px;
    min-width: 200px;
}

.header-search input[type="search"]:focus {
    outline: none;
    border-color: #FFD700;
    background-color: #fff;
}

.header-search input[type="submit"] {
    padding: 8px 16px;
    background-color: #FFD700;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.header-search input[type="submit"]:hover {
    background-color: #FFC700;
}

/* Main Content */
.site-main {
    padding: 20px 0 60px;
    overflow: visible;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
    overflow: visible;
    position: relative;
}

/* 記事下のサイドバー */
.sidebar-below {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 100%;
}

/* 人気の投稿ウィジェットを最初に配置 */
.sidebar-below .widget.highlight-popular {
    order: 1;
    width: 100%;
}

/* 人気の投稿のタイトル */
.sidebar-below .widget.highlight-popular .widget-title {
    margin-bottom: 20px;
}

/* 人気の投稿のグリッド部分を4列に */
.sidebar-below .widget.highlight-popular .fx-recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px;
}

/* カテゴリーウィジェットを最後に配置 */
.sidebar-below .widget_categories,
.sidebar-below .widget-category-below {
    order: 2;
    width: 100%;
}

/* その他のウィジェットは順番通り */
.sidebar-below .widget:not(.highlight-popular):not(.widget_categories):not(.widget-category-below) {
    order: 3;
    width: 100%;
}


/* Post */
.post {
    margin-bottom: 50px;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.post-header {
    margin-bottom: 30px;
}

.post-title {
    font-size: 40px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #333;
}

.post-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
}

.post-content h1 {
    font-size: 28px;
    font-weight: bold;
    margin: 40px 0 20px;
    color: #333;
    background-color: #FFD700;
    padding: 15px 20px;
    border-radius: 6px;
}

.post-content h2 {
    font-size: 24px;
    font-weight: bold;
    margin: 70px 0 18px 0;
    /* 上部のマージンを倍に */
    color: #333;
    background-color: #FFD700;
    padding: 12px 20px;
    border-radius: 6px;
}

/* ステップ見出しは上記のスタイルを上書き */
.post-content h2[id^="step"] {
    background-color: transparent !important;
}

/* ステップ1から5の特別なスタイル - WordPressブロックエディタ対応 */
.post-content h2[id^="step"],
.post-content h2.wp-block-heading[id^="step"] {
    position: relative !important;
    font-size: 28px !important;
    font-weight: bold !important;
    margin: 50px 0 30px 0 !important;
    padding: 25px 30px 25px 140px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-left: 120px solid #FFA500 !important;
    overflow: visible !important;
}

/* ステップ1もstep2と同じスタイル */
.post-content h2#step1,
.post-content h2.wp-block-heading#step1 {
    background: linear-gradient(135deg, #FFE55C 0%, #FFD700 100%) !important;
    color: #333 !important;
    border-left: 120px solid #FFA500 !important;
    font-size: 28px !important;
}

/* ステップ1の左側帯に「STEP 1」を横書き表示 */
.post-content h2#step1::before,
.post-content h2.wp-block-heading#step1::before {
    content: "STEP 1" !important;
    position: absolute !important;
    left: -120px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #fff !important;
    letter-spacing: 2px !important;
}

/* ステップ2から5のスタイル */
.post-content h2#step2,
.post-content h2#step3,
.post-content h2#step4,
.post-content h2#step5,
.post-content h2.wp-block-heading#step2,
.post-content h2.wp-block-heading#step3,
.post-content h2.wp-block-heading#step4,
.post-content h2.wp-block-heading#step5 {
    background: linear-gradient(135deg, #FFE55C 0%, #FFD700 100%) !important;
    color: #333 !important;
    border-left: 120px solid #FFA500 !important;
}

/* ステップ2から5の左側帯に「STEP 2」「STEP 3」などを横書き表示 */
.post-content h2#step2::before,
.post-content h2.wp-block-heading#step2::before {
    content: "STEP 2" !important;
    position: absolute !important;
    left: -120px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #fff !important;
    letter-spacing: 2px !important;
}

.post-content h2#step3::before,
.post-content h2.wp-block-heading#step3::before {
    content: "STEP 3" !important;
    position: absolute !important;
    left: -120px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #fff !important;
    letter-spacing: 2px !important;
}

.post-content h2#step4::before,
.post-content h2.wp-block-heading#step4::before {
    content: "STEP 4" !important;
    position: absolute !important;
    left: -120px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #fff !important;
    letter-spacing: 2px !important;
}

.post-content h2#step5::before,
.post-content h2.wp-block-heading#step5::before {
    content: "STEP 5" !important;
    position: absolute !important;
    left: -120px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #fff !important;
    letter-spacing: 2px !important;
}

/* h2の直前のhrを非表示 */
.post-content hr+h2 {
    margin-top: 70px;
}

.post-content h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 30px 0 15px;
    color: #333;
    background-color: rgba(255, 215, 0, 0.3);
    padding: 10px 18px;
    border-radius: 4px;
}

.post-content h4 {
    font-size: 18px;
    font-weight: bold;
    margin: 25px 0 12px;
    color: #555;
    background-color: rgba(255, 215, 0, 0.2);
    padding: 8px 16px;
    border-radius: 4px;
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-content ul,
.post-content ol {
    margin: 20px 0 20px 30px;
    line-height: 1.8;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 10px;
}

.post-content a {
    color: #666;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: #FFD700;
}

.post-content strong {
    font-weight: bold;
    color: #333;
    text-decoration: underline;
    text-decoration-color: #FFD700;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

.post-content em {
    font-style: italic;
}

.post-content hr {
    border: none;
    border-top: 2px solid #ddd;
    margin: 40px 0;
}

/* Comparison Table Details (折りたたみ) */
.comparison-table-details {
    margin: 20px 0;
}

.comparison-table-details summary {
    cursor: pointer;
    padding: 12px 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
    transition: all 0.3s ease;
    user-select: none;
    list-style: none;
}

.comparison-table-details summary::-webkit-details-marker {
    display: none;
}

.comparison-table-details summary::before {
    content: '▼ ';
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.comparison-table-details[open] summary::before {
    transform: rotate(180deg);
}

.comparison-table-details summary:hover {
    background-color: #FFD700;
    border-color: #FFD700;
    color: #333;
}

.comparison-table-details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
}

.comparison-table-details table {
    margin-top: 0;
    border-top: 1px solid #ddd;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* FAQ Items (折りたたみ) */
.faq-item {
    margin: 20px 0;
}

/* 質問部分（グレー背景、クリック可能） */
.faq-item summary.faq-question,
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold !important;
    color: #333;
    background-color: #e0e0e0 !important;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 0;
    user-select: none;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.faq-item summary.faq-question::-webkit-details-marker,
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary.faq-question::before,
.faq-item summary::before {
    content: '▼ ';
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.faq-item[open] summary.faq-question::before,
.faq-item[open] summary::before {
    transform: rotate(180deg);
}

.faq-item summary.faq-question:hover,
.faq-item summary:hover {
    background-color: #d0d0d0 !important;
}

/* 回答部分 */
.faq-item .faq-answer {
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-left: 3px solid #FFD700;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-top: 0;
    background-color: #fff;
}

.faq-item .faq-answer p {
    margin-bottom: 1em;
}

.faq-item .faq-answer table {
    margin: 15px 0;
}

/* h2の直前のhrは非表示 */
.post-content hr:has(+ h2) {
    display: none;
}

/* h2の直前のhrを非表示（:has()が対応していない場合の代替） */
.post-content h2:first-of-type {
    margin-top: 70px;
}

/* Tables */
.post-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 15px;
    box-sizing: border-box;
    table-layout: auto;
}

.post-content table thead {
    background-color: #666;
    color: #fff;
}

.post-content table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #555;
}

.post-content table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.post-content table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.post-content table tbody tr:hover {
    background-color: #fffacd;
}

/* Table Logo Images */
.post-content table td img {
    max-width: 120px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.post-content table td:has(img) {
    text-align: center;
    vertical-align: middle;
    padding: 10px;
}

/* Blockquote */
.post-content blockquote {
    border-left: 4px solid #FFD700;
    padding: 15px 20px;
    margin: 25px 0;
    background-color: #fffacd;
    font-style: italic;
}

/* Images */
.post-content img {
    max-width: 100%;
    height: auto;
    margin: 25px 0;
    border-radius: 4px;
    width: auto;
    box-sizing: border-box;
}

/* すべての画像がはみ出さないように */
img {
    max-width: 100%;
    height: auto;
}

/* Sidebar */
.sidebar {
    font-size: 14px;
    position: relative;
    align-self: start;
    height: fit-content;
    overflow: visible;
}

/* Table of Contents */
.toc-widget {
    background-color: #f5f5f5;
    /* 薄いグレー */
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* PC版でsticky positioningを適用 - より確実に */
@media screen and (min-width: 769px) {
    .content-area {
        align-items: start;
    }
    
    .sidebar {
        position: relative;
        overflow: visible !important;
        height: auto;
        align-self: start;
    }
    
    /* 目次にsticky positioningを適用 - IDセレクタで直接指定 */
    #table-of-contents {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 20px !important;
        max-height: calc(100vh - 40px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-bottom: 100px !important;
        z-index: 10 !important;
        transition: top 0.3s ease;
        will-change: position;
    }
    
    /* クラスセレクタでも適用 */
    .sidebar #table-of-contents,
    .sidebar .toc-widget,
    aside.sidebar .toc-widget,
    aside.sidebar #table-of-contents {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 20px !important;
    }
    
    /* 親要素のoverflowを確実に無効化 */
    .site-main,
    .container,
    .content-area,
    .sidebar {
        overflow: visible !important;
    }
}

.toc-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #FFD700;
    color: #333;
}

.toc-nav {
    font-size: 14px;
}

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

.toc-item {
    margin: 0;
    padding: 0;
}

.toc-link {
    display: block;
    padding: 5px 0 5px 12px;
    color: #555;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    line-height: 1.3;
    /* 半分に縮小（1.6 → 1.3） */
}

.toc-link:hover {
    border-left-color: #FFD700;
    background-color: rgba(255, 215, 0, 0.1);
}

.toc-link.active {
    font-weight: bold;
    border-left-color: #FFD700;
    background-color: rgba(255, 215, 0, 0.15);
}

/* h2は大きめ・黒色 */
.toc-level-2 .toc-link {
    font-weight: 600;
    font-size: 15px;
    color: #000;
    /* 黒 */
    padding: 6px 0 6px 12px;
    /* 縦方向を縮小 */
    line-height: 1.3;
}

/* h3は小さめでインデント・濃いグレー */
.toc-level-3 .toc-link {
    padding-left: 30px;
    /* インデント */
    padding-top: 3px;
    /* 縦方向を縮小 */
    padding-bottom: 3px;
    /* 縦方向を縮小 */
    font-size: 13px;
    color: #555;
    /* 濃いグレー */
    font-weight: 400;
    line-height: 1.3;
}

.toc-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
    color: #333;
}

.widget ul {
    list-style: none;
    margin: 0;
}

.widget ul li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.widget ul li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: #666;
    font-size: 10px;
}

.widget ul li a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: #FFD700;
}

/* 人気の投稿ウィジェットを目立たせる */
.sidebar-below .widget.highlight-popular {
    background-color: #fffacd;
    border: 2px solid #FFD700;
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.2);
    order: -1;
}

.sidebar-below .widget.highlight-popular .widget-title {
    font-size: 20px;
    color: #333;
    border-bottom: 3px solid #FFD700;
    padding-bottom: 12px;
}

/* Footer */
.site-footer {
    background-color: #2a2a2a;
    border-top: 3px solid #FFD700;
    padding: 50px 0 20px;
    margin-top: 60px;
    color: #ccc;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #444;
}

.footer-about .footer-description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #bbb;
}

.footer-about .footer-tagline {
    font-size: 13px;
    font-style: italic;
    color: #999;
    margin-top: 10px;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 10px;
}

.footer-menu a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: block;
}

.footer-menu a:hover {
    color: #FFD700;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
}

.copyright {
    margin: 0;
    font-size: 13px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }
    
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .site-header {
        padding: 30px 0;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
    }

    .main-navigation {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
        gap: 15px;
    }

    .header-search {
        width: 100%;
        max-width: 100%;
    }

    .header-search input[type="search"] {
        min-width: 0;
        flex: 1;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .site-title {
        font-size: 28px;
        margin-bottom: 5px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .site-subtitle {
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .nav-menu {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        gap: 5px;
    }

    .nav-menu a {
        padding: 12px 15px;
        width: 100%;
    }

    .content-area {
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 100%;
    }
    
    .site-main {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .post {
        padding: 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .post-title {
        font-size: 24px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .post-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .post-content h1 {
        font-size: 22px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .post-content h2 {
        font-size: 20px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .post-content h3 {
        font-size: 18px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* 画像とテーブルがはみ出さないように */
    .post-content img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
    }
    
    .post-content table {
        width: 100% !important;
        max-width: 100% !important;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .post-content table thead,
    .post-content table tbody,
    .post-content table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .toc-widget {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 30px;
        padding-bottom: 100px;
    }

    .sidebar-below {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        box-sizing: border-box;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* モバイルでは人気の投稿を2列に */
    .sidebar-below .widget.highlight-popular .fx-recent-posts-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        width: 100%;
        max-width: 100%;
    }
    
    /* フッターをモバイル対応 */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        width: 100%;
        max-width: 100%;
    }
    
    .footer-title {
        font-size: 16px;
    }
    
    .site-footer {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        padding-left: 0;
        padding-right: 0;
    }
    
    .site-footer .container {
        padding: 0 15px;
    }

    .broker-detail {
        grid-template-columns: 1fr !important;
        background-color: #ffebee;
        /* Debug */
    }
    
    /* モバイルでのステップ見出しの調整 */
    .post-content h2[id^="step"] {
        font-size: 20px !important;
        padding: 20px 15px 20px 100px !important;
        border-left: 90px solid #FFA500 !important;
    }
    
    .post-content h2#step1 {
        border-left: 90px solid #FFA500 !important;
    }
    
    .post-content h2#step1::before,
    .post-content h2#step2::before,
    .post-content h2#step3::before,
    .post-content h2#step4::before,
    .post-content h2#step5::before {
        left: -90px;
        width: 90px;
        font-size: 16px;
        letter-spacing: 2px;
        top: 50% !important;
        transform: translateY(-50%) !important;
        height: auto !important;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 画像付き最近の投稿ウィジェット */
.fx-recent-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.fx-post-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.fx-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fx-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fx-post-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.fx-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fx-post-item:hover .fx-post-thumbnail img {
    transform: scale(1.05);
}

.fx-post-title {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    color: #333;
}

/* PC表示（768px以上）で横4列 */
@media (min-width: 768px) {
    .fx-recent-posts-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* sidebar-below内の人気の投稿も4列に */
    .sidebar-below .widget.highlight-popular .fx-recent-posts-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* 3つのポイントセクションのスタイル */
.three-points-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 30px 0;
    padding: 20px 0;
}

.point-card {
    background-color: #fff;
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.point-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.3);
}

.point-number {
    font-size: 3em;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 15px;
    line-height: 1;
}

.point-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
}

.point-content {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-top: 15px;
}

.point-content p {
    margin: 0;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .three-points-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .point-card {
        padding: 20px;
    }
    
    .point-number {
        font-size: 2.5em;
    }
}