/* =========================================================
   taxonomy.css（タクソノミー一覧ページ）
   - taxonomy-card デザインで統一
   - アーカイブ / トップページと調和
========================================================= */

.taxonomy-list-page.front-container {
    padding: 0 20px 0;
}




/* ======================================
   1) ページタイトル（アーカイブと統一）
====================================== */
.taxonomy-list-page .archive-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin: 40px 0 24px;
    color: #fff;
}


/* ======================================
   2) 並び替え UI（archive と共通デザイン）
====================================== */

.taxonomy-sort-form {
    max-width: 1200px;
    margin: 0 auto 24px;
    display: flex;
    justify-content: flex-end;
    position: relative;          /* ▼ をこのフォームの中で絶対配置 */
}

/* セレクト本体 */
.taxonomy-sort-form select {
    appearance: none;
    -webkit-appearance: none;

    padding: 8px 40px 8px 12px;  /* 右を広めに → ▼ の分の余白 */
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.taxonomy-sort-form select:hover {
    background: #222;
    border-color: #444;
}

/* ▼ カスタム矢印（select の右端に固定） */
.taxonomy-sort-form::after {
    content: "▼";
    font-size: 10px;
    color: #ccc;
    pointer-events: none;
    position: absolute;
    right: 16px;                 /* セレクトの右端より少し内側 */
    top: 50%;
    transform: translateY(-50%);
}

/* スマホ時は中央寄せ＆幅100% */
@media (max-width: 768px) {
    .taxonomy-sort-form {
        justify-content: center;
        margin: 0 auto 16px;
    }

    .taxonomy-sort-form select {
        width: 100%;
    }
}




/* ======================================
   3) タクソノミー一覧（taxonomy-card デザイン）
====================================== */

.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}


@media (max-width: 768px) {
  .taxonomy-grid {
    grid-template-columns: repeat(1, minmax(0,1fr));
  }
}

/* ===== taxonomy-card ===== */
.taxonomy-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 16px 18px;
    background: #161616;

    border-radius: 4px;
    color: rgba(255,255,255,0.95);

    text-decoration: none;

    box-shadow: 0 4px 14px rgba(0,0,0,0.55);
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
    gap: 12px;                /* 左右の間隔を確保 */
    min-height: 48px;         /* 押しやすい高さを維持 */

}

.taxonomy-card:hover {
    background: #1b1b1b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.75);
}

/* 左：タクソノミー名 */
.taxonomy-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.32;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;           /* 余った領域を使用 */
    min-width: 0;             /* 長文での縮小を許可（重要） */
}

/* 右：件数バッジ */
.taxonomy-count {
    font-size: 13px;
    padding: 3px 8px;

    background: rgba(255,255,255,0.08);
    border-radius: 12px;

    color: rgba(255,255,255,0.75);
    min-width: 38px;
    text-align: center;

    transition: background .15s ease;
    flex-shrink: 0;           /* 右側が縮むのを禁止 */
    white-space: nowrap;      /* 改行しない（←これが重要） */

    min-width: 48px;          /* 右端幅を固定（スマホでも改行しない） */
}

.taxonomy-card:hover .taxonomy-count {
    background: rgba(255,255,255,0.18);
}



/* ======================================
   4) ページネーション（archive と完全統一）
====================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 60px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    height: 40px;
    padding: 0 14px;

    font-size: 14px;
    color: #ddd;

    background: #1c1c1c;
    border: 1px solid #2b2b2b;
    border-radius: 6px;

    text-decoration: none;
    transition: all .15s ease;
}

.pagination .prev,
.pagination .next {
    min-width: 70px;
    padding: 0 16px;
    font-weight: 600;
    background: #222;
    color: #fff;
}

@media (hover:hover) {
    .pagination a:hover {
        background: #2e2e2e;
        border-color: #444;
        color: #fff;
    }
}

.pagination .current {
    background: #fff;
    color: #000;
    border-color: #fff;
    font-weight: 600;
}

.pagination .dots {
    background: transparent !important;
    border: none !important;
    color: #555 !important;
    pointer-events: none;
}

@media (max-width: 768px) {
    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 10px;
        font-size: 13px;
    }

    .pagination .prev,
    .pagination .next {
        min-width: 60px;
        font-size: 13px;
    }
}

/* taxonomy見出し下の説明文（1） */
.gmd-taxonomy-intro{
  max-width: 760px;
  margin: 10px auto 18px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.70);
  text-align: center;

  /* 数字だけ・英数字だけでも折り返す */
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 768px){
  .gmd-taxonomy-intro{
    margin: 8px 12px 14px;
    text-align: left; /* スマホは読みやすさ優先 */
    font-size: 12.5px;
  }
}

/* taxonomyのh1自体も「数字だけ」で溢れないように保険 */
.archive-title,
.archive-taxonomy-title,
.taxonomy-title{
  overflow-wrap: anywhere;
  word-break: break-word;
}
