/*
Theme Name: Frost Child
Template: frost
*/

header h1 {
  padding: 0.4em 0.5em;
  margin-bottom: 1em;
  background-color: #eee;
  color: #003333;
  font-size: 1.8rem;
  line-height: 1.4;
  border-radius: 10px;
  border: 2px solid #888;
  font-weight: 700;
}

h2, h3, h4, h5 {
  font-weight: 700;
}

article h2 {
  border-bottom: 2px solid #006666;
  padding-bottom: 0.4em;
  margin-bottom: 1em;
  color: #003D3D;
  font-size: 1.7rem;
  padding-left: 0.4em;
}

article h3 {
  border-left: 4px solid #006666;
  padding-left: 0.7em;
  margin-left: 0;
  color: #003D3D;
  font-size: 1.5rem;
}

article h4 {
  border-left: 3px dashed #CCCCCC;
  padding-left: 0.7em;
  margin-left: 0;
  color: #003D3D;
  font-size: 1.3rem;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* 本文全体のベース設定 */
body {
  font-family: "Noto Sans JP", "M PLUS 1p", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Yu Gothic", "Meiryo",  sans-serif;
  font-size: 16.5px;
  line-height: 1.9;
  letter-spacing: 0.04em;
 }

/* 段落や見出し下にゆとり */
p,
h2, h3, h4, 
ul, ol {
  margin-bottom: 1.8em;
}

ul li, ol li {
  padding-top: 0.3em;
  padding-bottom: 0.3em;
  line-height: 1.8;
}

ul ul, ul ol, ol ul, ol ol {
  margin-bottom: 0em;
}


/* 本文コンテンツ幅（中央寄せ、写真用に広め） */
.wp-block-post-content {
  margin-left: auto;
  margin-right: auto;
  padding-left: 1em;
  padding-right: 1em;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* リスト（ul） */
ul,ol {
  padding-left: 1.5em;
}

aside h2 {
  background-color: #f0f0f0;
  border-left: 6px solid #099;
  padding: 0.6em 0.7em;
  margin: 1em 0;
  color: #022;
  font-size: 1.5rem;
}

.wp-element-caption { font-size: 0.95em; color: #555; }

blockquote {
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
  border-left: 4px solid #CCCCCC;
  padding-left: 1.2em;
  margin: 1.8em 0;
  background: #f9f9f9; 
  font-style: normal;
}

blockquote cite {
  display: block; 
  font-size: 0.9em;
  color: #666;
  margin-top: 0.8em;
  text-align: right;
  font-style: normal;
}

strong {
  font-weight: 700 !important;
}

.entry-content {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.my-related-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
}

.my-related-posts li {
  padding: 0em;
  display: flex;
  flex-direction: column;
}

.my-related-posts li a {
  display: block;
  text-decoration: none;
}

.my-related-posts figure {
  margin: 0;
}

.my-related-posts img {
  width: 100%;
  height: auto;
  display: block;
}

.my-related-title {
  display: block;
  margin-top: 0.5em;
  font-size: 20px;
  line-height: 1.4;
}

.my-related-date {
  display: block;
  font-size: 0.9em;
  color: #555 !important;
  margin-top: 0.5em;
}

.post-meta-date {
  font-size: 0.9em;
  color: #555;
}

aside select {
  height: 63px !important;
}

.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-numbers span {
  display: inline-block;
  min-width: 2.5em;
  padding: 0.5em;
  margin: 0.25em;
  text-align: center;
  border: 1px solid #007070;
  border-radius: 4px;
  text-decoration: none;
  background: #fff;
  color: #007070;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: all 0.3s ease;
}

.wp-block-query-pagination-numbers a:hover {
  background: #004C4C;
  color: #fff;
  border-color: #004C4C;
}

.wp-block-query-pagination-numbers .current {
  background: #007070;
  color: #fff;
  border-color: #007070;
  font-weight: bold;
}

.wp-block-query-pagination-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em;
  line-height: 1.5;
}

/* oEmbedカードの親ブロックに対する最小限のoverflow制御 */
.wp-block-embed,
.wp-block-embed__wrapper,
.wp-embed,
figure.wp-block-embed {
  overflow: hidden !important;
}

/* iframeの最低限の安定高さだけ確保 */
.wp-embed iframe {
  width: 100%;
  min-height: 150px;
  display: block;
}

/* 変にレイアウトが崩れた場合の保険 */
.wp-block-embed {
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
}

/* パンくずリスト：共通スタイル */
nav.breadcrumb {
  font-size: 0.85rem;
  color: #666;
  max-width: var(--wp--style--global--wide-size, 100%);
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem 1.5rem 1rem;
  line-height: 1.6;
}

/* 目次 */
ul.simpletoc-list {
  padding: 1em 0.5em 1em 2.4em;
  background-color: #F2FBFB; 
  border: 1px solid #006666;
  color: #222222;
  border-radius: 6px;
  font-size: 0.95em;
}

ul.simpletoc-list li {
  padding: 0;
}


/* 区切り記号 */
nav.breadcrumb .separator {
  margin: 0 0.5em;
  color: #aaa;
}

/* 現在ページ（リンクでない最後の要素） */
nav.breadcrumb span:last-child {
  font-weight: bold;
  color: #333;
}

@media (max-width: 768px) {
  .wp-block-columns,
  .wp-block-column,
  .entry-content,
  .site-main {
    overflow-x: hidden;
    max-width: 100%;
  }

*, *::before, *::after {
  box-sizing: border-box;
}

img, iframe, input, select, table {
  max-width: 100%;
  width: 100%;
  display: block;
}

  img.custom-logo {
    width: 240px !important;
    height: auto;
    max-width: 100%;
  }

[class*="wp-block"] {
  max-width: 100vw;
}

   body {
     font-size: 1em;
     overflow-x: hidden;
   }

  .entry-content {
     font-size: 1em !important;
  }

  .entry-header {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }

  .wp-block-group.is-layout-constrained {
    padding-left: 1em;
    padding-right: 1em;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }
  
  header h1 {
     font-size: 1.4rem;
  }

  article h2 {
     font-size: 1.5rem;
  }

  article h3 {
     font-size: 1.4rem;
  }

  aside h2 {
     font-size: 1.4rem;
  }


  aside.single-post-bottom {
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box;
  }

  .my-related-posts {
    grid-template-columns: 1fr;
    gap: 0;
  }


}