/**
 * Top news component.
 */

.icd-top-news {
	position: relative;
	width: min(100%, 960px);
	margin-top: 3rem;
	margin-right: auto;
	margin-left: auto;
}

.icd-top-news::before {
	position: absolute;
	left: 0;
	bottom: -184px;
	z-index: 1;
	width: clamp(108px, 12vw, 176px);
	aspect-ratio: 191 / 101;
	content: "";
	background: url("../../img/top_news_deco02.svg") center / contain no-repeat;
	pointer-events: none;
}

.icd-top-news > * {
	position: relative;
	z-index: 2;
}

.icd-top-news__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 42px;
}

.icd-top-news__tab {
	min-width: 88px;
	padding: 14px 24px;
	color: #111;
	background: #f2f2f2;
	border: 0;
	border-radius: 0;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.icd-top-news__tab:hover,
.icd-top-news__tab.is-active {
	color: #fff;
	background: #74c8d6;
	opacity: 1;
}

.icd-top-news__list {
	display: grid;
	gap: 12px;
}

.icd-top-news__item[hidden] {
	display: none;
}

.icd-top-news__link {
	display: grid;
	grid-template-columns: 132px 86px minmax(0, 1fr);
	align-items: center;
	gap: 20px;
	min-height: 92px;
	padding: 12px 32px;
	color: inherit;
	background-color: #fafafa;
	background-image: url("../../img/top_columBg.svg");
	background-repeat: repeat;
	background-size: 4px 4px;
	border-radius: 10px;
	text-decoration: none;
}

.icd-top-news__date {
	position: relative;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.05em;
}

.icd-top-news__date::after {
	position: absolute;
	top: -54px;
	right: 0;
	bottom: -54px;
	width: 3px;
	content: "";
	background-color: #fff;
}

.icd-top-news__category {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 64px;
	min-height: 20px;
	padding: 2px 10px;
	color: #fff;
	background: #74c8d6;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.05em;
}

.icd-top-news__title {
	overflow: hidden;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.8;
	letter-spacing: 0.05em;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.icd-top-news__empty {
	display: block;
	margin: 32px 0;
	font-weight: 700;
	text-align: center;
}

.icd-top-news__empty[hidden]:not(.is-visible) {
	display: none;
}

.icd-top-news--recruit {
	width: min(100%, 980px);
	margin-top: 0;
}

.icd-top-news--recruit::before {
	display: none;
}

.icd-top-news--recruit .icd-top-news__list {
	gap: 14px;
}

.icd-top-news--recruit .icd-top-news__link {
	grid-template-columns: 160px minmax(0, 1fr);
	min-height: 96px;
	padding: 12px 32px;
	background-color: #fff;
	background-image: none;
}

.icd-top-news--recruit .icd-top-news__date {
	font-size: 18px;
}

.icd-top-news--recruit .icd-top-news__date::after {
	top: -42px;
	bottom: -42px;
}

.icd-top-news--recruit .icd-top-news__title {
	font-size: 15px;
	white-space: normal;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

@media (max-width: 767px) {
	.icd-top-news {
		width: 100%;
	}

	.icd-top-news__tabs {
		gap: 6px;
		margin-bottom: 28px;
	}

	.icd-top-news__tab {
		flex: 0 0 auto;
		min-width: 0;
		padding: 8px 10px;
		font-size: 11px;
	}

	.icd-top-news__list {
		gap: 10px;
	}

	.icd-top-news__link {
		grid-template-columns: auto auto minmax(0, 1fr);
		gap: 8px;
		align-items: center;
		min-height: 0;
		padding: 18px 20px;
		border-radius: 0 6px 6px 0;
	}

	.icd-top-news__date {
		font-size: 13px;
	}

	.icd-top-news__date::after {
		top: -18px;
		right: -8px;
		bottom: -18px;
		width: 1px;
	}

	.icd-top-news__category {
		justify-self: flex-start;
		min-width: 56px;
		min-height: 18px;
		font-size: 10px;
	}

	.icd-top-news__title {
		grid-column: 1 / -1;
		font-size: 13px;
		line-height: 1.7;
		white-space: normal;
	}

	.icd-top-news--recruit .icd-top-news__list {
		gap: 10px;
	}

	.icd-top-news--recruit .icd-top-news__link {
		grid-template-columns: 92px minmax(0, 1fr);
		gap: 12px;
		min-height: 68px;
		padding: 12px 14px;
		border-radius: 6px;
	}

	.icd-top-news--recruit .icd-top-news__date {
		font-size: 12px;
	}

	.icd-top-news--recruit .icd-top-news__date::after {
		top: -12px;
		right: -6px;
		bottom: -12px;
	}

	.icd-top-news--recruit .icd-top-news__title {
		grid-column: auto;
		font-size: 12px;
		line-height: 1.7;
	}
}
