/*
Theme Name:        Twenty Twenty-Five Child
Theme URI:         https://www.tankobucreate.com/
Description:       tankobucreate.com 統合サイト用の子テーマ。デザイン定義は theme.json に置いている。
Author:            山ノ内 勇斗
Author URI:        https://www.tankobucreate.com/
Template:          twentytwentyfive
Version:           1.1.0
Requires at least: 6.7
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       twentytwentyfive-child
*/

/* 配色・タイポグラフィ・余白は theme.json で定義する。
   このファイルには theme.json で表現できないものだけを書く。 */

/* ==========================================================================
   1. フッター
   ========================================================================== */

/* 上罫線。theme.json には線幅のプリセットが無いのでここで指定する。 */
.tankobu-footer {
	border-top: 1px solid var(--wp--preset--color--gray-light);
}

.tankobu-footer .tankobu-footer-links {
	list-style: none;
	padding-left: 0;
	margin-block: var(--wp--preset--spacing--20) 0;
}

.tankobu-footer .tankobu-footer-links li {
	margin-block: 0.35rem;
}

/* ==========================================================================
   2. /blog/ の一覧
   ========================================================================== */

/* カテゴリの導線。素のリンクを横並びにするだけ。 */
.tankobu-category-nav a {
	display: inline-block;
	margin-right: var(--wp--preset--spacing--30);
	margin-bottom: 0.4rem;
	color: var(--wp--preset--color--gray-mid);
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--gray-light);
}

.tankobu-category-nav a:hover,
.tankobu-category-nav a:focus {
	color: var(--wp--preset--color--accent);
	border-bottom-color: var(--wp--preset--color--accent);
}

/* 記事カード。アイキャッチ未設定の記事が61件中17件あるため、
   画像が無いカードでも崩れないよう、プレースホルダを置かず上端を揃える。 */
.tankobu-post-cards {
	align-items: start;
}

.tankobu-post-cards > li {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20);
}

.tankobu-post-cards .tankobu-card-thumb img {
	border-radius: 0.25rem;
}

.tankobu-post-cards .tankobu-card-cat a {
	text-decoration: none;
}

.tankobu-post-cards .wp-block-post-title {
	margin-block: 0;
	line-height: 1.5;
}

.tankobu-post-cards .wp-block-post-title a {
	text-decoration: none;
}

.tankobu-post-cards .wp-block-post-title a:hover,
.tankobu-post-cards .wp-block-post-title a:focus {
	text-decoration: underline;
}

.tankobu-post-cards .tankobu-card-excerpt {
	color: var(--wp--preset--color--gray-mid);
	line-height: 1.7;
	margin-block: 0;
}

/* ==========================================================================
   3. /news/ の一覧
   ========================================================================== */

.tankobu-news-list > li {
	padding-block: var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--wp--preset--color--gray-light);
}

.tankobu-news-list .wp-block-post-title {
	margin-block: 0.2rem;
	line-height: 1.6;
}

.tankobu-news-list .wp-block-post-title a {
	text-decoration: none;
}

.tankobu-news-list .wp-block-post-title a:hover,
.tankobu-news-list .wp-block-post-title a:focus {
	text-decoration: underline;
}

/* ==========================================================================
   4. 記事本文の読みやすさ
   ========================================================================== */

/* 見出しの階層を目で追えるようにする。
   h2 は上に余白と細い罫線、h3 は罫線なしでサイズ差だけ付ける。 */
.wp-block-post-content h2 {
	margin-top: var(--wp--preset--spacing--60);
	margin-bottom: var(--wp--preset--spacing--30);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--gray-light);
	line-height: 1.5;
}

.wp-block-post-content h3 {
	margin-top: var(--wp--preset--spacing--50);
	margin-bottom: var(--wp--preset--spacing--20);
	line-height: 1.5;
}

/* リストの行間を本文（1.8）に揃える。 */
.wp-block-post-content ul,
.wp-block-post-content ol {
	line-height: 1.8;
}

.wp-block-post-content li {
	margin-block: 0.4rem;
}

/* 本文中のリンクは色だけで区別しない（下線を必ず付ける）。 */
.wp-block-post-content p a,
.wp-block-post-content li a {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* コードブロック。プログラミング記事で効く。 */
.wp-block-post-content pre.wp-block-code,
.wp-block-post-content pre.wp-block-preformatted {
	background: var(--wp--preset--color--gray-light);
	padding: var(--wp--preset--spacing--30);
	border-radius: 0.25rem;
	overflow-x: auto;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.7;
	tab-size: 4;
}

.wp-block-post-content :not(pre) > code {
	background: var(--wp--preset--color--gray-light);
	padding: 0.1em 0.35em;
	border-radius: 0.2rem;
	font-size: 0.925em;
}

/* 画像。角を軽く丸め、キャプションは小さく中央に。 */
.wp-block-post-content .wp-block-image img {
	border-radius: 0.25rem;
}

.wp-block-post-content .wp-block-image figcaption {
	text-align: center;
	color: var(--wp--preset--color--gray-mid);
	font-size: var(--wp--preset--font-size--small);
}

/* 引用。業績一覧の summary_ja と同じ見え方に揃える。 */
.wp-block-post-content blockquote {
	border-left: 3px solid var(--wp--preset--color--gray-light);
	padding-left: var(--wp--preset--spacing--30);
	margin-left: 0;
	color: var(--wp--preset--color--gray-mid);
}

/* 表は横スクロールで逃がす（本文幅42remに収まらない表があるため）。 */
.wp-block-post-content .wp-block-table {
	overflow-x: auto;
}

/* 記事上部のメタ情報。 */
.tankobu-post-meta {
	gap: var(--wp--preset--spacing--30);
	margin-block: var(--wp--preset--spacing--20) var(--wp--preset--spacing--40);
}

.tankobu-post-meta a {
	text-decoration: none;
}

.tankobu-post-nav {
	gap: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--gray-light);
	padding-top: var(--wp--preset--spacing--40);
}
