/* ========================================
   Crown Package - Resource Download Site
   Content-specific styles (header/footer in crown.css)
   ======================================== */

/* ========================================
   Hero / Page Title
   ======================================== */
.page-hero {
  background: url('../images/bg_hero.png') center center / cover no-repeat var(--primary-color) !important;
  padding: 48px 24px;
  text-align: center;
  color: #fff;
}

.page-hero h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.page-hero p {
  margin-top: 12px;
  font-size: 15px;
  opacity: 0.85;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb-inner {
  max-width: 1200px;
  width: 92%;
  margin: 0 auto;
  padding: 16px 0;
  font-size: 13px;
  color: #666;
}

.breadcrumb-inner a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-inner a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  margin: 0 8px;
  color: #999;
}

.breadcrumb-current {
  color: #666;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
  max-width: 1200px;
  width: 92%;
  margin: 0 auto;
  padding: 60px 0 80px;
}

/* ========================================
   Card Grid (Index Page)
   ======================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.card-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
  padding-top: 30px;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.card:hover .card-thumb img {
  transform: scale(1.03);
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h2 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.card-body p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  flex: 1;
}

.card-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 9px 0;
  text-align: center;
  background: var(--primary-color);
  border: 1px solid var(--primary-color);
  color: #fff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

/* カード全体をボタンとみなし、カードホバーで下層 CTA（.-btn）と同じ白反転にする */
.card:hover .card-btn {
  background: #fff;
  color: var(--text-color);
}

/* ========================================
   Detail Page - Two Column
   ======================================== */
.resource-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 24px;
  line-height: 1.5;
}

.detail-layout {
  display: flex;
  gap: 64px;
  align-items: center;
}

/* 画像は固定比率の不可視枠（10:7）に収める。縦長・横長どちらでも枠サイズは一定で、
   画像は枠の上下または左右いっぱいまで表示される（枠自体は透明・線や影は付けない） */
.resource-thumb {
  flex: 0 0 360px;
  aspect-ratio: 10 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 4px;
  filter: drop-shadow(-1px -1px 1px rgba(200, 200, 200, 0.6));
}

.resource-body {
  flex: 1;
  min-width: 0;
}

.resource-catchcopy {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.6;
  margin-bottom: 16px;
}

.resource-description {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  font-size: 15px;
  line-height: 1.9;
  color: #444;
}

.resource-description p + p {
  margin-top: 1.9em;
}

.resource-description h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 12px;
}

/* Download CTA（本文下・中央） */
.dl-cta {
  margin-top: 56px;
  text-align: center;
}

.dl-cta .form-lead {
  margin-bottom: 20px;
}

/* ========================================
   MarkeRize Form Overrides
   ======================================== */
.form-lead {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 20px;
}

/* 見た目・ホバー（白反転＋矢印切替）は公式共通の .-btn に委譲。ここでは CTA 用の幅と中央寄せのみ */
.dl-cta .dl-button {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  font-size: 16px;
  cursor: pointer;
}

.mrc_webform {
  font-family: inherit !important;
}

.mrc_webform input[type="text"],
.mrc_webform input[type="email"],
.mrc_webform input[type="tel"],
.mrc_webform textarea,
.mrc_webform select {
  width: 100% !important;
  padding: 10px 12px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-family: inherit !important;
}

.mrc_webform input:focus,
.mrc_webform textarea:focus,
.mrc_webform select:focus {
  border-color: var(--primary-color) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(43, 43, 107, 0.15) !important;
}

.mrc_webform_req {
  background: #e74c3c !important;
  color: #fff !important;
  font-size: 11px !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  margin-left: 6px !important;
}

.mrc_webform_apply {
  background: var(--primary-color) !important;
  color: #fff !important;
  border: none !important;
  padding: 14px 32px !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
  width: 100% !important;
}

.mrc_webform_apply:hover {
  background: var(--over-color) !important;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .resource-thumb { flex-basis: 300px; }
  .detail-layout { gap: 40px; }
}

@media (max-width: 768px) {
  .page-hero { padding: 32px 20px; }
  .page-hero h1 { font-size: 22px; }
  .main-content { padding: 40px 0 60px; }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .detail-layout {
    flex-direction: column;
    gap: 32px;
  }
  .resource-thumb {
    flex-basis: auto;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .card-thumb { aspect-ratio: 16 / 9; }
  .resource-title { font-size: 20px; }
  .dl-cta { margin-top: 40px; }
}

/* ========================================
   Detail Page v2 - 2カラム
   （左＝表紙＋わかること／右＝タイトル・説明・CTA。
     白カードなしで背景直置き。smartpapier から順次適用）
   ======================================== */
.dl-detail-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 52px;
  align-items: start;
}

.dl-cover { text-align: center; }

.dl-cover img {
  width: 100%;
  max-width: 240px;
  height: auto;
  border-radius: 4px;
  filter: drop-shadow(-1px -1px 1px rgba(200, 200, 200, 0.6)) drop-shadow(0 10px 20px rgba(30, 30, 80, 0.16));
}

.learn {
  margin-top: 30px;
  text-align: left;
  background: #fff;
  border-radius: 8px;
  padding: 20px 24px;
}

.learn h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.learn h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.learn ul {
  margin-top: 12px;
  display: grid;
  gap: 9px;
}

.learn li {
  position: relative;
  padding-left: 26px;
  font-size: 13.5px;
  line-height: 1.7;
}

.learn li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
}

.learn li::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 8.5px;
  width: 7px;
  height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.dl-detail-grid .resource-title {
  font-size: 28px;
  margin-bottom: 12px;
}

/* v2 は白カードをやめて背景に直接置く */
.dl-detail-grid .resource-description {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.dl-cta2 { margin-top: 28px; }

.dl-cta2 .dl-button {
  width: 100%;
  max-width: 460px;
  font-size: 16px;
  cursor: pointer;
}

/* v2 ページでは「製品情報トップページへ戻る」帯を出さない（partial は共有のため CSS で非表示） */
.dl-detail .prev-index { display: none; }

.m-only { display: none; }

@media (max-width: 880px) {
  .dl-detail-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .m-only { display: block; margin-bottom: 16px; }
  .d-only { display: none; }
  .dl-cover img { max-width: 220px; }
  .dl-cta2 .dl-button { max-width: none; }
}

/* ========================================
   フッター「ページ上部へ戻る」用（アンカー #top ＋ CSS スムーススクロール・JS不使用）
   ======================================== */
html {
  scroll-behavior: smooth;
}
