/*
 * プロジェクトのカード（GT3 の gt3-core-imageinfobox type2 を移したグループ。migration/lib/widgets/gt3-core-imageinfobox.php）。
 *   .cl-project-card          カード（背景画像・高さはブロック属性）
 *   .cl-project-card__index   右下の大きな番号（装飾）
 *   .cl-project-card__title   タイトル（h3）
 *   .cl-project-card__link    タイトルのリンク。::after でカード全体に広げる
 * 本番の値: gt3-themes-core の widgets/gt3-core-imageinfobox.css + ewebot の同名 CSS + 本番の追加 CSS
 * （番号 left: 82%、文字の枠 left: 25px / bottom: 20px、オーバーレイは #0082e4 へのグラデーション）。
 * カードの中身の枠（本番の .gt3_imageinfobox_container）は左 25px・右 45px・下 20px。
 */

.cl-project-card {
	--cl-pc-inset-left: 25px;
	--cl-pc-inset-right: 45px;
	--cl-pc-inset-bottom: 20px;

	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	overflow: hidden;
	padding: 0 var(--cl-pc-inset-right) var(--cl-pc-inset-bottom) var(--cl-pc-inset-left);
	font-weight: 700;
	letter-spacing: 1px;
	transition: transform 0.2s;
}

/* 下に向かって濃くなるオーバーレイ（本番の .gt3_imageinfobox_img_bg::after） */
.cl-project-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(180deg, transparent 25%, #0082e4);
	opacity: 0.8;
	transition: opacity 0.3s;
}

.cl-project-card:hover::before {
	opacity: 0.7;
}

/* Happy Addons のホバーの浮き上がり（値はブロックの style.css の --cl-pc-hover-y） */
.cl-project-card:hover {
	transform: translateY(var(--cl-pc-hover-y, 0));
}

/* 番号: 中身の枠の左から 82% の位置、枠の下端にそろえる。タイトルより下に描く */
:root .cl-project-card__index {
	position: absolute;
	right: var(--cl-pc-inset-right);
	bottom: var(--cl-pc-inset-bottom);
	left: calc(var(--cl-pc-inset-left) + (100% - var(--cl-pc-inset-left) - var(--cl-pc-inset-right)) * 0.82);
	z-index: -1;
	margin: 0;
	color: rgb(255 255 255 / 20%);
	font-size: 72px;
	font-weight: 800;
	line-height: 65px;
}

:root .cl-project-card__title {
	margin: 0;
	color: #fff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: inherit;
}

.cl-project-card__link,
.cl-project-card__link:hover {
	color: inherit;
}

.cl-project-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/*
 * 一覧（patterns/project-list.php の Query Loop）。ul / li（.wp-block-post-template / .wp-block-post）に本文のリストの既定
 * （ul li の下余白・丸印。base/10-elements.css・base/20-content.css）が付かないようにする。
 * 行の高さは本番のグリッドと同じ（grid-template-rows: repeat(2, 1fr)）。カードの間隔はブロック属性（post-template の blockGap 1px）。
 */
.cl-project-list__items {
	grid-template-rows: repeat(2, 1fr);
}

.cl-project-list__items > .wp-block-post {
	padding: 0;
}

.cl-project-list__items > .wp-block-post::before {
	content: none;
}
