/*
Theme Name: Research Followy Blog
Theme URI: https://local.research.followy.co.jp/
Author: Followy
Description: Research Followy 用のシンプルなブログテーマ（トップ／一覧／詳細のみ）
Version: 1.0.0
Text Domain: research-followy
*/

/* ベース */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  line-height: 1.7;
}

a {
  color: #1c7ed6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.inner {
  width: min(1000px, 100% - 32px);
  margin: 0 auto;
}

/* ヘッダー */
#siteHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow: hidden;
}

.siteHeaderBg {
  position: absolute;
  left: 50%;
  top: 0;
  width: 100vw;
  height: 112px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.siteHeaderBg img {
  width: 100%;
  height: 112px;
  display: block;
  opacity: 0.95;
}

#siteHeader .inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 112px;
  padding: 10px 0;
}

.siteTitle {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 600;
  color: inherit;
  margin-top: -25px;
  position: relative;
  padding-left: 40px;
}

.siteTitle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  background: no-repeat center / contain url("./assets/img/ico_research.svg");
}

.siteTitle span {
  display: inline-block;
}

.siteTitleMain {
  display: inline-block;
}

.siteTitleMain span {
  display: inline;
}

.siteTitle small {
  font-size: 0.8rem;
  color: #666;
}

.headerDecoration {
  flex: 0 0 auto;
  width: clamp(74px, 12vw, 126px);
}

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

.headerNav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}

.headerNav a {
  color: #333;
  font-weight: 500;
}

.headerNav a:hover {
  color: #1c7ed6;
}

/* メインビジュアル（トップ） */
#mainVisual {
  background: radial-gradient(circle at top left, #e7f5ff 0, #f8f9fa 55%, #f1f3f5 100%);
  padding: 64px 0 72px;
}

#mainVisual .inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

#mainVisual h1 {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  margin: 0 0 16px;
}

#mainVisual p {
  margin: 0;
  color: #444;
}

.mainVisualMeta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.9rem;
  color: #666;
}

.mainVisualTag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: rgba(28, 126, 214, 0.1);
  color: #1c7ed6;
  font-size: 0.8rem;
}

.mainVisualImage {
  justify-self: center;
  max-width: 320px;
}

/* セクション共通 */
section.sectionBlock {
  padding: 56px 0;
  background-color: #ffffff;
}

section.sectionBlock + section.sectionBlock {
  border-top: 1px solid #f1f3f5;
}

.sectionHeader {
  margin-bottom: 24px;
}

.sectionHeader h2 {
  font-size: 1.3rem;
  margin: 0 0 6px;
}

.sectionHeader small {
  display: inline-block;
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.sectionHeader p {
  margin: 12px 0 0;
  color: #555;
  font-size: 0.95rem;
}

/* 最新記事 (トップ)・一覧共通 */
.postList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.postListItem {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.postListItem:hover {
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.postListItem a {
  color: inherit;
  text-decoration: none;
}

.postMeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 0.82rem;
  color: #666;
}

.postMeta time {
  font-variant-numeric: tabular-nums;
}

.postCategory {
  padding: 2px 8px;
  border-radius: 999px;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  font-size: 0.75rem;
}

.postTitle {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

.postExcerpt {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

.postList.postListCards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.postList.postListCards .postListItem {
  padding: 0;
  overflow: hidden;
  border: 1px solid #e6ebf1;
  background-color: #fff;
}

.postCardLink {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.postCardThumb img,
.postCardThumbPlaceholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #e9ecef;
}

.postCardBody {
  padding: 12px 14px 14px;
}

.postCardBody .postMeta {
  margin-bottom: 6px;
}

.postCardBody .postTitle {
  margin-bottom: 0;
  line-height: 1.5;
}

/* 記事詳細 */
.singleWrapper {
  padding: 56px 0;
  background-color: #ffffff;
}

.singleHeader {
  margin-bottom: 24px;
}

.singleHeader h1 {
  line-height: 1.4;
  font-size: 1.7rem;
  margin: 0 0 10px;
}

.singleHeader.singleHeaderContact h1 {
  text-align: center;
}

.singleContent {
  font-size: 1.06rem;
  color: #222;
}

.singleContent > * + * {
  margin-top: 1.2em;
}

.singleContent h2 {
  font-size: 1.3rem;
  margin-top: 1.8em;
}

.singleContent h3 {
  font-size: 1.1rem;
  margin-top: 1.4em;
}

.singleContent ul,
.singleContent ol {
  padding-left: 1.4em;
}

.singleContent .article-lead {
  margin-bottom: 2em;
}

/* 目次（JSで自動生成） */
.singleContent .articleIndex {
  margin: 2.5em;
  padding: 1.25em 1.5em;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.singleContent .articleIndexTitle {
  margin: 0 0 0.75em;
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  letter-spacing: 0.05em;
}

.singleContent .articleIndexList {
  margin: 0;
  padding-left: 1.5em;
}

.singleContent .articleIndexList li {
  margin-bottom: 0.4em;
}

.singleContent .articleIndexList a {
  color: #333;
  text-decoration: none;
  position: relative;
}

.singleContent .articleIndexList a:hover {
  color: #000;
}


.singleContent .article-section {
  margin-top: 2.5em;
  padding-top: 1.5em;
}

.singleContent .article-section-heading {
  font-size: 1.25rem;
  margin: 0 0 0.6em;
  padding-bottom: 0.25em;
  border-bottom: 1px solid #e9ecef;
}

.singleContent .article-section-body {
  margin-bottom: 1em;
}

.singleContent .article-section-figure {
  margin: 0 0 1em;
}

.singleContent .article-section-figure img {
  max-width: 100%;
  height: auto;
}

.singleContent .article-section-body strong {
  font-weight: 600;
  background: linear-gradient(to bottom, transparent 60%, #e9ecef 60%);
}

.singleContent .article-section-body ul {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}

.singleContent .article-section-body ul li {
  margin-bottom: 0.35em;
}

/* 記事本文の装飾（モノトーン） */
.singleContent .article-lead {
  margin-bottom: 2.5em;
  padding: 1.3em 1.5em;
  font-size: 14px;
  color: #333;
}

.singleContent .article-body h2 {
  position: relative;
  margin-top: 2.4em;
  margin-bottom: 0.9em;
  padding-left: 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.singleContent .article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 3px;
  height: 1.4em;
  border-radius: 999px;
  background-color: #111;
}

.singleContent .article-body h3 {
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  font-size: 1.05rem;
  font-weight: 600;
  color: #222;
}

.singleContent .article-body p {
  margin: 0 0 1.1em;
}

.singleContent.contactContent .article-body > p {
  text-align: center;
}

.singleContent .article-body ul,
.singleContent .article-body ol {
  padding-left: 1.6em;
  margin: 0 0 1.1em;
}

.singleContent .article-body ul li,
.singleContent .article-body ol li {
  margin-bottom: 0.35em;
}

.singleContent .article-body ul li::marker {
  color: #666;
}

.singleContent .article-body ol {
  list-style-type: decimal;
}

.singleContent .article-body blockquote {
  margin: 1.8em 0;
  padding: 1.1em 1.25em;
  border-left: 3px solid #111;
  background-color: #f5f5f5;
  color: #333;
  font-style: italic;
}

.singleContent .article-body blockquote p:last-child {
  margin-bottom: 0;
}

.singleContent .article-body code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background-color: #f1f1f1;
  font-size: 0.9em;
}

.singleContent .article-body pre {
  margin: 1.6em 0;
  padding: 1em 1.2em;
  border-radius: 8px;
  background-color: #111;
  color: #f5f5f5;
  font-size: 0.9rem;
  overflow: auto;
}

.singleContent .article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 0.95rem;
}

.singleContent .article-body th,
.singleContent .article-body td {
  padding: 0.7em 0.8em;
  border: 1px solid #e2e2e2;
}

.singleContent .article-body th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.fixedDiagnosticToolButton {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fixedDiagnosticToolButton.isHidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.fixedDiagnosticToolButton a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid #0b5ed7;
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.fixedDiagnosticToolButton a:hover {
  opacity: 0.85;
  text-decoration: none;
}

.singleContent .articleDiagnosticInline {
  margin-top: 2.2em;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.singleContent .articleDiagnosticInline.isVisible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.singleContent .articleDiagnosticInline a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid #0b5ed7;
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.singleContent .articleDiagnosticInline a:hover {
  opacity: 0.9;
  text-decoration: none;
}

.singleNav {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.9rem;
}

.singleNav a {
  color: #495057;
}

.articleKeywords {
  margin-top: 3.4em;
  text-align: center;
}

.articleKeywordsTitle {
  margin: 0 0 0.8em;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
}

.singleContent .articleKeywordsList {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.singleContent .articleKeywordsList li {
  margin: 0;
}

.singleContent .articleKeywordsList span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  background: #f8fafc;
  color: #1f2937;
  font-size: 0.86rem;
  line-height: 1.35;
}

.relatedArticles {
  margin-top: 3.2em;
  text-align: center;
}

.relatedArticles .sectionHeader {
  margin-bottom: 1em;
  text-align: center;
}

.relatedArticles .postList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  justify-content: center;
}

.relatedArticles .postListItem {
  height: 100%;
  text-align: left;
}

.relatedArticles .postListItem a {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.relatedArticles .relatedItemThumb img,
.relatedArticles .relatedItemThumbPlaceholder {
  width: 104px;
  height: 90px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  background: #eef2f7;
}

.relatedArticles .relatedItemBody {
  min-width: 0;
}

.relatedArticles .postTitle {
  font-size: 0.9rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.backToList {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  margin-top: 28px;
}

.backToList::before {
  content: "←";
  font-size: 0.9rem;
}

/* ページネーション */
.pagination {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  margin: 0 3px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #495057;
  background-color: #f1f3f5;
}

.pagination .page-numbers.current {
  background-color: #1c7ed6;
  color: #ffffff;
}

.pagination .page-numbers:hover {
  background-color: #228be6;
  color: #ffffff;
}

/* フッター */
#siteFooter {
  background-color: #212529;
  color: #ced4da;
  padding: 28px 0 22px;
  text-align: center;
  font-size: 0.85rem;
}

#siteFooter .inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#siteFooter .footerLinks ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

#siteFooter .footerLinks li {
  margin: 0;
  padding: 0;
}

#siteFooter .footerLinks a {
  color: #ced4da;
}

#siteFooter .footerLinks a:hover {
  color: #ffffff;
}

#siteFooter small {
  color: #868e96;
}

/* お問い合わせフォーム（Contact Form 7） */
.contactFormArea {
  margin: 1.8em auto 0;
  width: 80%;
  max-width: 750px;
}

.contactFormArea h2 {
  margin: 0 0 1.2em;
  font-size: 1.25rem;
  line-height: 1.5;
}

.contactFormArea dl {
  margin: 0;
  padding: 18px 0;
  border-bottom: 1px solid #e5e7eb;
}

.contactFormArea dt {
  margin: 0 0 10px;
  font-weight: 600;
  color: #1f2937;
}

.contactFormArea dd {
  margin: 0;
}

.contactFormArea .required {
  display: inline-block;
  margin: -3px 0 0 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e03131;
  color: #fff;
  font-size: 0.72rem;
  line-height: 1.4;
  vertical-align: middle;
}

.contactFormArea input[type="text"],
.contactFormArea input[type="email"],
.contactFormArea input[type="tel"],
.contactFormArea select,
.contactFormArea textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  color: #111827;
}

.contactFormArea .selectList {
  position: relative;
}

.contactFormArea .selectList::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #6b7280;
  border-bottom: 2px solid #6b7280;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.contactFormArea select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.6em;
}

.contactFormArea textarea {
  min-height: 160px;
  resize: vertical;
}

.contactFormArea .wpcf7-list-item {
  margin: 0 14px 0 0;
}

.contactFormArea .wpcf7-list-item label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.contactFormArea #privacyCheck {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.contactFormArea #privacyCheck li {
  margin: 0;
  text-align: center;
}

.contactFormArea .formBtn {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.contactFormArea .formBtn .btnSubmit {
  margin: 0 auto;
  width: 340px;
}

.contactFormArea .formBtn input[type="submit"] {
  width: 100%;
  max-width: 340px;
  display: inline-flex;
  justify-content: center;
  border: 1px solid #0b5ed7;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
  padding: 12px 18px;
  cursor: pointer;
}

.contactFormArea .formBtn input[type="submit"]:disabled,
.contactFormArea .formBtn input[type="submit"].isDisabled {
  background: #9ca3af;
  border-color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.9;
}

.contactFormArea .wpcf7-spinner {
  display: block;
  margin-top: 12px;
}

.contactFormArea .recaptchaNotice {
  margin: 16px 0 0;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #6b7280;
  text-align: left;
}

.contactFormArea .recaptchaNotice a {
  color: #4b5563;
  text-decoration: underline;
}

.grecaptcha-badge {
  visibility: hidden !important;
}

#contactComplete {
  margin-top: 8px;
  padding: 22px 0 0;
}

#contactComplete h2 {
  margin: 0 0 1em;
  font-size: 1.45rem;
  text-align: center;
}

#contactComplete .confirmTxt {
  margin: 0 0 1.2em;
  text-align: center;
  line-height: 1.9;
}

#contactComplete dl {
  margin: 0;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
}

#contactComplete dl dt {
  margin: 0 0 8px;
  font-weight: 600;
}

#contactComplete dl dd {
  margin: 0;
}

#contactComplete dl dd ul {
  margin: 0;
  padding-left: 1.3em;
}

#contactComplete dl dd li {
  margin: 0.4em 0;
}

#contactComplete #btnTop {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

#contactComplete #btnTop a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid #0b5ed7;
  background: #0d6efd;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

#contactComplete #btnTop a:hover {
  opacity: 0.9;
  text-decoration: none;
}

/* レスポンシブ */
@media (max-width: 768px) {
  #mainVisual {
    padding: 42px 0 48px;
  }

  #mainVisual .inner {
    grid-template-columns: minmax(0, 1fr);
  }

  #siteHeader {
    overflow: hidden;
  }

  .siteHeaderBg {
    width: 100vw;
    min-width: 0;
    height: 92px;
  }

  #siteHeader .inner {
    flex-wrap: wrap;
    gap: 8px 12px;
    min-height: 92px;
    padding: 6px 0;
  }

  .siteHeaderBg img {
    width: 150vw;
    max-width: 150vw;
    height: 92px;
    margin: 0 auto;
  }

  .siteTitle {
    margin-top: 0;
    padding-left: 45px;
  }

  .siteTitle::before {
    width: 42px;
    height: 42px;
  }

  .siteTitleMain {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.25;
  }

  .siteTitleMain span {
    display: block;
  }

  .headerDecoration {
    width: 68px;
    margin-left: auto;
  }

  .headerNav ul {
    gap: 14px;
    flex-wrap: wrap;
  }

  .singleHeader h1 {
    line-height: 1.4;
    font-size: 1.5rem;
  }

  .singleContent .articleIndex {
    margin: 2.5em 0;
  }

  .singleContent .articleIndexTitle {
    font-size: 0.76rem;
  }

  .singleContent .articleIndexList {
    font-size: 0.76rem;
    padding-left: 1.25em;
  }

  .singleContent .articleIndexList li {
    margin-bottom: 0.3em;
  }

  .relatedArticles .postList {
    grid-template-columns: minmax(0, 1fr);
  }

  .postList.postListCards {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .postList.postListCards .postListItem {
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  }

  .relatedArticles .postListItem a {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
  }

  .relatedArticles .relatedItemThumb img,
  .relatedArticles .relatedItemThumbPlaceholder {
    width: 92px;
    height: 23vw;
  }

  .singleContent .articleKeywordsList {
    justify-content: flex-start;
  }

  .fixedDiagnosticToolButton {
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    width: calc(100% - 24px);
  }

  .fixedDiagnosticToolButton.isHidden {
    transform: translateX(-50%) translateY(8px);
  }

  .fixedDiagnosticToolButton a {
    width: 100%;
    min-width: 0;
  }

  .singleContent .articleDiagnosticInline a {
    width: 100%;
    min-width: 0;
  }

  .contactFormArea {
    width: 100%;
  }
  
  .contactFormArea dl {
    padding: 14px 0;
  }

  #contactComplete #btnTop a {
    width: 100%;
    min-width: 0;
  }

}

