/*
Theme Name: Wedding Place
Description: 지역별 웨딩홀을 그리드로 보여주는 테마입니다. 글의 대표 이미지가 그대로 카드 이미지가 되고, 상단 메뉴는 HOME · TIP · PLACE로 구성됩니다.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wedding-place
Tags: grid-layout, custom-menu, custom-logo, featured-images, translation-ready
*/

:root {
	--wp-ink: #111;
	--wp-text: #333;
	--wp-muted: #767b82;
	--wp-line: #e4e5e7;
	--wp-tab-hover: #f2f3f4;
	--wp-placeholder: #eff0f2;
	--wp-bg: #fff;
	--wp-radius: 14px;
	--wp-gap: 19px;
	--wp-gutter: 51px;
	--wp-max: 1304px;
	--wp-font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Noto Sans CJK KR", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--wp-bg);
	color: var(--wp-text);
	font-family: var(--wp-font);
	font-size: 16px;
	line-height: 1.6;
	word-break: keep-all;
	overflow-wrap: break-word;
}

img, video { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--wp-ink); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 100;
	width: auto;
	height: auto;
	margin: 0;
	padding: 10px 16px;
	clip: auto;
	background: var(--wp-ink);
	color: #fff;
	border-radius: 8px;
}

.container {
	width: 100%;
	max-width: var(--wp-max);
	margin-inline: auto;
	padding-inline: var(--wp-gutter);
}

/* Header */
.site-header { background: var(--wp-bg); }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 72px;
}

.site-brand {
	color: var(--wp-ink);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.site-brand .custom-logo { display: block; width: auto; max-height: 40px; }

.main-menu {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-menu a {
	display: block;
	padding: 8px 14px;
	border-radius: 8px;
	color: var(--wp-text);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .04em;
	transition: background-color .15s, color .15s;
}

.main-menu a:hover { background: var(--wp-tab-hover); color: var(--wp-ink); }

.main-menu .current-menu-item > a,
.main-menu .current-menu-ancestor > a { color: var(--wp-ink); box-shadow: inset 0 -2px 0 var(--wp-ink); border-radius: 0; }

.main-menu .sub-menu { display: none; }

/* Region tabs */
.region-tabs {
	padding-top: 8px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wp-line);
}

.region-tabs__list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.region-tabs__link {
	display: block;
	padding: 9px 18px;
	border-radius: 10px;
	color: #444;
	font-size: 14px;
	line-height: 22px;
	white-space: nowrap;
	transition: background-color .15s;
}

.region-tabs__link:hover { background: var(--wp-tab-hover); }

.region-tabs__link[aria-current] { background: var(--wp-ink); color: #fff; }

/* Headings */
.site-main { padding-bottom: 72px; }

.list-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin: 18px 0 20px;
}

.list-head__title {
	margin: 0;
	color: var(--wp-ink);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.35;
}

.list-head__count,
.region-section__count {
	flex: none;
	color: var(--wp-muted);
	font-size: 13px;
	line-height: 1.5;
}

.region-section { margin-bottom: 44px; }

.region-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.region-section__title {
	margin: 0;
	color: var(--wp-ink);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.35;
}

.region-section__title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.region-section__more { margin-top: 20px; text-align: center; }

.more-link {
	display: inline-block;
	padding: 10px 22px;
	border: 1px solid var(--wp-line);
	border-radius: 10px;
	color: var(--wp-ink);
	font-size: 14px;
	font-weight: 600;
	transition: background-color .15s, border-color .15s;
}

.more-link:hover { background: var(--wp-tab-hover); border-color: #cfd1d4; }

/* Place grid */
.place-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 24px var(--wp-gap);
}

.place-card { min-width: 0; }

.place-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--wp-line);
	border-radius: var(--wp-radius);
	background: var(--wp-bg);
	transition: box-shadow .2s, border-color .2s;
}

.place-card__link:hover { border-color: #d3d5d8; box-shadow: 0 8px 22px rgba(17, 17, 17, .09); }

.place-card__media {
	display: block;
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--wp-placeholder);
}

.place-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.place-card__link:hover .place-card__media img { transform: scale(1.03); }

.place-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-self: center;
	max-width: 100%;
	padding: 14px 16px 17px;
}

.place-card__location {
	color: var(--wp-muted);
	font-size: 13px;
	line-height: 1.6;
}

.place-card__title {
	display: -webkit-box;
	overflow: hidden;
	margin: 3px 0 0;
	color: var(--wp-ink);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* Tip / article grid */
.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 24px;
}

.post-card { min-width: 0; }

.post-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: var(--wp-radius);
	background: var(--wp-placeholder);
}

.post-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.post-card:hover .post-card__media img { transform: scale(1.03); }

.post-card__title {
	margin: 14px 0 6px;
	color: var(--wp-ink);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.4;
}

.post-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin: 0 0 8px;
	color: #555;
	font-size: 14.5px;
	line-height: 1.65;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.post-card__date { color: var(--wp-muted); font-size: 13px; }

/* Pagination */
.pagination { margin-top: 44px; }

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
}

.pagination .page-numbers {
	display: block;
	min-width: 40px;
	padding: 8px 12px;
	border-radius: 10px;
	color: #444;
	font-size: 14px;
	line-height: 24px;
	text-align: center;
}

.pagination a.page-numbers:hover { background: var(--wp-tab-hover); }

.pagination .current { background: var(--wp-ink); color: #fff; }

/* Empty state */
.empty-state {
	padding: 72px 20px;
	color: var(--wp-muted);
	text-align: center;
}

.empty-state p { margin: 0 0 6px; }

.empty-state a { color: var(--wp-ink); text-decoration: underline; text-underline-offset: 3px; }

.empty-state .search-form { margin-top: 20px; }

/* Single post and page */
.entry {
	max-width: 760px;
	margin-inline: auto;
	padding-top: 24px;
}

.entry__location {
	color: var(--wp-muted);
	font-size: 14px;
}

.entry__location a:hover { color: var(--wp-ink); text-decoration: underline; text-underline-offset: 3px; }

.entry__title {
	margin: 4px 0 8px;
	color: var(--wp-ink);
	font-size: 32px;
	font-weight: 700;
	line-height: 1.35;
}

.entry__date { color: var(--wp-muted); font-size: 14px; }

.entry__thumbnail { margin: 24px 0 0; }

.entry__thumbnail img { display: block; width: 100%; border-radius: var(--wp-radius); }

.entry__content { margin-top: 28px; font-size: 17px; line-height: 1.85; }

.entry__content > * { margin-block: 0 1.2em; }

.entry__content h2,
.entry__content h3,
.entry__content h4 { margin-top: 1.8em; margin-bottom: .6em; color: var(--wp-ink); line-height: 1.4; }

.entry__content a { color: var(--wp-ink); text-decoration: underline; text-underline-offset: 3px; }

.entry__content img { border-radius: 8px; }

.entry__content blockquote {
	margin-inline: 0;
	padding-left: 18px;
	border-left: 3px solid var(--wp-ink);
	color: #555;
}

.entry__content pre { overflow-x: auto; padding: 14px; border-radius: 8px; background: var(--wp-tab-hover); }

.entry__content table { width: 100%; border-collapse: collapse; }

.entry__content th,
.entry__content td { padding: 8px 10px; border: 1px solid var(--wp-line); }

.alignwide { max-width: 1040px; margin-inline: auto; }

.alignleft { float: left; margin: .3em 1.2em .8em 0; }

.alignright { float: right; margin: .3em 0 .8em 1.2em; }

.aligncenter { display: block; margin-inline: auto; }

.wp-caption-text,
.wp-element-caption { color: var(--wp-muted); font-size: 13px; text-align: center; }

.post-navigation { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--wp-line); }

.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; }

.post-navigation a:hover { text-decoration: underline; text-underline-offset: 3px; }

.post-navigation .nav-next { margin-left: auto; text-align: right; }

/* Comments and forms */
.comments { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--wp-line); }

.comments__title,
.comment-reply-title { margin: 0 0 16px; color: var(--wp-ink); font-size: 20px; }

.comment-list { margin: 0 0 32px; padding: 0; list-style: none; }

.comment-list .children { padding-left: 20px; list-style: none; }

.comment-body { padding: 14px 0; border-bottom: 1px solid var(--wp-line); font-size: 15px; }

.comment-author .avatar { float: left; margin-right: 10px; border-radius: 50%; }

.comment-metadata { color: var(--wp-muted); font-size: 13px; }

.comment-form label { display: block; margin-bottom: 4px; font-size: 14px; }

.comment-form .comment-form-cookies-consent label { display: inline; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-field {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cfd1d4;
	border-radius: 8px;
	background: #fff;
	font: inherit;
}

.comment-form .submit,
.search-submit {
	padding: 10px 20px;
	border: 0;
	border-radius: 10px;
	background: var(--wp-ink);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.search-form { display: flex; gap: 8px; max-width: 420px; margin-inline: auto; }

.search-form label { flex: 1; }

/* Footer */
.site-footer { padding: 28px 0; border-top: 1px solid var(--wp-line); color: var(--wp-muted); font-size: 13px; }

/* Responsive */
@media (max-width: 1180px) {
	:root { --wp-gutter: 32px; }
	.place-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	:root { --wp-gutter: 24px; }
	.place-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	:root { --wp-gutter: 16px; --wp-gap: 12px; }

	.site-header__inner { min-height: 60px; gap: 12px; }
	.main-menu { gap: 0; }
	.main-menu a { padding: 8px 10px; font-size: 13px; }

	.region-tabs { padding-top: 0; }

	.region-tabs__list {
		flex-wrap: nowrap;
		margin-inline: calc(var(--wp-gutter) * -1);
		padding-inline: var(--wp-gutter);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.region-tabs__list::-webkit-scrollbar { display: none; }

	.region-tabs__link { padding: 7px 14px; }

	.list-head__title { font-size: 22px; }
	.region-section { margin-bottom: 36px; }
	.region-section__title { font-size: 19px; }

	.place-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px var(--wp-gap); }
	.place-card__body { padding: 11px 12px 13px; }
	.place-card__location { font-size: 12px; }
	.place-card__title { font-size: 15px; }

	.post-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }

	.entry__title { font-size: 26px; }
	.entry__content { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; }
	.place-card__link:hover .place-card__media img,
	.post-card:hover .post-card__media img { transform: none; }
}
