@charset "UTF-8";
/*
Theme Name: RiverTuck
Author: 両毛トレード
Description: 両毛トレードオリジナルテーマ（リバータック）
Version: 1.0
Text Domain: ryomo
*/

/*ベース*/
*, *::before, *::after {
  box-sizing: border-box;
}

/*モバイル小画面*/
body {
  margin: 0;
  padding: 0 7px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "ヒラギノ角ゴ ProN W3", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo,
    sans-serif;
  color: #333;
}

.wrapper {
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
}

#container {
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

@media screen and (max-width: 768px) {
  #container {
    padding: 0;/*余白0*/
  }
}

/*記事一覧　PC版タイトル調整 */
@media screen and (min-width: 769px) {
  .index-post-title {
    margin-top: 0;
  }

  .post-text {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
}

/*記事一覧　PC版アイキャッチ */
.post-inner {
  display: block; /*モバ縦並び*/
}

.post-thumbnail {
  text-align: center; /* pictureタグ内のimgを中央寄せ */
  height: 180px;/*共通部分で設定*/
  overflow: hidden;
}

/* PC表示（横並び） */
@media screen and (min-width: 769px) {
  .post-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }

.post-thumbnail {
  flex: 0 0 300px;
  max-width: 300px;
  display: flex;
  align-items: flex-start;
}

.post-thumbnail img {
  width: 300px;
  height: 171px;
  display: block;
}

  .post-text {
    flex: 1;
  }
}

/*一覧　モバイルアイキャッチ */
/*モバイル　アイキャッチ中央対応*/
@media screen and (max-width: 768px) {
  .post-text {
  }
  .post-inner {
    display: block; /* 縦並び */
  }

  .post-thumbnail {
    display: flex;
    justify-content: center;
    height: auto !important;   /*高さの固定を解除 */
    overflow: hidden;          /*枠超えを防止 */
  }

  .post-thumbnail picture {
    display: block;
    margin: 0 auto;
    width: fit-content;
  }

  .post-thumbnail-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    display: block;
  }
}
/****main-content*/
#main-content {
}


/* 登録日・更新日 表示用（PC向け） */
.post-meta .post-date {
  font-size: 0.95em;
  color: #666;
}

/* モバイル専用のフォントサイズ調整 */
@media screen and (max-width: 768px) {
  .post-meta .post-date {
    font-size: 0.85em; /* モバイルではやや小さく */
  }
}






/*ヘッダーとフッター*/


#header {
  background-image: url(./images/back.jpg);
  background-repeat: repeat;
  background-position: top left;

  padding: 40px 0 0 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #ddd;
  text-align: center;
}

#header #logo .site-title {
  font-size: 40px;
  margin: 0;
  padding: 10px 0;
}
.header-under-widget-area {
/*  margin: 10px 0;
  text-align: center;*/
  visibility: hidden; /* 表示されないが位置は保持される */

}
.header-under-widget-area .widget {
  display: inline-block;
}

.site-description {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}


#footer {
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

/* 投稿記事表示              */
#main {
  width: 100%;
}

.post,
.page {
  margin-bottom: 5px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  line-height: 1.8;
}

.single-post .post p,
.page .post p {
  padding-left: 10px;
}

/*画像関連*/
img {
  max-width: 100%;
  height: auto;
  display: block;
  border: none;
}

.post-thumbnail-img {
  width: 100%;
  height: auto;
  display: block;
}

@media screen and (min-width: 769px) {
  .post-thumbnail-img {
    height: auto; /* ← 高さを自動に戻す */
    object-fit: contain; /* ← 全体を表示。余白が出てもOK */
    aspect-ratio: 16 / 9; /* ← 高さを安定させる */
  }
}


/***トップ記事タイトル専用*/
.index-post-title {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  background-color: transparent;
  padding: 0;
  margin-bottom: 16px;
  border: none;
  line-height: 1.4;
}

/****記事本文のh2～h4装飾*/


/* h1 */
.single-post .post-title,
.page .post-title {
  padding: 16px 20px;
  margin: 2em 0 1.5em;
  box-sizing: border-box;
}

/* h2実線の下線 */
/*
  padding: 14px 16px;

*/
.single-post .post h2,
.page .post h2 {
  font-size: 1.4em;
  border-left: 5px solid #666;
  border-bottom: 3px solid #666;
  margin: 3.5em 0 1.5em 0;
  box-sizing: border-box;


    position: relative;
    padding: 20px 15px; /* さらに高さを増やす */
    padding-left: 60px;
    background-image: url('./images/h2.webp');
    background-repeat: no-repeat;
    background-position: -10px center;


}

/* h3：破線の下線＋交互色 */
/* 
  padding: 12px 16px;
  margin: 1.2em 0 1em 0;
*/
.single-post .post h3,
.page .post h3 {
  border-left: 4px solid #999;
  border-bottom: 2px dashed transparent; /* 下線スペースだけ確保 */

  box-sizing: border-box;
  position: relative;

  margin: 3em 0 1.5em 3px;

    position: relative;
    padding: 16px 12px; /* H2より少し低めに設定しつつ、前より高く */
    padding-left: 60px;
    margin-left: 3px; /* H3タグ自体の左側に余白を追加 */
    background-image: url('./images/h3.webp');
    background-repeat: no-repeat;
    background-position: -5px center;


}

.single-post .post h3::after,
.page .post h3::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    #999 0px,
    #999 10px,
    #ccc 10px,
    #ccc 20px
  );
}

/* h4：点線の下線＋交互色 */
/*
  margin: 1em 0;
*/
.single-post .post h4,
.page .post h4 {
  border-left: 3px solid #bbb;
  border-bottom: 1px dotted transparent; /* 下線スペースだけ確保 */
  background-color: #fafafa;
  padding: 10px 16px;
  font-weight: bold;
  box-sizing: border-box;
  position: relative;


  margin: 2em 0 1.5em 6px; /* H4タグ自体の左側に余白を追加 */




}

.single-post .post h4::after,
.page .post h4::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    #bbb 0px,
    #bbb 8px,
    #eee 8px,
    #eee 16px
  );
}

/*** ul / ol 共通 */
/*通常記事ページ*/
.single-post .post ul,
.single-post .post ol {
  margin-left: 20px;
  padding: 10px 20px;
  border: 2px solid #ccc;
  list-style-position: inside;
}

/*リスト項目*/
.single-post .post ul li,
.single-post .post ol li {
  margin-bottom: 8px;
  line-height: 1.6;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 4px;
}

/****ウィジェット内リスト*/
.widget_text ul {
  list-style: none;
  padding: 0;
}

.widget_text ul li {
  padding-left: 20px;
  background: url('./images/icon.jpg') no-repeat left center;
  background-size: 16px 16px;
}

.widget_mobile_text ul {
  list-style: none;
  padding: 0;
}

.widget_mobile_text ul li {
  padding-left: 20px;
  background: url('./images/icon.jpg') no-repeat left center;
  background-size: 16px 16px;
}

/****ウィジェット-カテゴリ*/
.widget_categories ul {
  list-style-type: disc;
  padding-left: 20px;
  margin: 0;
}

.widget_categories ul li {
  margin-bottom: 14px;
  line-height: 1.8;/* 行間：1.6-1.8 */
}

/* 子カテゴリ（階層） */
.widget_categories ul .children {
  margin-left: 16px;
  list-style-type: circle;
}

.widget_categories ul .children li {
  margin-bottom: 12px;
  line-height: 1.8;
}

/***ウィジェット　記事下*/
.post-bottom-widget {
  background-color: #f8f8f8;
  padding: 16px;
  margin-top: 40px;
  border-radius: 4px;
}

.post-bottom-widget .widget-title:hover {
  background: none !important;
  color: inherit !important;
}

/* h3（タイトル）の装飾をリセット：背景・枠線ナシ！ */
.post-bottom-widget .widget-title {
  background: none;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
  margin: 0 0 8px 0 !important;
  font-size: 16px;
  text-align: left;
}

/* 本文だけインデント */
.post-bottom-widget .textwidget {
  padding-left: 1em;
  font-size: 14px;
  line-height: 1.6;
}



/****ウィジェット トップ下*/
.top-menu-under-widget-area {
  width: 90%;
  margin: 20px auto;
  border: 1px solid #cc0000;  /* 赤枠 */
  padding: 15px;
  box-sizing: border-box;
  text-align: center;

}
.top-menu-under-widget-area h3.widget-title {
  font-size: 18px;
  margin: 0 0 10px 0;
  padding: 0;
  border: none;
  text-align: center;
}


/****ヘッダーのメニュー表示*/
/* 共通メニュー構造 */
.main-navigation {
  position: relative;
  margin-top: 20px;
  width: 100%;
  overflow-x: visible;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.main-navigation li {
  margin: 0 5px;
}

.main-navigation a {
  display: block;
  padding: 10px 15px;
  border-radius: 0px;
  transition: none;
}

/* naviサブメニュー */
.main-navigation li ul.sub-menu {
  display: none;
  position: absolute;
  border: 1px solid #ccc;
  padding: 0;
  margin-top: 0px;
  z-index: 1000;
}

.main-navigation li:hover ul.sub-menu {
  display: block;
}

.main-navigation li ul.sub-menu li a {
  padding: 10px 15px;
  border-radius: 0;
}



/* モバイル用：横スライドスクロール対応 */
@media screen and (max-width: 768px) {
  .main-navigation a {
    font-size: 12px;
  }
}

@media screen and (max-width: 768px) {
  .main-navigation {
    overflow-x: auto;
  }

  .main-navigation ul {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    white-space: nowrap;
    padding: 10px 0;
    margin: 0;
    background-color: #ffffff;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
  }

  .main-navigation li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .main-navigation a {
    display: inline-block;
    padding: 10px 15px;
  background-color: #fff;         /* 白背景 */
  color: #000;                    /* 黒文字 */
    text-decoration: none;
    border-radius: 0px;
    font-weight: bold;
    white-space: nowrap;
  }

/* サブメニュー */
  .main-navigation li:hover ul.sub-menu {
     position: relative
  }
}

/****パンくずリスト*/
.breadcrumb-box {
  padding: 6px 12px;
  font-size: 0.9em;
  margin-bottom: 10px;
  border-radius: 4px;
}

.breadcrumb-box .breadcrumb-item {
  display: inline;
}


/****関連記事リスト*/

/* ulとliのリストも完全にリセットし、ポチ付きの自然なリストに */
.related-posts-wrapper ul {
  all: unset;
  display: block;
  list-style-type: disc !important;     /* デフォルトのポチ */
  list-style-position: outside !important;
  margin-left: 1.5em !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
}

.related-posts-wrapper li {
  all: unset;
  display: list-item;
  margin: 0.5em 0 !important;
  padding: 0 !important;
  border: none !important;
  border-bottom: 0 !important;
  background: none !important;
  list-style-type: disc !important;
  list-style-position: outside !important;
  color: inherit;
}

/****ナビゲーション*/
.pagination {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  padding: 0;
}

.pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination li a,
.pagination li span {
  display: inline-block;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  text-decoration: none;
  border-radius: 4px;
}



/****footer-TagList*/
.tag-button {
  display: inline-block;
  padding: 0.4em 0.8em;
  font-size: 0.9em;
  background-color: #e0e0e0;
  color: #333;
  text-decoration: none;
  border-radius: 20px;
  border: 1px solid #ccc;
  transition: background-color 0.2s, color 0.2s;
}

.tag-button:hover {
  background-color: #d0d0d0;
  color: #000;
}



/****フッター*/
.footer-menu {
  text-align: center;
  margin-bottom: 10px;
  padding-top: 5px;
  font-size: 14px;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav li {
  display: inline-block;
  margin: 0 12px;
}

.footer-nav a {
  color: #444;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
  color: #000;
}


/* --- モバイル時に縦並び＋区切り線 --- */
@media screen and (max-width: 768px) {
  .footer-nav li {
    display: block;
    margin: 8px 0;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
  }

  .footer-nav li:last-child {
    border-bottom: none; /* 最後の項目には線を引かない */
  }
}


/*文字装飾*/
.marker-red {
  background-color: rgba(255, 0, 0, 0.3);
}

.marker-blue {
  background-color: rgba(0, 0, 255, 0.3);
}

.marker-green {
  background-color: rgba(0, 128, 0, 0.3);
}

.marker-yellow {
  background-color: rgba(255, 255, 0, 0.5);
}

/* 文字下線装飾 */

.underline-red {
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 0, 0.6); /* 赤 */
  text-decoration-thickness: 4px;
}

.underline-blue {
  text-decoration: underline;
  text-decoration-color: rgba(0, 0, 255, 0.6); /* 青 */
  text-decoration-thickness: 4px;
}

.underline-green {
  text-decoration: underline;
  text-decoration-color: rgba(0, 128, 0, 0.6); /* 緑 */
  text-decoration-thickness: 4px;
}

.underline-yellow {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 0, 0.6); /* 黄 */
  text-decoration-thickness: 4px;
}

/*整形済みテキスト*/
pre {
    background-color: #e0f7fa; /* 水色っぽい背景 */
    padding: 12px;
    border-radius: 6px;
    font-family: monospace;
    white-space: pre-wrap; /* 折り返しありにするなら */
    overflow-x: auto;       /* 長い行を横スクロール可能に */
}

/*formのセレクト*/
.quiz-select {
  font-size: 16pt;         /* フォントサイズを少し大きく */
  border-radius: 8px;       /* セレクト枠を丸く */
  padding: 0.4em 0.8em;     /* 内側の余白も調整（任意） */

}


/*固定ページの記事下のウィジェットのタイトルにアイコン表示させない*/
.post-bottom-widget .widget-title {
  background-image: none !important;
  padding-left: 0 !important;
}