/* ===============================
   コラム詳細ページのメインコンテナ
=============================== */
.column-detail-container {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0px 40px 60px 40px;
  box-sizing: border-box;
}
.sidebar-banner a img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* 他にも width:100%, height:auto など画像表示用の指定がある場合は合わせて */
}

.sidebar-banner a:hover img {
  /* ほんの少しだけ拡大する */
  transform: scale(1.01);
  /* 周囲に影を付ける (色や濃さはお好みで調整) */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 関連記事などで3列表示にする例 */
.articles-wrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* 2カラムレイアウト用のコンテナ */
.column-detail-layout {
  display: flex;
  gap: 60px;
  margin: 0 auto;
}

/* メインコンテンツエリア */
.article-main {
  flex: 0 0 900px;
  max-width: 900px;
}

/* サイドバー */
.article-sidebar {
  flex: 0 0 350px;
  max-width: 350px;
}

/* ===============================
   バナーエリア（サイドバー上部など）
=============================== */
.sidebar-banner {
  height: 186px;
  width: 100%;
  width: 100%;
  margin-bottom: 30px;
}

/* ===============================
   検索エリア (詳細ページ)
=============================== */
.search-area {
  display: flex;
  gap: 10px;
  margin-bottom: 0px; /* ここでは余白を狭める例 */
}
.search-input {
  width: 200px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  border: none;
  padding: 0 15px;
  font-family: "BIZ UDGothic";
}
.search-button {
  display: inline-flex;
  height: 52px;
  padding: 12px 50px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-radius: 7px;
  background: #e61221;
  border: none;
  cursor: pointer;
  color: #fff;
  font-family: "BIZ UDGothic";
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 4px;
  transition: background-color 0.3s ease;
}
.search-button:hover {
  background: #cc0f1d;
}

/* ===============================
   カテゴリーコンテナ(詳細ページ)
=============================== */
.column-main .category-container.category-detail {
  display: flex;
  width: 100%;
  max-width: 331px;
  padding: 30px 30px 35px 30px;
  flex-direction: column;
  gap: 15px;
  border-radius: 14px;
  background: #fff;
  margin: 30px auto 0px auto;
}

.category-detail .category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  padding: 30px 4px;
}

/* カテゴリーボタン (.category-btn) */
.category-detail .category-buttons .category-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: #929292;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 7px;
  text-align: center;
  color: #fff;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 3.2px;
  transition: background-color 0.3s ease;
  width: auto;
  min-width: 266px;
  margin-bottom: 0;
  flex: 0 1 auto;
}
.category-detail .category-buttons .category-btn:hover {
  background: #e61221;
}
.category-detail .category-buttons .category-btn.active {
  background: #e61221;
}

/* Ajax結果を表示する .latest-articles-grid (詳細ページ用) */
#single-column-ajax-results.latest-articles-grid {
  display: grid;
  grid-template-columns: 1fr; /* サイドバーの幅を考慮して1列表示 */
  gap: 20px;
  margin-top: 20px;
}

/* ===============================
   人気記事エリア
=============================== */
.popular-articles {
  margin-top: 30px;
padding: 30px 20px;
}
.popular-title {
  color: #333;
  text-align: center;
  font-family: "BIZ UDGothic";
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

/* ===============================
   記事詳細エリア
=============================== */
.article-detail {
  width: 100%;
}

/* 記事メイン画像 */
.article-image {
  width: 100%;
  margin-bottom: 30px;
  height: 0px;
  overflow: hidden;
}
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 記事日付 */
.article-meta {
  margin-bottom: 24px;
}
.article-date {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 2.4px;
  opacity: 0.5;
}

/* 記事タイトル */
.article-title {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: 3.6px;
  margin: 24px 0;
}

/* カテゴリーエリア */
.article-tag {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}
.article-tag span {
  display: flex;
  width: 191px;
  height: 25px;
  padding: 0px 30px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 40px;
  background: #fff;
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 25px;
  letter-spacing: 2.1px;
  opacity: 0.5;
}

/* 区切り線 */
.decorative-lines {
  display: flex;
  gap: 12px;
  margin: 25px 0px;
  width: 100%;
  padding-left: 30px;
}

/* 記事本文 */
.article-content {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: 3.2px;
}

/* 一覧に戻るボタン */
.view-all-button-container {
  display: flex;
  justify-content: center;
  margin-top: 73px;
  padding-bottom: 100px;
}
.view-all-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-radius: 51px;
  background: #333;
  text-decoration: none;
  height: 50px;
  min-width: 295px;
  padding: 0 20px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* アニメーションを反対にした */
}
.view-all-button:hover {
  transform: translateX(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.view-all-button:active {
  transform: translateX(0);
  box-shadow: none;
}

.view-all-button span {
  color: #fff;
  text-align: center;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-weight: 700;
  line-height: 28.9px;
  letter-spacing: 3.2px;
  padding-right: 0px;
}

.view-all-button .arrow-icon {
  width: 24px;
  height: 24px;
}

/* ===============================
   サイドバーの人気記事カードスタイル
=============================== */
.sidebar-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.sidebar-card:hover {
  transform: translateY(-2px);
}
.sidebar-card .card-thumbnail {
  width: 100%;
  height: 200px; /* column-cardと同じ高さに調整 */
  overflow: hidden;
  position: relative;
  display: block;
}
.sidebar-card .card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}
.sidebar-card .card-content {
  padding: 12px;
}
.sidebar-card .card-title {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.sidebar-card .card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.sidebar-card .card-category {
  color: #fff;
  background: #de021e;
  padding: 2px 8px;
  opacity: 0.5;
}
.sidebar-card .card-date {
  color: #333;
  opacity: 0.5;
}

#single-column-ajax-results .column-card .card-title {
  font-size: 10px;
}
#single-column-ajax-results .column-card .card-category {
  padding: 0px 4px;
  font-size: 8px;
  line-height: 20px;
  letter-spacing: 1.8px;
}
#single-column-ajax-results .column-card .card-date {
  font-size: 10px; /* 日付のフォントサイズを変える */
}

/* ===============================
   関連記事セクション
=============================== */
.related-articles {
  margin-top: 60px;
  margin-bottom: 60px;
}
.related-articles .latest-header {
  display: flex;
  align-items: center;
  gap: 30px;
  width: 100%;
  margin: 60px auto;
}
.related-articles .latest-decorative-lines {
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  gap: 12px;
  min-width: 0;
}
.related-articles .line {
  height: 1px;
  flex: 1;
}
.related-articles .blue-line {
  background-color: #1e5eff;
}
.related-articles .red-line {
  background-color: #de021e;
}
.related-articles .main-title {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 24px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 4.8px;
  margin: 0;
}
.related-articles .latest-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

/* ===============================
   レスポンシブ対応
=============================== */

/* --- 1400px以下 --- */
@media screen and (max-width: 1400px) {
  .sidebar-banner {
    height: 500px;
  }
  .column-main .category-container.category-detail {
    max-width: none;
    width: 100%;
    margin: 0px auto 0px auto;
  }

  .category-detail .category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    padding: 30px 35px;
    margin-top: 0;
  }
  .category-detail .category-buttons .category-btn {
    flex: 0 1 auto;
    width: auto;
    min-width: 120px;
    max-width: calc(33.333% - 10px);
  }

  .sidebar-card .card-title {
    margin-left: 10px;
    margin-top: 0px;
    margin-bottom: 20px;
    font-size: 16px;
  }
  .sidebar-card .card-meta {
    margin-left: 10px;
    margin-bottom: 10px;
  }

  /* 以前は「.column-main .category-container.category-detail {display:none;}」となっていたが
       今回はサイドバー表示用なので表示したままにしておく */
  .column-detail-layout {
    flex-direction: column;
    gap: 40px;
  }

  .article-main,
  .article-sidebar {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .category-container {
    width: 100%;
    max-width: none;
  }

  .search-area {
    flex-wrap: wrap;
  }
  .search-input {
    width: calc(100% - 140px);
  }
  #single-column-ajax-results.latest-articles-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px auto;
    width: 100%;
  }
  /* カード内のコンテンツサイズ調整 */
  #single-column-ajax-results .column-card {
    height: 100%;
  }

  #single-column-ajax-results .column-card .card-thumbnail {
    height: 200px;
    width: 100%;
  }

  #single-column-ajax-results .column-card .card-thumbnail img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  #single-column-ajax-results .column-card .card-title {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
    letter-spacing: 2px;
  }

  #single-column-ajax-results .column-card .card-category {
    padding: 2px 2px;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 1.8px;
  }

  #single-column-ajax-results .column-card .card-date {
    font-size: 14px;
  }
}

/* タブレットサイズ対応 */
@media screen and (max-width: 1024px) {
  #single-column-ajax-results.latest-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- 1200px以下 --- */
@media screen and (max-width: 1200px) {
  .related-articles .articles-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- 767px以下 --- */
@media screen and (max-width: 767px) {
  .sidebar-banner {
    margin-bottom: 0px;
  }
  .article-meta {
    margin-bottom: 10px;
  }
  .article-image img {
    width: 100%;
    height: 0px !important;
    object-fit: cover;
    display: block;
  }
  .sidebar-banner {
    height: 200px;
  }
  .category-detail .category-buttons {
    padding: 12px 12px;
    margin-top: 0;
    padding-top: 30px;
  }
  .column-main .category-container.category-detail {
    padding: 0px 0px 0px 0px;
    gap: 0px;
    background: none;
  }
  .category-detail .category-buttons .category-btn {
    min-width: 100px;
    max-width: calc(50% - 5px);
    font-size: 9.996px;
    font-style: normal;
    font-weight: 700;
    line-height: 19.992px; /* 200% */
    letter-spacing: 1.999px;
    padding: 6px 15px;
  }
  .related-articles .articles-wrapper {
    grid-template-columns: 1fr;
    padding: 30px 20px;
  }
  .related-articles {
    margin-top: 60px;
    margin-bottom: 40px;
  }
  .related-articles .latest-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin: 40px 30px 30px 25px;
  }
  .related-articles .latest-cards {
    margin-top: 20px;
  }
  .related-articles .latest-header {
    width: 87%;
  }
  .related-articles .latest-decorative-lines {
    max-width: 100%;
    width: 100%;
  }
  .related-articles .main-title {
    font-size: 20px;
    letter-spacing: 4px;
  }
  .sidebar-card .card-thumbnail {
    height: 120px;
  }
  .column-detail-container {
    padding: 40px 10px;
  }
  .column-detail-layout {
    padding: 30px 20px;
    gap: 30px;
  }
  .article-title {
    font-size: 16px;
    line-height: 22px;
    letter-spacing: 3px;
  }
  .article-content {
    font-size: 14px;
    line-height: 26px;
    letter-spacing: 2.8px;
  }
  .article-date {
    font-size: 11px;
  }
  .article-tag span {
    font-size: 9.96px;
    width: auto;
    /* 必要に応じてパディングやマージンを調整 */
    padding: 0 15px;
  }
  .article-tag {
    flex-wrap: wrap;
    gap: 8px; /* お好みで隙間調整 */
  }

  .decorative-lines {
    padding-left: 0px;
  }
  .article-image {
    height: 0px !important;
  }

  .search-area {
    flex-direction: column;
  }
  .search-input {
    width: 100%;
  }
  .search-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 12px;
  }

  .category-container {
    padding: 30px 20px 20px;
  }
  .category-button,
  .category-btn {
    font-size: 14px;
    letter-spacing: 2.8px;
  }

  .view-all-button-container {
    margin-top: 50px;
    padding-bottom: 60px;
  }
  .view-all-button {
    min-width: 230px;
    height: 38px;
  }

  .view-all-button span {
    font-size: 14px;
    letter-spacing: 2.8px;
  }
  .view-all-button .arrow-icon {
    width: 18.4px;
    height: 18.4px;
    right: 92px;
    bottom: 15px;
  }
  #single-column-ajax-results.latest-articles-grid {
    grid-template-columns: 1fr;
    padding-left: 28px;
    padding-right: 28px;
  }

  #single-column-ajax-results .column-card .card-thumbnail {
    height: 180px;
  }

  #single-column-ajax-results .column-card .card-title {
    font-size: 14px;
    letter-spacing: 1.5px;
  }
}

/* --- 525px以下 --- */
@media screen and (max-width: 525px) {
  .sidebar-card .card-thumbnail {
    height: 180px;
  }
  
  .sidebar-card .card-title {
    font-size: 14px;
    margin: 8px 0;
    letter-spacing: 1.5px;
  }
  
  .sidebar-card .card-meta {
    gap: 8px;
  }
  
  .sidebar-card .card-category {
    padding: 2px 6px;
    font-size: 11px;
  }
  
  .related-articles .articles-wrapper {
    grid-template-columns: 1fr;
  }
  .related-articles {
    margin-top: 40px;
    margin-bottom: 0px;
  }
  .view-all-button .arrow-icon {
    width: 18.4px;
    height: 18.4px;
    right: 75px;
    bottom: 16px;
  }
}

/* --- 480px以下 --- */
@media screen and (max-width: 480px) {
  .column-detail-container {
    padding: 0px 20px;
    padding-bottom: 0px;
  }

  .view-all-button-container {
    margin-top: 35px;
    padding-bottom: 60px;
  }

  .view-all-button {
    min-width: 220px;
    height: 31px;
  }

  .view-all-button span {
    font-size: 12px;
    letter-spacing: 2.4px;
  }

  .view-all-button .arrow-icon {
    width: 17px;
    height: 17px;
  }
	
	.sidebar-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
  }
  
  .sidebar-card .card-thumbnail {
    height: 200px;
    width: 100%;
  }
  
  .sidebar-card .card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  .sidebar-card .card-content {
    padding: 10px 15px;
  }
  
  .sidebar-card .card-title {
    font-size: 16px;
    line-height: 1.5;
    margin: 10px 0;
    letter-spacing: 2px;
  }
  
  .sidebar-card .card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .sidebar-card .card-category {
    padding: 2px 8px;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 1.8px;
  }
}
