/*
 * documents.css
 * お役立ち資料（一覧 archive-documents.php ／ 詳細 single-documents.php）
 *
 * 一覧の見た目は、リニューアル版プロトタイプの documents-renewal.css。
 * 詳細ページの2カラム・見出し・表紙・「資料でわかること」の形は partner.css を共用し、
 * ここでは本文の基本の体裁だけを足している。
 */

/* =============================================
   パンくず
   style.css ではサービスページ向けに 1023px 以下で隠しているため、
   このページでは常に表示する。
   ============================================= */
@media screen and (max-width: 1023px) {
  .page-documents .breadcrumb {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    width: 100%;
    flex-shrink: 1;
    min-width: 0;
  }

  .page-documents .breadcrumb::-webkit-scrollbar {
    display: none;
  }
}

/* =============================================
   上：タイトル
   ============================================= */
body .dl-head {
  padding: 48px 0 0;
  background: #fff;
}

.dl-head__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--color-dark);
}

.dl-head__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--color-text);
}

/* =============================================
   おすすめ：3点セット
   ============================================= */
body .dl-featured {
  padding: 40px 0 0;
}

body .dl-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 40px;
  border: 0 !important;
  border-radius: 20px;
  background: var(--color-bg-light) !important;
  text-decoration: none;
  color: var(--color-dark);
}

.dl-feature__cover {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: #fff center / cover no-repeat;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .08);
}

.dl-feature__eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.dl-feature__title {
  display: block;
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
}

.dl-feature__desc {
  display: block;
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text);
}

.dl-feature__list {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.dl-feature__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

.dl-feature__list li span {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-sub);
}

.dl-feature__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 999px;
  background: var(--color-primary);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  transition: opacity .2s;
}

body .dl-feature:hover .dl-feature__btn {
  opacity: .85;
}

/* =============================================
   一覧
   ============================================= */
body .dl-section {
  padding-top: 64px;
}

.dl-list__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 0 0 28px;
  padding: 0 0 16px;
  border-bottom: 2px solid var(--color-dark);
}

.dl-list__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-dark);
}

.dl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body .dl-tab {
  padding: 8px 18px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-dark);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}

body .dl-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

body .dl-tab.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dl-grid li[hidden] {
  display: none;
}

body .dl-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 0 !important;
  background: none !important;
  text-decoration: none;
  color: var(--color-dark);
}

.dl-card__cover {
  display: block;
  aspect-ratio: 16 / 9;
  margin: 0 0 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff center / cover no-repeat;
  transition: box-shadow .2s, transform .2s;
}

body .dl-card:hover .dl-card__cover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
  transform: translateY(-2px);
}

.dl-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
}

.dl-card__cat {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--color-bg-light);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary);
}

.dl-card__format {
  font-size: 12px;
  color: var(--color-text-sub);
}

.dl-card__title {
  display: block;
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

.dl-card__desc {
  display: block;
  flex: 1;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text);
}

.dl-card__btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--color-primary);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
  transition: background .2s, color .2s;
}

body .dl-card:hover .dl-card__btn {
  background: var(--color-primary);
  color: #fff;
}

/* =============================================
   画面幅ごとの調整
   ============================================= */
@media screen and (max-width: 1079px) {
  body .dl-feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 28px;
  }

  .dl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 540px) {
  .dl-head__title {
    font-size: 24px;
  }

  body .dl-feature {
    padding: 20px;
  }

  .dl-feature__title {
    font-size: 21px;
  }

  .dl-feature__btn {
    justify-content: center;
    width: 100%;
  }

  .dl-list__title {
    font-size: 19px;
  }

  .dl-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}

/* おすすめ（3点セット）：資料ダウンロードのページと同じく、3つの表紙を重ねて見せる
   パンフレット（縦長）を左手前に立て、事例集とプロダクトイメージ（横長）を右奥に */
.dl-feature__cover--stack {
  position: relative;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.dl-stack {
  position: absolute;
  display: block;
  border-radius: 6px;
  background: #eee center / cover no-repeat;
  box-shadow: 0 14px 32px rgba(20, 20, 30, .16);
}

.dl-stack--pamphlet { top: 8%;  left: 2%;  z-index: 3; width: 34%; aspect-ratio: 210 / 297; box-shadow: 0 20px 40px rgba(20, 20, 30, .24); }
.dl-stack--cases    { top: 0;   left: 36%; z-index: 1; width: 60%; aspect-ratio: 16 / 9; }
.dl-stack--product  { top: 40%; left: 40%; z-index: 2; width: 60%; aspect-ratio: 16 / 9; }


/* =============================================
   パンくず
   プロトタイプでは column-renewal.css から読み込んでいた指定。
   お役立ち資料のページでも同じ見た目にするため、ここに写している。
   ============================================= */

body .page-nav .breadcrumb {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

body .page-nav .breadcrumb li,
body .page-nav .breadcrumb li:last-child {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--color-text-sub);
}

body .page-nav .breadcrumb li:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-dark);
}

body .page-nav .breadcrumb li + li::before {
  content: "\00203A";
  margin: 0 10px;
  color: #BBB;
}

body .page-nav .breadcrumb a {
  color: inherit;
  text-decoration: none;
}

body .page-nav .breadcrumb a:hover {
  color: var(--color-primary);
}


/* =============================================
   ページ送り（WordPress標準の仕組みで出力）

   見た目は共通土台（cocoon-reset.css 後半）の .pager。
   プロトタイプはボタン（:disabled）だったので、
   リンクのない「前へ」「次へ」用に is-disabled を足している。
   ============================================= */

body .pager__step.is-disabled {
  opacity: .35;
  cursor: default;
  pointer-events: none;
}

.dl-empty {
  text-align: center;
  color: var(--color-text-sub);
  padding: 48px 0;
  margin: 0;
}


/* =============================================
   詳細ページ：フォーム
   ============================================= */

.doc-form__empty {
  font-size: 14px;
  color: var(--color-text-sub);
  line-height: 1.8;
  margin: 0;
}

.doc-form__empty a {
  color: var(--color-primary);
  text-decoration: underline;
}


/* =============================================
   詳細ページ：本文（投稿画面のHTML）

   資料ごとに自由に書くため、クラスのない見出し・段落・リスト・画像・表の
   基本の体裁だけをそろえる。:where() で優先度を最低にしているので、
   本文に cv-topics などのクラス付きのHTMLを書けば、そちらの指定（partner.css）が優先される。
   ============================================= */

:where(.doc-body) > *:first-child {
  margin-top: 0;
}

:where(.doc-body) h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--color-dark);
  margin: 56px 0 20px;
}

:where(.doc-body) h3 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-dark);
  margin: 36px 0 12px;
}

:where(.doc-body) p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text);
  margin: 0 0 16px;
}

:where(.doc-body) ul,
:where(.doc-body) ol {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

:where(.doc-body) li {
  font-size: 16px;
  line-height: 1.9;
  color: var(--color-text);
  margin-bottom: 6px;
}

:where(.doc-body) img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

:where(.doc-body) figure {
  margin: 24px 0;
}

:where(.doc-body) table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
}

:where(.doc-body) th,
:where(.doc-body) td {
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  text-align: left;
  line-height: 1.7;
}

:where(.doc-body) th {
  background: var(--color-bg-light);
  font-weight: 700;
}

:where(.doc-body) a {
  color: var(--color-primary);
  text-decoration: underline;
}

@media screen and (max-width: 834px) {
  :where(.doc-body) h2 {
    font-size: 20px;
    margin-top: 44px;
  }

  :where(.doc-body) p,
  :where(.doc-body) li {
    font-size: 15px;
  }
}
