/*
Theme Name: 初心者から始めるせどり講座
Theme URI: https://example.com
Author: あなたの名前
Description: せどり初心者向けカジュアルテーマ（アフィリエイト対応）
Version: 1.0
*/

/* ============================================================
   ベース設定
============================================================ */
body {
  background: #fffdf7;
  color: #333;
  font-family: "M PLUS Rounded 1c", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

a {
  color: #f97316;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ============================================================
   ヘッダー
============================================================ */
header {
  background: #f97316;
  color: #fff;
  padding: 15px 20px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}

.site-title h1 {
  font-size: 1.6em;
  margin: 0;
}

.site-title a {
  color: #fff;
  font-weight: bold;
}

.nav-search-group {
  display: flex;
  align-items: center;
  gap: 25px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  color: #fff;
  font-weight: bold;
}
.main-nav a:hover {
  text-decoration: underline;
}

/* 検索バー */
.header-search form {
  display: flex;
  align-items: center;
}
.header-search input[type="text"] {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  width: 150px;
  font-size: 0.9em;
}
.header-search button {
  background: #fbbf24;
  border: none;
  color: #333;
  padding: 6px 10px;
  margin-left: 5px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
.header-search button:hover {
  background: #fde68a;
}

/* ============================================================
   コンテンツ全体構造
============================================================ */
.content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
  gap: 30px;
}

.main-content {
  flex: 3;
}

/* ============================================================
   サイドバー
============================================================ */
.sidebar {
  flex: 1;
  background: #fff8e1;
  border-radius: 10px;
  padding: 20px;
  height: fit-content;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 20px;
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-section h3 {
  color: #f97316;
  margin-top: 0;
  border-bottom: 2px solid #fbbf24;
  padding-bottom: 5px;
  font-size: 1.1em;
  background: none;
  margin-left: 0;
}

/* カテゴリー画像リスト */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.category-link {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

.category-link:hover {
  background: #fff8e1;
  transform: translateY(-2px);
}

.category-link img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.category-link span {
  font-weight: bold;
  color: #333;
}

/* ============================================================
   記事カード
============================================================ */
.article-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin-bottom: 25px;
  transition: all 0.25s ease;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.article-link {
  display: flex;
  gap: 15px;
  text-decoration: none;
  color: inherit;
}

.thumb-wrapper {
  width: 35%;
  min-width: 140px;
  border-radius: 8px;
  overflow: hidden;
}

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

.article-info h3 {
  color: #f97316;
  font-size: 1.1em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ============================================================
   プロフィールページ
============================================================ */
.profile-content h2 {
  background: #fff3e0;
  color: #f97316;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 1.3em;
  margin: 25px 0 20px 0;
}

/* ============================================================
   共通見出し（全ページで本文と左位置を揃える）
============================================================ */
h2,
.articles h2,
.related-posts h2,
.page-template-page-privacy .privacy-policy h2,
.single .article-content h2 {
  background-color: #fff3e0;
  color: #f97316;
  padding: 12px 18px;
  border-radius: 8px;
  display: inline-block;
  margin: 25px 0 20px 0;
}

h3,
.single .article-content h3,
.page-template-page-privacy .privacy-policy h3 {
  background-color: #fff8e1;
  color: #f97316;
  padding: 8px 14px;
  border-radius: 6px;
  display: inline-block;
  margin: 20px 0 15px 0;
}

/* ============================================================
   パンくずリスト
============================================================ */
.breadcrumb-wrapper {
  max-width: 1000px;
  margin: 15px auto 20px;
  padding: 0 20px;
}

.breadcrumb ul {
  background: #fff8e6;
  padding: 10px 15px;
  border-radius: 8px;
  display: flex;
  gap: 8px;
  font-size: 0.95em;
}

/* ============================================================
   SNSシェアボタン（角丸）
============================================================ */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 40px 0;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 25px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.share-btn.x { background: #000; }
.share-btn.line { background: #06C755; }
.share-btn.facebook { background: #1877F2; }
.share-btn.instagram {
  background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
}

/* ============================================================
   フッター
============================================================ */
footer.site-footer {
  background: #fff3e0;
  padding: 20px 10px;
  text-align: center;
}

/* ============================================================
   レスポンシブ
============================================================ */
@media (max-width: 700px) {
  h2 { font-size: 1.15em; }
  .single .single-article { padding: 0 20px; }
}

/* ==============================================
   ★記事ページ：見出し位置を本文に完全一致
================================================ */
.single .article-content h2,
.single .article-content h3,
.single article h2,
.single article h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
  display: inline-block;
}

/* デザイン（背景色など）は維持 */
.single .article-content h2,
.single article h2 {
  background: #fff3e0;
  padding: 12px 18px;
  border-radius: 8px;
}

.single .article-content h3,
.single article h3 {
  background: #fff8e1;
  padding: 8px 14px;
  border-radius: 6px;
}

/* ============================================================
   ★ 全ページ：見出し位置を本文に完全一致させる
   h2 / h3 を統一して margin-left ゼロに
============================================================ */

/* トップページ、固定ページ、記事ページ、すべて共通で左揃え */
h2, h3,
.page h2, .page h3,
.single h2, .single h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
  display: inline-block;
}

/* デザインは維持：h2 */
h2, .page h2, .single .article-content h2, .single article h2 {
  background: #fff3e0;
  padding: 12px 18px;
  border-radius: 8px;
}

/* デザインは維持：h3 */
h3, .page h3, .single .article-content h3, .single article h3 {
  background: #fff8e1;
  padding: 8px 14px;
  border-radius: 6px;
}

/* 不要な margin-left を強制上書き（前CSSの 40px を無効化） */
h2,
.profile-content h2,
.articles h2,
.related-posts h2,
.sidebar-section h3 {
  margin-left: 0 !important;
}

h3 {
  margin-left: 0 !important;
}

/* ================================================
   固定ページ（お問い合わせ・プライバシーなど）
================================================ */
.page .entry-content h2,
.page .entry-content h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* プライバシーポリシー専用 */
.page-template-page-privacy .privacy-policy h2,
.page-template-page-privacy .privacy-policy h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* 記事ページ（single）調整 */
.single .article-content h2,
.single article h2,
.single .article-content h3,
.single article h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;
}
/* ============================================
   ① カテゴリー欄の「・」を完全に消す
============================================ */
.sidebar-section ul,
.sidebar-section ul li {
  list-style: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* ============================================
   ② パンくずリストの区切りを「›」に変更
============================================ */
.breadcrumb li:not(:last-child)::after {
  content: "›" !important;
  margin: 0 6px;
  color: #f97316;
  font-weight: bold;
}


/* プライバシーポリシーページの左右余白を統一 */
.page-template-page-privacy .privacy-policy {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px; /* ← 他ページと同じ余白 */
  line-height: 1.9;
}

/* スマホ時の余白も統一 */
@media (max-width: 700px) {
  .page-template-page-privacy .privacy-policy {
    padding: 0 20px;
  }
}

/* パンくずリストの「・」を完全に消す */
.breadcrumb ul,
.breadcrumb ul li {
  list-style: none !important;
}

.breadcrumb ul {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/****************************************************
 *  プロフィールページ（page-about）
 *  見出し h2・h3 と本文を他ページと同じ位置に揃える
 ****************************************************/

/* プロフィールページ全体の余白を統一 */
.page-template-page-about .profile-content,
.page-template-page-about .profile-text {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px; /* 他ページと同じ左右余白 */
  box-sizing: border-box;
}

/* 見出し（h2, h3）位置調整：本文と揃える */
.page-template-page-about .profile-content h2,
.page-template-page-about .profile-content h3 {
  margin-left: 0 !important;
  padding-left: 0 !important;

  /* デザイン維持 */
  display: inline-block;
  background: #fff3e0;
  padding: 12px 18px;
  border-radius: 8px;
  color: #f97316;
}

/* h3 の背景色だけ変更（記事ページと統一） */
.page-template-page-about .profile-content h3 {
  background: #fff8e1;
  padding: 8px 14px;
  border-radius: 6px;
}

/* 本文の上部余白（整える） */
.page-template-page-about .profile-text {
  margin-top: 20px;
  line-height: 1.9;
}

/****************************************************
 *  プロフィールページ（page-about）
 *  本文を見出し（運営者プロフィール）と揃える
 ****************************************************/

/* 左右余白を見出しと完全一致：40px */
.page-template-page-about .profile-text {
  padding-left: 40px !important;
  padding-right: 40px !important;
  box-sizing: border-box;
  margin-top: 20px;
  line-height: 1.9;
}

/* h2（運営者プロフィール）は今の位置が正しいのでそのまま */
.page-template-page-about .profile-content h2 {
  padding-left: 40px !important;
  padding-right: 40px !important;
  box-sizing: border-box;

  /* デザイン維持 */
  background: #fff3e0;
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 8px;
  display: inline-block;
}
/* サイト全体の横スクロール防止 */
html, body {
  overflow-x: hidden;
}

/* レイアウト要素のはみ出し防止 */
.content-wrapper,
.main-content,
.sidebar,
.single .single-article,
.page .entry-content,
.page-template-page-privacy .privacy-policy,
.page-template-page-about .profile-content {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* 見出しのはみ出し防止 */
h2, h3 {
  max-width: 100%;
  box-sizing: border-box;
}

/* 画像が横幅を超えないようにする */
img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   スマホ時（幅700px以下）
   プロフィールページ（page-about）の左右余白を統一
============================================ */
@media (max-width: 700px) {
  .page-template-page-about .profile-content,
  .page-template-page-about .profile-box,
  .page-template-page-about .profile-text {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* ============================================================
   プロフィールページ（page-about）余白と見出し位置統一
============================================================ */

/* プロフィールページ全体の幅調整（本文は広め） */
.page-template-page-about .profile-content,
.page-template-page-about .profile-box {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* 見出し（h2）を本文と揃える */
.page-template-page-about .profile-content h2 {
  margin-left: 0 !important;
  padding-left: 14px !important; /* ← 背景の自然な余白 */
  padding-right: 14px !important;
  display: inline-block;
  box-sizing: border-box;
}

/* 本文テキスト部分の左右余白を自然に */
.page-template-page-about .profile-text {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-top: 20px;
  line-height: 1.9;
  box-sizing: border-box;
}

/* スマホ時の余白最適化（他ページと統一） */
@media (max-width: 700px) {
  .page-template-page-about .profile-content,
  .page-template-page-about .profile-box {
    padding-left: 20px;
    padding-right: 20px;
  }
}


/* ============================================================
   記事ページ（single）見出し背景を本文より少し広くする
============================================================ */

/* 記事ページ h2 の背景を広く */
single .article-content h2,
.single article h2 {
  position: relative;
  padding-left: 14px !important;
  padding-right: 18px !important;
  margin-left: 0 !important;
  display: inline-block;
}


/* h2 の右側背景を横に広げる */
.single .article-content h2,
.single article h2 {
  display: block;
  width: calc(100% + 16px); /* 本文より 16px 広く */
  margin-left: -8px;        /* 左に 8px はみ出す */
  background: #fff3e0;
  padding: 12px 18px;
  border-radius: 8px;
  box-sizing: border-box;
}


/* h3 も同様 */
.single .article-content h3,
.single article h3 {
  position: relative;
  padding-left: 12px !important;
  padding-right: 16px !important;
  margin-left: 0 !important;
  display: inline-block;
}

/* h3 の右側背景を横に広げる */
.single .article-content h3,
.single article h3 {
  display: block;
  width: calc(100% + 16px); /* h2 と同じ広がり */
  margin-left: -8px;
  background: #fff8e1;
  padding: 8px 14px;
  border-radius: 6px;
  box-sizing: border-box;
}



/* ============================================================
   プライバシーポリシー余白修正（本文は広く、見出しは揃える）
============================================================ */

.page-template-page-privacy .privacy-policy {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

/* 見出しを本文に揃える */
.page-template-page-privacy .privacy-policy h2,
.page-template-page-privacy .privacy-policy h3 {
  margin-left: 0 !important;
  padding-left: 14px !important;  /* デザインとして背景を維持 */
  padding-right: 14px !important;
  display: inline-block;
}

/* ★記事ページ（single）の余白をお問い合わせと同じにそろえる */
.single .single-article,
.single .article-detail {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 10px !important;
  padding-right: 10px !important;
  box-sizing: border-box;
}

/* ================================
   スマホ版（幅700px以下）
   シェアボタンを小さくして横並びにする
================================ */
@media (max-width: 700px) {
  .share-buttons {
    gap: 8px;               /* ボタン同士の間隔を縮める */
  }

  .share-btn {
    padding: 6px 10px;      /* ボタンの横幅・高さを縮小 */
    font-size: 0.8em;       /* 文字サイズも少し小さく */
    border-radius: 18px;    /* 角丸も少し小さく */
    min-width: 90px;        /* ボタン幅を調整（横に並びやすく） */
    text-align: center;
  }

  /* Instagram のグラデはそのまま */
  .share-btn.instagram {
    padding: 6px 10px;
  }
}

/* =========================================
   フッターのリンクを横並びにそろえる
========================================= */
.footer-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* スマホで折り返し可 */
}

.footer-links a {
  white-space: nowrap;
  font-weight: bold;
}
/* ------------------------------
   モバイル検索：アイコン → 検索開閉（スタイル）
   ------------------------------ */

/* header 内の2行構成（スマホ） */
.header-top {
  width: 100%;
}
.header-bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative; /* .header-search-mobile を絶対配置するため */
  padding-top: 8px;
}

/* ヘッダー右側のアクション群 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 検索トグルボタン（虫眼鏡） */
.search-toggle {
  background: transparent;
  border: none;
  padding: 8px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
}
.search-toggle:focus { outline: 2px solid rgba(255,255,255,0.25); }

/* PC の既存検索フォームはそのまま表示（非モバイル） */
.header-search-desktop { display: block; }

/* モバイル用検索フォーム（初期は非表示） */
.header-search-mobile {
  position: absolute;
  right: 12px;
  top: calc(100% + 8px); /* ヘッダー下に重なるように表示 */
  z-index: 999;
  display: none;
  transition: opacity 260ms ease, transform 260ms ease;
  transform-origin: right top;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* 開いたときの状態 */
.header-search-mobile.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* モバイル内フォームのスタイル */
.mobile-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  padding: 8px;
  border-radius: 10px;
  min-width: 230px;
  max-width: 86vw;
  box-sizing: border-box;
}
.mobile-search-form input[type="search"] {
  border: 1px solid #f0c36d;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.95em;
  outline: none;
  width: 100%;
}
.mobile-search-form input[type="search"]:focus {
  box-shadow: 0 0 0 3px rgba(251,183,36,0.12);
}
.mobile-search-form button[type="submit"] {
  background: #f97316;
  color: #fff;
  border: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

/* スマホでの2行レイアウト（振る舞い） */
@media (max-width: 700px) {
  .header-inner { max-width: 100%; padding: 12px 16px; }
  .header-top { width: 100%; }
  .header-bottom { margin-top: 8px; padding-bottom: 8px; }

  /* ナビは2行目に小さく表示（折りたたみ等は既存ルールに則る） */
  .main-nav ul { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; padding: 0; }
  .main-nav a { font-size: 0.95em; color: #fff; }

  /* PC 検索フォームは非表示に（モバイルはアイコン表示） */
  .header-search-desktop { display: none; }

  /* 検索トグルを目立たせる */
  .search-toggle svg path { stroke: #fff; }
}

/* デスクトップでの通常表示：モバイル検索は非表示 */
@media (min-width: 701px) {
  .header-search-mobile { display: none !important; }
}

/* モバイル検索ポップアップ（アニメーション対応） */
.header-search-mobile {
  position: absolute;
  right: 18px;
  top: calc(100% + 8px);
  z-index: 1200;

  /* アニメーションを効かせるため display:none は使わない */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;

  transform: translateY(-6px) scale(0.96);
  transition:
    opacity 250ms ease-out,
    transform 250ms cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0ms linear 250ms; /* 閉じるときだけ遅延 */
}

.header-search-mobile.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition:
    opacity 250ms ease-out,
    transform 250ms cubic-bezier(0.22, 0.61, 0.36, 1),
    visibility 0ms; /* 開くときは即座に表示 */
}

/* モバイルフォームデザイン */
.mobile-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  min-width: 240px;
  max-width: 92vw;
  box-sizing: border-box;

  /* 軽く影を付けてポップアップ感 */
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

@media (max-width: 700px) {
  .header-search-mobile {
    position: relative;
    right: 0;
    left: 0;
    top: auto;
    margin-top: 6px;
  }
}

@media (min-width: 701px) {
  .header-search-mobile {
    position: absolute;
  }
}

/* ===============================
   シンプルカテゴリー（文字のみ）
================================ */
.category-simple-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-simple-list li a {
  display: block;
  padding: 10px 14px;
  background: #fff3e0;
  border-left: 4px solid #f97316;
  border-radius: 6px;
  color: #333;
  font-weight: bold;
  transition: 0.25s;
}

.category-simple-list li a:hover {
  background: #ffe6c7;
  transform: translateX(4px);
}

/* スマホのときはサイドバーを記事の下へ */
@media (max-width: 700px) {
  .content-wrapper {
    flex-direction: column;
  }

  .sidebar-single {
    order: 2; /* 記事の下に移動 */
    width: 100%;
    margin-top: 30px;
  }

  .main-content {
    order: 1;
    width: 100%;
  }
}

/* ============================================
   ホームと同じカテゴリーカード（single用）
   → カテゴリー間の余白を小さく調整
============================================ */

.sidebar-category-list .category-card {
  display: block;
  background: #fdeed9;
  padding: 12px 15px;
  border-radius: 12px;
  font-weight: bold;
  color: #333;
  text-decoration: none;
  margin-bottom: 0px;   /* ← ★ 12px → 6px に変更（隙間縮小） */
  position: relative;
  transition: 0.2s;
}

/* 左のオレンジバー */
.sidebar-category-list .category-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: #f97316;
  border-radius: 12px 0 0 12px;
}

/* 文字は中央寄り */
.sidebar-category-list .category-card span {
  margin-left: 10px;
}

/* ホバー */
.sidebar-category-list .category-card:hover {
  background: #ffe6c9;
  transform: translateX(3px);
}

/* ================================
   スマホ時：サイドバーを広くする
================================ */
@media (max-width: 700px) {
  .sidebar {
    width: 100% !important;        /* 画面いっぱいに */
    max-width: 100% !important;
    margin: 20px auto 0 !important;
    padding: 20px !important;
    box-sizing: border-box;
  }
}

/* ==================================
   スマホ時：サイドバーを下に固定
================================== */
@media (max-width: 700px) {
  .content-wrapper {
    display: block !important;   /* ← flex を無効化して縦並びに */
  }

  .main-content {
    width: 100% !important;
  }

  .sidebar {
    margin-top: 30px !important; /* 本文の下にスペースをつけて設置 */
  }
}

/* ============================================================
   記事カード（PC / スマホ 共通で横並び）
============================================================ */

.article-card-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* カード全体 */
.article-card {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* 横並びレイアウト（スマホでも共通） */
.article-card-link {
  display: flex;
  gap: 18px;
  text-decoration: none;
  color: inherit;
}

/* サムネイル：幅40%（共通） */
.article-card-thumb {
  width: 40%;
  min-width: 120px;
  max-height: 160px;
  border-radius: 10px;
  overflow: hidden;
}

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

/* テキストエリア：幅60% */
.article-card-body {
  width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* タイトル */
.article-card-title {
  font-size: 1.1em;
  font-weight: bold;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

/* 日付 */
.card-date {
  font-size: 0.9em;
  color: #777;
}

/* カテゴリ（サイドバーと同じデザイン） */
.card-category-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.card-cat-tag {
  display: inline-block;
  background: #fff;
  border: 2px solid #fbbf24;
  color: #f97316;
  padding: 4px 8px;
  font-size: 0.85em;
  border-radius: 6px;
  font-weight: bold;
}

/* ====================== */
/* スマホ最適化（横並び維持） */
/* ====================== */
@media (max-width: 700px) {

  .article-card-link {
    gap: 12px;
  }

  .article-card-thumb {
    width: 45%;
    max-height: 140px;
  }

  .article-card-body {
    width: 55%;
  }

  .article-card-title {
    font-size: 1em;
  }

  .card-cat-tag {
    font-size: 0.78em;
    padding: 3px 6px;
  }
}

/* 淡オレンジ背景 + ふんわり影の高級版 */
.article-card {
  background: #FFF7ED !important;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
}

/* ★記事カード内のタイトル背景を完全に消す（最強版） */
.articles .article-card .article-info h3 {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* ===========================================
   ★ single（記事ページ）のサイドバー幅を固定
   タイトルや本文幅に圧迫されないようにする
=========================================== */

.single .content-wrapper {
  display: flex;
  align-items: flex-start;
}

.single .main-content {
  flex: 1 1 auto;
  max-width: 680px; /* ← 本文側の最大幅を軽く制限して圧迫防止 */
}

.single .sidebar {
  flex: 0 0 300px !important; /* ← ★ここでサイドバー幅を固定 */
  max-width: 300px !important;
  min-width: 300px !important;
  box-sizing: border-box;
}
/* ============================================
   single：シェアボタンを少し小さく調整（PC）
============================================ */
.single .share-buttons .share-btn {
  padding: 6px 12px;
  font-size: 0.85em;
  border-radius: 20px;
  min-width: 110px;
}

/* ロゴ位置の調整（余白を少し減らす） */
.single .share-buttons .share-btn svg {
  width: 18px;
  height: 18px;
}

/* スマホはさらにコンパクトに（既存より少しだけ縮小） */
@media (max-width: 700px) {
  .single .share-buttons .share-btn {
    padding: 5px 8px;
    font-size: 0.78em;
    min-width: 80px;
    border-radius: 16px;
  }

  .single .share-buttons {
    gap: 6px;
  }
}
/* ============================================
   single：スマホ版シェアボタンをさらに小さく
============================================ */
@media (max-width: 700px) {

  .single .share-buttons .share-btn {
    padding: 4px 6px;          /* ← さらに縮小 */
    font-size: 0.72em;         /* ← 文字も少し小さめ */
    min-width: 70px;           /* ← ボタン幅も縮小 */
    border-radius: 14px;       /* ← 小さめの角丸 */
  }

  /* アイコンもやや小さく */
  .single .share-buttons .share-btn svg {
    width: 16px;
    height: 16px;
  }

  /* ボタン間隔も詰める */
  .single .share-buttons {
    gap: 5px;
  }
}
/* ============================================================
   記事カード（統一版）40%（画像） / 60%（テキスト）
============================================================ */

/* カード全体 */
.article-card {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 14px;
  background: #FFF7ED;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: 0.2s ease;
  min-height: 160px;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

/* リンク部分 */
.article-card-link {
  display: flex;
  gap: 16px;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* サムネイル（40%） */
.article-card-thumb {
  flex: 0 0 20%;
  max-width: 20%;
  min-width: 140px;
  border-radius: 10px;
  overflow: hidden;
}

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

/* テキスト（60%） */
.article-card-body {
  flex: 1 1 80%;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* タイトル */
.article-card-title {
  font-size: 1.1em;
  font-weight: bold;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

/* 日付 */
.card-date {
  font-size: 0.9em;
  color: #777;
  margin-bottom: 6px;
}

/* カテゴリ */
.card-category-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.card-cat-tag {
  background: #fff;
  border: 2px solid #fbbf24;
  color: #f97316;
  padding: 4px 8px;
  font-size: 0.85em;
  border-radius: 6px;
  font-weight: bold;
}

/* ====================== */
/* スマホ最適化 */
/* ====================== */
@media (max-width: 700px) {
  .article-card {
    gap: 10px;
    padding: 10px;
  }

  .article-card-thumb {
    flex: 0 0 45%;
    max-width: 45%;
    height: 150px;
  }

  .article-card-body {
    max-width: 55%;
  }

  .article-card-title {
    font-size: 1em;
  }
}


/* ====== レスポンシブ調整（狭い画面でも崩れにくく） ====== */
@media (max-width: 480px) {

  /* もしスマホで横幅狭すぎて崩れるようなら縦積みに戻す（コメントアウトを外して使う） */
  /* .article-card { flex-direction: column !important; } */
  /* .article-card-thumb, .thumb-wrapper { flex: 0 0 auto !important; max-width: 100% !important; height: auto !important; } */
  /* .article-card-body { max-width: 100% !important; } */

  /* まずは同じ比率を維持しつつ画像の最小幅を下げる */
  .article-card-thumb,
  .thumb-wrapper {
    min-width: 110px !important;
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }

  .article-card { min-height: 120px !important; }
}

/* ================================
   スマホ（Bパターン：縦並び×画像フル幅）
================================ */
@media (max-width: 700px) {

  /* カード → 縦並び */
  .article-card {
    flex-direction: column;
    padding: 12px;
    gap: 10px;
  }

  /* 画像 → 横100%×高さ自動（見切れゼロ） */
  .article-card-thumb {
    flex: none;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;     /* ← 高さ自動 */
    min-width: 0;
  }

  .article-card-thumb img {
    width: 100% !important;
    height: auto !important;     /* ← 正しい比率で表示 */
    object-fit: cover;
  }

  /* テキスト部分 */
  .article-card-body {
    flex: none;
    width: 100% !important;
    max-width: 100%;
  }

  .article-card-title {
    font-size: 1.15em !important;
    line-height: 1.5;
  }
}
@media (max-width: 700px) {

  /* タイトル */
  .article-card-title {
    font-size: 0.6em !important;
  }

  /* 日付 */
  .article-card-meta .card-date {
    font-size: 0.4em !important;
  }

  /* カテゴリー */
  .card-category-list .card-cat-tag {
    font-size: 0.4em !important;
  }
}
/* ===============================
   サイドバー記事カード - 画像を最大幅に
================================ */
.sidebar .sidebar-article-thumb {
  width: 100% !important;
  height: auto !important;
  border-radius: 10px;
  overflow: hidden;
  display: block;
}

.sidebar .sidebar-article-thumb img {
  width: 100% !important;
  height: 160px !important; /* ← 高さは調整可（現在の画像に合わせた推奨値） */
  object-fit: cover !important;
  display: block;
}

/* タイトルを2行までに制限 */
.sidebar .sidebar-article-title {
  font-size: 0.95rem;
  font-weight: bold;
  margin-top: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ============================
   サイドバー：縦型カード A
============================ */

.sidebar-vertical-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-vcard {
  display: flex;
  flex-direction: column;
  background: #fff7e6;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: .2s;
}

.sidebar-vcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.sv-thumb {
  width: 100%;
  height: 130px;
  border-radius: 8px;
  overflow: hidden;
}

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

.sv-title {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* スマホは横型に切り替え */
@media (max-width: 700px) {
  .sidebar-vcard {
    flex-direction: row;
    gap: 10px;
    align-items: center;
  }

  .sv-thumb {
    width: 40%;
    height: 90px;
  }

  .sv-title {
    -webkit-line-clamp: 3;
  }
}
