/*
Theme Name: Heian Original Theme
Version: 1.0.0
*/

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

body {
  margin: 0;
  color: #222;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  line-height: 1.8;
  background: #fffdf8;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all .25s ease-out;
}

a:hover {
	opacity: .6;
	filter: brightness(110%);
}

@media (max-width:1024px) {
  a:active {
    transform: translateY(1px) scale(0.98);
    opacity: 0.85;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}


/* その他
=============================== */
/*参考情報紹介のスタイル*/
.reference_box{
  margin-bottom: 40px;
  padding: 24px;
  border: solid 4px #d9d9d9;
}
 .reference_box p{
  margin: 0;
}
 .reference_txt{
  margin-bottom: 2em;
}
 .reference_title{
  font-size: 1.2em;
  font-weight: bold;
}
 .reference_article_title{
  font-weight: bold;
}
 .reference_article ul li{
  font-size: 85%!important;
}
 
/*記事ページの参考情報紹介のスタイル*/
.single_reference{
  margin-bottom: 40px;
  padding: 24px;
  border: solid 4px #d9d9d9;
}
.single_reference_title{
  font-size: 1em;
  font-weight: bold;
}
.single_reference_txt{
  font-size: 85%;
  margin-bottom: 1em;
}
.single_reference_other{
  margin-bottom: 0;
}
.single_reference_other a{
  font-size: 85%;
}
 .reference_head{
  font-size: 1em!important;
  padding-bottom: 0.5em!important;
  border-bottom: solid 1px #d9d9d9!important;
  margin-bottom: 8px!important;
}
  
/*記事ページの補足のスタイル*/
.supplement{
  margin-bottom: 2em;
  padding: 1em;
  border: 2px solid #a3cdff;
}
.supplement p{
  font-size: 90%;
  margin-bottom: 0em;
}


/* パンくずリスト
=============================== */
.breadcrumb {
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.6;
}

.breadcrumb_list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb_item {
  color: #666;
}

.breadcrumb_item a {
  color: #666;
  text-decoration: none;
}

.breadcrumb_item a:hover {
  text-decoration: underline;
}

.breadcrumb_separator {
  color: #999;
}

.breadcrumb_home_link,
.breadcrumb_home_icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.breadcrumb_home_icon {
  width: 14px;
  height: 14px;
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
}

.breadcrumb_home_link {
  display: inline-flex;
  align-items: center;
}


/* ヘッダー
=============================== */
.site_header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site_header_inner,
.top_pickup_inner,
.content_wrap{
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site_header_inner {
  display: block;
  padding: 18px 0;
  gap: 20px;
}

.site_logo a {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.global_nav_list,
.footer_nav {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.global_nav_list a,
.footer_nav a {
  font-size: 14px;
}

.top_pickup {
  padding: 28px 0;
  background: #f7f1e6;
}

.top_pickup_list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.top_pickup_item,
.section_post_card{
  background: #fff;
  border: 1px solid #e5dccf;
}

.top_pickup_content,
.section_post_body,
.sidebar_box {
  padding: 16px;
}

.top_pickup_title,
.section_post_title {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
}

.content_wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  padding: 40px 0 64px;
  background: #fff;
}

.top_section + .top_section {
  margin-top: 56px;
}

.section_heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid #b89b5e;
  padding-bottom: 10px;
}

.section_heading h2{
  margin: 0;
  font-size: 28px;
  line-height: 1.4;
}

.section_heading .section_more{
  margin: 0;
}

.section_heading .section_more a::after{
  content: ">";
  display: inline-block;
  font-size: 12px;
  margin-left: 6px;
}

.section_posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.section_post_cat {
  margin: 0 0 8px;
  font-size: 13px;
  color: #866c35;
}

@media (max-width:1024px) {
  .global_nav {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .global_nav_list {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    gap: 32px;
    padding: 0;
  }

  .global_nav_list li {
    flex: 0 0 auto;
  }

  .global_nav_list a {
    display: block;
    white-space: nowrap;
  }

  .global_nav::-webkit-scrollbar {
    display: none;
  }
}


/* TOPページ
=============================== */
.content_main{ 
}

@media (max-width:1024px) {
  .content_main{
    width: calc(100% - 32px);
    margin: 0 auto;
  }

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

  .section_post_title{
    font-size: 16px;
  }
  
  
}


/* 記事ページ
=============================== */
.single_page {
  padding: 30px 0 80px;
  background: #fff;
}

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.content_wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.main_content {
  min-width: 0;
}

.single_article {
  background: #fff;
}

.single_header {
  margin-bottom: 24px;
}

.single_title {
  font-size: 30px;
  line-height: 1.5;
  font-weight: 700;
  color: #222;
  margin: 0 0 16px;
}

.single_meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #777;
  margin-bottom: 20px;
}

.single_category a {
  display: inline-block;
  padding: 4px 10px;
  background: #4b1fa3;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  border-radius: 2px;
}

.single_thumbnail {
  margin-bottom: 30px;
}

.single_thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.single_content {
  font-size: 16px;
  line-height: 2;
  color: #333;
}

.single_content p {
  margin: 0 0 1.8em;
}

.single_content h2 {
  font-size: 22px;
  line-height: 1.6;
  color: #fff;
  background: #4b1fa3;
  padding: 12px 16px;
  margin: 56px 0 24px;
}

.single_content h3 {
  font-size: 18px;
  line-height: 1.7;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid #4b1fa3;
}

.single_content img {
  max-width: 100%;
  height: auto;
}

.single_content ul,
.single_content ol {
  margin: 0 0 1.8em 1.5em;
}

.single_content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.single_content th,
.single_content td {
  border: 1px solid #ddd;
  padding: 12px;
}

.single_share {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 50px;
}

.share_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
}

.share_x {
  background: #222;
}

.share_facebook {
  background: #1877f2;
}

.share_hatena {
  background: #00a4de;
}

.single_pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}

.single_pagination_prev a,
.single_pagination_next a {
  display: block;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  line-height: 1.7;
}

.single_pagination_next {
  text-align: right;
}

.related_posts {
  margin-top: 60px;
}

.related_posts_title {
  font-size: 18px;
  color: #222;
  margin: 0 0 20px;
  padding: 10px 14px;
  background: #f1f1f1;
}

.related_posts_grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.related_post_link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.related_post_thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.related_post_body {
  padding-top: 10px;
}

.related_post_title {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.related_post_date {
  font-size: 12px;
  color: #777;
}

@media (max-width: 1024px) {
  .content_wrap {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .single_title {
    font-size: 24px;
  }

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

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


/* 固定ページ
=============================== */
.page_layout {
  padding: 30px 0 80px;
  background: #ffffff;
}

.page_wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.page_main {
  min-width: 0;
}

.page_article {
  background: #fff;
}

.page_header {
  margin-bottom: 24px;
}

.page_title {
  font-size: 30px;
  line-height: 1.5;
  font-weight: 700;
  color: #222;
  margin: 0 0 20px;
}

.page_thumbnail {
  margin-bottom: 30px;
}

.page_thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.page_content {
  font-size: 15px;
  line-height: 2;
  color: #333;
}

.page_content p {
  margin: 0 0 1.8em;
}

.page_content h2 {
  font-size: 22px;
  line-height: 1.6;
  color: #fff;
  background: #4b1fa3;
  padding: 12px 16px;
  margin: 56px 0 24px;
}

.page_content h3 {
  font-size: 18px;
  line-height: 1.7;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid #4b1fa3;
}

.page_content h4 {
  font-size: 16px;
  line-height: 1.7;
  margin: 32px 0 12px;
  font-weight: 700;
}

.page_content img {
  max-width: 100%;
  height: auto;
}

.page_content ul,
.page_content ol {
  margin: 0 0 1.8em 1.5em;
}

.page_content li {
  margin-bottom: 0.6em;
}

.page_content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.page_content th,
.page_content td {
  border: 1px solid #ddd;
  padding: 12px;
}

.page_content a {
  color: #4b1fa3;
  text-decoration: underline;
}

.page_content blockquote {
  margin: 24px 0;
  padding: 20px;
  background: #f7f7f7;
  border-left: 4px solid #4b1fa3;
}

@media (max-width: 900px) {
  .page_wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page_title {
    font-size: 24px;
  }

  .page_layout {
    padding: 20px 0 60px;
  }
}


/* サイドバー
=============================== */
.sidebar_section {
  margin-bottom: 32px;
}

.sidebar_title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.sidebar_section .sidebar_category_list{
  list-style-type: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 1024px) {
  .sidebar_section{
    width: calc(100% - 32px);
    margin: 0 auto;
    margin-bottom: 32px;
  }
}

/* ===============================
  新着記事（ランキングと同じUI）
=============================== */
.sidebar_recent_list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar_recent_item {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 16px;
}

.sidebar_recent_link {
  display: flex;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.sidebar_recent_thumb {
  width: 90px;
  min-width: 90px;
}

.sidebar_recent_thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.sidebar_recent_title{
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
}

.sidebar_recent_body {
  flex: 1;
}

/* ===============================
  人気の記事
=============================== */
.sidebar_ranking_list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar_ranking_item {
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 16px;
}

.sidebar_ranking_link {
  display: flex;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.sidebar_ranking_thumb {
  width: 90px;
  min-width: 90px;
}

.sidebar_ranking_thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.sidebar_ranking_body {
  flex: 1;
}

.sidebar_ranking_title {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 700;
}

.sidebar_ranking_pv {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}


/* アーカイブページ
=============================== */
.archive_page {
  padding: 24px 0 64px;
  background: #ffffff;
}

.archive_container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.archive_content_wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}

.archive_header {
  margin-bottom: 24px;
}

.archive_title {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
}

.archive_description {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

.archive_post_list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.archive_post_item {
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e5e5;
}

.archive_post_link {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.archive_post_thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.archive_post_title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
}

.archive_post_meta {
  margin-bottom: 8px;
  font-size: 12px;
  color: #777;
}

.archive_post_excerpt {
  font-size: 13px;
  line-height: 1.8;
  color: #333;
}

.archive_pagination {
  margin-top: 32px;
}

.archive_pagination .nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.archive_pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #333;
  font-size: 13px;
}

.archive_pagination .page-numbers.current {
  background: #333;
  color: #fff;
  border-color: #333;
}

.archive_no_post {
  font-size: 14px;
  line-height: 1.8;
}

@media (max-width: 1024px) {
  .archive_post_list{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .archive_content_wrap {
    grid-template-columns: 1fr;
  }

  .archive_post_link {
    grid-template-columns: 1fr;
  }
  .archive_post_title {
    font-size: 16px;
  }
}


/* フッター
=============================== */
.site_footer {
  background: #242424;
  color: #fff;
  padding: 32px 0;
}

.site_footer_inner{
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site_footer_logo a {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.copyright {
  margin: 20px 0 0;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .top_pickup_list,
  .content_wrap {
    grid-template-columns: 1fr;
  }

  .site_header_inner {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* 404ページ
=============================== */
.error_404_layout {
  padding: 30px 0 80px;
}

.error_404_wrap {
  max-width: 840px;
}

.error_404_main {
  min-width: 0;
}

.error_404_box {
  padding: 48px 32px;
  border: 1px solid #ddd;
  background: #fff;
  text-align: center;
  margin-bottom: 48px;
}

.error_404_code {
  margin: 0 0 12px;
  font-size: 56px;
  line-height: 1;
  font-weight: 700;
  color: #4b1fa3;
}

.error_404_title {
  margin: 0 0 20px;
  font-size: 30px;
  line-height: 1.5;
  color: #222;
}

.error_404_text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 2;
  color: #555;
}

.error_404_buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.error_404_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 46px;
  padding: 0 20px;
  background: #4b1fa3;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.3s ease;
}

.error_404_button:hover {
  opacity: 0.85;
}

.error_404_button_sub {
  background: #777;
}

.error_404_section {
  margin-top: 48px;
}

.error_404_section_title {
  margin: 0 0 20px;
  padding: 10px 16px;
  background: #4b1fa3;
  color: #fff;
  font-size: 18px;
  line-height: 1.5;
}

.error_404_category_list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.error_404_category_link {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.error_404_category_link:hover {
  border-color: #4b1fa3;
  color: #4b1fa3;
}

.error_404_posts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.error_404_post_link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.error_404_post_thumbnail img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.error_404_post_body {
  padding-top: 10px;
}

.error_404_post_date {
  margin: 0 0 6px;
  font-size: 12px;
  color: #777;
}

.error_404_post_title {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #222;
}

@media (max-width: 900px) {
  .error_404_posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .error_404_layout {
    padding: 20px 0 60px;
  }

  .error_404_box {
    padding: 36px 20px;
  }

  .error_404_code {
    font-size: 42px;
  }

  .error_404_title {
    font-size: 24px;
  }

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