/*
Theme Name: StreamNavi
Theme URI: https://streaming-navi.com
Description: VODアフィリエイト特化テーマ。配信サービス比較・作品別視聴方法記事に最適化。
Author: 見放題ガイド
Version: 1.0.0
Text Domain: streamnavi
*/

/* =============================================
   CSS Variables
============================================= */
:root {
  --color-primary: #0ea5e9;
  --color-primary-dark: #0284c7;
  --color-secondary: #1e293b;
  --color-bg: #0f172a;
  --color-bg-card: #1e293b;
  --color-bg-light: #f8fafc;
  --color-text: #1e293b;
  --color-text-light: #64748b;
  --color-text-white: #f1f5f9;
  --color-border: #e2e8f0;
  --color-accent: #f59e0b;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --font-main: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --max-width: 1100px;
  --sidebar-width: 300px;
}

/* =============================================
   Reset & Base
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-bg-light);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }

ul, ol { padding-left: 1.5em; }

/* =============================================
   Layout
============================================= */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.content-area {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 40px;
  max-width: var(--max-width);
  margin: 40px auto;
  padding: 0 20px;
}

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

@media (max-width: 900px) {
  .content-area {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
}

/* =============================================
   Header
============================================= */
.site-header {
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.logo-text span { color: var(--color-primary); }

/* Global Nav */
.global-nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 4px;
}

.global-nav a {
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all 0.2s;
  white-space: nowrap;
}

.global-nav a:hover {
  color: #fff;
  background: rgba(14,165,233,0.2);
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .global-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .global-nav.is-open { display: block; }
  .global-nav ul { flex-direction: column; gap: 4px; }
  .global-nav a { display: block; padding: 10px 16px; }
}

/* =============================================
   Hero Banner（トップページ）
============================================= */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  color: #fff;
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230ea5e9' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; max-width: 700px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(14,165,233,0.2);
  color: var(--color-primary);
  border: 1px solid rgba(14,165,233,0.4);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 28px;
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}

.hero-search input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 0.95rem;
  font-family: var(--font-main);
}

.hero-search button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.hero-search button:hover { background: var(--color-primary-dark); }

/* =============================================
   Breadcrumb
============================================= */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  flex-wrap: wrap;
}

.breadcrumb li::after { content: '›'; margin-left: 6px; }
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb a { color: var(--color-primary); }

/* =============================================
   Article Card（一覧）
============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.post-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e293b, #334155);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
}

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

.post-card-body { padding: 16px; }

.post-card-cat {
  display: inline-block;
  background: rgba(14,165,233,0.1);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.post-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card h3 a { color: var(--color-text); }
.post-card h3 a:hover { color: var(--color-primary); }

.post-card-meta {
  font-size: 0.75rem;
  color: var(--color-text-light);
  display: flex;
  gap: 12px;
}

/* =============================================
   Single Article
============================================= */
.article-header {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.article-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.cat-badge {
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
}

.article-title {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 16px;
  color: var(--color-text);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--color-text-light);
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* アフィリエイト表示 */
.affiliate-disclosure {
  background: #fef3c7;
  border-left: 4px solid var(--color-accent);
  padding: 10px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.8rem;
  color: #92400e;
  margin-bottom: 24px;
}

/* Article Body */
.article-body {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.article-body h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--color-secondary), #334155);
  padding: 12px 20px;
  border-radius: var(--radius);
  margin: 40px 0 20px;
  border-left: 4px solid var(--color-primary);
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  padding: 8px 0 8px 16px;
  border-left: 3px solid var(--color-primary);
  margin: 28px 0 14px;
}

.article-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--color-border);
}

.article-body p { margin-bottom: 1.2em; }

.article-body ul li,
.article-body ol li { margin-bottom: 0.5em; }

.article-body strong { color: var(--color-text); font-weight: 700; }

/* 注意・補足ボックス */
.article-body .notice-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.9rem;
}

.article-body .notice-box.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.article-body .notice-box.danger {
  background: #fef2f2;
  border-color: #fecaca;
}

/* =============================================
   CTA Box（最重要）
============================================= */
.cta-box {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 32px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(14,165,233,0.15), transparent);
  border-radius: 50%;
}

.cta-box-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.cta-box-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.cta-box-sub {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.cta-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff !important;
  font-size: 1rem;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(14,165,233,0.4);
  transition: all 0.2s;
  text-decoration: none !important;
  letter-spacing: 0.03em;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14,165,233,0.5);
  background: linear-gradient(135deg, #38bdf8, var(--color-primary));
  color: #fff !important;
}

.cta-note {
  color: #64748b;
  font-size: 0.75rem;
  margin-top: 12px;
}

/* =============================================
   配信状況比較表
============================================= */
.streaming-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.streaming-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9rem;
}

.streaming-table thead {
  background: var(--color-secondary);
  color: #fff;
}

.streaming-table th {
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.streaming-table th:first-child { text-align: left; }

.streaming-table td {
  padding: 11px 16px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.streaming-table td:first-child { text-align: left; font-weight: 600; }

.streaming-table tbody tr:hover { background: #f8fafc; }

/* おすすめ行ハイライト */
.streaming-table tr.recommended {
  background: #eff6ff;
}

.streaming-table tr.recommended td:first-child::before {
  content: '⭐ ';
}

.streaming-available { color: var(--color-success); font-weight: 700; font-size: 1.1rem; }
.streaming-unavailable { color: #cbd5e1; }
.streaming-paid { color: var(--color-accent); font-weight: 600; font-size: 0.8rem; }

/* =============================================
   サービス比較カード
============================================= */
.vod-cards { display: grid; gap: 20px; margin: 24px 0; }

.vod-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}

.vod-card.is-recommended {
  border-color: var(--color-primary);
  border-width: 2px;
}

.vod-card-recommend-badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 14px;
  border-radius: 999px;
}

.vod-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.vod-card-logo {
  width: 60px;
  height: 60px;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.vod-card-name { font-size: 1.1rem; font-weight: 800; }
.vod-card-price { font-size: 0.85rem; color: var(--color-text-light); }

.vod-card-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.vod-spec-item { text-align: center; }
.vod-spec-label { color: var(--color-text-light); margin-bottom: 4px; }
.vod-spec-value { font-weight: 700; color: var(--color-text); }

.vod-card-merit {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* =============================================
   FAQ
============================================= */
.faq-list { margin: 24px 0; }

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transition: background 0.2s;
  list-style: none;
}

.faq-question:hover { background: #f8fafc; }

.faq-question::marker { display: none; }

.faq-q-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 1px;
}

.faq-answer {
  padding: 16px 20px 16px 56px;
  background: #f8fafc;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  line-height: 1.8;
}

details[open] .faq-question { background: #eff6ff; }

/* =============================================
   Sidebar
============================================= */
.sidebar { display: flex; flex-direction: column; gap: 24px; }

.sidebar-widget {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.sidebar-widget-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-text);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* サイドバー CTAバナー */
.sidebar-cta {
  background: linear-gradient(135deg, #0f172a, #1e3a5f);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  color: #fff;
}

.sidebar-cta-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.sidebar-cta-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.sidebar-cta .cta-btn {
  font-size: 0.85rem;
  padding: 10px 20px;
}

/* 人気記事 */
.popular-posts { list-style: none; padding: 0; }

.popular-posts li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.85rem;
  line-height: 1.5;
}

.popular-posts li:last-child { border-bottom: none; }

.popular-posts a { color: var(--color-text); }
.popular-posts a:hover { color: var(--color-primary); }

/* カテゴリ */
.cat-list { list-style: none; padding: 0; }

.cat-list li {
  border-bottom: 1px solid var(--color-border);
}

.cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.85rem;
  color: var(--color-text);
  transition: color 0.2s;
}

.cat-list a:hover { color: var(--color-primary); }

.cat-count {
  background: #f1f5f9;
  color: var(--color-text-light);
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
}

/* =============================================
   Footer
============================================= */
.site-footer {
  background: var(--color-bg);
  color: #94a3b8;
  margin-top: auto;
  padding: 48px 0 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.footer-brand .logo-text { font-size: 1.1rem; margin-bottom: 12px; display: block; }

.footer-desc {
  font-size: 0.82rem;
  line-height: 1.8;
  color: #64748b;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links { list-style: none; padding: 0; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  color: #64748b;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--color-primary); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: #475569;
}

/* =============================================
   Utilities
============================================= */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }

/* WordPress Alignment */
.aligncenter { display: block; margin: 24px auto; }
.alignleft { float: left; margin: 8px 20px 8px 0; }
.alignright { float: right; margin: 8px 0 8px 20px; }
.wp-caption-text { font-size: 0.78rem; color: var(--color-text-light); text-align: center; margin-top: 4px; }

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: all 0.2s;
}

.pagination a:hover,
.pagination span.current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* スマホ対応 */
@media (max-width: 600px) {
  .article-header,
  .article-body { padding: 20px 16px; }

  .vod-card-specs { grid-template-columns: repeat(2, 1fr); }

  .cta-btn { font-size: 0.9rem; padding: 12px 24px; }

  .hero { padding: 40px 16px; }
}

/* 画像著作権表記 */
.image-copyright {
  font-size: .72rem;
  color: #94a3b8;
  text-align: right;
  margin: 0 0 20px;
  padding: 4px 8px;
}
.image-copyright a {
  color: #94a3b8;
  text-decoration: underline;
}
.image-copyright a:hover {
  color: #0ea5e9;
}
