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

:root {
  --bg: #0f0f13;
  --surface: #1a1a24;
  --surface2: #22222f;
  --accent: #e8392a;
  --accent2: #ff6b35;
  --text: #e8e8f0;
  --text-muted: #888899;
  --border: #2e2e3e;
  --font: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

/* 画像は比率を絶対に変えない */
img { max-width: 100%; height: auto; }

/* ===========================
   Header
=========================== */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-logo a {
  display: flex;
  align-items: center;
}

.site-logo-img {
  height: 60px !important;
  width: auto !important;
  max-width: none !important;
  display: block;
}

/* ヘッダーSNSアイコン */
.header-social {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: #fff;
  transition: opacity 0.2s;
}
.social-link:hover { opacity: 0.8; }
.social-link--yt { background: #ff0000; border: 1px solid #515151; }
.social-link--x  { background: #1a1a1a; border: 1px solid #515151; }

/* ===========================
   Category Nav
=========================== */
.category-nav { overflow: hidden; flex: 1; }

.nav-list {
  list-style: none;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-list li a {
  display: block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.nav-list li a:hover,
.nav-list li.current-menu-item a {
  color: var(--text);
  background: var(--surface2);
}

/* ===========================
   Hero Slider
=========================== */
.hero-slider {
  position: relative;
  width: 100%;
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 40px;
}

.slide { display: none; position: relative; }
.slide.active { display: block; }

.slide-link { display: block; position: relative; }

.slide-image {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}

.slide-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 32px 28px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
}

.slide-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 8px;
}

.slide-title {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  padding: 0;
}
.slider-btn:hover { background: rgba(232,57,42,0.75); }
.slider-btn--prev { left: 12px; }
.slider-btn--next { right: 12px; }

.slider-dots {
  position: absolute;
  bottom: 14px;
  right: 20px;
  display: flex;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.dot.active { background: #fff; }

/* ===========================
   Layout
=========================== */
.site-wrap { min-height: 100vh; }

.main-content { padding: 32px 0 64px; }
.home .main-content { padding-top: 0; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
}

@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ===========================
   Card Grid
=========================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card-thumbnail-link { display: block; }

.card-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
}

/* カードのサムネだけobject-fit:cover（アイキャッチを正方形・縦長でも統一表示するため） */
.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.card:hover .card-thumbnail img { transform: scale(1.04); }

.card-no-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface2), var(--border));
}

.card-body { padding: 12px 14px 16px; }

.card-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-block;
}
.card-category:hover { text-decoration: underline; }

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

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin: 6px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date { font-size: 12px; color: var(--text-muted); }

/* ===========================
   Single Article
=========================== */
.single-thumbnail {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

/* 記事アイキャッチは比率そのまま */
.single-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.article-header { margin-bottom: 24px; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.article-category { color: var(--accent2); font-weight: 700; }

.article-title { font-size: 26px; font-weight: 900; line-height: 1.4; }

.article-body {
  font-size: 15px;
  line-height: 1.9;
}
.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}
.article-body h3 { font-size: 17px; margin: 24px 0 8px; }
.article-body p { margin-bottom: 16px; }

/* 記事本文内の画像は比率を変えない */
.article-body img {
  height: auto !important;
  max-width: 100%;
  border-radius: 6px;
  margin: 16px auto;
}

.article-body a { color: var(--accent2); text-decoration: underline; }

/* ===========================
   Sidebar
=========================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 0;
}

.widget {
  background: var(--surface);
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* 検索ウィジェット（classic / block 両対応） */
.widget_search .widget-title,
.wp-block-search__label { display: none !important; }

.widget_search form,
.wp-block-search__inside-wrapper {
  display: flex !important;
  gap: 4px !important;
  align-items: center !important;
}

.widget input[type="search"],
.wp-block-search__input {
  flex: 1 !important;
  min-width: 0 !important;
  width: auto !important;
  height: 32px !important;
  max-height: 32px !important;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  box-shadow: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.widget input[type="search"]:focus,
.wp-block-search__input:focus {
  border-color: var(--accent) !important;
}

.widget input[type="submit"],
.wp-block-search__button {
  flex-shrink: 0 !important;
  width: auto !important;
  height: 32px !important;
  background: var(--surface2) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  line-height: 32px !important;
}
.widget input[type="submit"]:hover,
.wp-block-search__button:hover {
  color: var(--text) !important;
  border-color: var(--accent) !important;
  background: var(--surface2) !important;
}

/* アイキャッチ付き最近の記事 */
.recent-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }

.recent-item a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.recent-thumb {
  width: 72px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface2);
}

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

.recent-title {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.recent-item a:hover .recent-title { color: var(--accent2); }

/* ===========================
   Footer
=========================== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
}

.footer-inner { max-width: 1280px; margin: 0 auto; }

.footer-nav-list {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 12px;
}
.footer-nav-list a { font-size: 13px; color: var(--text-muted); }
.footer-nav-list a:hover { color: var(--text); }

.copyright { font-size: 12px; color: var(--text-muted); }

/* ===========================
   フッター管理人紹介
=========================== */
.footer-about {
  border-bottom: 1px solid var(--border);
  padding: 32px 20px;
}

.footer-about-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-avatar {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--border);
  overflow: hidden;
}

.footer-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.footer-about-body { flex: 1; text-align: left; }

.footer-about-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 6px;
}

.footer-about-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.footer-about-social {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}
.footer-social-link:hover { opacity: 0.85; }
.footer-social-link--yt { background: #ff0000; color: #fff; }
.footer-social-link--x  { background: #000;    color: #fff; }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 20px 24px;
  text-align: left;
}

/* ===========================
   サイドバー 検索フォーム（get_search_form出力）
=========================== */
.widget_search .search-form {
  display: flex;
  gap: 4px;
}
.widget_search .search-field {
  flex: 1;
  min-width: 0;
  height: 32px !important;
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.widget_search .search-field:focus { border-color: var(--accent) !important; }
.widget_search .search-submit {
  height: 32px !important;
  background: var(--surface2) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--border) !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.widget_search .search-submit:hover {
  color: var(--text) !important;
  border-color: var(--accent) !important;
}

/* ===========================
   サイドバー カテゴリ
=========================== */
.cat-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.cat-list .cat-item a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  font-size: 13px;
  color: var(--text-muted);
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}
.cat-list .cat-item a:hover { color: var(--text); background: var(--surface2); }

.cat-name { flex: 1; }

.cat-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface2);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 6px;
  flex-shrink: 0;
}

.recent-thumb-empty {
  width: 72px;
  height: 52px;
  background: var(--surface2);
  border-radius: 3px;
  flex-shrink: 0;
}

/* ===========================
   サイドバー 最近の記事カード
=========================== */
.sidebar-card-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.sidebar-card {
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.sidebar-card:hover { border-color: var(--accent); }
.sidebar-card a { display: block; text-decoration: none; }

.sidebar-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
}
.sidebar-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.sidebar-card:hover .sidebar-card-thumb img { transform: scale(1.04); }

.sidebar-card-no-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface2), var(--border));
}

.sidebar-card-cat {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  line-height: 1.6;
}

.sidebar-card-body { padding: 8px 10px 10px; }

.sidebar-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-card:hover .sidebar-card-title { color: var(--accent2); }

.sidebar-card-date { font-size: 11px; color: var(--text-muted); }

/* ===========================
   Pagination
=========================== */
.nav-links { display: flex; justify-content: center; gap: 12px; margin-top: 32px; }
.nav-links a {
  padding: 8px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.nav-links a:hover { border-color: var(--accent); }

/* ===========================
   シェアボタン
=========================== */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.share-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 4px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}
.share-btn:hover { opacity: 0.85; text-decoration: none; }

.share-btn--x    { background: #000;    color: #fff !important; }
.share-btn--line { background: #06c755; color: #fff !important; }
.share-btn--hb   { background: #00a4de; color: #fff !important; }

/* ===========================
   記事内 Amazon 商品ボックス（background:#fafafa の白いdiv内）
=========================== */

/* 白背景ボックス内のテキストを黒に */
.article-body div[style*="background:#fafafa"],
.article-body div[style*="background: #fafafa"] {
  color: #222 !important;
}

/* ボックス内リンクはアクセントカラー */
.article-body div[style*="background:#fafafa"] a,
.article-body div[style*="background: #fafafa"] a {
  color: #e8392a !important;
}

/* inline style で color:#888 が直書きされた価格テキスト */
.article-body div[style*="background:#fafafa"] [style*="color:#888"],
.article-body div[style*="background:#fafafa"] [style*="color: #888"],
.article-body div[style*="background: #fafafa"] [style*="color:#888"],
.article-body div[style*="background: #fafafa"] [style*="color: #888"] {
  color: #555 !important;
}
