/* ========================================
共通：投稿ページ全体
======================================== */

.rp-blog-container {
  width: min(1080px, 92%);
  margin: 0 auto;
}

.rp-blog-single,
.rp-blog-archive {
  padding: 56px 0 72px;
  background: #fff;
}

/* ========================================
パンくず
======================================== */

.rp-breadcrumb {
  font-size: 13px;
  color: #777;
  margin-bottom: 24px;
  line-height: 1.7;
}

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

.rp-breadcrumb a:hover {
  text-decoration: underline;
}

/* ========================================
2カラム：本文 + サイドバー
======================================== */

.rp-has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  align-items: start;
}

.rp-main-content {
  min-width: 0;
}

.rp-sidebar {
  min-width: 0;
}

/* ========================================
投稿詳細
======================================== */

.rp-single-header {
  margin-bottom: 32px;
}

.rp-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 13px;
  color: #777;
  flex-wrap: wrap;
}

.rp-post-date {
  color: #777;
}

.rp-post-category {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rp-category-label {
  display: inline-block;
  padding: 2px 9px;
  border: 1px solid #ddd;
  border-radius: 2px;
  color: #555;
  font-size: 12px;
  line-height: 1.5;
  background: #fff;
}

.rp-single-title {
  font-size: 34px;
  line-height: 1.5;
  margin: 0;
  font-weight: 700;
  color: #222;
}

.rp-single-content {
  font-size: 16px;
  line-height: 1.9;
}

.rp-single-content p {
  margin-bottom: 1.6em;
}

.rp-single-content img {
  max-width: 100%;
  height: auto;
}

.rp-single-content h2 {
  font-size: 26px;
  line-height: 1.5;
  margin: 2.2em 0 1em;
  padding: 0 0 0.4em 14px;
  border-left: 4px solid #337ab7;
  border-bottom: 1px solid #e5e5e5;
  color: #222;
}

.rp-single-content h3 {
  font-size: 22px;
  line-height: 1.5;
  margin: 2em 0 1em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid #e5e5e5;
}

.rp-single-content ul,
.rp-single-content ol {
  margin-bottom: 1.6em;
  padding-left: 1.5em;
}

/* 前後記事 */

.rp-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 48px 0 24px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}

.rp-post-nav a {
  color: #333;
  text-decoration: none;
}

.rp-post-nav a:hover {
  text-decoration: underline;
}

.rp-prev,
.rp-next {
  width: 50%;
}

.rp-next {
  text-align: right;
}

/* 一覧へ戻る */

.rp-back-list {
  text-align: center;
  margin-top: 32px;
}

.rp-back-list a {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid #ccc;
  border-radius: 999px;
  text-decoration: none;
  color: #333;
  background: #fff;
}

.rp-back-list a:hover {
  background: #f7f7f7;
}

/* ========================================
サイドバー
======================================== */

.rp-widget {
  margin-bottom: 40px;
}

.rp-widget-title {
  font-size: 18px;
  line-height: 1.5;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eee;
  font-weight: 700;
  color: #222;
}

.rp-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rp-widget li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.rp-widget a {
  color: #333;
  text-decoration: none;
}

.rp-widget a:hover {
  text-decoration: underline;
}

.rp-widget input[type="search"] {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* ========================================
投稿一覧・アーカイブ・カテゴリー
======================================== */

.rp-archive-header h1 {
  font-size: 30px;
  line-height: 1.5;
  margin: 0 0 28px;
  font-weight: 700;
  color: #222;
}

.rp-archive-description {
  color: #666;
  margin-bottom: 36px;
  line-height: 1.8;
}

.rp-post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rp-post-card {
  margin: 0;
  padding: 24px 0;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.rp-post-card-link {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  padding: 0;
  color: inherit;
  text-decoration: none;
  transition: opacity .3s ease;
}

.rp-post-card-link:hover {
  opacity: .8;
}

.rp-post-thumb {
  width: 220px;
  height: 145px;
  overflow: hidden;
  background: #f2f2f2;
  border-radius: 4px;
}

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

/* 投稿一覧側の本文 */

.rp-post-content {
  min-width: 0;
}

.rp-post-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 700;
  color: #222;
}

.rp-post-card-link:hover .rp-post-title {
  text-decoration: underline;
}

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

/* ページネーション */

.rp-pagination {
  margin-top: 40px;
}

/* ========================================
スマホ
======================================== */

@media (max-width: 768px) {

  .rp-blog-single,
  .rp-blog-archive {
    padding: 40px 0 56px;
  }

  .rp-blog-container {
    width: min(100%, 92%);
  }

  .rp-has-sidebar {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .rp-single-title {
    font-size: 26px;
  }

  .rp-single-content {
    font-size: 15px;
  }

  .rp-single-content h2 {
    font-size: 22px;
  }

  .rp-single-content h3 {
    font-size: 20px;
  }

  .rp-post-nav {
    flex-direction: column;
  }

  .rp-prev,
  .rp-next {
    width: 100%;
    text-align: left;
  }

  .rp-archive-header h1 {
    font-size: 26px;
  }

  .rp-post-card {
    padding: 20px 0;
  }

  .rp-post-card-link {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rp-post-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rp-post-title {
    font-size: 20px;
  }

  .rp-post-excerpt {
    font-size: 13px;
  }

}

.rp-blog-single .rp-blog-container.rp-has-sidebar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 300px !important;
  gap: 48px !important;
  align-items: start;
}

.rp-blog-single .rp-main-content {
  min-width: 0;
}

.rp-blog-single .rp-sidebar {
  width: 300px;
  min-width: 0;
}

@media (max-width: 768px) {
  .rp-blog-single .rp-blog-container.rp-has-sidebar {
    grid-template-columns: 1fr !important;
  }

  .rp-blog-single .rp-sidebar {
    width: 100%;
  }
}
/* ========================================
事例投稿：Elementor編集用1カラム
======================================== */

.rp-case-single {
  padding: 48px 0 72px;
  background: #fff;
}

.rp-case-container {
  width: min(1180px, 94%);
  margin: 0 auto;
}

.rp-case-article {
  width: 100%;
}

.rp-case-content {
  width: 100%;
}

/* Elementor内の余白を邪魔しない */
.rp-case-content .elementor {
  width: 100%;
}

/* 事例ページではタイトル・アイキャッチをテンプレート側で出さない */
.rp-case-single .rp-single-title,
.rp-case-single .rp-single-thumbnail {
  display: none;
}

/* スマホ */
@media (max-width: 768px) {
  .rp-case-single {
    padding: 32px 0 56px;
  }

  .rp-case-container {
    width: min(100%, 92%);
  }
}