/* =============================================================
   BizMow コラム一覧ページ — column.css  v2
   service.css / plan.css の設計・変数・クラス名を完全踏襲
   functions.php の is_post_type_archive('column') で自動読み込み
============================================================= */

/* ------------------------------------------------------------
   Lightning 親テーマ干渉リセット
------------------------------------------------------------ */
#bizmow-column-archive h1,
#bizmow-column-archive h2,
#bizmow-column-archive h3,
#bizmow-column-archive h4 {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}
#bizmow-column-archive h1::before, #bizmow-column-archive h1::after,
#bizmow-column-archive h2::before, #bizmow-column-archive h2::after,
#bizmow-column-archive h3::before, #bizmow-column-archive h3::after,
#bizmow-column-archive h4::before, #bizmow-column-archive h4::after {
  content: none !important;
}

#bizmow-column-archive {
  padding-top: 15px;
}

/* ------------------------------------------------------------
   CSS 変数（service.css・plan.css と共有）
------------------------------------------------------------ */
:root {
  --col-gold:      #FFB800;
  --col-gold-dark: #8A6800;
  --col-gold-soft: #FFF9E0;
  --col-or:        #F97040;
  --col-text:      #383838;
  --col-mute:      #888888;
  --col-border:    #E5E7EB;
  --col-surface:   #F7F6F3;
}

/* ----------------------------------------------------------------
   2. CSS変数（カラーパレット）
---------------------------------------------------------------- */
:root {
  /* 事務アウトソーシング系（オレンジ） */
  --plan-or: #F97040;
  --plan-or-soft: #FFF7ED;
  --plan-or-line: #F0E0D0;
  /* 経営管理アウトソーシング系（ティール） */
  --plan-tl: #2FA3BD;
  --plan-tl-soft: #E1F5EE;
  --plan-tl-line: #C5E5DD;
  /* 共通アクセント */
  --plan-gold: #FFB800;
  --plan-gold-soft: #FFFBEB;
  /* テキスト・ボーダー */
  --plan-text: #383838;
  --plan-mute: #888888;
  --plan-line: #F0F0F0;
}

/* ----------------------------------------------------------------
   [01] FV
---------------------------------------------------------------- */
.plan-fv {
  padding: clamp(40px, 6vw, 80px) 0 clamp(30px, 5vw, 50px);
  background: linear-gradient(135deg, #fff7f3 0%, #ffffff 50%, #f0fbff 100%);
  position: relative;
  overflow: hidden;
}

/* 背景透かし文字 */
.plan-fv-bg-text {
  position: absolute;
  /* top: 50%; */
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(64px, 14vw, 140px);
  font-weight: 900;
  /* color: #ebebed; */
  color: #ebebed80;
  letter-spacing: .04em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  line-height: 1;
}

/* 背景装飾円 */
.plan-fv::before,
.plan-fv::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.plan-fv::before {
  width: 500px;
  height: 500px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle, rgba(249, 112, 64, 0.08) 0%, transparent 70%);
  animation: plan-fv-float1 8s ease-in-out infinite;
}

.plan-fv::after {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(47, 163, 189, 0.07) 0%, transparent 70%);
  animation: plan-fv-float2 10s ease-in-out infinite;
}

@keyframes plan-fv-float1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-20px, 20px) scale(1.05);
  }
}

@keyframes plan-fv-float2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(16px, -16px) scale(1.04);
  }
}

/* FV内コンテンツを前面に */
.plan-fv .container-1280 {
  position: relative;
  z-index: 1;
}

/* 装飾図形 */
.plan-fv-deco {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.plan-fv-deco--sq1 {
  width: 32px;
  height: 32px;
  top: 60px;
  right: 18%;
  border: 2px solid rgba(249, 112, 64, 0.18);
  border-radius: 6px;
  transform: rotate(20deg);
  animation: plan-fv-spin 14s linear infinite;
}

.plan-fv-deco--sq2 {
  width: 18px;
  height: 18px;
  top: 140px;
  right: 12%;
  background: rgba(255, 184, 0, 0.15);
  border-radius: 4px;
  transform: rotate(-10deg);
  animation: plan-fv-spin 20s linear infinite reverse;
}

.plan-fv-deco--dot {
  width: 10px;
  height: 10px;
  top: 80px;
  left: 14%;
  background: rgba(47, 163, 189, 0.18);
  border-radius: 50%;
  animation: plan-fv-float1 6s ease-in-out infinite;
}

@keyframes plan-fv-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.plan-fv-accent {
  color: var(--plan-or);
}

.plan-fv-or {
  color: var(--plan-or);
}

.plan-fv-tl {
  color: var(--plan-tl);
}

.plan-fv-lead {
  font-size: clamp(14px, 1.6vw, 16px);
  color: #555;
  line-height: 2;
  margin-top: 8px;
  text-align: center;
  padding-top: 3%;
}

.plan-fv-lead strong {
  font-weight: 700;
}



/* ============================================================
   [02] 2カラムレイアウト
============================================================ */
.col-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 80px;
}

/* ============================================================
   [03] カテゴリタブ
============================================================ */
.col-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.col-cat-tab {
  display: inline-block;
  padding: 7px 18px;
  border: 1.5px solid var(--col-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--col-text);
  background: #fff;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.col-cat-tab:hover {
  background: var(--col-gold-soft);
  border-color: var(--col-gold);
  color: var(--col-gold-dark);
  transform: translateY(-1px);
}
.col-cat-tab.is-active {
  background: #FFB800;
  border-color: #FFB800;
  color: #1a1a1a;
  font-weight: 700;
}

/* ============================================================
   [04] 記事グリッド
============================================================ */
.col-main {
  min-width: 0;
  overflow: hidden;
}

.col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* 先頭カードは2カラム幅（フィーチャード） */
.col-card--featured {
  grid-column: 1 / -1;
}

/* ── カード共通 ── */
.col-card {
  background: #fff;
  border: 1px solid var(--col-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.col-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,.08);
}

/* 通常カードのリンク */
.col-card__link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* フィーチャードカード専用リンク：横2分割グリッド */
.col-card__feat-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.col-card--featured .col-card__thumb {
  height: 100%;
  min-height: 220px;
  aspect-ratio: auto;
}

/* サムネ */
.col-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--col-surface);
}
.col-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.col-card:hover .col-card__thumb img { transform: scale(1.04); }

.col-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

/* カテゴリバッジ */
.col-card__cat-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--col-or);
  color: #FFF;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  z-index: 1;
  white-space: nowrap; /* 折り返し防止 */
  max-width: calc(100% - 20px); /* 親幅からはみ出ない */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* テキストエリア */
.col-card__body {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0; /* テキストがはみ出さないよう */
  overflow: hidden;
}
.col-card--featured .col-card__body {
  justify-content: center;
  padding: 24px 28px;
}

.col-card__date {
  font-size: 12px;
  color: var(--col-mute);
}

.col-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--col-text);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-all;
}
.col-card--featured .col-card__title {
  font-size: 18px;
  -webkit-line-clamp: 4;
}

.col-card__excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.7;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   [05] ページネーション
============================================================ */
.col-pagination {
  margin-top: 40px;
  text-align: center;
}
.col-pagination .nav-links {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.col-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--col-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--col-text);
  background: #fff;
  text-decoration: none;
  transition: all .15s;
}
.col-pagination .page-numbers:hover {
  border-color: var(--col-gold);
  background: var(--col-gold-soft);
}
.col-pagination .page-numbers.current {
  background: var(--col-gold);
  border-color: var(--col-gold);
  color: #1a1a1a;
}
.col-pagination .page-numbers.dots {
  border: none;
  background: none;
  width: auto;
}

/* ============================================================
   [06] サイドバー共通
============================================================ */
.col-sidebar {
  position: sticky;
  top: 100px; /* ヘッダー高さに合わせて調整 */
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.col-side-widget {
  background: transparent;
}

.col-side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--col-text);
  background: transparent;
  padding: 0 0 10px 0;
  border-bottom: none;
  border-bottom: 2px solid var(--col-border);
  margin: 0 0 4px 0 !important;
}
.col-side-title__icon {
  color: var(--col-or);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── 検索フォーム ── */
.col-search-form { padding: 10px 0 0; }
.col-search-inner {
  display: flex;
  border: 1.5px solid var(--col-or);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s;
}
.col-search-inner:focus-within { border-color: var(--col-or); box-shadow: 0 0 0 3px rgba(249,112,64,.12); }

.col-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 12px;
  font-size: 14px;
  font-family: 'Noto Sans JP', sans-serif;
  background: #fff;
  color: var(--col-text);
}
.col-search-input::placeholder { color: #bbb; }

.col-search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--col-or);
  border: none;
  cursor: pointer;
  color: #fff;
  transition: background .15s;
}
.col-search-btn:hover { background: #e05a2a; }
.col-search-btn svg { stroke: #fff; }

/* ── カテゴリリスト ── */
.col-side-cats {
  padding: 4px 0 0;
  list-style: none;
  margin: 0;
}
.col-side-cats li { border-bottom: 1px solid var(--col-border); }
.col-side-cats li:last-child { border-bottom: none; }

.col-side-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--col-text);
  text-decoration: none;
  transition: background .15s, color .15s;
  gap: 8px;
  background: #fff;
}
.col-side-cat:hover {
  background: var(--col-gold-soft) !important;
  color: var(--col-gold-dark) !important;
}
.col-side-cat.is-active {
  background: var(--col-gold-soft) !important;
  color: var(--col-gold-dark) !important;
  font-weight: 700;
}
.col-side-cat.is-active::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--col-gold) !important;
  border-radius: 2px;
  flex-shrink: 0;
}
.col-side-cat__name { flex: 1; }
.col-side-cat__count {
  font-size: 12px;
  color: var(--col-mute);
  background: var(--col-surface);
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ── 人気記事リスト ── */
.col-popular-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.col-popular-item { border-bottom: 1px solid var(--col-border); }
.col-popular-item:last-child { border-bottom: none; }

.col-popular-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--col-text);
  transition: background .15s;
}
.col-popular-link:hover { background: var(--col-gold-soft); }

/* 順位バッジ */
.col-popular-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--col-border);
  color: var(--col-mute);
}
/* 1〜3位は色付き */
.col-popular-rank--1 { background: #FFB800; color: #1a1a1a; }
.col-popular-rank--2 { background: #C0C0C0; color: #1a1a1a; }
.col-popular-rank--3 { background: #CD7F32; color: #fff; }

.col-popular-thumb {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--col-surface);
}
.col-popular-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.col-popular-thumb__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.col-popular-title {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   [07] "記事なし" メッセージ
============================================================ */
.col-no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--col-mute);
  font-size: 15px;
}

/* ============================================================
   [08] レスポンシブ
============================================================ */

/* ── PC：上部タブは不要なので非表示 ── */
@media screen and (min-width: 1025px) {
  .col-cat-tabs {
    display: none;
  }
}

/* ── タブレット（768〜1024px） ── */
@media screen and (max-width: 1024px) {
  /* 2カラム維持、サイドバー幅を少し縮める */
  .col-layout {
    grid-template-columns: 1fr 240px;
    gap: 28px;
  }

  /* フィーチャードカードは縦積みに変更（横幅が狭いので） */
  .col-card--featured .col-card__feat-link {
    grid-template-columns: 1fr;
  }
  .col-card--featured .col-card__thumb {
    min-height: auto;
    aspect-ratio: 16 / 7;
  }
  .col-card--featured .col-card__body {
    padding: 16px 18px 20px;
  }
  .col-card--featured .col-card__title {
    font-size: 16px;
  }  /* 上部タブ：表示（サイドバーが右にあっても補助として表示） */
  .col-cat-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .col-cat-tabs::-webkit-scrollbar { display: none; }
  .col-cat-tab { white-space: nowrap; }
}

/* ── スマホ（〜767px） ── */
@media screen and (max-width: 767px) {
  /* メインカラムに左右padding（タブがはみ出ないよう） */
  .col-main {
    padding: 0 16px;
    overflow: hidden;
  }

  /* 1カラム化（paddingはcol-mainに移譲） */
  .col-layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 24px 0 0;
  }

  /* サイドバーは記事リストの下へ */
  .col-sidebar {
    position: static;
    margin-top: 40px;
    padding: 0 0 56px;
    gap: 16px;
  }

  /* グリッド：1枚目フィーチャード＋以降は横長カードに */
  .col-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* 1枚目：通常の縦型カード（フィーチャードは解除） */
  .col-card--featured .col-card__feat-link {
    grid-template-columns: 1fr;
  }
  .col-card--featured .col-card__thumb {
    min-height: auto;
    aspect-ratio: 16 / 8;
  }
  .col-card--featured .col-card__body {
    padding: 14px 16px 16px;
  }
  .col-card--featured .col-card__title {
    font-size: 15px;
  }

  /* 2枚目以降：横長レイアウト（サムネ左・テキスト右） */
  .col-card:not(.col-card--featured) {
    display: block;
  }
  .col-card:not(.col-card--featured) .col-card__link {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  .col-card:not(.col-card--featured) .col-card__thumb {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 80px;
    height: auto;
    overflow: hidden;
  }
  .col-card:not(.col-card--featured) .col-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .col-card:not(.col-card--featured) .col-card__body {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: calc(100% - 100px) !important;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
  }
  .col-card:not(.col-card--featured) .col-card__title {
    font-size: 13px;
    -webkit-line-clamp: 3;
    word-break: break-all;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    max-width: 100% !important;
  }
  /* バッジもスマホ用に小さく */
  .col-card:not(.col-card--featured) .col-card__cat-badge {
    font-size: 10px;
    padding: 2px 8px;
    bottom: 6px;
    left: 6px;
  }

  /* カテゴリタブ：横スクロール */
  .col-cat-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
    gap: 6px;
  }
  .col-cat-tabs::-webkit-scrollbar { display: none; }
  .col-cat-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 12px;
  }
}
