/*
 * みらいサッカースクール - 投稿・固定ページ・アーカイブ用CSS
 * front-page.php 以外のページで読み込まれる
 */

/* ===== ページヒーロー（全固定ページ共通） ===== */
.page-hero {
  margin-top: 0;
  padding-top: calc(68px + 64px);
  padding-bottom: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, #1a4fa0 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(243,152,0,.1);
}
.page-hero h1 {
  font-family: 'M PLUS Rounded 1c', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}
.page-hero p {
  font-size: .9rem;
  color: rgba(255,255,255,.8);
  position: relative;
  z-index: 1;
}

/* ===== メインコンテンツエリア ===== */
.page-main {
  margin-top: 0;
  padding: 48px 0 64px;
  min-height: 60vh;
}
/* page-mainが.page-heroなしで使われた場合のフォールバック（single.php等） */
body.single .page-main {
  margin-top: 68px;
}

/* ===== 投稿詳細 (single.php) ===== */
.article-single {
  max-width: 760px;
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: .82rem;
  color: var(--text-muted);
}
.article-meta time {
  display: flex;
  align-items: center;
  gap: 4px;
}
.article-cat {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}

.article-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 24px;
}

.article-thumbnail {
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-thumbnail img {
  width: 100%;
  height: auto;
}

/* 記事本文 */
.article-content {
  font-size: .95rem;
  line-height: 2;
  color: var(--text);
}
.article-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}
.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.article-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 8px;
}
.article-content p {
  margin-bottom: 20px;
}
.article-content ul,
.article-content ol {
  margin: 16px 0 24px 24px;
  list-style: revert;
}
.article-content li {
  margin-bottom: 6px;
}
.article-content img {
  border-radius: var(--radius);
  margin: 24px 0;
}
.article-content blockquote {
  background: var(--bg-cream);
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9rem;
  color: var(--text-light);
}
.article-content a {
  color: var(--primary);
  text-decoration: underline;
}
.article-content a:hover {
  color: var(--accent);
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}
.article-content th,
.article-content td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: .88rem;
}
.article-content th {
  background: var(--primary-light);
  font-weight: 700;
}
.article-content pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .85rem;
  line-height: 1.6;
  margin: 24px 0;
}
.article-content code {
  background: var(--bg-cream);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .88rem;
}
.article-content pre code {
  background: none;
  padding: 0;
}

/* 記事下CTA */
.article-cta {
  max-width: 760px;
  margin: 48px auto 0;
}
.article-cta-inner {
  background: linear-gradient(135deg, var(--primary) 0%, #1a4fa0 100%);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.article-cta-inner::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.article-cta-inner::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(243,152,0,.1);
}
.article-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.article-cta-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.6;
  margin-bottom: 12px;
}
.article-cta-desc {
  font-size: .85rem;
  color: rgba(255,255,255,.8);
  line-height: 1.8;
  margin-bottom: 24px;
}
.article-cta-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.article-cta-btn-line,
.article-cta-btn-tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .92rem;
  transition: all .2s ease;
  min-width: 220px;
}
.article-cta-btn-line {
  background: #06C755;
  color: #fff;
  box-shadow: 0 4px 16px rgba(6,199,85,.3);
}
.article-cta-btn-line:hover {
  background: #05b34c;
  transform: translateY(-2px);
}
.article-cta-btn-tel {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,.4);
}
.article-cta-btn-tel:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .article-cta-inner { padding: 32px 24px; }
  .article-cta-title { font-size: 1.1rem; }
  .article-cta-btns { flex-direction: column; }
  .article-cta-btn-line,
  .article-cta-btn-tel { min-width: 0; width: 100%; }
}

/* 前後の記事ナビ */
.post-nav {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.post-nav-link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--bg-cream);
  text-decoration: none;
  transition: all .2s ease;
}
.post-nav-link:hover {
  background: var(--primary-light);
}
.post-nav-next {
  text-align: right;
}
.post-nav-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.post-nav-title {
  font-size: .85rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== アーカイブヘッダー ===== */
.archive-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--primary-light);
}
.archive-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.archive-desc {
  font-size: .88rem;
  color: var(--text-light);
  margin-top: 8px;
}

/* ===== 投稿カード一覧 ===== */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.post-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: all .3s ease;
}
.post-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.post-card-link {
  display: block;
  text-decoration: none;
}
.post-card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-cream);
}
.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.post-card:hover .post-card-thumb img {
  transform: scale(1.04);
}
.post-card-nothumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--primary-light);
}
.post-card-body {
  padding: 16px 20px 20px;
}
.post-card-cat {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.post-card-title {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-date {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ===== ページネーション ===== */
.pagination {
  margin-top: 48px;
  text-align: center;
}
.pagination .nav-links {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--bg-cream);
  text-decoration: none;
  transition: all .2s ease;
}
.pagination .page-numbers.current {
  background: var(--primary);
  color: #fff;
}
.pagination .page-numbers:hover:not(.current) {
  background: var(--primary-light);
  color: var(--primary);
}

/* ===== 記事なし ===== */
.no-posts {
  text-align: center;
  padding: 80px 0;
  font-size: 1rem;
  color: var(--text-muted);
}

/* ===== 404 ===== */
.page-404 {
  text-align: center;
  padding: 80px 0;
}
.page-404-icon {
  font-size: 4rem;
  color: var(--primary-light);
  margin-bottom: 24px;
  animation: float-bounce 3s ease-in-out infinite;
}
.page-404 h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}
.page-404 p {
  font-size: .95rem;
  color: var(--text-light);
  margin-bottom: 32px;
}
.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: all .2s ease;
}
.btn-back-home:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== WPブロックエディター対応 ===== */
.wp-block-image {
  margin: 24px 0;
}
.wp-block-image img {
  border-radius: var(--radius);
}
.alignwide {
  max-width: 100%;
}
.alignfull {
  margin-left: -24px;
  margin-right: -24px;
  max-width: calc(100% + 48px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .page-hero {
    margin-top: 0;
    padding-top: calc(56px + 48px);
    padding-bottom: 48px;
  }
  .page-hero h1 {
    font-size: 1.5rem;
  }
  .page-main {
    padding: 32px 0 48px;
  }
  .article-title {
    font-size: 1.4rem;
  }
  .article-content h2 {
    font-size: 1.2rem;
  }
  .post-list {
    grid-template-columns: 1fr;
  }
  .post-nav {
    flex-direction: column;
  }
  .post-nav-next {
    text-align: left;
  }
  .page-main {
    padding-bottom: 80px;
  }
}
