/*
 * layout.css
 * CDDP 공통 레이아웃(ISSUE-19 / WBS-M1-03): 헤더(GNB)·전체메뉴 오버레이·푸터·SNB·
 * 페이지 레이아웃 스켈레톤. 청양다돌봄 퍼블리싱 저장소(design-system v1.18)의
 * header.html/footer.html/snb.html/layout.html을 참고해 손으로 작성함(Tailwind 미사용,
 * 근거는 docs/superpowers/specs/2026-07-27-issue-19-공통퍼블리싱자원이관-design.md 참조).
 * 브레이크포인트: lg = 1024px 단일 기준.
 */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:focus-visible {
	outline: 2px solid var(--cy-pink-100, #e0476a);
	outline-offset: 2px;
}

.cddp-header,
.cddp-footer,
.cddp-allmenu,
.cddp-snb,
.cddp-layout {
	word-break: keep-all;
	overflow-wrap: break-word;
}

/* ==== 스킵 링크 ==== */
.cddp-skip-link {
	position: absolute;
	left: 8px;
	top: -60px;
	z-index: 200;
	background: var(--cy-white, #fff);
	color: var(--cy-gray-90, #333);
	padding: 10px 16px;
	border-radius: var(--cy-radius-control, 6px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	font-weight: bold;
	transition: top 0.15s ease-in-out;
}

.cddp-skip-link:focus {
	top: 8px;
}

/* ==== 헤더 / GNB ==== */
.cddp-header {
	font-family: var(--cy-font-sans);
	color: var(--cy-gray-90, #333);
}

.cddp-header__utility {
	display: none;
	background: var(--cy-gray-10, #f5f5f8);
}

.cddp-header__utility-inner {
	max-width: 1320px;
	margin: 0 auto;
	height: 40px;
	padding: 0 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cddp-header__utility-nav ul {
	display: flex;
	align-items: center;
	gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cddp-header__utility-nav a,
.cddp-header__utility-nav button {
	background: none;
	border: 0;
	font-size: 14px;
	color: var(--cy-gray-70, #666);
	text-decoration: none;
	cursor: pointer;
}

.cddp-header__utility-nav a:hover,
.cddp-header__utility-nav button:hover {
	color: var(--cy-gray-90, #333);
}

.cddp-header__gnb {
	border-bottom: 1px solid var(--cy-gray-30, #dcdcdc);
	background: var(--cy-white, #fff);
}

.cddp-header__gnb-inner {
	max-width: 1320px;
	margin: 0 auto;
	height: 60px;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.cddp-header__logo {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	flex-shrink: 0;
}

.cddp-header__logo-mark {
	height: 22px;
	width: auto;
}

.cddp-header__logo-text {
	height: 16px;
	width: auto;
}

.cddp-header__nav {
	display: none;
	flex: 1;
}

.cddp-header__nav ul {
	display: flex;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cddp-header__nav-link {
	position: relative;
	display: flex;
	align-items: center;
	height: 66px;
	padding: 0 30px;
	font-weight: bold;
	font-size: 16px;
	color: var(--cy-gray-90, #333);
	text-decoration: none;
	border-bottom: 4px solid transparent;
}

.cddp-header__nav-link:hover {
	border-bottom-color: var(--cy-pink-100, #e0476a);
}

.cddp-header__nav-link[aria-current="page"] {
	border-bottom-color: var(--cy-pink-100, #e0476a);
}

.cddp-header__nav-dot {
	position: absolute;
	top: -8px;
	right: -10px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cy-pink-100, #e0476a);
}

.cddp-header__actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-shrink: 0;
}

.cddp-header__icon-btn {
	display: inline-flex;
	padding: 4px;
	color: var(--cy-gray-90, #333);
	background: none;
	border: 0;
	cursor: pointer;
	text-decoration: none;
}

.cddp-header__icon-btn:hover {
	color: var(--cy-pink-100, #e0476a);
}

@media (min-width: 1024px) {
	.cddp-header__utility {
		display: block;
	}

	.cddp-header__gnb-inner {
		height: 70px;
		padding: 0;
	}

	.cddp-header__logo-mark {
		height: 28px;
	}

	.cddp-header__logo-text {
		height: 20px;
	}

	.cddp-header__nav {
		display: block;
	}
}

/* ==== 전체메뉴 오버레이 ==== */
.cddp-allmenu {
	position: fixed;
	inset: 0;
	z-index: 60;
}

.cddp-allmenu[hidden] {
	display: none;
}

.cddp-allmenu__dim {
	position: absolute;
	inset: 0;
	background: rgba(51, 51, 51, 0.5);
}

.cddp-allmenu__dialog {
	position: absolute;
	inset-inline: 0;
	top: 0;
	max-height: 100dvh;
	overflow-y: auto;
	background: var(--cy-white, #fff);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cddp-allmenu__inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 20px;
}

.cddp-allmenu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 60px;
	border-bottom: 1px solid var(--cy-gray-20, #ebeced);
}

.cddp-allmenu__brand {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 18px;
	font-weight: 800;
	text-decoration: none;
}

.cddp-allmenu__brand-pink {
	color: var(--cy-pink-100, #e0476a);
}

.cddp-allmenu__brand-navy {
	color: var(--cy-navy-100, #08264c);
}

.cddp-allmenu__close {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--cy-radius-control, 6px);
	background: none;
	border: 0;
	color: var(--cy-gray-90, #333);
	cursor: pointer;
}

.cddp-allmenu__close:hover {
	background: var(--cy-gray-10, #f5f5f8);
}

.cddp-allmenu__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px 24px;
	padding: 32px 0;
}

.cddp-allmenu__col h2 {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--cy-pink-100, #e0476a);
	font-size: 18px;
	font-weight: bold;
	color: var(--cy-pink-100, #e0476a);
}

.cddp-allmenu__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cddp-allmenu__col a {
	display: block;
	border-radius: var(--cy-radius-control, 6px);
	padding: 8px 4px;
	font-size: 15px;
	color: var(--cy-gray-90, #333);
	text-decoration: none;
}

.cddp-allmenu__col a:hover {
	background: var(--cy-gray-10, #f5f5f8);
	color: var(--cy-pink-100, #e0476a);
}

@media (min-width: 640px) {
	.cddp-allmenu__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1024px) {
	.cddp-allmenu__head {
		height: 70px;
	}

	.cddp-allmenu__grid {
		grid-template-columns: repeat(4, 1fr);
		padding: 40px 0;
	}
}

/* ==== 푸터 ==== */
.cddp-footer {
	background: var(--cy-navy-100, #08264c);
	color: var(--cy-gray-30, #dcdcdc);
	font-family: var(--cy-font-sans);
}

.cddp-footer__desktop {
	display: none;
}

.cddp-footer__brand-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: bold;
	font-size: 16px;
	margin: 0;
}

.cddp-footer__brand-desc {
	margin-top: 16px;
	max-width: 293px;
	font-size: 14px;
}

.cddp-footer__nav h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	color: var(--cy-white, #fff);
}

.cddp-footer__nav ul {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cddp-footer__nav a {
	display: flex;
	height: 36px;
	align-items: center;
	justify-content: space-between;
	max-width: 270px;
	font-size: 15px;
	color: var(--cy-gray-10, #f5f5f8);
	text-decoration: none;
}

.cddp-footer__nav a:hover {
	color: var(--cy-white, #fff);
}

.cddp-footer__guide a {
	background: var(--cy-navy-70, #234363);
	border-radius: var(--cy-radius-control, 6px);
	height: 34px;
	padding: 0 10px;
	color: var(--cy-white, #fff);
	font-size: 14px;
}

.cddp-footer__hr {
	margin: 30px 0;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cddp-footer__addr {
	text-align: center;
}

.cddp-footer__addr p {
	margin: 0;
}

.cddp-footer__addr .cddp-footer__copyright {
	margin-top: 10px;
	font-size: 14px;
}

.cddp-footer__mobile-addr {
	padding: 30px 10px;
	text-align: center;
	font-size: 12px;
	color: var(--cy-gray-20, #ebeced);
}

.cddp-footer__mobile-addr p + p {
	margin-top: 4px;
}

.cddp-footer__accordion {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cddp-footer__accordion-btn {
	display: flex;
	width: 100%;
	height: 50px;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	background: none;
	border: 0;
	color: var(--cy-gray-20, #ebeced);
	font-size: 18px;
	cursor: pointer;
}

.cddp-footer__accordion-panel {
	list-style: none;
	margin: 0;
	padding: 0 20px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cddp-footer__accordion-panel[hidden] {
	display: none;
}

.cddp-footer__accordion-panel a {
	font-size: 14px;
	color: var(--cy-gray-30, #dcdcdc);
	text-decoration: none;
}

.cddp-footer__accordion-panel a:hover {
	color: var(--cy-white, #fff);
}

.cddp-footer__caret {
	flex-shrink: 0;
	transition: transform 0.2s ease-in-out;
}

@media (min-width: 1024px) {
	.cddp-footer__desktop {
		display: block;
		max-width: 1320px;
		margin: 0 auto;
		padding: 30px 0;
	}

	.cddp-footer__mobile {
		display: none;
	}

	.cddp-footer__grid {
		display: grid;
		grid-template-columns: 300px 1fr 1fr 240px;
	}

	.cddp-footer__brand {
		padding-right: 40px;
	}

	.cddp-footer__nav {
		border-left: 1px solid rgba(255, 255, 255, 0.2);
		padding: 0 40px;
	}

	.cddp-footer__guide {
		border-left: 1px solid rgba(255, 255, 255, 0.2);
		padding-left: 40px;
	}
}

/* ==== SNB ==== */
.cddp-snb {
	box-sizing: border-box;
	width: 100%;
	border-radius: var(--cy-radius-panel, 16px);
	border: 1px solid var(--cy-gray-30, #dcdcdc);
	background: rgba(255, 255, 255, 0.95);
	padding: 10px 20px;
	font-family: var(--cy-font-sans);
}

.cddp-snb__mobile-toggle {
	display: flex;
	width: 100%;
	height: 44px;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	background: none;
	border: 0;
	cursor: pointer;
}

.cddp-snb__mobile-current-wrap {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 10px;
	font-weight: bold;
	color: var(--cy-pink-100, #e0476a);
}

.cddp-snb__mobile-bar {
	width: 1px;
	height: 20px;
	flex-shrink: 0;
	background: var(--cy-pink-100, #e0476a);
}

.cddp-snb__mobile-current {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cddp-snb__body {
	margin-top: 8px;
	padding-bottom: 8px;
}

.cddp-snb__body.is-collapsed {
	display: none;
}

.cddp-snb__heading {
	margin: 0;
	padding: 3px 0;
	font-size: 14px;
	font-weight: bold;
	color: var(--cy-gray-70, #666);
}

.cddp-snb__list {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cddp-snb__toggle {
	display: flex;
	width: 100%;
	height: 44px;
	align-items: center;
	gap: 4px;
	padding: 10px 0;
	background: none;
	border: 0;
	text-align: left;
	font-weight: bold;
	font-size: 16px;
	color: var(--cy-gray-90, #333);
	cursor: pointer;
}

.cddp-snb__toggle:hover,
.cddp-snb__toggle[aria-expanded="true"] {
	color: var(--cy-pink-100, #e0476a);
}

.cddp-snb__toggle-label {
	flex: 1;
}

.cddp-snb__caret {
	flex-shrink: 0;
	transition: transform 0.2s ease-in-out;
}

.cddp-snb__panel {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cddp-snb__panel[hidden] {
	display: none;
}

.cddp-snb__panel li a {
	display: flex;
	height: 36px;
	align-items: center;
	gap: 10px;
	border-radius: var(--cy-radius-badge, 8px);
	padding: 0 10px;
	font-size: 14px;
	font-weight: bold;
	color: var(--cy-gray-90, #333);
	text-decoration: none;
}

.cddp-snb__panel li a:hover {
	background: var(--cy-gray-10, #f5f5f8);
}

.cddp-snb__panel li a[aria-current="page"] {
	background: var(--cy-pink-10, #fdeef1);
	color: var(--cy-pink-100, #e0476a);
}

.cddp-snb__rule {
	display: inline-block;
	width: 1px;
	align-self: stretch;
	flex-shrink: 0;
	background: var(--cy-gray-30, #dcdcdc);
}

.cddp-snb__panel li a[aria-current="page"] .cddp-snb__rule {
	background: var(--cy-pink-100, #e0476a);
}

@media (min-width: 1024px) {
	.cddp-snb {
		width: 250px;
		padding: 28px 24px;
	}

	.cddp-snb__mobile-toggle {
		display: none;
	}

	.cddp-snb__body,
	.cddp-snb__body.is-collapsed {
		display: block;
		margin-top: 0;
		padding-bottom: 0;
	}
}

/* ==== 페이지 레이아웃 스켈레톤 ==== */
.cddp-layout {
	min-height: 100vh;
	background: var(--cy-page-bg, #f8f9fd);
}

.cddp-layout__main {
	max-width: 1320px;
	margin: 0 auto;
	padding: 20px;
}

.cddp-layout--snb .cddp-layout__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (min-width: 1024px) {
	.cddp-layout {
		background: var(--cy-white, #fff);
	}

	.cddp-layout__main {
		padding: 30px 0;
	}

	.cddp-layout--snb .cddp-layout__body {
		display: grid;
		grid-template-columns: 250px 1fr;
		gap: 20px;
		align-items: start;
	}
}

.cddp-layout__content {
	min-width: 0;
}
