/* page-case.css … 設置情報（一覧・カテゴリー別・記事）
   ページ送り（.c-pager）・記事の骨格（.p-entry）・一覧に戻る（.c-back-btn）は page-news.css のものを使う */

/* カテゴリーのタグ（一覧のカード・記事で共通。大きさは使う側で） */
.c-case-tag {
	display: inline-block;
	border-radius: 4px;
	background: var(--c-blue);
	font-weight: 700;
	color: var(--c-white);
	text-align: center;
	white-space: nowrap;
}


/* ==========================================================
   一覧（PC: 左にカテゴリー 200px、右にカード。白い article 枠はない）
   カードの幅: 1200=720 / 1600=920 を線形に（article 幅 - サイドバー - 間）
   ========================================================== */
.p-case {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	width: var(--article-w);
	margin: 91px auto 0;     /* .l-article と同じ: カード1枚目の上端 = Figma y=540 */
	padding-bottom: 44px;    /* 調整: ページ送り〜フッター（.l-page の 120px と合わせて） */
}

/* カテゴリー */
.p-case-side { width: 200px; }
.p-case-side__title {
	margin-top: -7px;        /* 調整: 字の上端をカードの上端（540）にそろえる */
	font-family: var(--ff-en);
	font-size: 40px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .05em;
}
.p-case-side__list { margin-top: 34px; }
.p-case-side__link {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 48px;
	padding-top: 2px;        /* 調整: 字の上端（線の 27px 上） */
	border-bottom: 1px solid #8d8d8d;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	transition: color var(--dur-hover) var(--ease);
}
.p-case-side__link .c-icon { width: 9px; height: 12px; translate: 0 2px; }  /* 調整: 字の上端にそろえる */
.p-case-side__link.is-current { color: var(--c-blue); }
@media (hover: hover) {
	.p-case-side__link:hover { color: var(--c-hover); }
	.p-case-side__link:hover .c-icon { background-color: var(--c-hover); }
}

/* カード（150px の高さ。中は Figma の位置に置く） */
.p-case-main { width: clamp(720px, 50cqw + 120px, 920px); }
.p-case-list { display: grid; gap: 20px; }
.p-case-card {
	position: relative;
	display: block;
	height: 150px;
	border-radius: 10px;
	background: var(--c-white);
	transition: color var(--dur-hover) var(--ease);
}
.p-case-card__thumb {
	position: absolute;
	top: 10px;
	left: 10px;
	width: 200px;
	height: 130px;
	overflow: hidden;
	border-radius: 6px;
}
.p-case-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.p-case-card__thumb.is-noimage {   /* 画像のない記事: 水色にロゴ */
	display: grid;
	place-items: center;
	background: #d8e5eb;
}
.p-case-card__thumb.is-noimage img { width: 120px; height: auto; object-fit: contain; }
.p-case-card__pin { position: absolute; top: 32px; left: 240px; }
.p-case-card__date {
	position: absolute;
	top: 38px;               /* 調整: 字の上端 41 */
	left: 280px;
	font-family: var(--ff-en);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .05em;
}
.p-case-card__tags {
	position: absolute;
	top: 35px;
	left: 389px;
	display: flex;
	gap: 10px;
}
.p-case-card .c-case-tag {
	min-width: 60px;
	height: 24px;
	padding: 0 6px;
	font-size: 12px;
	line-height: 24px;
}
.p-case-card__title {
	position: absolute;
	top: 79px;               /* 調整: 字の上端 88 */
	left: 240px;
	right: clamp(40px, 5cqw - 20px, 60px);  /* 1200=40 / 1600=60（矢印に近づけない） */
	overflow: hidden;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.8;
	white-space: nowrap;
	text-overflow: ellipsis; /* 1行で「…」 */
}
.p-case-card__arrow { position: absolute; top: 65px; right: 15px; width: 12px; height: 16px; }
@media (hover: hover) {
	.p-case-card:hover { color: var(--c-hover); }
	.p-case-card:hover .p-case-card__arrow { background-color: var(--c-hover); }
}

.p-case-main .c-pager { margin-top: 74px; }   /* 調整: 最後のカード〜ページ送りの字 82px */
.p-case__empty { padding-top: 40px; text-align: center; }


/* ==========================================================
   記事（お知らせの記事 .p-entry に、ピン・カテゴリー・SNS・写真の2列を足す）
   ========================================================== */
.p-case-entry .p-entry { margin-top: -6px; }   /* 調整: ピンの上端（article の上端から 114） */
.p-case-entry__head {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas:
		"date  date"
		"title title"
		"tags  share";
	align-items: center;
}
.p-case-entry__date {
	grid-area: date;
	display: flex;
	align-items: center;
	gap: 15px;
	font-family: var(--ff-en);
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .05em;
}
.p-case-entry__title {
	grid-area: title;
	margin-top: 7px;         /* 調整: 字の上端（ピンの下端から 28） */
	font-size: 40px;         /* お知らせ詳細は原案で 36px・字間 5% に変わったが、設置情報は 40px のまま */
	line-height: 1.6;
	letter-spacing: 0;
}
.p-case-entry__tags {
	grid-area: tags;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 19px;        /* 調整: タグの上端 */
}
.p-case-entry__tags li { display: flex; }
.p-case-entry .c-case-tag {
	min-width: 70px;         /* 原案 2026-11-11: 70×28・14px（旧 高さ 36・16px） */
	height: 28px;
	padding: 0 17px;
	font-size: 14px;
	line-height: 28px;
	transition: background-color var(--dur-hover) var(--ease);
}
.c-share {
	grid-area: share;
	align-self: end;
	display: flex;
	gap: 10px;
	margin-bottom: -1px;     /* タグ（28px）と縦の中心をそろえる（原案） */
}
.c-share a { display: block; transition: opacity var(--dur-hover) var(--ease); }
.c-share img { width: 30px; height: 30px; }
@media (hover: hover) {
	.p-case-entry a.c-case-tag:hover { background-color: var(--c-hover); }
	.c-share a:hover { opacity: .6; }
}

/* 本文と写真（写真は2列。旧記事の画像も同じ大きさにそろえる） */
.p-case-entry__body { padding: 48px 0 70px; }  /* 調整: 線〜本文、写真〜線 */
.p-case-entry .p-entry__nav { margin-top: 80px; }  /* 調整: 線〜一覧に戻る 81 */
.p-case-entry__photos {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
.p-case-entry__body > .p-case-entry__photos { margin-top: 51px; }  /* 調整: 本文〜写真 */
.p-case-entry__photos img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 440 / 203;
	margin: 0;
	object-fit: cover;
}


/* ===== SP（390 基準）===== */
@media (max-width: 568px) {
	/* 一覧はグレーの地（他の SP ページは白） */
	.p-case-page,
	main.p-case-page + .l-footer { background-color: #f0f4f5; }

	.p-case {
		display: block;
		width: auto;
		margin: 0;
		padding: 45px 20px 54px;  /* 調整: パンくず〜「Category」、ページ送り〜フッター */
	}
	.p-case-side { width: auto; }
	.p-case-side__title {
		margin-top: 0;
		font-size: 30px;
		text-align: center;
	}
	.p-case-side__list {         /* 3列×2行。列の間に縦線 */
		display: grid;
		grid-template-columns: repeat(3, 116px);
		row-gap: 20px;
		margin: 39px 0 0 -2px;   /* Figma: 列の区切り線が x=134 / 250 */
	}
	.p-case-side__list li + li:not(:nth-child(3n+1)) { border-left: 1px solid #8d8d8d; }
	.p-case-side__link {
		justify-content: center;
		height: 20px;
		padding-top: 0;
		border-bottom: 0;
		font-size: 14px;
	}
	.p-case-side__link .c-icon { display: none; }
	.p-case-side__link.is-current {
		text-decoration: underline;
		text-decoration-thickness: 2px;
		text-underline-offset: 3px;
	}

	.p-case-main { width: auto; margin-top: 40px; }
	.p-case-list { gap: 10px; }
	.p-case-card { height: 148px; }
	.p-case-card__thumb { top: 58px; width: 110px; height: 80px; border-radius: 4px; }
	.p-case-card__thumb.is-noimage img { width: 80px; }
	.p-case-card__pin { top: 21px; left: 20px; width: 12px; height: 16px; }
	.p-case-card__date { top: 23px; left: 42px; font-size: 12px; }
	.p-case-card__tags { top: 20px; left: 136px; gap: 4px; }
	.p-case-card .c-case-tag {
		min-width: 36px;
		height: 18px;
		padding: 0 4px;
		border-radius: 2.4px;
		font-size: 10px;
		line-height: 18px;
	}
	.p-case-card__title {
		top: 52px;               /* 調整: 字の上端 60 */
		left: 140px;
		right: 20px;
		font-size: 16px;
		line-height: 1.6;
		white-space: normal;
		display: -webkit-box;
		-webkit-line-clamp: 3;   /* 3行まで */
		-webkit-box-orient: vertical;
	}
	.p-case-card__arrow { top: 68px; right: 10px; width: 8px; height: 12px; }
	.p-case-main .c-pager { margin-top: 49px; }

	/* 記事 */
	.p-case-entry__head {
		grid-template-areas:
			"date  tags"
			"title title"
			".     share";
		padding-bottom: 20px;
	}
	.p-case-entry__date { gap: 10px; font-size: 12px; }
	.p-case-entry__date .c-icon--pin { width: 12px; height: 16px; }
	.p-case-entry .p-entry { margin-top: -4px; }
	.p-case-entry .p-entry__nav { margin-top: 42px; }
	.p-case-entry__title { margin-top: 12px; font-size: 20px; }
	.p-case-entry__tags { justify-self: end; align-self: start; gap: 4px; margin-top: -1px; }
	.p-case-entry .c-case-tag {
		min-width: 36px;
		height: 18px;
		padding: 0 4px;
		border-radius: 2.4px;
		font-size: 10px;
		line-height: 18px;
	}
	.c-share { gap: 9px; margin: 11px 0 0; }
	.c-share img { width: 20px; height: 20px; }

	.p-case-entry__body { padding: 30px 0 34px; }
	.p-case-entry__photos { grid-template-columns: 1fr; }
	.p-case-entry__body > .p-case-entry__photos { margin-top: 26px; }
	.p-case-entry__photos img { aspect-ratio: 330 / 180; border-radius: 6px; }
}
