/*
 * 이 숏코드를 담은 Elementor 섹션의 콘텐츠 폭이 1140px로 제한되어 있어
 * .ic-cert__layout의 max-width가 실제로는 적용되지 않는 문제가 있었다.
 * 이 페이지에 한해 그 폭 제한을 해제한다(Elementor 자체 CSS가 더 구체적인
 * 선택자로 적용되어 있어 !important로 재정의).
 */
.elementor-container:has(.ic-cert) {
	max-width: 1300px !important;
}

.ic-cert {
	--ic-cert-accent: #e71922;
	--ic-cert-accent-hover: #c20f17;
	--ic-cert-text: #151719;
	--ic-cert-text-muted: #4e5358;
	--ic-cert-bg-subtle: #f7f7f7;
	--ic-cert-border: rgba(16, 24, 40, 0.12);
	--ic-cert-header-offset: calc(var(--the7-float-menu-height, 68px) + 20px);
	padding: 48px 16px 80px;
	color: var(--ic-cert-text);
}

.ic-cert,
.ic-cert * {
	box-sizing: border-box;
}

.ic-cert__layout {
	display: grid;
	grid-template-columns: minmax(180px, 200px) minmax(0, 1fr);
	gap: 56px;
	max-width: 1300px;
	margin: 0 auto;
	align-items: start;
}

/*
 * 좌측 목차.
 * <body>에 overflow-x:hidden이 걸려 있으면 CSS 스펙상 overflow-y가 auto로
 * 강제 계산되어 <body>가 스크롤 컨테이너가 되고, 실제 스크롤은 <html>에서
 * 일어나기 때문에 position:sticky가 동작하지 않는다(이 사이트에서 실측 확인).
 * 그래서 위치 고정은 CSS가 아니라 js/cert-green-building.js가 담당하며,
 * 여기서는 기본(고정 전) 상태의 스타일만 정의한다.
 */
.ic-cert__toc {
	position: relative;
}

.ic-cert__toc::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: -16px;
	width: 1px;
	background: var(--ic-cert-border);
}

/* 전체 인증업무 목록 */
.ic-cert-nav__mobile-bar {
	display: none;
}

.ic-cert-nav__services {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ic-cert-nav__service-item {
	list-style: none;
}

.ic-cert-nav__service-item + .ic-cert-nav__service-item {
	margin-top: 16px;
}

.ic-cert-nav__service-label {
	display: block;
	font-size: 16.5px;
	font-weight: 600;
	color: var(--ic-cert-text);
	text-decoration: none;
	word-break: keep-all;
}

a.ic-cert-nav__service-label:hover {
	color: var(--ic-cert-accent);
}

.ic-cert-nav__service-item.is-current > .ic-cert-nav__service-label {
	font-weight: 700;
	color: var(--ic-cert-accent);
}

/* 현재 인증업무의 하위 목차 */
.ic-cert__toc-list {
	margin: 10px 0 0 12px;
	padding: 0;
	list-style: none;
	border-left: 1px solid var(--ic-cert-border);
}

.ic-cert .ic-cert__toc-item {
	list-style: none;
}

.ic-cert__toc-item a {
	display: block;
	padding: 7px 0 7px 14px;
	margin-left: -1px;
	border-left: 2px solid transparent;
	font-size: 14.5px;
	font-weight: 500;
	color: var(--ic-cert-text-muted);
	text-decoration: none;
	word-break: keep-all;
	white-space: nowrap;
}

.ic-cert__toc-item a:hover {
	color: var(--ic-cert-text);
}

.ic-cert__toc-item a.is-active {
	border-left-color: var(--ic-cert-accent);
	color: var(--ic-cert-accent);
	font-weight: 600;
}

/* 우측 본문 */
.ic-cert__content {
	min-width: 0;
}

.ic-cert__section {
	scroll-margin-top: var(--ic-cert-header-offset);
	padding: 40px 0 72px;
	border-top: 1px solid var(--ic-cert-border);
}

.ic-cert__section:first-child {
	padding-top: 0;
	border-top: 0;
}

.ic-cert__section-title {
	margin: 0 0 32px;
	padding-left: 14px;
	border-left: 4px solid var(--ic-cert-accent);
	font-size: 32px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--ic-cert-text);
	word-break: keep-all;
}

.ic-cert__subsection {
	margin: 0;
	padding-top: 4px;
}

.ic-cert__subsection:last-child > *:last-child {
	margin-bottom: 0;
}

.ic-cert__subtitle {
	margin: 56px 0 14px;
	font-size: 23px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ic-cert-text);
	word-break: keep-all;
}

.ic-cert__section-title + .ic-cert__subsection .ic-cert__subtitle {
	margin-top: 0;
}

.ic-cert__group-title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--ic-cert-text);
	word-break: keep-all;
}

.ic-cert__text {
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.8;
	color: var(--ic-cert-text);
	word-break: keep-all;
}

.ic-cert__text:last-child {
	margin-bottom: 0;
}

.ic-cert__text--muted {
	margin-bottom: 20px;
	color: var(--ic-cert-text-muted);
}

.ic-cert__source {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--ic-cert-text-muted);
}

.ic-cert__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ic-cert .ic-cert__list li {
	list-style: none;
	position: relative;
	padding: 0 0 10px 16px;
	font-size: 16px;
	line-height: 1.7;
	color: var(--ic-cert-text);
	word-break: keep-all;
}

.ic-cert__list li:last-child {
	padding-bottom: 0;
}

.ic-cert__list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.75em;
	width: 5px;
	height: 5px;
	background: var(--ic-cert-accent);
}

/* 2열 목록 (예: 업무 수행에 필요한 자료) */
.ic-cert__list--2col {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 24px;
}

/* 번호가 붙는 목록 (예: 의무취득대상 조건) — 원형 숫자기호 */
.ic-cert .ic-cert__list--numbered li {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding-left: 0;
}

.ic-cert__list--numbered li::before {
	content: none;
}

.ic-cert__list-num {
	flex: none;
	font-size: 17px;
	font-weight: 700;
	color: var(--ic-cert-accent);
	line-height: 1.7;
}

.ic-cert__list-text {
	flex: 1 1 auto;
}

/* 인증 등급 4열 */
.ic-cert__grade-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ic-cert .ic-cert__grade-item {
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 16px 10px;
	border: 1px solid var(--ic-cert-border);
	border-top: 2px solid var(--ic-cert-accent);
	text-align: center;
}

.ic-cert__grade-name {
	font-size: 16px;
	font-weight: 700;
	color: var(--ic-cert-text);
}

.ic-cert__grade-sub {
	font-size: 14px;
	color: var(--ic-cert-text-muted);
}

/* 주요 수행 내용 - 소분류 2열 */
.ic-cert__group-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 32px;
}

/* 표 */
.ic-cert__table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.ic-cert__table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font-size: 15.5px;
}

.ic-cert__table th,
.ic-cert__table td {
	padding: 12px 16px;
	border-bottom: 1px solid var(--ic-cert-border);
	text-align: left;
	vertical-align: top;
	word-break: keep-all;
}

.ic-cert__table th {
	font-weight: 700;
	color: var(--ic-cert-text);
	background: var(--ic-cert-bg-subtle);
	white-space: nowrap;
}

.ic-cert__table td {
	color: var(--ic-cert-text-muted);
}

.ic-cert__td-name {
	white-space: nowrap;
	color: var(--ic-cert-text);
	font-weight: 600;
}

.ic-cert__td-phone {
	white-space: nowrap;
}

/* 절차 흐름도 */
.ic-cert__flow {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 40px;
	margin: 0 0 8px;
	padding: 0;
	list-style: none;
}

.ic-cert .ic-cert__flow-step {
	position: relative;
	list-style: none;
	flex: 1 1 180px;
	min-height: 132px;
	padding: 16px;
	border: 1px solid var(--ic-cert-border);
}

.ic-cert .ic-cert__flow-step:not(:last-child)::after {
	content: "→";
	position: absolute;
	top: 50%;
	right: -29px;
	transform: translateY(-50%);
	width: 18px;
	text-align: center;
	color: var(--ic-cert-text-muted);
	font-size: 18px;
	line-height: 1;
}

.ic-cert__flow-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin-bottom: 8px;
	border-radius: 50%;
	background: var(--ic-cert-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

.ic-cert__flow-title {
	display: block;
	margin-bottom: 4px;
	font-size: 17px;
	font-weight: 700;
	color: var(--ic-cert-text);
	word-break: keep-all;
}

.ic-cert__flow-desc {
	display: block;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ic-cert-text-muted);
	word-break: keep-all;
}

/* 컨설팅 수행 업무 - 자료 안내 */
.ic-cert__doc-group {
	margin: 0;
}

.ic-cert__doc-group-title {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 700;
	color: var(--ic-cert-text);
}

.ic-cert__doc-group .ic-cert__list li::before {
	background: var(--ic-cert-text-muted);
}

/* 관련 법령 및 공식 자료 */
.ic-cert__resource-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ic-cert .ic-cert__resource-item {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--ic-cert-border);
	font-size: 15px;
}

.ic-cert__resource-item:last-child {
	border-bottom: 0;
}

.ic-cert__resource-desc {
	color: var(--ic-cert-text-muted);
}

/* 외부 링크 */
.ic-cert__external-link {
	color: var(--ic-cert-accent);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ic-cert__external-link:hover,
.ic-cert__external-link:focus-visible {
	color: var(--ic-cert-accent-hover);
	text-decoration: underline;
}

/* 태블릿·모바일: 2열 해제 + 가로 스크롤 목차 */
@media (max-width: 991px) {
	.ic-cert {
		padding: 32px 20px 56px;
	}

	.ic-cert__layout {
		display: block;
	}

	.ic-cert__toc {
		position: static;
		margin: 0 0 24px;
	}

	.ic-cert__toc::after {
		display: none;
	}

	.ic-cert-nav__mobile-bar {
		display: block;
		margin-bottom: 10px;
	}

	.ic-cert-nav__select {
		display: block;
		width: 100%;
		padding: 10px 14px;
		border: 1px solid var(--ic-cert-border);
		background: #fff;
		font-size: 15px;
		font-weight: 600;
		color: var(--ic-cert-text);
	}

	.ic-cert-nav__service-item:not(.is-current) {
		display: none;
	}

	.ic-cert-nav__service-item.is-current > .ic-cert-nav__service-label {
		display: none;
	}

	.ic-cert__toc-list {
		display: flex;
		gap: 4px;
		margin: 0;
		border-left: 0;
		border-bottom: 1px solid var(--ic-cert-border);
		padding-bottom: 4px;
		width: auto;
		min-width: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}

	.ic-cert__toc-list::-webkit-scrollbar {
		height: 3px;
	}

	.ic-cert__toc-list::-webkit-scrollbar-thumb {
		background: var(--ic-cert-border);
	}

	.ic-cert__toc-item a {
		padding: 8px 14px;
		border-left: 0;
		border-bottom: 2px solid transparent;
		margin-left: 0;
		font-size: 14.5px;
		white-space: nowrap;
	}

	.ic-cert__toc-item a.is-active {
		border-left-color: transparent;
		border-bottom-color: var(--ic-cert-accent);
	}

	.ic-cert__section {
		padding: 32px 0 56px;
	}

	.ic-cert__section-title {
		font-size: 29px;
	}

	.ic-cert__subtitle {
		font-size: 21px;
	}

	.ic-cert__group-title {
		font-size: 17.5px;
	}

	.ic-cert__text,
	.ic-cert .ic-cert__list li {
		font-size: 16px;
	}
}

@media (max-width: 767px) {
	.ic-cert__grade-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ic-cert__group-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.ic-cert__list--2col {
		grid-template-columns: 1fr;
	}

	.ic-cert__section-title {
		font-size: 27px;
	}

	.ic-cert__subtitle {
		margin-top: 36px;
		font-size: 20px;
	}

	.ic-cert__section-title + .ic-cert__subsection .ic-cert__subtitle {
		margin-top: 0;
	}

	.ic-cert__group-title {
		font-size: 16.5px;
	}

	.ic-cert__text,
	.ic-cert .ic-cert__list li {
		font-size: 15.5px;
	}

	.ic-cert__flow-title {
		font-size: 16.5px;
	}

	.ic-cert__flow-desc {
		font-size: 15px;
	}

	.ic-cert__table--agencies,
	.ic-cert__table--agencies tbody,
	.ic-cert__table--agencies tr,
	.ic-cert__table--agencies td {
		display: block;
		width: 100%;
	}

	.ic-cert__table--agencies {
		min-width: 0;
	}

	.ic-cert__table--agencies thead {
		display: none;
	}

	.ic-cert__table--agencies tr {
		margin: 0 0 16px;
		padding: 14px 0;
		border-bottom: 1px solid var(--ic-cert-border);
	}

	.ic-cert__table--agencies tr:last-child {
		margin-bottom: 0;
		border-bottom: 0;
	}

	.ic-cert__table--agencies td {
		padding: 4px 0;
		border-bottom: 0;
	}

	.ic-cert__table--agencies td::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 2px;
		font-size: 12px;
		font-weight: 700;
		color: var(--ic-cert-text-muted);
	}

	.ic-cert__table--agencies .ic-cert__td-name {
		white-space: normal;
		font-size: 16px;
	}

	.ic-cert__table--agencies .ic-cert__td-phone {
		white-space: normal;
	}
}

@media (max-width: 600px) {
	.ic-cert__flow-step {
		flex: 1 1 100%;
	}

	.ic-cert .ic-cert__flow-step::after {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ic-cert * {
		scroll-behavior: auto;
	}
}
