/*
Theme Name: hodu
Theme URI: https://hodutrip.com/
Author: hodu
Author URI: https://hodutrip.com/
Description: 여행 기록장처럼 담백한 개인 여행 블로그 테마. 연도별 기록 목록, 다녀온 곳 목록, 방문 시기 표시, 목차, 애드센스(자동광고·본문 광고·ads.txt), 구글·네이버 사이트 인증을 지원합니다.
Version: 2.4.0
Requires at least: 6.3
Tested up to: 7.1
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: hodu
Tags: blog, one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
	--paper: #ffffff;
	--card: #ffffff;
	--ink: #1a1f24;
	--ink-soft: #3d4651;
	--muted: #66727e;
	--line: #d2dde7;
	--walnut: #7b4a28;
	--serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
	--sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
	--wrap: 680px;
	--wrap-wide: 1080px;
}

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

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.8;
	word-break: keep-all;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }
iframe { max-width: 100%; }
body { overflow-x: clip; }
img { display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--walnut); }
:focus-visible { outline: 2px solid var(--walnut); outline-offset: 3px; }

h1, h2, h3, h4 { margin: 0; line-height: 1.4; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	top: 8px; left: 8px; z-index: 100; padding: 8px 14px; background: var(--paper); border: 1px solid var(--ink);
}

.wrap { max-width: calc(var(--wrap) + 40px); margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: calc(var(--wrap-wide) + 40px); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 8px; padding-bottom: 24px; }

.section-label {
	margin: 56px 0 0;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--ink);
	font-family: var(--sans);
	font-size: .85rem;
	font-weight: 600;
	color: var(--ink);
}

/* ---------- 머리글 ---------- */
.site-header { padding: 30px 0 22px; }
.header-inner { display: flex; align-items: baseline; gap: 24px; position: relative; }
.site-title { font-family: var(--serif); font-size: 1.65rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.site-title:hover { color: var(--ink); }
.custom-logo { max-height: 40px; width: auto; }

.main-nav { margin-left: auto; display: flex; align-items: baseline; gap: 22px; font-size: .95rem; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.main-nav li { position: relative; }
.main-nav a { color: var(--ink-soft); }
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-category-ancestor > a,
.main-nav .current-post-ancestor > a { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.main-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: -14px; z-index: 20;
	flex-direction: column; gap: 0; min-width: 150px; padding: 8px 14px;
	background: var(--paper); border: 1px solid var(--line);
}
.main-nav .sub-menu a { display: block; padding: 4px 0; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.nav-search { color: var(--muted) !important; }

.menu-toggle { display: none; }

/* ---------- 홈 ---------- */
.home-photo { margin: 0 auto; }
.home-photo img { width: 100%; max-height: 72vh; object-fit: cover; }
.home-photo figcaption { margin-top: 8px; font-size: .82rem; color: var(--muted); }

.home-intro { margin: 44px 0 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.95; color: var(--ink-soft); }
.home-intro p { margin: 0 0 .6em; }

.places dl { margin: 0; }
.places-row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.places dt { font-weight: 600; }
.places dd { margin: 0; min-width: 0; color: var(--ink-soft); }
.places dd a:hover, .places dt a:hover { text-decoration: underline; text-underline-offset: 4px; }
.places .dot { color: var(--muted); }

/* ---------- 기록 목록 ---------- */
.log-year { margin: 36px 0 2px; font-family: var(--serif); font-size: 1.05rem; font-weight: 700; color: var(--muted); }
.log { list-style: none; margin: 0; padding: 0; }
.log-row { border-bottom: 1px solid var(--line); }
.log-link { display: grid; grid-template-columns: 52px 1fr auto; gap: 18px; align-items: center; padding: 16px 0; color: var(--ink); }
.log-link:hover { color: var(--ink); }
.log-link:hover .log-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.log-date { align-self: start; padding-top: 2px; font-size: .86rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-text { min-width: 0; }
.log-place { display: block; font-size: .82rem; color: var(--walnut); margin-bottom: 2px; }
.log-title { font-size: 1.04rem; font-weight: 600; line-height: 1.55; }
.log-thumb img { width: 96px; height: 72px; object-fit: cover; }

/* ---------- 목록 머리 ---------- */
.page-header { padding: 24px 0 8px; }
.page-up { margin: 0 0 6px; font-size: .88rem; color: var(--muted); }
.page-up a::before { content: "← "; }
.page-title { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2rem); font-weight: 700; }
.page-description { margin-top: 12px; color: var(--ink-soft); }
.page-description p { margin: 0; }
.page-children { margin: 12px 0 0; color: var(--ink-soft); }
.page-children a:hover { text-decoration: underline; text-underline-offset: 4px; }
.page-header .search-form { margin-top: 20px; }

.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .95rem; }
.pagination .page-numbers { color: var(--muted); }
.pagination .page-numbers.current { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }

/* ---------- 검색 ---------- */
.search-form { display: flex; gap: 8px; max-width: 420px; }
.search-field {
	flex: 1; min-width: 0; padding: 9px 12px; font: inherit; font-size: .95rem; color: var(--ink);
	background: var(--card); border: 1px solid var(--line); border-radius: 2px;
}
.search-field:focus { outline: none; border-color: var(--ink); }
.search-submit { padding: 9px 16px; font: inherit; font-size: .92rem; color: #fff; background: var(--ink); border: 0; border-radius: 2px; cursor: pointer; }

/* ---------- 글 ---------- */
.entry-header { padding-top: 32px; }
.entry-where { margin: 0 0 10px; font-size: .9rem; color: var(--muted); }
.entry-where a { color: var(--walnut); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-title { font-family: var(--serif); font-size: clamp(1.7rem, 4.6vw, 2.35rem); font-weight: 700; line-height: 1.45; letter-spacing: -0.015em; }
.entry-date { margin: 14px 0 0; font-size: .85rem; color: var(--muted); }
.entry-updated { margin-left: 4px; }

.entry-photo { margin: 36px auto 0; }
.entry-photo img { width: 100%; }
.entry-photo figcaption { margin-top: 8px; font-size: .84rem; color: var(--muted); }

.entry-content { margin-top: 40px; font-size: 1.06rem; line-height: 1.95; }
.entry-content > * { margin-top: 0; margin-bottom: 1.5em; }
.entry-content h2 { font-family: var(--serif); font-size: 1.42rem; font-weight: 700; margin: 2.6em 0 .9em; }
.entry-content h3 { font-size: 1.12rem; font-weight: 700; margin: 2em 0 .6em; }
.entry-content h4 { font-size: 1rem; font-weight: 700; margin: 1.6em 0 .5em; }
.entry-content a { color: var(--walnut); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content li { margin-bottom: .3em; }
.entry-content figure { margin-left: 0; margin-right: 0; }
.entry-content figcaption, .wp-element-caption { margin-top: 8px; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.entry-content blockquote { margin-left: 0; margin-right: 0; padding-left: 18px; border-left: 2px solid var(--ink); color: var(--ink-soft); }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content hr { border: 0; text-align: center; margin: 2.6em 0; }
.entry-content hr::after { content: "* * *"; color: var(--muted); letter-spacing: .5em; }
.entry-content code { padding: 1px 5px; background: #eef2f5; font-size: .9em; }
.entry-content .alignwide { width: auto; max-width: var(--wrap-wide); margin-left: calc((var(--wrap) - var(--wrap-wide)) / 2); margin-right: calc((var(--wrap) - var(--wrap-wide)) / 2); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
@media (max-width: 1120px) { .entry-content .alignwide { margin-left: 0; margin-right: 0; } }
.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .4em 1.4em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.4em; }

/* 표: 선만 남긴 담백한 표 */
.wp-block-table { overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .94rem; line-height: 1.6; }
.entry-content th, .entry-content td { padding: 9px 10px 9px 0; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--line); }
.entry-content thead th, .entry-content th { border-bottom: 1px solid var(--ink); font-weight: 600; }
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: transparent; }

/* 메모 상자: 문단 블록 > 고급 > 추가 CSS 클래스에 tip 또는 warn */
.entry-content .tip, .entry-content .warn,
.entry-content .is-style-hodu-memo, .entry-content .is-style-hodu-warn { padding-left: 16px; border-left: 2px solid var(--walnut); font-size: .97rem; color: var(--ink-soft); }
.entry-content .tip::before, .entry-content .warn::before,
.entry-content .is-style-hodu-memo::before, .entry-content .is-style-hodu-warn::before { display: block; font-size: .8rem; font-weight: 700; color: var(--walnut); }
.entry-content .tip::before, .entry-content .is-style-hodu-memo::before { content: "메모"; }
.entry-content .warn, .entry-content .is-style-hodu-warn { border-left-color: #a33b20; }
.entry-content .warn::before, .entry-content .is-style-hodu-warn::before { content: "주의"; color: #a33b20; }

/* 워드프레스 기본 클래스 */
.sticky .log-title::after { content: "고정"; margin-left: 8px; padding: 1px 6px; font-size: .72rem; font-weight: 600; color: var(--walnut); border: 1px solid currentColor; vertical-align: 2px; }
.bypostauthor > .comment-body .comment-author .fn::after { content: "글쓴이"; margin-left: 6px; font-size: .75rem; font-weight: 600; color: var(--walnut); }
.wp-caption { max-width: 100%; margin-bottom: 1.5em; }
.wp-caption img { display: block; }
.wp-caption-text, .gallery-caption { margin-top: 8px; font-size: .86rem; line-height: 1.6; color: var(--muted); }

/* 목차 */
.toc { padding: 14px 0 6px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.7; }
.toc-label { margin: 0 0 4px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.toc ol { margin: 0 0 8px; padding-left: 1.3em; }
.toc .toc-h3 { margin-left: 1em; list-style: none; }
.toc .toc-h3::before { content: "– "; color: var(--muted); }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--walnut); }

.hodu-ad { clear: both; margin: 2.4em 0; text-align: center; }

/* 글 하단 */
.entry-footer { margin-top: 56px; }
.tags { margin: 0 0 28px; font-size: .88rem; color: var(--muted); }
.tags a { margin-right: 10px; }
.tags a::before { content: "#"; }

.author { display: flex; gap: 14px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.author-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-name { margin: 0; font-weight: 700; }
.author-bio { margin: 4px 0 0; font-size: .94rem; line-height: 1.7; color: var(--ink-soft); }
.author-links { margin: 6px 0 0; display: flex; gap: 14px; font-size: .88rem; }
.author-links a { color: var(--walnut); }

.post-navigation .nav-links { display: flex; flex-direction: column; }
.post-navigation .nav-links > div { border-bottom: 1px solid var(--line); }
.post-navigation a { display: block; padding: 14px 0; }
.nav-label { font-size: .84rem; color: var(--muted); margin-right: 8px; }
.nav-title { font-weight: 600; }

.related { margin-top: 24px; }
.log-link--full { grid-template-columns: 86px 1fr auto; }
.log-link--full .log-date { font-size: .8rem; white-space: nowrap; }

/* ---------- 댓글 ---------- */
.comments-area { padding: 24px 0 8px; }
.comments-title, .comment-reply-title { margin: 32px 0 12px; font-size: 1rem; font-weight: 700; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.comment-author { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; }
.comment-metadata a { color: var(--muted); }
.comment-content p { margin: .4em 0; }
.comment-content a { color: var(--walnut); text-decoration: underline; text-underline-offset: 3px; }
.reply { font-size: .85rem; }
.comment-notes, .logged-in-as { font-size: .88rem; color: var(--muted); }
.comment-form label { display: block; font-size: .88rem; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 9px 11px; font: inherit; font-size: .95rem; background: var(--card); border: 1px solid var(--line); border-radius: 2px;
}
.comment-form textarea { height: 140px; }
.comment-form .comment-form-cookies-consent label { display: inline; }
.comment-form input[type="submit"] { padding: 10px 20px; font: inherit; font-size: .92rem; color: #fff; background: var(--ink); border: 0; border-radius: 2px; cursor: pointer; }

.no-results { margin: 24px 0; color: var(--muted); }

/* ---------- 바닥글 ---------- */
.site-footer { margin-top: 80px; padding: 26px 0 44px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-bottom: 24px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.footer-widgets ul { list-style: none; margin: 0; padding: 0; }
.footer-widgets h2, .footer-widgets h3, .widget-title { margin: 0 0 6px; font-family: var(--sans); font-size: .86rem; font-weight: 600; color: var(--ink); }
.footer-widgets li { margin: 2px 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer-name { margin: 0; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; }
.footer-menu .menu-item-privacy-policy a { font-weight: 700; color: var(--ink); }

/* ---------- 모바일 ---------- */
@media (max-width: 720px) {
	body { font-size: 16px; }
	.site-header { padding: 20px 0 14px; }
	.header-inner { align-items: center; }
	.menu-toggle {
		display: block; margin-left: auto; padding: 6px 0; font: inherit; font-size: .92rem;
		color: var(--ink); background: none; border: 0; cursor: pointer;
	}
	.main-nav {
		display: none; position: absolute; top: calc(100% + 14px); left: 0; right: 0; z-index: 30;
		flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 14px;
		background: var(--paper); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
	}
	.main-nav.is-open { display: flex; }
	.no-js .menu-toggle { display: none; }
	.no-js .main-nav { display: flex; position: static; margin: 12px 0 0; border: 0; padding: 0; width: 100%; }
	.no-js .header-inner { flex-wrap: wrap; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav a { display: block; padding: 10px 0; }
	.main-nav .sub-menu { display: flex; position: static; border: 0; padding: 0 0 0 14px; background: none; }
	.home-photo { padding: 0; }
	.home-photo figcaption { padding: 0 20px; }
	.home-intro { margin-top: 32px; font-size: 1.04rem; }
	.places-row { grid-template-columns: 80px 1fr; }
	.log-link { grid-template-columns: 44px 1fr 72px; gap: 12px; }
	.log-link--full { grid-template-columns: 1fr 72px; }
	.log-link--full .log-date { display: none; }
	.log-thumb img { width: 72px; height: 54px; }
	.entry-header { padding-top: 16px; }
	.entry-photo { padding: 0; }
	.entry-photo figcaption { padding: 0 20px; }
	.entry-content { margin-top: 30px; }
	.entry-content h2 { font-size: 1.28rem; }
	.alignleft, .alignright { float: none; margin: 0 0 1em; }
}

@media print {
	.site-header, .site-footer, .hodu-ad, .related, .comments-area, .post-navigation, .toc { display: none !important; }
}
