/*
Theme Name: サガカケ テーマ
Theme URI: https://example.com/
Author: Your Name
Version: 1.0
Description: サガカケのオリジナルWordPressテーマ
*/

@charset "utf-8";

/* single-post レイアウト */
.single-post {
  width: 100%; /* 幅はまず100% */
  max-width: 1000px; /* ここで最大幅を制限 */
  margin: 0 auto; /* 真ん中に寄せる */
  padding: 100px 20px 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* single-post レイアウト */
.single-post p{
 margin-bottom:15px;
}

/* ── ヘッダーエリア ── */
.single-post__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1; /* ロゴより下に */
}
.single-post__logo {
  position: absolute;
  top: 0px; /* header の上に 150px 持ち上げる */
  z-index: 10; /* header より上に */
}
.single-post__logo img {
  height: 400px;
  width: auto;
  display: block;
}
@media (max-width: 768px) {
  .single-post__logo {
    position: absolute;
    top: 10px; /* header の上に 150px 持ち上げる */
    left: 10px;
    transform: translateX(0%);
    z-index: 0; /* header より上に */
  }
  .single-post__logo img {
    height: 60px;
    width: auto;
    display: block;
  }
}
/* ── パンくず ── */
.single-post__breadcrumbs {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 16px;
	text-decoration: none;
}
.single-post__breadcrumbs a,
.archive-post__breadcrumbs a,
.single-post__breadcrumbs a:link,
.archive-post__breadcrumbs a:visited,
.single-post__breadcrumbs a:active,
.archive-post__breadcrumbs a:active {
  color: #48B7D1;
  text-decoration: none;
}

.single-post__breadcrumbs a:hover,
.archive-post__breadcrumbs a:hover {
  text-decoration: underline;
}
/* ３．ヘッダー・フッター以外を伸長させる */
main {
  flex: 1;
}
/* ── タイトル ── */
.single-post__title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 24px;
  line-height: 1.3;
}
/* ── 本文 ── */
.single-post__content {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 40px;
  flex: 1;
}
.single-post__content img {
  max-width: 100%;
  height: auto;
  margin: 1.5em 0;
}
/* ── ページ送り ── */
.single-post__pager {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-top: 40px;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}
.pager__prev a, .pager__next a {
  color: #48B7D1;
  text-decoration: none;
}
.pager__prev a:hover, .pager__next a:hover {
  text-decoration: underline;
}
/* ── レスポンシブ ── */
@media (max-width: 768px) {
  .single-post {
    padding: 100px 16px 60px;
  }
  .single-post__title {
    font-size: 1.6rem;
  }
  .single-post__pager {
    flex-direction: column;
    gap: 12px;
  }
}
.archive-grid {
  width: 800px;
  margin: 80px auto;
}
.archive-grid__list {
  display: flex;
  flex-wrap: wrap;
  /* gapを変数化して計算に使う */
  --gap: 2vw;
  gap: var(--gap);
  margin: 40px 0;
}
.archive-grid__item {
  /* 幅は width ではなく flex-basis で列幅を指定 */
  flex: 0 0 calc((100% - (var(--gap) * 2)) / 3); /* 3列 */
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 30px; /* 任意。gapと二重にならないよう注意 */
  box-shadow: 0 2px 10px #0001;
  transition: box-shadow .2s;
  display: flex;
  flex-direction: column;
  min-width: 0; /* はみ出し対策 */
}
.archive-grid__item:hover {
  box-shadow: 0 4px 18px #0002;
}
.archive-grid__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.archive-grid__thumb img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}
.archive-grid__meta {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
}
.archive-grid__date {
  font-size: 0.93em;
  color: #888;
}
.archive-grid__item-title {
  font-size: 1.08em;
  font-weight: bold;
  margin: 0;
  flex: 1 1 auto;
  word-break: break-word;
  line-height: 1.4;
}
/* 2列（タブレット以下） */
@media (max-width: 768px) {
  .archive-grid__item {
    /* 2列 = (100% - gap*1) / 2 */
    flex-basis: calc((100% - var(--gap)) / 2);
  }
  .archive-grid {
    width: 90%;
    margin: 60px auto;
  }
}

.sns-share {
  display: flex;
  gap: 20px;
  margin: 20px 0 0;
}
.sns-share__item {
  text-decoration: none;
  color: #555;
  font-size: 1em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .2s;
}
.sns-share__item.x:hover { color: #000000; }
.sns-share__item.twitter:hover { color: #1da1f2; }
.sns-share__item.facebook:hover { color: #3b5998; }
.sns-share__item.line:hover { color: #06c755; }
.sns-share__item i {
  font-size: 1.3em;
}
.single-post__content a {
  color: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  position: relative;
  transition: all 0.25s ease;
}

.single-post__content a:hover {
  text-decoration-color: transparent; /* 下線だけフェードアウト */
}