/*
Theme Name: Down QA
Description: Down QA 다운로드 자료실용 GeneratePress 자식 테마.
Template: generatepress
Version: 1.0.0
Text Domain: down-qa
*/

body {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
}

body > #page {
	flex: 1 0 auto;
	width: 100%;
}

body .site-header {
	position: sticky;
	top: 0;
	width: 100%;
}

body.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
body footer.congdy-footer { width: 100%; left: auto; margin: 0; box-sizing: border-box; }
footer.congdy-footer p { margin-top: 0; }
footer.congdy-footer nav a { display: inline-block; }
footer.congdy-footer nav a:hover { text-decoration: underline; }
.site-header a:focus-visible, .site-header button:focus-visible, .congdy-footer a:focus-visible {
	outline: 2px solid #ffd700;
	outline-offset: 4px;
}

.single-post #primary, .page:not(.home) #primary {
	width: min(100%, 800px);
	margin-inline: auto;
}
.single-post .entry-header .entry-title { line-height: 1; }
.single-post .entry-meta { display: none; }
.single-post .inside-article .entry-content > h2:first-child { margin-top: -30px; }
.single-post .inside-article .entry-content:not(:has(> h2:first-child)) h2:first-of-type { margin-top: 60px; }
.entry-content :is(h2, h3, h4, h5, h6) { scroll-margin-top: 125px; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.home.separate-containers .site-main, .search.separate-containers .site-main { margin: 0; }
.dq-directory { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 3.2vw, 46px) clamp(54px, 6vw, 86px); box-sizing: border-box; }
.dq-intro {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(270px, .9fr);
	align-items: end;
	gap: 36px;
	padding: clamp(48px, 6.6vw, 88px) 0 clamp(32px, 4.5vw, 60px);
	border-bottom: 2px solid #111;
}
.dq-intro h1 {
	margin: 0;
	color: #101010;
	font-size: clamp(36px, 4.6vw, 62px);
	font-weight: 750;
	line-height: 1.14;
	letter-spacing: -.055em;
	word-break: keep-all;
}
.dq-intro-description p, .dq-query-label {
	margin: 14px 0 0;
	color: #3b3b3b;
	font-size: 21px;
	line-height: 2;
	word-break: keep-all;
	overflow-wrap: anywhere;
}
.dq-search {
	display: flex;
	align-items: stretch;
	gap: 6px;
	margin: 0;
	padding: 5px;
	border: 1px solid #282828;
	border-radius: 8px;
	background: #fff;
	box-sizing: border-box;
}
.dq-search:focus-within { outline: 2px solid #111; outline-offset: 2px; }
.dq-search input[type=search] {
	flex: 1 1 0;
	min-width: 0;
	width: 100%;
	border: 0;
	border-radius: 3px;
	background: transparent;
	padding: 10px 12px;
	color: #111;
	font: inherit;
	font-size: 17px;
}
.dq-search input[type=search]:focus { outline: 0; }
.dq-search button {
	flex: none;
	min-height: 44px;
	padding: 8px 21px;
	border: 1px solid #111;
	border-radius: 5px;
	background: #111;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
}
.dq-search button:hover { background: #303030; }
.dq-directory :is(a, button):focus-visible { outline: 2px solid #111; outline-offset: 4px; }
.dq-section { margin-top: clamp(32px, 4vw, 55px); }
.dq-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 19px; }
.dq-section-head h2 { margin: 0; color: #151515; font-size: clamp(22px, 2.4vw, 30px); font-weight: 720; line-height: 1.3; letter-spacing: -.045em; }
.dq-section-head > a { flex: none; color: #3b3b3b; font-size: 15px; text-underline-offset: 4px; }
.dq-post-list { padding: 0; margin: 0; list-style: none; }
.dq-post-list { border-top: 1px solid #c5c5c5; }
.dq-post-list li { display: flex; align-items: baseline; gap: 14px; padding: 16px 0; border-bottom: 1px solid #e4e4e4; }
.dq-post-list a, .dq-no-results a { color: #151515; text-decoration: none; }
.dq-post-list a:hover, .dq-no-results a { text-decoration: underline; text-underline-offset: 3px; }
.dq-post-list time { margin-left: auto; flex: none; color: #626262; font-size: 14px; }
.dq-no-results { padding: 32px 0; }
.dq-no-results p { margin-bottom: 12px; }

@media (max-width: 768px) {
	.dq-intro { grid-template-columns: minmax(0, 1fr); gap: 21px; }
	.dq-intro-description p, .dq-query-label { font-size: 18px; line-height: 1.8; }
	.single-post .inside-article .entry-content > h2:first-child { margin-top: 0; }
	.single-post .inside-article .entry-content:not(:has(> h2:first-child)) h2:first-of-type { margin-top: 30px; }
	.single-post.separate-containers .inside-article, .page:not(.home).separate-containers .inside-article { padding-inline: 16px; }
	.dq-post-list li { flex-wrap: wrap; gap: 4px 12px; }
}
@media (max-width: 600px) {
	body.admin-bar .site-header { top: 0; }
}

.dq-topic-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; list-style: none; margin: 0; padding: 0; }
#topics { scroll-margin-top: 125px; }
.dq-topic-card { display: block; height: 100%; box-sizing: border-box; padding: 23px 22px; border: 1px solid #d6d6d6; border-top: 3px solid #171717; border-radius: 2px 2px 8px 8px; background: #fff; color: #171717; text-decoration: none; }
.dq-topic-card:hover, .dq-topic-card:focus-visible { background: #f7f7f7; border-color: #292929; color: #111; }
.dq-topic-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: clamp(20px,2vw,25px); font-weight: 700; line-height: 1.4; letter-spacing: -.035em; }
.dq-topic-name > span { font-size: .9em; color: #555; }
.dq-topic-description { display: block; color: #4a4a4a; margin-top: 10px; font-size: 16px; line-height: 1.7; word-break: keep-all; }
.dq-empty-list { padding: 24px 0; color: #555; border-block: 1px solid #dedede; margin: 0; }
@media (max-width: 680px) {
	.dq-topic-list { grid-template-columns: minmax(0,1fr); gap: 10px; }
	.dq-topic-card { padding: 15px 18px; border-top: 1px solid #d6d6d6; border-left: 3px solid #171717; }
	.dq-topic-description { margin-top: 3px; }
}

.downqa-h2-ad { display: block; width: 100%; min-width: 0; clear: both; box-sizing: border-box; margin: 12px auto 20px; }
.downqa-h2-ad:has(> ins[data-ad-status="unfilled"]) { display: none; }
.entry-content h2 + .downqa-h2-ad + h3 { margin-top: 0 !important; }
.dq-section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
.dq-section-head > h2 { grid-area: 1 / 1; }
.dq-section-head > a { grid-area: 1 / 2; justify-self: end; }
.dq-section-head > .downqa-h2-ad { grid-column: 1 / -1; grid-row: 2; margin: 8px 0 0; }
