/*
 * 読みもの（ブログ一覧・記事・トピックハブ・検索）の追加CSS。pop.css の後に読まれる。
 * クラスは .rd- で始める。16px 未満の font-size を書かない。coral の面に白文字を載せない。
 *
 * 節: 1. 見出し帯  2. 解説文  3. カード  4. 記事本文  5. 記事下  6. 事例ページ  7. 空・その他
 */

/* ===== 1. 見出し帯 ===== */
.rd-hero--tech { background-color: var(--foam); }
.rd-hero--cases { background-color: var(--sand); }
.rd-hash-mark { color: var(--lagoon); margin-right: 0.08em; -webkit-text-stroke: 2px var(--ink); }
.rd-count { font-weight: 800; font-size: 1.4em; color: var(--ocean); margin-right: 4px; }
.page-hero .lead p { margin: 0; }

/* ===== 2. 解説文（台帳の lead） ===== */
.rd-lead {
  position: relative;
  padding: 4px 0 4px 24px;
  border-left: 8px solid var(--lagoon);
  display: grid;
  gap: 1em;
}
.rd-lead p { margin: 0; }
.rd-body { display: grid; gap: 1em; margin-top: 24px; }
.rd-body p { margin: 0; }
.rd-note { margin: 28px 0 0; font-weight: 700; }

/* ===== 3. カード ===== */
.rd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rd-meta time { font-family: var(--display); font-weight: 700; color: var(--muted); }

/* 共通カード（article.post-card）。見出しのリンクを広げてカード全体を押せるようにする */
.rd-card { position: relative; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.rd-card:hover, .rd-card:focus-within { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); }
.grid-cards > .rd-card:hover, .grid-cards > .rd-card:focus-within { transform: translate(3px, 3px); }
.rd-card .thumb { display: block; position: relative; }
.rd-card .body { flex: 1; }
.rd-card__title { margin: 0; }
.pop .rd-card__title a { color: var(--ink); text-decoration: none; }
.pop .rd-card__title a:focus-visible { outline: none; }
.rd-card:focus-within { outline: 3px solid var(--ocean); outline-offset: 4px; }
.rd-stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.rd-card__more { color: var(--ocean); margin-top: auto; align-self: start; }
/* 「続きを読む」をカードの底に揃える（このテーマの読みもののカードだけ。トップの .post-card には効かせない） */
.rd-card .body, .rd-front-sec .post-card .body { display: flex; flex-direction: column; }
.rd-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.post-card h3.rd-clamp { -webkit-line-clamp: 2; }

/* 代替サムネ（アイキャッチが無いとき）。色を回す */
.rd-ph { width: 100%; height: 100%; min-height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.rd-ph--0 { background: var(--sun); }
.rd-ph--1 { background: var(--moss); }
.rd-ph--2 { background: var(--lagoon); }
.rd-ph-icon { width: 56px; height: 56px; opacity: 0.7; }

/* 再生バッジ（ポッドキャスト） */
.rd-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sun); color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.2s var(--ease);
}
.rd-play svg { width: 28px; height: 28px; margin-left: 4px; }
.rd-card:hover .rd-play { transform: translate(-50%, -50%) scale(1.1) rotate(-6deg); }

/* アーカイブの横長カード（content-archive.php） */
.rd-archive-item { overflow: hidden; display: grid; }
@media (min-width: 720px) { .rd-archive-item:has(.rd-archive-item__thumb) { grid-template-columns: 2fr 3fr; } }
.rd-archive-item__thumb { display: block; border-bottom: 3px solid var(--ink); overflow: hidden; aspect-ratio: 16 / 9; }
@media (min-width: 720px) { .rd-archive-item__thumb { border-bottom: 0; border-right: 3px solid var(--ink); aspect-ratio: auto; } }
.rd-archive-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.rd-archive-item:hover .rd-archive-item__thumb img { transform: scale(1.05); }
.rd-archive-item__body { padding: 24px; display: grid; gap: 12px; align-content: start; }
.rd-archive-item__title { margin: 0; }
.pop .rd-archive-item__title a { color: var(--ink); text-decoration: none; }
.pop .rd-archive-item__title a:hover { text-decoration: underline; }
.rd-archive-item__excerpt p { margin: 0; }

/* ===== 4. 記事本文 ===== */
.rd-crumb { margin-bottom: 24px; }
.rd-entry__thumb {
  margin: -28px -22px 24px;
  border-bottom: 3px solid var(--ink);
  border-radius: 17px 17px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
@media (min-width: 768px) { .rd-entry__thumb { margin: -48px -56px 32px; } }
.rd-entry__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-entry__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rd-entry__date { font-weight: 700; color: var(--muted); }
.rd-entry__author { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.rd-ico { width: 20px; height: 20px; flex: none; }
.rd-entry__title {
  margin: 18px 0 0;
  font-weight: 900;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.4;
  font-feature-settings: "palt";
}
.rd-entry__tags { margin-top: 16px; }
.rd-hash::before { content: "#"; font-family: var(--display); margin-right: 2px; }
.rd-entry .prose { margin-top: 32px; padding-top: 28px; border-top: 3px dashed var(--ink); }
.rd-page-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 700; }

/* 前の記事／次の記事 */
.rd-postnav { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 720px) { .rd-postnav { grid-template-columns: 1fr 1fr; } }
.rd-postnav__link { display: grid; gap: 6px; height: 100%; }
.rd-postnav__link--next { text-align: right; }
.rd-postnav__label { font-family: var(--display); font-weight: 800; color: var(--ocean); }
.rd-postnav__title { font-weight: 900; line-height: 1.55; }

/* ===== 5. 記事下（あわせて読みたい・関連サービス・CTA） ===== */
.rd-related { margin-top: 64px; padding-top: 48px; border-top: 3px solid var(--ink); }
.rd-related__h { margin: 0; }
.rd-related__grid { margin-top: 24px; gap: 22px; }
@media (min-width: 720px) { .rd-related__grid.grid-cards--3 { grid-template-columns: repeat(3, 1fr); } }
.rd-link-card .body { padding: 16px 18px 20px; }
.rd-link-card h3 { font-size: 17px; }
.rd-svc { margin-top: 48px; }
.rd-svc .h3 { margin: 0; }
.rd-svc__text { margin: 10px 0 22px; }
.rd-doors .wrap > * { margin-top: 0; }

/* ===== 6. 事例ページ ===== */
.rd-flow { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.rd-flow li { display: flex; align-items: center; gap: 16px; padding: 16px 20px; font-weight: 700; }
.rd-flow__no {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sun); border: 3px solid var(--ink); font-weight: 800; font-size: 20px; line-height: 1;
}
.rd-flow li:nth-child(3n+2) .rd-flow__no { background: var(--moss); }
.rd-flow li:nth-child(3n) .rd-flow__no { background: var(--lagoon); }

.rd-industry { display: grid; gap: 10px; align-content: start; }
.rd-industry__name { margin: 0; }
.rd-industry__blurb { margin: 0; }
.rd-industry:nth-child(3n+1) { transform: rotate(-0.5deg); }
.rd-industry:nth-child(3n+2) { transform: rotate(0.4deg); }

.rd-fit { margin-top: 0; }
.rd-fit .h3 { margin: 0 0 18px; }
.rd-marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rd-marks li { display: flex; gap: 12px; }
.rd-marks__m { flex: none; font-weight: 900; width: 1.4em; text-align: center; }

.rd-cta-btns { margin-top: 32px; }

/* ===== 7. 空・その他 ===== */
.rd-empty { display: grid; justify-items: center; gap: 12px; background: var(--white); }
.rd-empty--narrow { max-width: 640px; margin-left: auto; margin-right: auto; }
.rd-empty .h3, .rd-empty__msg { margin: 0; }
.rd-empty__icon {
  width: 88px; height: 88px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sun); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-8deg);
}
.rd-empty__icon svg { width: 44px; height: 44px; }
.rd-empty .btns { margin: 8px 0 0; }
.rd-empty__search { width: 100%; max-width: 480px; margin-top: 8px; }

/* トップの読みもの節（front-post-section.php） */
.rd-front-sec__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.rd-front-sec .grid-cards { margin-top: 32px; }

/* ページ送りの間隔（一覧の下） */
.rd-list + .navigation.pagination { margin-top: 56px; }

@media (prefers-reduced-motion: reduce) {
  .rd-industry:nth-child(n) { transform: none; }
}
