/* ============================================================
   single.css — 通常投稿・固定ページ共通スタイル
   サイドバーレイアウト（PC: 8:2 / モバイル: メインのみ）
   ※ ヘッダー・フッターは base.css のみで管理
   ============================================================ */

/* ========================================
   ヒーロー（sand背景・全幅）
   ======================================== */
.single-hero {
  background: #f4f0e8;
  padding: 40px 0 48px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin: 0;
}

.single-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* パンくず */
.single-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  font-size: 12px;
  color: rgba(26,26,46,0.5);
}

.single-breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.single-breadcrumb__item::after {
  content: '/';
  color: rgba(26,26,46,0.3);
}

.single-breadcrumb__item:last-child::after {
  display: none;
}

.single-breadcrumb__item a {
  color: rgba(26,26,46,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.single-breadcrumb__item a:hover {
  color: #c0392b;
}

/* カテゴリーバッジ */
.single-hero__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.single-hero__cat {
  display: inline-block;
  background: rgba(26,26,46,0.06);
  border: 1px solid rgba(26,26,46,0.12);
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #1a1a2e;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.2s;
}

.single-hero__cat:hover {
  background: rgba(26,26,46,0.1);
}

/* タイトル */
.single-hero__title {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.45;
  margin: 0 0 16px;
}

/* メタ情報 */
.single-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: rgba(26,26,46,0.5);
}

.single-hero__date,
.single-hero__modified {
  display: inline-flex;
  align-items: center;
}

.single-hero__read-time {
  background: rgba(26,26,46,0.06);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
}

/* ========================================
   アウター（cream背景）
   ======================================== */
.single-outer {
  background: #f8f6f1;
  padding: 48px 0 80px;
}

/* ========================================
   2カラムレイアウト（PC: 8:2）
   ======================================== */
.single-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

/* モバイル：1カラム・サイドバー非表示 */
@media (max-width: 1023px) {
  .single-layout {
    grid-template-columns: 1fr;
  }

  .single-sidebar {
    display: none;
  }
}

/* ========================================
   メインカラム
   ======================================== */
.single-main {
  min-width: 0;
}

/* アイキャッチ */
.single-thumb {
  margin-bottom: 28px;
}

.single-thumb__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* インラインCTA */
.single-cta-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(26,26,46,0.1);
  border-left: 4px solid #c0392b;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 28px;
}

@media (min-width: 600px) {
  .single-cta-inline {
    flex-direction: row;
    justify-content: space-between;
  }
}

.single-cta-inline__text {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a2e;
  margin: 0;
}

.single-cta-inline__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  background: #c0392b;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.single-cta-inline__btn:hover {
  background: #a93226;
}

/* 目次 */
.single-toc {
  background: #fff;
  border: 1px solid rgba(26,26,46,0.1);
  border-radius: 6px;
  padding: 18px 22px;
  margin-bottom: 28px;
}

.single-toc__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.single-toc__title {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
}

.single-toc__toggle {
  background: transparent;
  border: 1px solid rgba(26,26,46,0.15);
  border-radius: 3px;
  padding: 3px 10px;
  font-size: 11px;
  color: rgba(26,26,46,0.5);
  cursor: pointer;
  transition: all 0.2s;
}

.single-toc__toggle:hover {
  border-color: #1a1a2e;
  color: #1a1a2e;
}

.single-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.single-toc.is-closed .single-toc__list {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

.single-toc.is-closed .single-toc__header {
  margin-bottom: 0;
}

.single-toc__item {
  font-size: 13px;
  line-height: 1.5;
}

.single-toc__item--h3 {
  padding-left: 1rem;
}

.single-toc__item a {
  color: #1a1a2e;
  text-decoration: none;
  transition: color 0.2s;
}

.single-toc__item a:hover {
  color: #c0392b;
}

/* 本文 */
.single-content-wrap {
  background: #fff;
  border-radius: 6px;
  padding: 32px;
}

.single-content {
  max-width: 100%;
}

.entry-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  border-left: 4px solid #c0392b;
  padding-left: 12px;
  margin: 36px 0 16px;
  line-height: 1.45;
}

.entry-content h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 28px 0 12px;
  line-height: 1.5;
}

.entry-content p {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(26,26,46,0.85);
  margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(26,26,46,0.85);
}

.entry-content li {
  margin-bottom: 6px;
}

.entry-content a {
  color: #c0392b;
  text-decoration: underline;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 24px auto;
}

.entry-content blockquote {
  border-left: 3px solid rgba(26,26,46,0.2);
  padding: 12px 20px;
  margin: 24px 0;
  background: #f8f6f1;
  font-size: 14px;
  color: rgba(26,26,46,0.7);
}

/* タグ */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(26,26,46,0.08);
}

.single-tag {
  display: inline-block;
  border: 1px solid rgba(26,26,46,0.15);
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 12px;
  color: rgba(26,26,46,0.6);
  text-decoration: none;
  transition: all 0.2s;
}

.single-tag:hover {
  border-color: #1a1a2e;
  color: #1a1a2e;
  background: rgba(26,26,46,0.04);
}

/* 記事下CTA */
.single-cta-main {
  background: #1a1a2e;
  border-radius: 6px;
  padding: 40px 32px;
  margin-top: 32px;
  text-align: center;
}

.single-cta-main__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

.single-cta-main__title {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 16px;
}

.single-cta-main__desc {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.single-cta-main__btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 600px) {
  .single-cta-main__btns {
    flex-direction: row;
    justify-content: center;
  }
}

.single-cta-main__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.single-cta-main__btn--primary {
  background: #c0392b;
  color: #fff;
  border: none;
}

.single-cta-main__btn--primary:hover {
  background: #a93226;
}

.single-cta-main__btn--sub {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.4);
  color: rgba(255,255,255,0.85);
}

.single-cta-main__btn--sub:hover {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.08);
}

.single-cta-main__note {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 14px;
}

/* 関連記事（メインカラム内） */
.single-related {
  margin-top: 40px;
}

.single-related__title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1a1a2e;
}

.single-related__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 関連記事カード */
.s-card {
  display: flex;
  gap: 16px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s;
  padding: 14px;
}

.s-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.s-card__thumb {
  flex-shrink: 0;
  width: 100px;
  aspect-ratio: 16/9;
  background: #f4f0e8;
  border-radius: 4px;
  overflow: hidden;
}

.s-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.s-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e4dc;
}

.s-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.s-card__date {
  font-size: 11px;
  color: rgba(26,26,46,0.45);
  margin-bottom: 4px;
}

.s-card__title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   サイドバー（PC のみ）
   ======================================== */
.single-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ウィジェット */
.sidebar-widget {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(26,26,46,0.08);
}

.sidebar-widget__head {
  background: #1a1a2e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 10px 16px;
}

.sidebar-widget__body {
  padding: 0;
}

/* サイドバー記事アイテム */
.sidebar-post {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(26,26,46,0.06);
  transition: background 0.2s;
}

.sidebar-post:last-child {
  border-bottom: none;
}

.sidebar-post:hover {
  background: #f8f6f1;
}

.sidebar-post__thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  background: #f4f0e8;
}

.sidebar-post__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-post__img-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e4dc;
}

.sidebar-post__body {
  flex: 1;
  min-width: 0;
}

.sidebar-post__title {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.5;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post__date {
  font-size: 10px;
  color: rgba(26,26,46,0.4);
}

/* ========================================
   base.css の body.single / body.page margin 上書き
   ======================================== */
body.single .keikyo-interview-header,
body.page .keikyo-interview-header {
  margin-bottom: 0 !important;
}

body.single .keikyo-interview-site-footer,
body.page .keikyo-interview-site-footer {
  margin-top: 0 !important;
}

/* ========================================
   アクセシビリティ
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .single-cta-inline__btn,
  .single-toc__list,
  .single-tag,
  .s-card,
  .sidebar-post {
    transition: none !important;
  }
}

:focus-visible {
  outline: 2px solid #c0392b;
  outline-offset: 2px;
}

/* ========================================
   site-main / #main をフル幅にリセット
   （category.css と同じ対処）
   ======================================== */
body.single .site-main,
body.single #main,
body.page .site-main,
body.page #main {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* ========================================
   base.css のヘッダー・フッター余白を上書き
   ======================================== */
body.single .keikyo-interview-header,
body.page .keikyo-interview-header {
  margin-bottom: 0 !important;
}

body.single .keikyo-interview-site-footer,
body.page .keikyo-interview-site-footer {
  margin-top: 0 !important;
}
