/*
Theme Name: 新卒マイラー日記
Theme URI: https://example.com
Author: あなたの名前
Description: 20代社会人がマイルで旅する記録ブログ用WordPressテーマ。シンプルで読みやすいレイアウト。
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: poikatsu-blog
*/

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

:root {
  --primary: #e53935;
  --primary-dark: #b71c1c;
  --accent: #ff6f00;
  --text: #212121;
  --text-sub: #616161;
  --text-light: #9e9e9e;
  --bg: #ffffff;
  --bg-gray: #f5f5f5;
  --bg-light: #fafafa;
  --border: #e0e0e0;
  --green: #2e7d32;
  --green-bg: #e8f5e9;
  --yellow: #f57f17;
  --yellow-bg: #fff8e1;
  --blue: #1565c0;
  --blue-bg: #e3f2fd;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 20px rgba(0,0,0,0.14);
  --radius: 6px;
  --font-body: 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', sans-serif;
  --font-num: 'Oswald', sans-serif;
  --sidebar-w: 300px;
  --content-max: 1100px;
}

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

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

a { color: var(--primary); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ==============================
   LAYOUT
============================== */
.site-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px 16px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 24px;
  align-items: start;
}

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

@media (max-width: 900px) {
  .site-inner { grid-template-columns: 1fr; }
  .widget-area { display: none; }
}

/* ==============================
   HEADER
============================== */
#masthead {
  background: var(--primary);
  padding: 0;
  border-bottom: 3px solid var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

.site-branding {
  display: flex;
  align-items: center;
  padding: 12px 0;
}

.site-title {
  font-family: var(--font-num);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  line-height: 1;
}

.site-title a { color: #fff; text-decoration: none; }
.site-title a:hover { color: rgba(255,255,255,0.85); text-decoration: none; }

.site-description {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.75);
  margin-top: 3px;
}

/* Navigation */
#site-navigation { display: flex; align-items: center; }

.nav-menu {
  list-style: none;
  display: flex;
  gap: 0;
  height: 100%;
}

.nav-menu li { display: flex; align-items: stretch; }

.nav-menu a {
  color: rgba(255,255,255,0.9);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 14px;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
  background: rgba(0,0,0,0.15);
  color: #fff;
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ==============================
   BREADCRUMB
============================== */
.breadcrumb-wrap {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.breadcrumb-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.breadcrumb-wrap a { color: var(--text-sub); text-decoration: none; }
.breadcrumb-wrap a:hover { color: var(--primary); }
.breadcrumb-wrap span { margin: 0 6px; }

/* ==============================
   POST CARDS (archive / index)
============================== */
.post-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  gap: 0;
}

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

.post-card-thumb {
  width: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-gray);
}

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

.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-body {
  padding: 16px 20px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.post-cat-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  text-decoration: none !important;
  transition: background 0.15s;
}

.post-cat-badge:hover { background: var(--primary-dark); color: #fff; }

.post-date {
  font-size: 0.72rem;
  color: var(--text-light);
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
}

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

.post-card-excerpt {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Point badge on cards */
.post-pt-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin-top: 8px;
  background: var(--yellow-bg);
  border: 1px solid #ffe082;
  border-radius: 3px;
  padding: 3px 10px;
  align-self: flex-start;
}

.post-pt-num {
  font-family: var(--font-num);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
}

.post-pt-unit { font-size: 0.7rem; color: var(--yellow); font-weight: 700; }

@media (max-width: 640px) {
  .post-card { flex-direction: column; }
  .post-card-thumb { width: 100%; height: 180px; }
}

/* ==============================
   SINGLE POST
============================== */
.entry-header {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px 28px 20px;
  margin-bottom: 16px;
}

.entry-header .entry-cats { margin-bottom: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

.entry-title {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 12px;
}

.entry-meta {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.entry-meta span { display: flex; align-items: center; gap: 4px; }

/* Thumbnail */
.entry-thumbnail {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  max-height: 420px;
}

.entry-thumbnail img { width: 100%; object-fit: cover; max-height: 420px; }

/* Article content */
.entry-content {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  margin-bottom: 16px;
}

.entry-content h2 {
  font-size: 1.2rem;
  font-weight: 900;
  border-left: 4px solid var(--primary);
  padding: 6px 12px;
  background: #fff5f5;
  margin: 28px 0 14px;
  border-radius: 0 4px 4px 0;
}

.entry-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
  margin: 22px 0 12px;
}

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

.entry-content ul, .entry-content ol {
  margin: 0 0 16px 1.5rem;
  line-height: 1.9;
}

.entry-content li { margin-bottom: 4px; }

.entry-content strong { color: var(--primary); }

.entry-content blockquote {
  background: var(--bg-light);
  border-left: 4px solid var(--primary);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
  color: var(--text-sub);
  font-style: normal;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.88rem;
}

.entry-content table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
}

.entry-content table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.entry-content table tr:nth-child(even) td { background: var(--bg-gray); }

/* ポイント比較ボックス */
.pt-compare-box {
  background: var(--yellow-bg);
  border: 2px solid #ffe082;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 20px 0;
}

.pt-compare-box .box-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--yellow);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pt-compare-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #ffe082;
  font-size: 0.88rem;
}

.pt-compare-row:last-child { border-bottom: none; }
.pt-compare-row .site-name { font-weight: 600; }
.pt-compare-row .pts { font-family: var(--font-num); font-weight: 700; color: var(--yellow); font-size: 1rem; }
.pt-compare-row.top .pts { color: var(--primary); font-size: 1.15rem; }
.pt-compare-row.top { background: rgba(229,57,53,0.06); margin: 0 -4px; padding: 6px 4px; border-radius: 3px; }

/* お得ボックス */
.otoku-box {
  background: var(--green-bg);
  border: 2px solid #a5d6a7;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}

.otoku-box .box-title { font-size: 0.82rem; font-weight: 700; color: var(--green); margin-bottom: 8px; }

/* 注意ボックス */
.note-box {
  background: var(--blue-bg);
  border: 2px solid #90caf9;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}

.note-box .box-title { font-size: 0.82rem; font-weight: 700; color: var(--blue); margin-bottom: 8px; }

/* CTAボタン */
.cta-btn {
  display: block;
  text-align: center;
  background: var(--primary);
  color: #fff !important;
  font-weight: 900;
  font-size: 1rem;
  padding: 16px 24px;
  border-radius: 4px;
  margin: 24px 0;
  text-decoration: none !important;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(229,57,53,0.3);
  letter-spacing: 0.03em;
}

.cta-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(229,57,53,0.4);
  color: #fff !important;
}

.cta-btn-sub {
  font-size: 0.75rem;
  display: block;
  font-weight: 400;
  margin-top: 4px;
  opacity: 0.85;
}

/* 目次 */
.toc-box {
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}

.toc-title { font-size: 0.88rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

.toc-list {
  list-style: none;
  counter-reset: toc;
  font-size: 0.85rem;
}

.toc-list li {
  counter-increment: toc;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.toc-list li:last-child { border-bottom: none; }

.toc-list li::before {
  content: counter(toc);
  font-family: var(--font-num);
  font-weight: 700;
  color: var(--primary);
  font-size: 0.75rem;
  min-width: 18px;
}

.toc-list a { color: var(--text); text-decoration: none; }
.toc-list a:hover { color: var(--primary); }

/* ==============================
   SIDEBAR
============================== */
.widget {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}

.widget-title {
  background: var(--primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 10px 14px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.widget-body { padding: 14px; }

/* Profile widget */
.profile-widget { text-align: center; }

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-gray);
  margin: 0 auto 10px;
  overflow: hidden;
  border: 3px solid var(--border);
}

.profile-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }
.profile-desc { font-size: 0.78rem; color: var(--text-sub); line-height: 1.7; text-align: left; }

/* Recent posts widget */
.recent-post-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.recent-post-item:last-child { border-bottom: none; }

.recent-post-thumb {
  width: 60px;
  height: 45px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-gray);
}

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

.recent-post-title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-post-title a { color: var(--text); text-decoration: none; }
.recent-post-title a:hover { color: var(--primary); }

.recent-post-date { font-size: 0.68rem; color: var(--text-light); margin-top: 3px; }

/* Category widget */
.cat-widget-list { list-style: none; }

.cat-widget-item {
  border-bottom: 1px solid var(--border);
}

.cat-widget-item:last-child { border-bottom: none; }

.cat-widget-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 4px;
  color: var(--text);
  font-size: 0.83rem;
  text-decoration: none;
  transition: color 0.15s;
}

.cat-widget-link:hover { color: var(--primary); text-decoration: none; }

.cat-widget-count {
  background: var(--bg-gray);
  font-size: 0.68rem;
  padding: 1px 7px;
  border-radius: 10px;
  color: var(--text-light);
}

/* ==============================
   PAGINATION
============================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}

.page-numbers:hover, .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ==============================
   FOOTER
============================== */
#colophon {
  background: #212121;
  color: rgba(255,255,255,0.6);
  padding: 32px 16px 16px;
  margin-top: 32px;
}

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

.footer-nav {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-nav a:hover { color: #fff; text-decoration: none; }

.site-info {
  text-align: center;
  font-size: 0.72rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 16px;
}

/* ==============================
   UTILITIES
============================== */
.screen-reader-text { position: absolute; left: -9999em; }

.label-new {
  display: inline-block;
  background: var(--green);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 4px;
}

.label-hot {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 4px;
}
