/* 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #2d2d2d;
    color: #e0e0e0;
    line-height: 1.6;
}

/* ヘッダー */
.header {
    position: absolute;   /*この行がスクロール追従不要 */
    top: 0;
    right: 0;
    left: 0; /* 全幅に */
    z-index: 100;
    padding: 20px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between; /* 変更: 左右に分散 */
    gap: 10px;
    flex-wrap: nowrap;             /* 変更: 折り返し禁止 */
}

/* 左ナビ（Blog/Help ピル型） */
.nav-icons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;                /* 追加: 縮小禁止 */
}

.nav-icons .circle-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    background-color: rgba(255, 255, 255, 0.9); /* blog.cssと同じ */
    border: 1px solid #ccc;                     /* blog.cssと同じ */
    border-radius: 9999px;
    color: #333;                                /* blog.cssと同じ */
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    transition: opacity 0.3s ease, transform 0.2s ease;
    white-space: nowrap;          /* 追加: テキスト折り返し禁止 */
}

.nav-icons .circle-link:hover {
    opacity: 0.9;                               /* blog.cssと同じ */
    transform: translateY(-1px);                /* blog.cssと同じ */
}

.social-icons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;               /* 追加: 縮小禁止 */
    align-items: center;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 50%;
    transition: opacity 0.3s ease;
    flex-shrink: 0;               /* 追加: アイコン縮小禁止 */
}

.social-icons a:hover {
    opacity: 0.7;
}

.social-icons img {
    width: 24px;
    height: auto;
}

.YouTube {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* 記事タイトル */
.article-header h1 {
    font-size: 2.4em;
    color: #9bc6e9;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ブログ記事全体のコンテナ */
.blog-article-container {
    max-width: 1000px; /* 記事の最大幅を広げる (例: 900px) */
    margin: 30px auto; /* 上下マージンと左右中央揃えに戻す */
    padding: 30px 40px; 
    background-color: #fff; 
    box-shadow: 0 0 15px rgba(0,0,0,0.07); 
    border-radius: 8px;
    margin-top: 100px;
}

/* ブログ記事全体のコンテナ（記事カード） */
.blog-article-container {
    /* max-widthと中央寄せ/上マージンをリセットし、2カラム内でフル幅化 */
    max-width: 100%;
    margin: 0;
    padding: 30px 40px; 
    background-color: #424242; 
    box-shadow: 0 0 15px rgba(0,0,0,0.07); 
    border-radius: 8px;
    /* margin-top: 100px; ← 不要 */
}

/* 右側のスペース確保用プレースホルダー */
.right-sidebar-placeholder {
    width: 280px; /* 右側スペースの幅 */
    flex-shrink: 0; /* この要素も縮まないように */
    /* 背景色や枠線などをデバッグ用に一時的に設定しても良い */
    /* background-color: #f0f0f0; */
}

/* 個別の記事投稿のスタイル（必要に応じて） */
/* タイトル画像 */
.article-title-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 記事内画像 */
.article-content img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 440px;
    display: block;
    margin: 22px auto;
    border-radius: 4px;
    object-fit: cover;
}

/* 記事本文 */
.article-content {
    font-size: 1.15em; /* 本文のフォントサイズを少し大きく */
    line-height: 1.85; /* 行間を少し広げる */
    color: #ffffff; /* 文字色を微調整 */
}

.article-content h2 {
    font-size: 1.9em; /* 微調整 */
    color: #9bc6e9;
    margin-top: 45px; /* 少し増やす */
    margin-bottom: 20px; /* 少し増やす */
    padding-bottom: 8px; /* 微調整 */
    border-bottom: 1px solid #ffffff; /* 線の色を微調整 */
}

.article-content h3 {
    font-size: 1.6em; /* 微調整 */
    color: #ce8787;
    margin-top: 35px; /* 少し増やす */
    margin-bottom: 15px; /* 少し増やす */
}

.article-content p {
    margin-bottom: 22px; /* 少し増やす */
}

.article-content ul,
.article-content ol {
    margin-bottom: 22px; /* 少し増やす */
    padding-left: 35px; /* 少し増やす */
}

.article-content li {
    margin-bottom: 10px; /* 少し増やす */
}

.article-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background-color: #232323;
    border-left: 5px solid #66b3ff;
    font-style: italic;
    color: #e0e0e0;
}

.article-content blockquote p {
    margin-bottom: 0;
}

.article-content a {
    color: #66b3ff;
    text-decoration: none;
    transition: color 0.2s ease-in-out; /* ホバー時のトランジションを追加 */
}

.article-content a:hover {
    text-decoration: underline;
    color: #e0e0e0; /* ホバー時は明るい色 */
}

/* 目次のスタイル */
.article-content ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.article-content ul li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.article-content ul li a {
    color: #66b3ff;
    text-decoration: none;
    border-bottom: 1px dashed #66b3ff;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.article-content ul li a:hover {
    color: #66b3ff;
    border-bottom-color: #66b3ff;
}

/* リンクのホバー効果 */
.article-content a {
    color: #66b3ff;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.article-content a:hover {
    color: #66b3ff;
    text-shadow: 0 0 5px rgba(102, 179, 255, 0.8);
}

/* 記事メタ情報 (作成日など) */
.article-meta {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ffffff;
    font-size: 0.9em;
    color: #ffffff;
}

.article-meta p {
    margin-bottom: 8px;
}

.article-meta time {
    font-weight: bold;
}

.article-meta a {
    color: #ffffff;
    text-decoration: none;
}

.article-meta a:hover {
    text-decoration: underline;
}

.article-meta a {
    color: #66b3ff;
    text-decoration: none;
}

.article-meta a:hover {
    text-decoration: underline;
}

/* フッター */
.footer {
    text-align: center;
    padding: 20px;
    background-color: #232323;
    color: #e0e0e0;
}

.social-icons a:hover {
  opacity: 0.9;
  transform: scale(1.1);
}

/* 記事一覧ページ相当の2カラムレイアウト（blog.cssから移植・微調整） */
.blog-page-container {
    display: flex;
    max-width: 1200px;
    margin: 100px auto 20px auto; /* ヘッダーと重ならないように上マージン */
    padding: 20px;
    gap: 20px;
    align-items: flex-start;
}

.blog-main-content {
    flex: 3;
}

.blog-sidebar {
    flex: 1;
    background-color: #424242;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 100px; /* ヘッダーの高さを考慮（mediaはheader:absoluteだが余裕を確保） */
}

.blog-sidebar h3 {
    font-size: 18px;
    color: #66b3ff;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #66b3ff;
    padding-bottom: 8px;
}

.blog-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.blog-sidebar ul li {
    margin-bottom: 8px;
}

.blog-sidebar ul li a {
    text-decoration: none;
    color: #66b3ff;
    transition: color 0.2s;
}

.blog-sidebar ul li a:hover {
    color: #e0e0e0;
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .header {
        padding: 15px 10px;       /* 余白調整 */
    }
    
    .header-inner {
        gap: 8px;                 /* 間隔調整 */
    }
    
    .nav-icons {
        gap: 8px;
    }
    
    .nav-icons .circle-link {
        height: 38px;             /* サイズ調整 */
        padding: 0 12px;
        font-size: 12px;
    }
    
    .social-icons {
        gap: 8px;                 /* アイコン間隔調整 */
    }
    
    .social-icons a {
        width: 38px;              /* アイコンサイズ調整 */
        height: 38px;
    }
    
    .social-icons img {
        width: 22px;              /* 画像サイズ調整 */
    }
    
    .YouTube {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 15px;
        padding: 0;
        overflow-x: hidden; /* 横スクロール防止 */
    }
    .header {
        padding: 12px 8px;        /* さらに余白調整 */
    }
    
    .header-inner {
        gap: 6px;                 /* 間隔調整 */
    }
    
    .nav-icons {
        gap: 6px;
    }
    
    .nav-icons .circle-link {
        height: 36px;             /* サイズ調整 */
        padding: 0 10px;
        font-size: 11px;
    }
    
    .social-icons {
        gap: 6px;                 /* アイコン間隔調整 */
    }
    
    .social-icons a {
        width: 36px;              /* アイコンサイズ調整 */
        height: 36px;
    }
    
    .social-icons img {
        width: 20px;              /* 画像サイズ調整 */
    }
    
    .YouTube {
        width: 22px;
        height: 22px;
    }
    /*ここ*/
    
    .blog-page-container {
        flex-direction: column;
        max-width: 100vw;
        padding: 8px;
        gap: 0;
    }
    .blog-main-content,
    .blog-sidebar {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    .blog-sidebar {
        margin-top: 20px;
        position: static;
        top: unset;
        box-shadow: none;
        padding: 12px 8px;
    }
    .blog-article-container {
        padding: 16px 6px;
        border-radius: 4px;
        margin: 0;
        max-width: 100vw;
    }
    .article-title-image {
        max-height: 300px;
        border-radius: 3px;
        margin-bottom: 10px;
        /* width, height, max-width, display, margin, object-fit は上書き不要 */
    }
    .article-content img {
        max-height: 270px;
        border-radius: 3px;
        margin: 18px auto;
        /* width, height, max-width, display, object-fit は上書き不要 */
    }
    .article-content {
        font-size: 1em;
        line-height: 1.7;
        padding: 0;
    }
    .article-content h2 {
        font-size: 1.2em;
        margin-top: 28px;
        margin-bottom: 12px;
        padding-bottom: 4px;
    }
    .article-content h3 {
        font-size: 1em;
        margin-top: 18px;
        margin-bottom: 8px;
    }
    .article-content ul,
    .article-content ol {
        padding-left: 18px;
    }
    .footer {
        padding: 12px 4px;
        font-size: 0.95em;
    }
    .right-sidebar-placeholder {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 6px;        /* 最小余白 */
    }
    
    .header-inner {
        gap: 4px;                 /* 最小間隔 */
    }
    
    .nav-icons {
        gap: 4px;
    }
    
    .nav-icons .circle-link {
        height: 34px;             /* 最小サイズ */
        padding: 0 8px;
        font-size: 10px;
    }
    
    .social-icons {
        gap: 4px;                 /* アイコン間隔調整 */
    }
    
    .social-icons a {
        width: 34px;              /* アイコンサイズ調整 */
        height: 34px;
    }
    
    .social-icons img {
        width: 18px;              /* 画像サイズ調整 */
    }
    
    .YouTube {
        width: 20px;
        height: 20px;
    }
}

/* 超小画面対応 */
@media (max-width: 360px) {
    .header {
        padding: 8px 4px;         /* 超小画面用余白 */
    }
    
    .header-inner {
        gap: 3px;                 /* 超小画面用間隔 */
    }
    
    .nav-icons {
        gap: 3px;
    }
    
    .nav-icons .circle-link {
        height: 32px;             /* 超小画面用サイズ */
        padding: 0 6px;
        font-size: 9px;
    }
    
    .social-icons {
        gap: 3px;                 /* アイコン間隔調整 */
    }
    
    .social-icons a {
        width: 32px;              /* アイコンサイズ調整 */
        height: 32px;
    }
    
    .social-icons img {
        width: 16px;              /* 画像サイズ調整 */
    }
    
    .YouTube {
        width: 18px;
        height: 18px;
    }
}


