@charset "UTF-8";

.main_container {
    position: relative;
}

.main_container::before {
    display: block;
    position: absolute;
    left: 50%;
    z-index: -1;
    transform: translateX(-50%);
    width: 1000%;
    height: 1000000px;
    background-repeat: repeat;
    background-position: center top;
    content: "";
}

/* ブログ詳細ページ全体のコンテナ */
.page-blog__container {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 記事コンテンツ */
.common_list-contents {
    display: flex;
    width: 100%;
    margin-top: 40px;
    flex-direction: column;
}

/* ヘッダー部分（タイトル・日付・カテゴリー） */
.blog_header {
    margin-bottom: 50px;
}

/* タイトル */
.blog_title {
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    font-weight: bold;
    line-height: 1.6;
    margin-bottom: 12px;
    color: #1A1F19;
}

/* メタ情報（日付・カテゴリー） */
.blog_meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    color: #707070;
}

.blog_meta time {
    font-weight: 500;
}

/* カテゴリータグ */
.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-category-tag {
    display: inline-block;
    padding: 4px 15px;
    border: 1px solid #707070;
    border-radius: 20px;
    text-decoration: none;
    color: #1A1F19;
    font-size: 0.875rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.blog-category-tag:hover {
    background-color: #707070;
    color: #ffffff;
    border-color: #707070;
}

/* 本文コンテンツ - 基本スタイル */
.blog_content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
}

/* ユーザーがスタイル設定していない要素のみにデフォルトスタイルを適用 */
.blog_content p:not([class*="has-"]):not([style*="margin"]) {
    margin-bottom: 1.5em;
}

.blog_content h2:not([class*="has-"]):not([style]) {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 2em;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #1A1F19;
}

.blog_content h3:not([class*="has-"]):not([style]) {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}

.blog_content h4:not([class*="has-"]):not([style]) {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

/* リストは常にスタイル適用 */
.blog_content ul:not([class*="wp-block-"]),
.blog_content ol:not([class*="wp-block-"]) {
    margin: 1.5em 0;
    padding-left: 2em;
}

.blog_content li:not([class*="wp-block-"]) {
    margin-bottom: 0.5em;
}

/* 画像は常にレスポンシブに */
.blog_content img {
    max-width: 100%;
    height: auto;
}

/* WordPress画像ブロック以外の画像にマージン */
.blog_content img:not(.wp-block-image img) {
    margin: 2em 0;
}

/* WordPress画像ブロック */
.blog_content .wp-block-image {
    margin: 2em 0;
}

.blog_content .wp-block-image img {
    margin: 0;
}

/* 引用ブロック - WordPressブロック以外 */
.blog_content blockquote:not(.wp-block-quote) {
    margin: 2em 0;
    padding: 1em 1.5em;
    border-left: 4px solid #707070;
    background-color: #f5f5f5;
    font-style: italic;
}

/* コード - WordPressブロック以外 */
.blog_content code:not(.wp-block-code code) {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.blog_content pre:not(.wp-block-code) {
    background-color: #f5f5f5;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5em 0;
}

/* リンク - WordPressボタンブロック以外 */
.blog_content a:not(.wp-block-button__link):not([class*="has-"]) {
    color: #25425c;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.blog_content a:not(.wp-block-button__link):not([class*="has-"]):hover {
    color: #1a3347;
}

/* 戻るボタン */
.link_wrap {
    margin-top: 80px;
    text-align: center;
}

.single-link {
    display: inline-block;
    max-width: 75%;
    min-width: 280px;
    width: 340px;
    padding: 12px 15px;
    border: 2px solid #25425c;
    background-color: #25425c;
    color: #ffffff;
    font-weight: 700;
    font-size: 19px;
    text-align: center;
    letter-spacing: 0.11em;
    transition: all 0.3s;
}

.single-link:hover {
    background-color: #ffffff;
    color: #25425c;
}

/* PC画面 (768px以上) */
@media screen and (min-width: 768px) {
    .main_container {
        padding-top: calc(80px + 50px);
        padding-bottom: 100px;
    }
    
    .main_container::before {
        top: 80px;
        background-image: url(../images/access_bg-pc.png);
        background-size: 1920px 1610px;
        opacity: 0.4;
    }
    
    .page-blog__container {
        margin-top: 55px;
    }
    
    .link_wrap {
        margin-top: 80px;
    }
}

/* スマホ画面 (767px以下) */
@media screen and (max-width: 767px) {
    .main_container {
        padding-top: calc(60px + 15px);
        padding-bottom: 120px;
    }
    
    .main_container::before {
        top: 60px;
        background-image: url(../images/access_bg-mb.png);
        background-size: 375px 1388px;
        opacity: 0.5;
    }
    
    .page-blog__container {
        padding: 0 15px;
        margin-top: 40px;
    }
    
    .blog_header {
        margin-bottom: 40px;
    }
    
    .blog_content {
        font-size: 15px;
    }
    
    .link_wrap {
        margin-top: 40px;
    }
}