/*
Theme Name: ThisDay
Theme URI: https://thisday.jp
Author: KAJI DESIGN
Author URI: https://thisday.jp
Description: ThisDay 公式テーマ。予定管理・イベント情報メディア用。
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thisday
*/

/* ==========================================================================
   WP メインレイアウト
   ========================================================================== */

.wp-main {
  max-width: var(--max-w, 900px);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.wp-container {
  max-width: var(--max-w, 900px);
  margin: 0 auto;
}

.wp-single {
  max-width: 780px;
  margin: 0 auto;
}

/* ==========================================================================
   記事カード一覧
   ========================================================================== */

.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.post-card {
  background: #fff;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--color-light, #E5E7EB);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.post-card .post-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  display: block;
}

.post-body {
  padding: 24px;
}

.post-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 8px 0 10px;
  line-height: 1.5;
}

.post-title a {
  color: var(--color-dark, #12162B);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--color-main, #FF6B57);
}

.post-meta {
  font-size: 0.8rem;
  color: var(--color-mid, #6B7280);
  margin-bottom: 10px;
}

.post-category {
  font-size: 0.75rem;
  color: var(--color-main, #FF6B57);
  font-weight: 600;
  margin-bottom: 4px;
}

.post-excerpt {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 14px;
}

.btn-read-more {
  color: var(--color-main, #FF6B57);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-read-more:hover {
  text-decoration: underline;
}

/* ==========================================================================
   記事詳細（single）
   ========================================================================== */

.entry-thumbnail img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 32px;
  display: block;
}

.entry-header .entry-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 16px;
  color: var(--color-dark, #12162B);
}

.entry-meta {
  font-size: 0.8rem;
  color: var(--color-mid, #6B7280);
  margin-bottom: 32px;
}

.entry-meta time {
  margin-right: 12px;
}

.entry-content {
  font-size: 0.9375rem;
  line-height: 1.9;
  color: #374151;
}

.entry-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--color-main, #FF6B57);
  color: var(--color-dark, #12162B);
}

.entry-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--color-dark, #12162B);
}

.entry-content p {
  margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  margin-bottom: 20px;
  line-height: 2;
}

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

.entry-content blockquote {
  border-left: 4px solid var(--color-light, #E5E7EB);
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--color-mid, #6B7280);
}

.entry-content figure {
  margin: 24px 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.entry-content th,
.entry-content td {
  padding: 12px;
  border: 1px solid var(--color-light, #E5E7EB);
}

.entry-content th {
  background: #fafafa;
  font-weight: 600;
}

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

.pagination {
  text-align: center;
  margin-top: 48px;
}

.page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-dark, #12162B);
  border: 1px solid var(--color-light, #E5E7EB);
}

.page-numbers.current {
  background: var(--color-main, #FF6B57);
  color: #fff;
  border-color: var(--color-main, #FF6B57);
}

.page-numbers:hover:not(.current) {
  border-color: var(--color-main, #FF6B57);
  color: var(--color-main, #FF6B57);
}

/* ==========================================================================
   Gutenberg ブロック
   ========================================================================== */

.wp-block-image {
  margin: 24px 0;
}

.wp-block-image img {
  border-radius: 8px;
}

/* ==========================================================================
   ページヘッダー
   ========================================================================== */

.page-header {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-dark, #12162B);
  margin-bottom: 8px;
}

.archive-description {
  font-size: 0.9rem;
  color: var(--color-mid, #6B7280);
  margin-bottom: 24px;
}

/* 記事一覧に戻るリンク */
.back-to-list {
  display: inline-block;
  margin-top: 40px;
  font-size: 0.875rem;
  color: var(--color-mid, #6B7280);
  text-decoration: none;
}

.back-to-list:hover {
  color: var(--color-main, #FF6B57);
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */

@media (max-width: 640px) {
  .wp-main {
    padding: 32px 16px 64px;
  }

  .post-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .entry-header .entry-title {
    font-size: 1.4rem;
  }

  .entry-thumbnail img {
    max-height: 240px;
  }

  .entry-content h2 {
    font-size: 1.2rem;
  }

  .entry-content h3 {
    font-size: 1.05rem;
  }

  .page-numbers {
    padding: 6px 10px;
    font-size: 0.875rem;
  }
}
