/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/**************************************************/
/* 国やカテゴリ、タグ、著者名、日付などはADDITIONAL CSS CLASS(ES) */
/* にこのクラスを設定する */
/**************************************************/
.meta-text {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 0;
}

/**************************************************/
/* スマホのスティッキーナビゲーション時のロゴ位置修正 */
/**************************************************/
@media (max-width: 768px) {
  /* スティッキー時の左右余白を通常時と同じに */
  .main-navigation.is_stuck .inside-navigation {
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}
/**************************************************/
/* モバイルハンバーガーメニューの背景色統一 */
/**************************************************/
/* 通常時のハンバーガーボタン */
.main-navigation .menu-toggle {
    flex-grow: 1;
    width: auto;
    background-color: var(--base-2) !important;
    transition: background-color 0s !important; /* 即座に切り替え */
}
/* 開いた状態（バッテン）のボタン */
.main-navigation.toggled .menu-toggle {
    background-color: var(--base-2) !important;
}
/* タップ時・フォーカス時・アクティブ時の背景色 */
.main-navigation .menu-toggle:active,
.main-navigation .menu-toggle:focus,
.main-navigation .menu-toggle:hover,
.main-navigation.toggled .menu-toggle:active,
.main-navigation.toggled .menu-toggle:focus,
.main-navigation.toggled .menu-toggle:hover {
    background-color: var(--base-2) !important;
    outline: none !important; /* フォーカスリングを消す */
}
/**************************************************/
/* Sponsoredバッジの見た目 */
/**************************************************/
.sponsored-badge {
    display: inline-block !important;
    background: #333333 !important;
    color: #ffffff !important;
	padding-left: 5px !important;
	padding-right: 5px !important;
    font-size: 14px !important;
/*    margin-bottom: 5px !important; */
}
/**************************************************/
/* 一覧表示のカテゴリの前に区切り線を入れる */
/**************************************************/
.post-category::before {
    content: " | ";
    color: #333333;
    margin-left: 0px;
    margin-right: 6px;
} 

/**************************************************/
/* 一覧表示の著者の後に区切り線を入れる */
/**************************************************/
.post-author::after {
    content: " | ";
    color: #333333;
    margin-left: 6px;
    margin-right: 0px;
}
/**************************************************/
/* タグの前に「#」を付ける */
/**************************************************/
.post-tags a::before {
    content: "#";
}
/**************************************************/
/* メニュー項目のテキストと矢印の距離を短縮 */
/**************************************************/
.main-navigation .menu-item-has-children > a .dropdown-menu-toggle {
    margin-left: -10px; /* デフォルトより短く */
}

/**************************************************/
/* WordPress Popular Posts ランキングスタイル（3色対応） */
/**************************************************/

/**************************************************/
/* 7-Day Ranking（赤） */
/**************************************************/
.ranking-7day .wpp-list {
    counter-reset: ranking;
    list-style: none;
    padding: 10px;
    margin: 15px auto;
    background: #fff;
    border: 2px solid #bc002d;
    box-shadow: 0 2px 8px rgba(188, 0, 45, 0.1);
    box-sizing: border-box;
}

.ranking-7day .wpp-list::before {
    content: "7-Day Ranking";
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    background: #bc002d;
    margin: -10px -10px 10px -10px;
    padding: 0px 15px;
    border-bottom: none;
}

.ranking-7day .wpp-list li {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 8px 0 8px 35px;
    margin-bottom: 0;
    background: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    box-sizing: border-box;
}

.ranking-7day .wpp-list li:last-child {
    border-bottom: none;
}

.ranking-7day .wpp-list li::before {
    counter-increment: ranking;
    content: counter(ranking);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #eee;
    border-radius: 50%;
}

.ranking-7day .wpp-list li .wpp-item-data {
    order: -1;
    font-size: 0 !important;
    line-height: 0 !important;
    color: #bc002d !important;
    font-weight: 600;
    opacity: 1;
    text-transform: capitalize;
    margin-bottom: 4px;
}

.ranking-7day .wpp-category a {
    font-size: 14px !important;
    line-height: 1.1 !important;
    color: #bc002d !important;
    text-decoration: none;
}

.ranking-7day .wpp-list li .wpp-item-data .cat-links::before {
    display: none !important;
}

.ranking-7day .wpp-list li .wpp-post-title,
.ranking-7day .wpp-list li h3 {
    order: 1;
    word-break: break-word;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.ranking-7day .wpp-list li .wpp-post-title,
.ranking-7day .wpp-list li h3,
.ranking-7day .wpp-list li a {
    color: rgb(51, 51, 51);
    text-decoration: none;
}

.ranking-7day .wpp-list li a:hover {
    text-decoration: underline;
    color: #bc002d;
}

.ranking-7day .wpp-thumbnail {
    margin-right: 8px;
    flex-shrink: 0;
}

.ranking-7day .wpp-thumbnail img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.ranking-7day .wpp-meta {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.ranking-7day .wpp-category {
    font-size: 0 !important;
    line-height: 0 !important;
    display: inline-block;
}

/**************************************************/
/* 30-Day Ranking（青） */
/**************************************************/
.ranking-30day .wpp-list {
    counter-reset: ranking;
    list-style: none;
    padding: 10px;
    margin: 15px auto;
    background: #fff;
    border: 2px solid #1a5490;
    box-shadow: 0 2px 8px rgba(26, 84, 144, 0.1);
    box-sizing: border-box;
}

.ranking-30day .wpp-list::before {
    content: "30-Day Ranking";
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    background: #1a5490;
    margin: -10px -10px 10px -10px;
    padding: 0px 15px;
    border-bottom: none;
}

.ranking-30day .wpp-list li {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 8px 0 8px 35px;
    margin-bottom: 0;
    background: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    box-sizing: border-box;
}

.ranking-30day .wpp-list li:last-child {
    border-bottom: none;
}

.ranking-30day .wpp-list li::before {
    counter-increment: ranking;
    content: counter(ranking);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #eee;
    border-radius: 50%;
}

.ranking-30day .wpp-list li .wpp-item-data {
    order: -1;
    font-size: 0 !important;
    line-height: 0 !important;
    color: #1a5490 !important;
    font-weight: 600;
    opacity: 1;
    text-transform: capitalize;
    margin-bottom: 4px;
}

.ranking-30day .wpp-category a {
    font-size: 14px !important;
    line-height: 1.1 !important;
    color: #1a5490 !important;
    text-decoration: none;
}

.ranking-30day .wpp-list li .wpp-item-data .cat-links::before {
    display: none !important;
}

.ranking-30day .wpp-list li .wpp-post-title,
.ranking-30day .wpp-list li h3 {
    order: 1;
    word-break: break-word;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.ranking-30day .wpp-list li .wpp-post-title,
.ranking-30day .wpp-list li h3,
.ranking-30day .wpp-list li a {
    color: rgb(51, 51, 51);
    text-decoration: none;
}

.ranking-30day .wpp-list li a:hover {
    text-decoration: underline;
    color: #1a5490;
}

.ranking-30day .wpp-thumbnail {
    margin-right: 8px;
    flex-shrink: 0;
}

.ranking-30day .wpp-thumbnail img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.ranking-30day .wpp-meta {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.ranking-30day .wpp-category {
    font-size: 0 !important;
    line-height: 0 !important;
    display: inline-block;
}

/**************************************************/
/* All-Time Ranking（緑） */
/**************************************************/
.ranking-alltime .wpp-list {
    counter-reset: ranking;
    list-style: none;
    padding: 10px;
    margin: 15px auto;
    background: #fff;
    border: 2px solid #2d6b3f;
    box-shadow: 0 2px 8px rgba(45, 107, 63, 0.1);
    box-sizing: border-box;
}

.ranking-alltime .wpp-list::before {
    content: "All-Time Ranking";
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    background: #2d6b3f;
    margin: -10px -10px 10px -10px;
    padding: 0px 15px;
    border-bottom: none;
}

.ranking-alltime .wpp-list li {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 8px 0 8px 35px;
    margin-bottom: 0;
    background: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    box-sizing: border-box;
}

.ranking-alltime .wpp-list li:last-child {
    border-bottom: none;
}

.ranking-alltime .wpp-list li::before {
    counter-increment: ranking;
    content: counter(ranking);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    background: #eee;
    border-radius: 50%;
}

.ranking-alltime .wpp-list li .wpp-item-data {
    order: -1;
    font-size: 0 !important;
    line-height: 0 !important;
    color: #2d6b3f !important;
    font-weight: 600;
    opacity: 1;
    text-transform: capitalize;
    margin-bottom: 4px;
}

.ranking-alltime .wpp-category a {
    font-size: 14px !important;
    line-height: 1.1 !important;
    color: #2d6b3f !important;
    text-decoration: none;
}

.ranking-alltime .wpp-list li .wpp-item-data .cat-links::before {
    display: none !important;
}

.ranking-alltime .wpp-list li .wpp-post-title,
.ranking-alltime .wpp-list li h3 {
    order: 1;
    word-break: break-word;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.ranking-alltime .wpp-list li .wpp-post-title,
.ranking-alltime .wpp-list li h3,
.ranking-alltime .wpp-list li a {
    color: rgb(51, 51, 51);
    text-decoration: none;
}

.ranking-alltime .wpp-list li a:hover {
    text-decoration: underline;
    color: #2d6b3f;
}

.ranking-alltime .wpp-thumbnail {
    margin-right: 8px;
    flex-shrink: 0;
}

.ranking-alltime .wpp-thumbnail img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.ranking-alltime .wpp-meta {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.ranking-alltime .wpp-category {
    font-size: 0 !important;
    line-height: 0 !important;
    display: inline-block;
}

/**************************************************/
/* レスポンシブ対応（3色共通） */
/**************************************************/
@media (max-width: 767px) {
    .ranking-7day .wpp-list,
    .ranking-30day .wpp-list,
    .ranking-alltime .wpp-list {
        padding: 8px;
        margin: 10px auto;
    }
    
    .ranking-7day .wpp-list li,
    .ranking-30day .wpp-list li,
    .ranking-alltime .wpp-list li {
        padding: 6px 0 6px 30px;
        font-size: 14px;
    }
    
    .ranking-7day .wpp-list li::before,
    .ranking-30day .wpp-list li::before,
    .ranking-alltime .wpp-list li::before {
        min-width: 20px;
        height: 20px;
        font-size: 18px;
        left: 2px;
    }
    
    .ranking-7day .wpp-list li .wpp-post-title,
    .ranking-7day .wpp-list li h3,
    .ranking-30day .wpp-list li .wpp-post-title,
    .ranking-30day .wpp-list li h3,
    .ranking-alltime .wpp-list li .wpp-post-title,
    .ranking-alltime .wpp-list li h3 {
        font-size: 18px;
    }
    
    .ranking-7day .wpp-category a,
    .ranking-30day .wpp-category a,
    .ranking-alltime .wpp-category a {
        font-size: 14px !important;
    }
    
    .ranking-7day .wpp-thumbnail img,
    .ranking-30day .wpp-thumbnail img,
    .ranking-alltime .wpp-thumbnail img {
        width: 35px;
        height: 35px;
    }
}

/**************************************************/
/* Posts Pageのタイトル位置をトップページに合わせる調整 */
/**************************************************/
/* カテゴリページのタイトル（H2）の余白を調整 */
.category .entry-title {
    /* トップページに合わせてマージンを調整 */
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}
/* タイトルを囲む要素の余白調整 */
.category .inside-article .entry-header {
    /* トップページのFeaturedタイトルは周囲の要素と隙間が少ないため、余白を削減 */
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}
/**************************************************/
/* メインメニューのCutegoriesはどこにも飛ばさないため */
/* Linkのような動作をしなくする */
/**************************************************/
/* URLが # であるメニュー項目（例: Countries）のホバー動作を無効にする */
.main-navigation ul li a[href="#"]:hover {
    color: inherit !important; /* デフォルト色を継承 */
    background-color: transparent !important;
    text-decoration: none !important;
    cursor: default !important; /* カーソルを矢印に戻す */
}

/* Countries項目をクリックできないように設定 */
.main-navigation ul li.menu-item-has-children > a[href="#"] {
    cursor: default !important;
}

/* ただし、ドロップダウン内のリンクは通常通りホバー動作させる */
.main-navigation ul li a:not([href="#"]):hover {
    /* ここに通常の設定色を入れます */
    color: #bc002d !important; 
}
/**************************************************/
/* パンくずの装飾や配置調整 */
/**************************************************/
.rank-math-breadcrumb {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
	padding: 8px 0 4px 0; /* 上8px 右0 下4px 左0 */
    margin: 0 !important;
    min-height: 40px; /* 高さを事前に確保 */
}

.rank-math-breadcrumb p {
    max-width: 1280px;
    margin: 0 auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    font-size: 14px;
    line-height: 1.6;
    color: #666666;
}

.rank-math-breadcrumb a {
    color: #333333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rank-math-breadcrumb a:hover {
    color: #bc002d;
}

.rank-math-breadcrumb .separator {
    margin: 0 8px;
    color: #999999;
}

.rank-math-breadcrumb .last {
    color: #333333;
    font-weight: 500;
}


/* モバイル対応 */
@media (max-width: 768px) {
    .rank-math-breadcrumb {
        padding: 10px 0;
        display: flex;
        align-items: center;
    }
    
    .rank-math-breadcrumb p {
        width: 100%; /* 幅を100%に */
        max-width: 1280px;
        margin: 0 !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        font-size: 13px;
        line-height: 1.5;
    }
}

/**************************************************/
/* モバイルでサイドバーの上に余白を追加 */
/**************************************************/
@media (max-width: 768px) {
    .sidebar {
        margin-top: 40px; /* 数値を調整 */
    }
}
/**************************************************/
/* サイドバーにタグ一覧を出す */
/**************************************************/
/* タグリストを横並びに */
.wp-block-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin-left: 0 !important;
}

/* 各タグをボックスで囲む */
.wp-block-categories-list li {
    margin: 0;
}

.wp-block-categories-list li a {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid #ddd;
    text-decoration: none;
	font-size: 14px;
    color: #333333;
    background-color: #ffffff;
	border-color: #333333;
}

.wp-block-categories-list li a:hover {
    background-color: #bc002d;
    color: #fff;
    border-color: #bc002d;
}

/* タグの前に#を追加 */
.wp-block-categories-list li a::before {
    content: "#";
    margin-right: 0px;
}
/* Pinnedタグを非表示 */
.cat-item-31 {
    display: none !important;
}

/**************************************************/
/* 一覧ページや検索結果ページのページネーションの見た目 */
/**************************************************/
/* GeneratePress風シンプルページネーション */
.wp-pagenavi {
    text-align: center;
    padding: 50px 0;
    clear: both;
}

.wp-pagenavi .pages {
    display: none;
}

/* First/Lastボタンを非表示
.wp-pagenavi .first,
.wp-pagenavi .last {
    display: none !important;
}　*/

.wp-pagenavi a,
.wp-pagenavi span {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 40px; /* border分を引く */
    padding: 0;
/*    margin: 0 8px; */
    margin: 0 0px;
    background: #fff;
    border: 1px solid #000;
    text-decoration: none;
    color: #000;
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    transition: all 0.2s ease;
}

.wp-pagenavi a:hover {
    background: #f5f5f5;
}

.wp-pagenavi .current {
    background: #fff;
    color: #000;
    border-color: #000;
}

/* 前へ・次へボタンも同じスタイル */
.wp-pagenavi .previouspostslink,
.wp-pagenavi .nextpostslink {
    min-width: 40px;
}

/* 省略記号（...）は枠なしテキストのみ */
.wp-pagenavi .extend {
    background: none !important;
    border: none !important;
    min-width: auto !important;
    padding: 0 5px !important;
    color: #999 !important;
    cursor: default !important;
}

.wp-pagenavi .extend:hover {
    background: none !important;
}

/* スマホ対応 - ボタンを少し小さく */
@media (max-width: 767px) {
    .wp-pagenavi a,
    .wp-pagenavi span {
        min-width: 30px;
        height: 30px;
        line-height: 30px;
/*        margin: 0 4px; */
        font-size: 14px;
    }
    
    .wp-pagenavi .previouspostslink,
    .wp-pagenavi .nextpostslink {
        min-width: 50px;
    }
}
/**************************************************/
/* originalバッジ */
/**************************************************/
.original-badge {
    display: inline-block !important;
    background: #bc002d !important;
    color: #ffffff !important;
	padding-left: 3px !important;
	padding-right: 3px !important;
    font-size: 14px !important;
}

