/*
 * Theme Name: My Hack Academy Custom
 * Author: Seiryu Uehata
 * Description: My Hack Academy Custom Theme
 * Version: 2.0.1
 */

/* デフォルト：スマホ用（2列） */
:root {
  --theme-primary: #111111;
  --theme-accent: #c2185b;
  --theme-bg: #f7f6f2;
  --theme-display: "Cormorant Garamond", serif;
  --theme-body: "Source Serif 4", serif;
}

body {
  color: var(--theme-primary);
  font-family: var(--theme-body);
  background: var(--theme-bg);
}

h1,
h2,
h3,
h4 {
  font-family: var(--theme-display);
  letter-spacing: 0.01em;
  font-feature-settings: "lnum" 1, "pnum" 1;
  font-variant-numeric: lining-nums proportional-nums;
}

.navbar-nav {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  text-align: left !important;
}

/* PC用（768px以上）：横並び */
@media (min-width: 768px) {
  .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-end !important;
  }
}

/* ナビゲーションのリンク文字色 */
.navbar-nav .nav-link {
  color: #333333 !important;
  font-weight: bold !important;
  font-family: var(--theme-body);
  transition: color 0.3s ease !important;
}

.custom-logo-link {
  display: inline-flex;
  margin-right: 10px;
}

.custom-logo-link img {
  height: 32px;
  width: auto;
}

.navbar-brand .site-title {
  display: inline-block;
  margin-left: 8px;
}

/* ホバー時に色を変える */
.navbar-nav .nav-link:hover {
  color: var(--theme-accent) !important;
}

/* アクティブなメニュー項目の色 */
.navbar-nav .nav-item.current-menu-item .nav-link,
.navbar-nav .nav-link.active {
  color: var(--theme-accent) !important;
}

/* アーカイブ */
.archive .card {
  border: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  height: 250px;
  transition: transform 0.2s ease;
  width: 100%;
}

.archive .card:hover {
  transform: translateY(-10px);
}

.archive .card-body {
  align-items: center;
  display: flex;
  height: 70px;
  justify-content: center;
  text-align: center;
}

.archive .card-img-top {
  height: 180px;
  object-fit: cover;
}

@media (max-width: 765px) {
  .archive .col-md-6 {
      flex: 0 0 100%;
      max-width: 100%;
  }
}

/* アーカイブ説明 */
.archive-intro {
  margin: 1.5rem 0 2.2rem;
}

.archive-intro-inner {
  background: linear-gradient(135deg, #ffffff 0%, #f4efe6 100%);
  border: 1px solid #e5dfd3;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
}

.archive-intro-inner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(194, 24, 91, 0.18) 0%, rgba(194, 24, 91, 0) 65%);
  pointer-events: none;
}

.archive-intro-label {
  color: #8c7d69;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.archive-intro-title {
  font-size: 1.8rem;
  margin: 0 0 0.8rem;
}

.archive-intro-body {
  color: #3d3a34;
  font-size: 1rem;
  line-height: 1.8;
  overflow: hidden;
}

.archive-intro-body p:last-child {
  margin-bottom: 0;
}

.archive-intro.is-collapsed .archive-intro-body {
  overflow: hidden;
  position: relative;
}

.archive-intro.is-expanded .archive-intro-body {
  overflow: auto;
}

.archive-intro.is-collapsed .archive-intro-body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #f4efe6 100%);
}

.archive-intro-toggle {
  align-items: center;
  background: #17130d;
  border: none;
  border-radius: 999px;
  color: #f7f1e6;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 600;
  gap: 0.6rem;
  letter-spacing: 0.12em;
  margin-top: 1rem;
  padding: 0.65rem 1.4rem;
  text-transform: uppercase;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.archive-intro-toggle::after {
  content: "↘";
  display: inline-block;
  transition: transform 0.2s ease;
}

.archive-intro:not(.is-collapsed) .archive-intro-toggle::after {
  content: "↗";
}

.archive-intro-toggle:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
  background: #221a12;
}

header.masthead .archive-intro {
  margin: 1.8rem 0 0;
  position: sticky;
  top: 120px;
  z-index: 3;
}

header.masthead .archive-intro-inner {
  background: rgba(18, 16, 12, 0.72);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color: #f7f1e6;
  backdrop-filter: blur(10px);
}

header.masthead .archive-intro-inner::after {
  background: radial-gradient(circle, rgba(247, 241, 230, 0.2) 0%, rgba(247, 241, 230, 0) 65%);
}

header.masthead .archive-intro-title {
  color: #fff8ec;
}

header.masthead .archive-intro-body {
  color: #f2e9d8;
}

header.masthead .archive-intro-toggle {
  background: #f7f1e6;
  color: #1f1710;
}

header.masthead .archive-intro-toggle:hover {
  background: #fff7e9;
  color: #1f1710;
}

.pagination-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin: 2rem 0 1rem;
}

.pagination-modern-edge {
  display: flex;
  align-items: center;
  min-width: 96px;
  height: 36px;
}

.pagination-modern-edge.is-prev {
  justify-content: flex-start;
}

.pagination-modern-edge.is-next {
  justify-content: flex-end;
}

.pagination-modern-list {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  flex: 1;
}

.pagination-modern-item a,
.pagination-modern-item span,
.pagination-modern-edge a,
.pagination-modern-edge span {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  line-height: 1;
  padding: 0 12px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  color: #3b3328;
  border: 1px solid #e0d8cb;
  background: #fff;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pagination-modern-edge a {
  min-width: 96px;
  white-space: nowrap;
}

.pagination-modern-edge:empty::before {
  content: "";
  display: inline-block;
  width: 96px;
  height: 36px;
}

.pagination-modern-item a:hover {
  border-color: #cbbda8;
  background: #f4efe6;
  color: #221a12;
}

.pagination-modern-item.is-current span {
  background: #12100c;
  border-color: #12100c;
  color: #f6f1e7;
}

.pagination-modern-status {
  color: #7a6c57;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  text-align: center;
  width: 100%;
  order: 2;
}

@media (max-width: 768px) {
  .archive-intro-inner {
    padding: 1.6rem;
  }
  .archive-intro-title {
    font-size: 1.5rem;
  }
  header.masthead .archive-intro {
    position: static;
  }
  .pagination-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "prev next"
      "list list"
      "status status";
    align-items: center;
    row-gap: 0.8rem;
  }
  .pagination-modern-edge.is-prev {
    grid-area: prev;
    justify-content: flex-start;
  }
  .pagination-modern-edge.is-next {
    grid-area: next;
    justify-content: flex-end;
  }
  .pagination-modern-edge {
    min-width: 0;
  }
  .pagination-modern-edge:empty::before {
    width: 0;
    height: 0;
  }
  .pagination-modern-list {
    grid-area: list;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.6rem;
  }
  .pagination-modern-status {
    grid-area: status;
    text-align: center;
  }
}

/* サイトタイトル */
.masthead-title {
  background-color: #000 !important;
}

.container-title {
  margin-top: 100px;
  text-align: right;
}

.site-heading {
  display: inline-block;
  font-size: 70px;
  margin-right: 20px;
  text-align: left;
  width: 595px;
}

.site-heading span {
  display: block;
  height: 80px;
  line-height: 0.3;
  width: 100%;
}

.site-heading .left {
  text-align: left;
}

.site-heading .right {
  text-align: right;
}

.subtitle {
  font-size: 35px;
}

/* 767px以下 */
@media screen and (max-width: 767px) {
  .container-title {
    height: 90px;
  }

  .site-heading {
    font-size: 50px;
    margin-right: 0;
    width: auto;
  }

  .site-heading span {
    line-height: 1.4;
  }

  .subtitle {
    font-size: 25px;
  }
}

@media screen and (max-width: 767px) {
  header.masthead {
    background-position: center;
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  header.masthead:before {
    opacity: 0.7;
  }

  header.masthead .post-heading {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 8px;
    padding: 0.75rem 1rem;
  }

  header.masthead .post-heading h1 {
    font-size: 1.6rem;
    line-height: 1.3;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  header.masthead .post-heading .meta {
    font-size: 0.9rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  }
}

/* サムネイル表示 */
.post-thumbnail {
  height: auto;
  margin-bottom: 10px;
  overflow: visible;
  position: static;
  text-align: center;
  width: 100%;
}

.post-thumbnail img {
  display: block;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  position: static;
  transform: none;
  width: 100%;
}

/* コンテンツリンク */
/* デフォルト：スマホ用（2列） */
.content-links {
  display: grid;
  font-size: 18px;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  list-style: none;
  text-align: left;
}

/* PC用（768px以上）：横並び */
@media (min-width: 768px) {
  .content-links {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
}

/* ナビゲーションのリンク文字色 */
.content-links .content-nav-link {
  color: #333333;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* ホバー時に色を変える */
.content-links .content-nav-link:hover {
  color: deeppink;
}

/* アクティブなメニュー項目の色 */
.content-links .content-nav-item.current-menu-item .content-nav-link,
.content-links .content-nav-link.active {
  color: deeppink;
}

.link-box {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid #000;
  padding: 65px 5px;
  text-align: center;
  transition: background-color 0.3s, transform 0.3s;
}

.link-box a {
  background-color: #eee;
  color: #000;
  font-size: 18px;
  font-weight: bold;
  padding: 5px 10px;
  text-decoration: none;
}

.link-box:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
}

/* スライドショータイトル */
.header-section {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
}

.title {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
}

.link-button {
  align-items: center;
  border-radius: 5px;
  display: flex;
  font-size: 20px;
  font-weight: bold;
  padding: 5px 15px;
  text-decoration: none;
  transition: background-color 0.3s;
}

.link-button span {
  margin-left: 5px;
}

.link-button:hover {
  background-color: #ddd;
}

/* スライドショー */
.slider-container {
  margin: auto;
  max-width: 800px;
  position: relative;
  width: 100%;
}

.slider {
  overflow: hidden;
  position: relative;
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slide {
  align-items: center;
  background-color: #fff;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  min-width: 100%;
  position: relative;
}

.slide-content {
  display: block;
  position: relative;
}

.slide-title {
  background-color: rgba(0, 0, 0, 0.5);
  bottom: 0;
  box-sizing: border-box;
  color: white;
  font-size: 16px;
  left: 0;
  padding: 10px;
  position: absolute;
  right: 0;
  text-align: center;
}

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

.slider .prev, .slider .next {
  background-color: rgba(255, 182, 193, 0.8);
  border: none;
  border-radius: 50%;
  color: white;
  padding: 10px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
}

.slider .prev {
  left: 10px;
}

.slider .next {
  right: 10px;
}

.dots {
  padding-top: 10px;
  text-align: center;
}

.dot {
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  height: 15px;
  margin: 0 5px;
  width: 15px;
}

.active {
  background-color: #FFB6C1;
}

/* フロントページ　リスト */
.news-section {
  margin-bottom: 4rem;
  padding: 1.5rem 1rem;
  border-radius: 16px;
}

.section-header {
  align-items: center;
  border-bottom: 2px solid var(--theme-primary);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.news-section + .news-section {
  border-top: 1px solid #ddd7cc;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.section-meta {
  color: #888;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-header h2 {
  font-family: var(--theme-display);
  font-size: 1.7rem;
  font-weight: bold;
}

.section-number {
  color: var(--theme-accent);
  font-family: var(--theme-body);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 0.6rem;
}

.section-header h2:after {
  background: var(--theme-accent);
  content: "";
  display: block;
  height: 2px;
  margin-top: 0.4rem;
  width: 48px;
}

.section-header .more-link {
  color: var(--theme-primary);
  font-size: 0.9rem;
  text-decoration: none;
}

.section-icon {
  color: var(--theme-accent);
  font-size: 1.2rem;
}

.news-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.magazine-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.magazine-grid .news-main {
  grid-column: span 2;
  grid-row: span 2;
}

.magazine-grid .news-main .thumb {
  aspect-ratio: 16 / 9;
  height: auto;
}

.magazine-grid .news-sub .thumb {
  aspect-ratio: 16 / 9;
  height: auto;
}

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

  .magazine-grid .news-main {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* フロント ヒーロー */
.front-hero {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1.25fr;
  margin: 2rem 0 3rem;
}

.front-hero-kicker {
  color: var(--theme-accent);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.front-hero-subcopy {
  color: #777;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}

.front-hero-title {
  font-family: var(--theme-display);
  font-size: 2.6rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}

.front-hero-lead {
  color: #444;
  font-size: 1rem;
  line-height: 1.7;
}

.front-hero-lead p {
  margin-bottom: 0.8rem;
}

.front-hero-lead p:first-child {
  font-size: 1.1rem;
  font-weight: 600;
}

.front-feature-card {
  background: #fff;
  border: 1px solid #e6e3dc;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.front-hero-feature-stack {
  display: grid;
  gap: 1.2rem;
  grid-template-rows: auto;
}

.front-hero-feature-stack .front-feature-card {
  display: flex;
  flex-direction: column;
}

.front-hero-feature-stack .front-feature-card.compact .front-feature-label {
  left: 0.75rem;
  right: auto;
}

.front-feature-card.compact .front-feature-body {
  padding: 0.8rem 1.1rem 1.1rem;
}

.front-feature-card.compact h2 {
  font-size: 1.1rem;
}

.front-feature-card.compact p {
  font-size: 0.9rem;
}

.front-feature-label {
  background: var(--theme-primary);
  color: #fff;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.8rem;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  text-transform: uppercase;
}

.front-feature-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
}

.front-feature-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.news-main .thumb img,
.news-sub .thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.front-feature-body {
  background: #fff;
  padding: 1rem 1.2rem 1.4rem;
}

.front-feature-date {
  color: #888;
  font-size: 0.8rem;
}

.front-feature-body h2 {
  font-family: var(--theme-display);
  font-size: 1.3rem;
  margin: 0.4rem 0 0.6rem;
}

.front-feature-body p {
  color: #555;
  font-size: 0.95rem;
  margin: 0;
}

.front-feature-body h2,
.front-feature-body p {
  overflow: visible;
}


.front-index {
  border-top: 1px solid #ddd7cc;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin: 1rem 0 2rem;
  padding-top: 1rem;
}

.front-index a {
  color: var(--theme-primary);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.front-index-num {
  color: var(--theme-accent);
  font-family: var(--theme-body);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-right: 0.35rem;
}

@media (min-width: 992px) {
  .front-index {
    align-items: flex-start;
    border-left: 1px solid #ddd7cc;
    border-top: none;
    flex-direction: column;
    gap: 0.6rem;
    padding-left: 1rem;
  }
}

@media (min-width: 1200px) {
  .front-index {
    position: sticky;
    top: 140px;
  }
}
@media (max-width: 992px) {
  .front-hero {
    grid-template-columns: 1fr;
  }

  .front-feature-thumb {
    height: 200px;
  }
}

@media screen and (max-width: 992px) {
  .news-grid {
    display: flow;
  }
  .news-main {
    width: 100%;
  }
  .news-sub {
    margin-top: 8px;
    width: 100%;
  }
}

/* メイン記事 */
.news-main {
  background-color: #fff;
  border: 1px solid #e6e3dc;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  grid-column: span 2;
  overflow: hidden;
  position: relative;
}

.news-main .thumb {
  display: block;
  height: auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.news-main .thumb img {
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.news-main .labels {
  color: #999;
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
}

.reading-time {
  color: #777;
  margin-left: 0.5rem;
}

.news-main .labels,
.news-sub .labels {
  display: flex;
  gap: 0.6rem;
  justify-content: space-between;
}

.news-main .labels span:first-child,
.news-sub .labels span:first-child {
  white-space: nowrap;
}

.news-main .labels .reading-time,
.news-sub .labels .reading-time {
  margin-left: 0;
}

.front-editorial {
  border: 1px solid #ddd7cc;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  margin: 4rem 0 2rem;
  padding: 2.2rem;
}

.front-editorial h2 {
  font-family: var(--theme-display);
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.front-editorial p {
  color: #555;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.front-editorial-author {
  color: #444;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.front-editorial-role {
  color: #888;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-top: -0.4rem;
  text-transform: uppercase;
}

.news-main h3 {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0.5rem 0;
  padding: 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-main p {
  color: #444;
  font-size: 0.95rem;
  padding: 0 1rem 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* サブ記事 */
.news-sub {
  background-color: #fff;
  border: 1px solid #e6e3dc;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s;
}

.news-sub:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.news-sub .thumb {
  display: block;
  height: auto;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.news-sub .thumb img {
  display: block;
  height: auto;
  object-fit: contain;
  width: 100%;
}

.news-main.no-thumb .thumb,
.news-sub.no-thumb .thumb {
  display: none;
}

.news-sub .labels {
  color: #aaa;
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
}

.news-sub h4 {
  color: #333;
  font-size: 0.95rem;
  font-weight: bold;
  margin: 0.5rem 0;
  padding: 0 0.8rem 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.full-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  text-indent: -9999px;
  overflow: hidden;
}

a {
  text-decoration: none !important;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: -15px;
  padding: 0 0px 5px 15px;
}

.single-post .post-tags {
  padding: 0;
}

.news-main .post-tags {
  margin-top: 0.5rem;
  padding: 0 1rem 1rem;
}

.news-sub .post-tags {
  margin-top: 0.5rem;
  padding: 0 0.8rem 0.8rem;
}

.post-tags .tag {
  background-color: #f6e6ec;
  border: 1px solid #e9c9d6;
  border-radius: 7px;
  color: var(--theme-accent);
  display: inline-block;
  font-size: 0.75rem;
  margin: 5px 1px;
  padding: 0.2rem 0.5rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.post-tags .tag:hover {
  background-color: var(--theme-accent);
  color: white;
}

/* パンくず */
.breadcrumbs {
  color: #777;
  font-size: 0.85rem;
  margin: 1rem 0 1.5rem;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li:before {
  color: #bbb;
  content: "/";
  margin: 0 0.35rem 0 0.1rem;
}

.breadcrumbs a {
  color: #555;
  text-decoration: none;
}

/* 目次 */
.toc {
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 8px;
  margin: 1rem 0 2rem;
  padding: 1rem 1.2rem;
}

.toc-title {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: bold;
  margin: 0 0 0.75rem;
  list-style: none;
}

.toc[open] .toc-title {
  margin-bottom: 0.75rem;
}

.toc-title::-webkit-details-marker {
  display: none;
}

.toc-title::after {
  content: "+";
  float: right;
  font-weight: bold;
}

.toc[open] .toc-title::after {
  content: "−";
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-item {
  margin: 0 0 0.5rem;
}

.toc-item a {
  color: #333;
  text-decoration: none;
}

.toc-h3 {
  margin-left: 1rem;
  font-size: 0.95rem;
}

@media (min-width: 992px) {
  .single-post .toc {
    float: none;
    margin: 0;
    max-width: 280px;
    position: static;
  }
}

@media (max-width: 991px) {
  .single-post .toc {
    float: none;
    position: static;
    width: 100%;
  }
}

@media (min-width: 1200px) {
  .single-post {
    overflow: visible;
    position: relative;
  }

  .single-post .toc {
    float: none;
    margin: 0 0 1.5rem;
    position: static;
    width: 100%;
  }
}

@media (min-width: 1200px) {
  .single-post .toc {
    max-height: calc(100vh - 140px);
    overflow: auto;
    display: none;
    position: fixed;
    right: max(16px, calc((100vw - 1272px) / 2 - 8px));
    top: 120px;
    width: 280px;
    z-index: 10;
  }
}

@media (min-width: 1200px) {
  .single-post .toc.is-fixed {
    display: block;
  }
}

@media (max-width: 1599px) and (min-width: 1200px) {
  .single-post .toc {
    right: 45px;
    width: 300px;
  }
}

/* 読了プログレス */
#reading-progress {
  background: var(--theme-accent);
  height: 3px;
  left: 0;
  position: fixed;
  top: 0;
  width: 0;
  z-index: 9999;
}

/* 記事内CTA */
.post-cta {
  background: var(--theme-bg);
  border: 1px solid #ddd7cc;
  border-radius: 12px;
  margin: 2.5rem 0;
  padding: 1.5rem;
}

.post-cta-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.post-cta-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 0.25rem;
}

.post-cta-sub {
  color: #555;
  margin: 0;
}

.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-cta-button {
  border: 1px solid var(--theme-accent);
  border-radius: 999px;
  color: var(--theme-accent);
  display: inline-block;
  font-weight: bold;
  padding: 0.5rem 1.2rem;
  text-decoration: none;
}

.post-cta-button.primary {
  background: var(--theme-accent);
  color: #fff;
}

/* 関連記事 */
.related-posts {
  margin: 2.5rem 0 1rem;
}

.related-posts h3 {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.related-posts-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.related-post-card {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.related-post-thumb {
  display: block;
  height: 140px;
  overflow: hidden;
}

.related-post-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.related-post-body {
  padding: 0.75rem;
}

.related-post-date {
  color: #999;
  font-size: 0.8rem;
}

.related-post-body h4 {
  font-size: 0.95rem;
  margin: 0.4rem 0 0;
}

/* 画像モーダル */
.image-modal {
  align-items: center;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 0.2s ease;
  z-index: 9998;
}

.image-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-modal img {
  max-height: 90vh;
  max-width: 90vw;
}

.image-modal-close {
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  height: 36px;
  position: absolute;
  right: 20px;
  top: 20px;
  width: 36px;
}

@media screen and (max-width: 767px) {
  .post-cta {
    padding: 1.2rem;
  }

  .related-post-thumb {
    height: 120px;
  }
}

/* 記事内の画像配置（WPエディターの整列クラス対応） */
.single-post img {
  height: auto;
  max-height: none;
  max-width: 100%;
  width: revert;
}

.single-post .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.single-post .alignleft {
  float: left;
  margin: 0 1rem 1rem 0;
}

.single-post .alignright {
  float: right;
  margin: 0 0 1rem 1rem;
}

.single-post .wp-caption {
  max-width: 100%;
  overflow: visible;
}

.single-post .wp-caption img {
  display: block;
  margin: 0 auto;
}

.single-post .wp-caption-text {
  font-size: 0.9rem;
  text-align: center;
}

.single-post h2,
.single-post h3 {
  scroll-margin-top: 100px;
}

/* ブロックエディター画像のサイズ指定を尊重 */
.single-post figure,
.single-post .wp-block-image {
  max-width: 100%;
}

.single-post figure.aligncenter,
.single-post .wp-block-image.aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.single-post figure img,
.single-post .wp-block-image img {
  height: auto;
  max-width: 100%;
  width: revert;
}
