/* ==========================================================================
   資料ダウンロード（詳細）  page-download-detail.php
   接頭辞：.p-dl-
   ========================================================================== */
.p-dl {
  --dl-red: #d6000f;
  --dl-ink: #1a1a1a;
  --dl-text: #333;
  --dl-sub: #666;
  --dl-gray: #f4f4f4;
  --dl-line: #e3e3e3;
  --dl-pink: #fff0f1;
  color: var(--dl-text);
}

/* ---- FV（共通 c-low-fv）内のタグ ------------------------------------------- */
.p-dl-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}
.p-dl-tags li {
  border: 1px solid var(--dl-red);
  color: var(--dl-red);
  background: #fff;
  border-radius: 999px;
  padding: 3px 16px;
  font-size: 13px;
  font-weight: 700;
}

/* ---- Body (2 columns) ---------------------------------------------------- */
.p-dl-body__container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 56px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 100px;
}
.p-dl--single .p-dl-body__container {
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
}

/* 表紙 */
.p-dl-cover {
  margin: 0 0 24px;
  background: var(--dl-gray);
  border-radius: 20px;
  padding: 40px 48px;
}
.p-dl-cover__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.p-dl-jump {
  display: none;
}

/* ---- 本文ブロック -------------------------------------------------------- */
.p-dl-content > *:first-child {
  margin-top: 0;
}
.p-dl-content p {
  font-size: 16px;
  line-height: 1.9;
}
.p-dl-sec {
  margin-top: 56px;
}
.p-dl-sec__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dl-ink);
  line-height: 1.5;
  margin: 0 0 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.p-dl-sec__title span {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--dl-red);
  text-transform: uppercase;
}

/* わかること（チェック） */
.p-dl-learn {
  list-style: none;
  margin: 0;
  padding: 28px 32px;
  background: var(--dl-gray);
  border-radius: 16px;
  display: grid;
  gap: 14px;
}
.p-dl-learn li {
  position: relative;
  padding-left: 36px;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 700;
  color: var(--dl-ink);
}
.p-dl-learn li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--dl-red);
}
.p-dl-learn li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 7px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 中身の一部紹介 */
.p-dl-preview {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.p-dl-preview li {
  margin: 0;
}
.p-dl-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--dl-line);
}
.p-dl-preview p {
  font-size: 14px;
  line-height: 1.6;
  margin: 10px 0 0;
  color: var(--dl-sub);
}

/* 目次 */
.p-dl-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--dl-line);
}
.p-dl-toc li {
  display: flex;
  gap: 20px;
  align-items: baseline;
  padding: 16px 4px;
  border-bottom: 1px solid var(--dl-line);
  font-size: 16px;
  font-weight: 700;
  color: var(--dl-ink);
  line-height: 1.6;
}
.p-dl-toc li span {
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  color: var(--dl-red);
  min-width: 28px;
}

/* こんな方に */
.p-dl-target {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.p-dl-target li {
  background: #333;
  color: #fff;
  border-radius: 16px;
  padding: 22px 20px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.7;
}

/* 資料概要 */
.p-dl-spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.p-dl-spec th,
.p-dl-spec td {
  border-bottom: 1px solid var(--dl-line);
  padding: 14px 8px;
  text-align: left;
  vertical-align: top;
  line-height: 1.7;
}
.p-dl-spec th {
  width: 9em;
  color: var(--dl-ink);
  font-weight: 700;
}

/* ---- フォーム（右カラム・追従） ------------------------------------------ */
.p-dl-body__side {
  position: sticky;
  top: 110px;
  scroll-margin-top: 100px;
}
.p-dl-form {
  background: #fff;
  border: 2px solid var(--dl-ink);
  border-radius: 20px;
  padding: 28px 26px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.p-dl-form__head {
  font-size: 20px;
  font-weight: 700;
  color: var(--dl-ink);
  text-align: center;
  margin: 0 0 8px;
}
.p-dl-form__note {
  font-size: 13px;
  line-height: 1.7;
  color: var(--dl-sub);
  margin: 0 0 18px;
  text-align: center;
}
/* サイト共通 .ota2-form を縦積みに */
.p-dl-form .ota2-form__card {
  padding: 0;
  box-shadow: none;
  border: 0;
  background: none;
}
.p-dl-form .ota2-form__row {
  display: block;
  padding: 0;
  margin: 0 0 16px;
  border: 0;
}
.p-dl-form .ota2-form__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  width: auto;
  padding: 0;
}
.p-dl-form .ota2-form__label p {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.p-dl-form .ota2-form__field {
  width: 100%;
}
.p-dl-form input[type="text"],
.p-dl-form input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
}
.p-dl-form .ota2-form__privacy,
.p-dl-form .ota2-form__submit-hint {
  font-size: 12px;
  line-height: 1.6;
}
.p-dl-form .ota2-form__actions {
  margin-top: 8px;
  text-align: center;
}
.p-dl-form .ota2-form__submit {
  width: 100%;
}

/* SP下部固定CTA */
.p-dl-fixed {
  display: none;
}

/* ---- SP ------------------------------------------------------------------ */
@media screen and (max-width: 767px) {
  .p-dl-body__container {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 32px;
    padding-bottom: 120px;
  }
  .p-dl-cover {
    padding: 20px;
    border-radius: 14px;
  }
  .p-dl-jump {
    display: block;
    background: var(--dl-red);
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    margin: 0 0 8px;
  }
  .p-dl-sec {
    margin-top: 44px;
  }
  .p-dl-sec__title {
    font-size: 20px;
    flex-direction: column;
    gap: 4px;
  }
  .p-dl-learn {
    padding: 20px;
  }
  .p-dl-preview {
    grid-template-columns: minmax(0, 1fr);
  }
  .p-dl-target {
    grid-template-columns: minmax(0, 1fr);
  }
  .p-dl-body__side {
    position: static;
  }
  .p-dl-form {
    padding: 24px 18px 20px;
  }
  .p-dl-fixed {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s;
  }
  .p-dl-fixed.is-hide {
    transform: translateY(110%);
  }
  .p-dl-fixed__btn {
    display: block;
    background: var(--dl-red);
    color: #fff;
    text-align: center;
    font-weight: 700;
    border-radius: 999px;
    padding: 14px;
    text-decoration: none;
  }
}

/* ---- サンクスページ（フォームなし・1カラム） ------------------------------- */
.p-dl-thanks {
  text-align: center;
}
.p-dl-thanks__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--dl-red);
  position: relative;
}
.p-dl-thanks__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 30px;
  height: 20px;
  border: solid #fff;
  border-width: 0 0 3px 3px;
  transform: translate(-50%, -50%) rotate(-45deg);
  box-sizing: border-box;
}
.p-dl-content .p-dl-thanks__title {
  font-size: 26px;
  font-weight: 700;
  color: var(--dl-ink);
  line-height: 1.5;
  margin: 0 0 16px;
}
.p-dl-thanks .p-dl-thanks__text {
  font-size: 16px;
  line-height: 1.9;
  margin: 0;
}
.p-dl-steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  text-align: left;
}
.p-dl-steps li {
  background: var(--dl-gray);
  border-radius: 16px;
  padding: 22px 20px;
  font-size: 15px;
  line-height: 1.7;
}
.p-dl-steps li b {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--dl-red);
  margin-bottom: 6px;
}
.p-dl-notice {
  margin: 24px 0 0;
  padding: 20px 24px;
  border: 1px solid var(--dl-line);
  border-radius: 12px;
  text-align: left;
  font-size: 14px;
  line-height: 1.8;
}
.p-dl-notice p {
  font-size: 14px;
  margin: 0;
}
.p-dl-next {
  margin: 48px 0 0;
  padding: 36px 32px;
  border-radius: 20px;
  background: var(--dl-ink);
  color: #fff;
}
.p-dl-content .p-dl-next__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #fff;
}
.p-dl-next p {
  color: #ddd;
  font-size: 15px;
}
.p-dl-next__btn {
  display: inline-block;
  margin-top: 18px;
  background: var(--dl-red);
  color: #fff;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 999px;
  text-decoration: none;
}
.p-dl-next__btn:hover {
  opacity: 0.85;
}
@media screen and (max-width: 767px) {
  .p-dl-content .p-dl-thanks__title {
    font-size: 21px;
  }
  .p-dl-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .p-dl-next {
    padding: 28px 20px;
  }
}

/* ---- 確認画面（Confirm Plus Contact Form 7） ------------------------------ */
/* プラグイン既定の div#wpcf7cpcnf{position:absolute} を右カラム内で上書き */
.p-dl-form .wpcf7 div#wpcf7cpcnf {
  position: static;
  z-index: auto;
  margin: 0;
  padding: 0;
  background: none;
  color: var(--dl-text);
}
.p-dl-form .wpcf7 div#wpcf7cpcnf table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;
}
.p-dl-form .wpcf7 div#wpcf7cpcnf tbody {
  display: table-row-group;
}
.p-dl-form .wpcf7 div#wpcf7cpcnf tr {
  display: block;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--dl-line);
  padding: 12px 0;
}
.p-dl-form .wpcf7 div#wpcf7cpcnf th,
.p-dl-form .wpcf7 div#wpcf7cpcnf td {
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
  color: var(--dl-text);
}
.p-dl-form .wpcf7 div#wpcf7cpcnf th {
  font-weight: 700;
  color: var(--dl-ink);
  margin-bottom: 2px;
}
.p-dl-form .wpcf7 div#wpcf7cpcnf th p {
  margin: 0;
  font-size: 13px;
}
.p-dl-form .wpcf7cp-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.p-dl-form .wpcf7cp-btns .wpcf7cp-cfm-edit-btn,
.p-dl-form .wpcf7cp-btns .wpcf7cp-cfm-submit-btn {
  flex: 1;
  padding: 14px 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.4;
  text-align: center;
}
.p-dl-form .wpcf7cp-btns .wpcf7cp-cfm-edit-btn {
  background: #5f5f5f;
}
.p-dl-form .wpcf7cp-btns .wpcf7cp-cfm-submit-btn {
  background: var(--dl-red);
}

/* SP：reCAPTCHAバッジを下部固定CTAの上に逃がす */
@media screen and (max-width: 767px) {
  body.page-template-page-download-detail .grecaptcha-badge {
    bottom: 90px !important;
  }
}

/* ==========================================================================
   2026-10-21 追加：サービス資料・あわせて読みたい資料・フォーム項目
   ========================================================================== */
.p-dl-tags li:first-child {
  background: var(--dl-red);
  color: #fff;
}
.p-dl-form input[type="tel"],
.p-dl-form select {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px;
}

/* あわせて読みたい資料（カードは page-download.css の .p-dlh-card を使用） */
.p-dl-related {
  background: var(--dl-gray);
  padding: 72px 0 96px;
}
.p-dl-related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
}
.p-dl-related__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dl-ink);
  line-height: 1.5;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.p-dl-related__title span {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--dl-red);
  text-transform: uppercase;
}
.p-dl-related__all {
  font-size: 14px;
  font-weight: 700;
  color: var(--dl-ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  white-space: nowrap;
}
.p-dl-related__all:hover {
  color: var(--dl-red);
}
.p-dl--single .p-dl-body__container {
  padding-bottom: 72px;
}

@media screen and (max-width: 767px) {
  .p-dl-related {
    padding: 48px 0 120px;
  }
  .p-dl-related__head {
    flex-direction: column;
    align-items: flex-start;
  }
  .p-dl-related__title {
    font-size: 20px;
    flex-direction: column;
    gap: 4px;
  }
}

/* ダウンロードURLの期限切れで戻ってきたとき（?dl=expired）の案内 */
.p-dl-form__expired {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #FDECEE;
  color: #B00014;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}
.p-dl-form__expired[hidden] {
  display: none;
}
