/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー共通設定 */

:root {
    --primary-color: #c30d23;
    --text-color: #666666;
    --background-color: #ffffff;
    --white: #ffffff;
    --light-color:#d6d6d6;

    --font-jp: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    --font-tc: 'Noto Sans TC', sans-serif;
    }


/* 言語指定 */

[lang="zh-Hant"] { /* 繁体中文 */
font-family: var(--font-tc);
}

  /* 中国語フォントスタックの再定義 */
  :root {
    --font-sc: 
      'Noto Sans SC Variable',  /* 可変フォント優先 */
      'Noto Sans SC',
      system-ui,                /* システムUIフォント継承 */
      'PingFang SC',
      'Microsoft YaHei',
      sans-serif;
  }
  
  /* 言語指定の詳細度向上 */
  html[lang^="zh"] body {
    font-weight: 400 !important; /* 通常ウェイトで強制統一 */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  
  /* gTranslateの言語切り替え専用 */
  body.gtranslate-lang-zh-CN,
  body.gtranslate-lang-zh-TW {
    font-family: var(--font-sc) !important;
    font-variation-settings: 'wght' 400; /* 可変フォント用 */
  }
  
  /* 中国語特有の文字調整 */
  @supports font-variant-ligatures(common-ligatures) {
    [lang|="zh"] {
      font-variant-ligatures: common-ligatures;
    }
  }




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



body {
    font-family: var(--font-jp); /* 変数を使用して統一 */
    color: var(--text-color);
    background-color: var(--white);
    font-size: 12px;
    font-weight: 300; 
    line-height: 1.7; /* 読みやすい行間へ */
    letter-spacing: 0.03em; /* 間隔を少し詰めてシンプルに */
}


li {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.6;
}



  
/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーユーティリティクラス */
.btn {
    background:var(--primary-color);
    color: var(--white);
    padding: 8px 20px;
    border: none;
    cursor: pointer;
}


.view-more {
    color: var(--primary-color);
    text-decoration: none;
    display: block; /* または block */
    margin-top: 15px;
    text-align: center;
    width: 100%; /* blockの場合に必要 */
    font-weight: bold;
}



.sns-links a {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.5em;
}

.sp-center {
    text-align: center;
    margin: 20px 0;
}

.sp-center{
    display: none;
}





/* ---------------------------------------------------------------------ヘッダー */
header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    z-index: 1000;
}

.blog-title {
    color:var(--primary-color);
    font-size: 2em;
    font-weight: bold;
}

header .blog-nav ul {
    display: flex;
    color: var(--primary-color);
}

header .blog-nav  ul li {
    margin: 0 10px;
}


/* メインコンテナ */
.container {
    display: grid;
    grid-template-columns: 70% 28%;
    gap: 2%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* サイドバー固定のため */
    position: relative;
    display: flex;
    justify-content: space-between;
}



/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーメインビジュアル */
.mv img {
    width: 200px;
}

.mv {
    background-color:var(--primary-color);
    height: 200px;
    position: relative;
}

.mv h2 {
    color: var(--white);
    font-size: 60px;
    font-weight: bold;
    position: absolute;
    right: 0%;
    bottom: 0%;
}

/* 修正 */

/* メインビジュアルリンク */
.mv-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

/* 既存のスタイルに追加 */
.mv {
    transition: transform 0.3s ease;
}

/* 子要素のポインターイベントを無効化 */
.mv img,
.mv h2 {
    pointer-events: none;
}



/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーートップページ */
/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー最新ニュース */



.news-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 0.5px solid var(--light-color);
}

.news-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.news-date {
    width: 120px;
    flex-shrink: 0;
    font-size: 14px;
}

.news-category {
    width: 100px;
    background-color: var(--primary-color);
    color:var(--white)!important;
    padding: 5px 20px;
    font-size: 10px;
    text-align: center;
    flex-shrink: 0;
    font-weight: 300!important;
}

.news-title {
    flex-grow: 1;
    padding-left: 20px;
    min-width: 0;
}

.news-title a:hover {
    text-decoration: underline;
}

.news i {
    margin-left: 5px;
}


/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーメインコンテンツ */
.main-content {
    margin-top: 80px;
    width: 70%;
    padding-right: 40px;
}

.main-content section {
    margin-bottom: 90px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    color: var(--primary-color);
    font-size: 2em;
    font-weight: bold;
}

/* 3カラムレイアウト */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.post-card {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
}

.post-card h3 {
    font-weight: 500;
}

/* 画像にグレーフィルターを適用 */
.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: grayscale(30%) brightness(100%);
    transition: filter 0.3s ease;
    position: relative;
    margin-bottom: 5px;
}

/* ホバー時には通常表示に */
.post-card:hover img {
    filter: grayscale(0%) brightness(100%);
    opacity: 1;
}

/* お問い合わせ */
.contact {
    border: 1px solid var(--primary-color);
    height: 200px;
}

/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー購読 */
.subscribe {
    border: 1px solid var(--primary-color);
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    margin-top: 100px;
}

  .subscribe i {
    font-size: 20px;
}



/* サイドバー ーーーーーーーーーーーーーーーーーーーーーーーーーーーーー------------ーーーーーーーーーーー*/


/* サイドバー固定 */
.sidebar {
    position: sticky;
    top: 60px; /* ヘッダー下の位置 */
    right: 0;
    overflow-y: auto;
    width: 30%;
    margin-top: 100px;
    padding: 10px 30px;
    align-self: flex-start;
    background: var(--white);
}


.widget {
    margin-bottom: 30px;
    background-color: var(--white);
}


/* カテゴリー */
.category-nav {
    background-color: var(--white);
}
.category-nav li{
    width: 100%;
    padding: 5px 0;
    border: 1px solid var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.news-category {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9em;
    padding: 2px 8px;
    border: 1px solid var(--primary-color);
    width: 80px;
    white-space: nowrap; /* 折り返し防止 */
    text-align: center;
}

/* 検索バー */
/* 検索フォームのスタイル */
.search-form {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 40px;

}

.search-form input {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--white);
}

.search-form .fa-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--white);
}

.search-form input[type="search"] {
    padding-right: 40px; /* アイコンのためのスペース確保 */
    width: 100%;
}

.search-form input::placeholder {
    color:var(--white); 
  }




/* 各種SNSページ */

.link-bg {
    background-color: var(--primary-color);
    height: 100px;
    position: relative;
}

.link-bg img {
    width: 150px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
}

.link p {
    color: var(--primary-color);
}

.link {
    display: flex;
    flex-direction: column;
    position: relative;
    margin-bottom: 30px;
}

.link p:last-child,
.link p:nth-child(2) {
    align-self: flex-end;
    text-align: right;
    width: 100%;
}

/* コンタクトリンク */

.contact-link {
    color: var(--primary-color);
    height: 100px;
    border: 1px solid var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
}


.contact-link i {
    font-size: 35px;
    margin-left: 3px;
}

.contact-link h3 {
    font-size: 18px;
    font-weight: bold;
    margin-right: 3px;
}

/* SNSリンク */

.sns-links {
    text-align: center;
    flex: block;
    justify-content: center;
    align-items: center;
}

.sns-links i {
    margin: 0 5px;
    font-size: 20px;
}



/* フッター----------------------------------------------------------------------- */
footer {
    background: var(--primary-color);
    text-align: center;
    color: var(--white);
    padding: 10px 0;
    font-size: 0.6rem;
    font-weight: light;
}






/* カテゴリー別表示ページーーーーーーーーーーーーー---------------ーーーーーーーーーーーーーーーーーー */
/* メインビジュアル */
.sub-mv-bg img {
    width: 200px;
}

.sub-mv-bg {
    background-color:var(--primary-color);
    height: 60px;
    /* position: relative; */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sub-mv-bg h2 {
    color: var(--white);
    font-size: 50px;
    font-weight: bold;
}
.sub-title{
    text-align: right;
    width: 100%;
}

.sub-title h3 {
    color: var(--white); /* 文字色 */
    font-size: 100px;
    font-weight: bold;
    text-shadow: 
        -1px -1px 0 var(--primary-color),  
        1px -1px 0 var(--primary-color),
        -1px 1px 0 var(--primary-color),
        1px 1px 0 var(--primary-color);
    -webkit-text-stroke: 1px var(--primary-color); /* ブラウザ互換用 */
    position: relative;
    display: inline-block;

    width: 100%;
    box-sizing: border-box; /* paddingを含めた幅計算 */
}







/* 記事個別ページーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー */

  /* 記事詳細ページスタイル */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 20px;
}

.article-date {
    color: var(--primary-color);
    font-size: 0.9em;
    display: block;
    margin-bottom: 10px;
}

.article-title {
    font-size: 2.2em;
    color: var(--text-color);
    line-height: 1.4;
    margin: 20px 0;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9em;
    color: #666;
}

.main-image {
    margin: 40px 0;
    position: relative;
}

.main-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.main-image figcaption {
    text-align: center;
    color: #666;
    font-size: 0.9em;
    margin-top: 15px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 40px 0;
}


.image-column img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-column img:hover {
    transform: scale(1.03);
}

.image-column figcaption {
    color: #666;
    padding: 10px;
    font-size: 0.85em;
}

.article-body {
    font-size: 1.1em;
    line-height: 1.8;
    color: #444;
}

.article-body h2 {
    color: var(--primary-color);
    margin: 40px 0 20px;
    font-size: 1.6em;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}


.no-results {
    text-align: center;
}



/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーページネーション */

/* ページネーションスタイル */
.custom-pagination {
    margin: 40px 0;
    text-align: center;
}

.custom-pagination .page-numbers {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
    padding: 10px;
}

.custom-pagination a,
.custom-pagination span {
    display: block;
    padding: 10px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--primary-color);
}



.custom-pagination .current {
    color: var(--white);
    background-color: var(--primary-color);
    
}



/* ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
レスポンシブ対応 
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー*/

/* ダークモードでも白背景 */
@media (prefers-color-scheme: dark) {
    body {
      background-color: var(--white) 
    }
  }


/* レスポンシブ対応 */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .main-content {
        width: 100%;
        padding-right: 0;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        margin-top: 40px;
        order: 2;
    }
}



/* レスポンシブ対応 */
@media (max-width: 768px) {

    

    .container {
        grid-template-columns: 100%;
    }

    .sidebar {
        order: 2;
    }

    

    .ranking-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-title {
        font-size: 1.8em;
    }

    .main-image img {
        height: 300px;
    }

    .image-grid {
        grid-template-columns: 1fr;
    }

    .image-column img {
        height: 250px;
    }

    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
}




/* レスポンシブ対応 */
@media screen and (max-width: 486px)  {
    .custom-pagination .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* ーーーーーーーヘッダー */
    .blog-nav ul{
        justify-content: center;
    }

    .mv img {
        width: 150px;
    }
    .mv h2 {
        font-size: 42px;
    }

    .section-header .btn {
        display: none;
    }

    .sp-center{
        display: block;
    }


    /* 最新ニュース */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px 0;
    }

    .news-header {
        width: 100%;
        gap: 10px;
        margin-bottom: 8px;
        justify-content: flex-start;
    }

    .news-date,
    .news-category {
        width: auto;
        font-size: 14px;
    }

    .news-category {
        padding: 3px 12px;
        font-size: 12px;
    }

    .news-title {
        width: 100%;
        padding-left: 0;
    }

    .news-title a {
        display: inline-block;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* カテゴリー別ページ */
    .sub-title h3{
        font-size: 50px;
    }

    .sub-mv-bg img {
        width: 100px;
    }
    
    .sub-mv-bg {
        background-color:var(--primary-color);
        height: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .sub-mv-bg h2 {
        color: var(--white);
        font-size: 30px;
        font-weight: bold;
    }

    

}

/* 記事サムネイル用 */
@media screen and (max-width: 640px)  {
    /* トップカテゴリー別 */
    .post-grid {
        grid-template-columns: 1fr;
    }

}