/* ========================================
   過去のコンテスト一覧
======================================== */

.past-contests {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	column-gap: 48px;
	row-gap: 32px;
	width: min(1180px, calc(100% - 40px));
	margin-inline: auto;
	padding-block: 48px 72px;
}

/* 見出しは全幅 */
.past-contests__header {
	grid-column: 1 / -1;
}

/* コンテスト一覧 */
.past-contests__list {
	grid-column: 1;
	min-width: 0;
	display: grid;
	gap: 24px;
}

/* サイドバー */
.past-contests > .ak-sidebar {
	grid-column: 2;
	width: 100%;
	max-width: 320px;
	margin: 0;
	align-self: start;
}


/* ========================================
   開催回カード
======================================== */

.past-contests__item {
	margin: 0;
	border: 1px solid #e7dfd3;
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(58, 43, 26, 0.08);
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease,
		border-color 0.25s ease;
}

.past-contests__item:hover {
	transform: translateY(-4px);
	border-color: #cbb89e;
	box-shadow: 0 12px 32px rgba(58, 43, 26, 0.14);
}

.past-contests__item > a {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 180px;
	padding: 32px 72px 32px 32px;
	color: inherit;
	text-decoration: none;
	background:
		linear-gradient(
			135deg,
			rgba(255, 250, 242, 0.96),
			rgba(247, 238, 224, 0.96)
		);
}

.past-contests__item > a::after {
	content: "→";
	position: absolute;
	right: 30px;
	top: 50%;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #fff;
	color: #7b5735;
	font-size: 20px;
	box-shadow: 0 3px 12px rgba(58, 43, 26, 0.12);
	transition:
		transform 0.25s ease,
		background-color 0.25s ease,
		color 0.25s ease;
}

.past-contests__item:hover > a::after {
	transform: translate(4px, -50%);
	background: #7b5735;
	color: #fff;
}

.past-contests__item h2 {
	margin: 0 0 14px;
	color: #362b22;
	font-size: clamp(1.35rem, 2.2vw, 1.8rem);
	line-height: 1.4;
}

.past-contests__item span {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	color: #7b5735;
	font-weight: 600;
	font-size: 0.95rem;
}


/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 900px) {
	.past-contests {
		grid-template-columns: minmax(0, 1fr);
		width: min(100% - 32px, 720px);
		padding-block: 32px 56px;
	}

	.past-contests__header,
	.past-contests__list,
	.past-contests > .ak-sidebar {
		grid-column: 1;
	}

	.past-contests > .ak-sidebar {
		max-width: none;
		margin-top: 16px;
	}
}

@media screen and (max-width: 520px) {
	.past-contests__item > a {
		min-height: 150px;
		padding: 24px 60px 24px 22px;
	}

	.past-contests__item > a::after {
		right: 18px;
		width: 34px;
		height: 34px;
	}
}

/* ========================================
   開催回・作品一覧ページ
======================================== */

.past-event-round {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	column-gap: 48px;
	row-gap: 32px;
	width: min(1180px, calc(100% - 40px));
	margin-inline: auto;
	padding-block: 48px 72px;
}

/* 開催回の見出し */
.past-event-round__header {
	grid-column: 1 / -1;
}

/* 作品一覧 */
.past-event-round__works {
	grid-column: 1;
	min-width: 0;
}

/* サイドバー */
.past-event-round > .ak-sidebar {
	grid-column: 2;
	width: 100%;
	max-width: 320px;
	margin: 0;
	align-self: start;
}


/* ========================================
   作品カード一覧
======================================== */

.past-event-round__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 24px;
}

/* 作品カード */
.past-event-round__work {
	min-width: 0;
	margin: 0;
	border: 1px solid #e7dfd3;
	border-radius: 14px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 5px 20px rgba(58, 43, 26, 0.08);
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease;
}

.past-event-round__work:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(58, 43, 26, 0.14);
}

.past-event-round__work > a {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

/* 作品画像 */
.past-event-round__work img {
	display: block;
	width: 100%;
	height: 340px;
	margin: 0;
	object-fit: contain;
	background: #f6f2ec;
}

/* 作品名 */
.past-event-round__work h2 {
	margin: 0;
	padding: 20px 20px 22px;
	color: #362b22;
	font-size: 1.05rem;
	line-height: 1.65;
}


/* ========================================
   ページ送り
======================================== */

.past-event-round__works .pagination {
	margin-top: 40px;
}


/* ========================================
   タブレット
======================================== */

@media screen and (max-width: 1000px) {
	.past-event-round {
		grid-template-columns: minmax(0, 1fr) 280px;
		column-gap: 32px;
	}

	.past-event-round > .ak-sidebar {
		max-width: 280px;
	}

	.past-event-round__work img {
		height: 300px;
	}
}


/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 800px) {
	.past-event-round {
		grid-template-columns: minmax(0, 1fr);
		width: min(100% - 32px, 720px);
		padding-block: 32px 56px;
	}

	.past-event-round__header,
	.past-event-round__works,
	.past-event-round > .ak-sidebar {
		grid-column: 1;
	}

	.past-event-round > .ak-sidebar {
		max-width: none;
		margin-top: 16px;
	}
}

@media screen and (max-width: 560px) {
	.past-event-round__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.past-event-round__work img {
		height: auto;
		max-height: 480px;
		object-fit: contain;
	}
}