/*
Theme Name: GeneratePress Child
Template:   generatepress
Version:    2.0
*/

/* ─── VARIABLES ──────────────────────────────────────────────────── */
:root {
	--mag-serif:    'Noto Serif KR', Georgia, serif;
	--mag-sans:     -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
	--mag-dark:     #1a1a1a;
	--mag-mid:      #555;
	--mag-muted:    #888;
	--mag-border:   #e8e8e8;
	--mag-bg:       #f8f8f8;
	--mag-max:      1140px;
	--mag-gap:      24px;
}

/* ─── BASE ───────────────────────────────────────────────────────── */
body {
	font-family: var(--mag-sans);
	background: #fff;
	color: var(--mag-dark);
	font-size: 16px;
	line-height: 1.7;
}

.mag-container {
	max-width: var(--mag-max);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* ─── HERO ───────────────────────────────────────────────────────── */
.mag-hero {
	width: 100%;
	margin-bottom: 64px;
}

.mag-hero__link {
	display: block;
	position: relative;
	height: 540px;
	background: var(--hero-bg, #1a1a1a) center / cover no-repeat;
	text-decoration: none;
	overflow: hidden;
}

.mag-hero__link::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, .85) 0%,
		rgba(0, 0, 0, .35) 45%,
		transparent 100%
	);
}

.mag-hero__content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1;
	padding: 48px max(20px, calc(50% - 570px));
	color: #fff;
}

.mag-hero__title {
	font-family: var(--mag-serif);
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.25;
	margin: 10px 0 14px;
	color: #fff;
	max-width: 680px;
	letter-spacing: -.01em;
}

.mag-hero__excerpt {
	font-size: 1rem;
	color: rgba(255, 255, 255, .82);
	margin: 0;
	max-width: 540px;
	line-height: 1.65;
}

/* ─── BADGE ──────────────────────────────────────────────────────── */
.mag-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--badge-color, #333);
	border-left: 3px solid var(--badge-color, #333);
	padding: 1px 7px;
	line-height: 1.5;
	text-decoration: none;
}

.mag-badge--sm { font-size: 10px; }

/* ─── SECTION HEADER ─────────────────────────────────────────────── */
.mag-section {
	margin-bottom: 64px;
}

.mag-section__head {
	display: flex;
	align-items: center;
	border-top: 2px solid var(--mag-dark);
	padding-top: 12px;
	margin-bottom: 28px;
}

.mag-section__label {
	font-family: var(--mag-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--mag-dark);
	margin: 0;
}

/* ─── PILLAR SECTION ─────────────────────────────────────────────── */
.mag-pillars {
	margin-bottom: 64px;
	padding: 28px 20px 32px;
	background: #f3f4f6;
	border-top: 3px solid var(--mag-dark);
	border-radius: 2px;
	max-width: var(--mag-max);
}

.mag-pillars__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.mag-pillar-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fff;
	border: 1px solid var(--mag-border);
	border-radius: 3px;
	overflow: hidden;
}

.mag-pillar-card__img {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--mag-border);
}

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

.mag-pillar-card__img:hover img {
	transform: scale(1.04);
}

.mag-pillar-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px 20px;
}

.mag-pillar-card__label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--mag-muted);
}

.mag-pillar-card__title {
	font-family: var(--mag-serif);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.45;
	margin: 0;
}

.mag-pillar-card__title a {
	color: var(--mag-dark);
	text-decoration: none;
}

.mag-pillar-card__title a:hover { color: var(--accent, #1e73be); }

.mag-pillar-card__desc {
	font-size: .85rem;
	color: var(--mag-mid);
	line-height: 1.6;
	margin: 0;
}

/* ─── 3-COLUMN GRID ──────────────────────────────────────────────── */
.mag-grid--3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 36px 28px;
}

/* ─── CARD ───────────────────────────────────────────────────────── */
.mag-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mag-card__img {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--mag-border);
}

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

.mag-card__img:hover img {
	transform: scale(1.04);
}

.mag-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mag-card__title {
	font-family: var(--mag-serif);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.45;
	margin: 0;
}

.mag-card__title a {
	color: var(--mag-dark);
	text-decoration: none;
}

.mag-card__title a:hover { color: var(--accent, #1e73be); }

.mag-card__date {
	font-size: 12px;
	color: var(--mag-muted);
	display: block;
}

/* ─── CATEGORY SECTIONS ──────────────────────────────────────────── */
.mag-cats {
	margin-bottom: 72px;
}

.mag-cats__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px 64px;
}

.mag-cat-block__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	border-top: 2px solid var(--mag-dark);
	padding-top: 12px;
	margin-bottom: 20px;
}

.mag-cat-block__name {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	border-bottom: 2px solid;
	padding-bottom: 3px;
	color: var(--mag-dark);
}

.mag-cat-block__more {
	font-size: 12px;
	color: var(--mag-muted);
	text-decoration: none;
	transition: color .2s;
}

.mag-cat-block__more:hover { color: var(--mag-dark); }

.mag-cat-block__body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 20px;
}

.mag-cat-lead img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	display: block;
	margin-bottom: 10px;
}

.mag-cat-lead h3 {
	font-family: var(--mag-serif);
	font-size: .92rem;
	font-weight: 700;
	line-height: 1.45;
	margin: 0;
}

.mag-cat-lead h3 a {
	color: var(--mag-dark);
	text-decoration: none;
}

.mag-cat-lead h3 a:hover { color: var(--accent, #1e73be); }

.mag-side-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	border-left: 1px solid var(--mag-border);
	padding-left: 16px;
}

.mag-side-list li {
	padding: 9px 0;
	border-bottom: 1px solid var(--mag-border);
	font-size: .85rem;
	line-height: 1.5;
}

.mag-side-list li:last-child { border-bottom: none; }

.mag-side-list a {
	color: var(--mag-dark);
	text-decoration: none;
	font-weight: 500;
}

.mag-side-list a:hover { color: var(--accent, #1e73be); }

/* ─── SINGLE POST ────────────────────────────────────────────────── */
.single .entry-title {
	font-size: clamp(1.6rem, 3.5vw, 2.4rem);
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -.01em;
}

.single .entry-content {
	font-size: 1.05rem;
	line-height: 1.9;
}

.single .entry-content h2 {
	font-size: 1.45rem;
	margin-top: 2.2em;
	padding-bottom: .4em;
	border-bottom: 1px solid var(--mag-border);
}

.single .entry-content h3 {
	font-size: 1.15rem;
	margin-top: 1.8em;
}

/* ─── HEADER / NAV ───────────────────────────────────────────────── */
.site-header {
	border-bottom: 1px solid var(--mag-border);
}

.main-navigation .main-nav ul li a {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
}

/* ─── FOOTER ─────────────────────────────────────────────────────── */
.site-footer, .site-info {
	border-top: 1px solid var(--mag-border);
	font-size: 13px;
	color: var(--mag-muted);
}

.site-info a {
	color: var(--mag-mid);
	text-decoration: none;
}

.site-info a:hover { color: var(--mag-dark); }

/* ─── RESPONSIVE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
	.mag-hero__link        { height: 300px; }
	.mag-hero__title       { font-size: 1.4rem; }
	.mag-hero__excerpt     { display: none; }
	.mag-pillars__grid     { grid-template-columns: 1fr; gap: 20px; }
	.mag-grid--3           { grid-template-columns: 1fr; gap: 32px; }
	.mag-cats__grid        { grid-template-columns: 1fr; gap: 44px; }
	.mag-cat-block__body   { grid-template-columns: 1fr; }
	.mag-side-list         { border-left: none; padding-left: 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
	.mag-pillars__grid { grid-template-columns: 1fr 1fr; }
	.mag-grid--3       { grid-template-columns: 1fr 1fr; }
	.mag-cats__grid    { gap: 40px 40px; }
}

/* ─── TOOLS (공통) ───────────────────────────────────────────────── */
.tool-wrap {
	max-width: 860px;
	margin: 48px auto 80px;
	padding: 0 20px;
}

.tool-breadcrumb {
	font-size: 0.8rem;
	color: var(--mag-muted);
	margin-bottom: 32px;
}

.tool-breadcrumb a {
	color: var(--mag-muted);
	text-decoration: none;
}

.tool-breadcrumb a:hover { color: #c0392b; }
.tool-breadcrumb span   { margin: 0 6px; }

.tool-page-header {
	margin-bottom: 32px;
	border-bottom: 2px solid var(--mag-dark);
	padding-bottom: 20px;
}

.tool-page-header h1 {
	font-family: var(--mag-serif);
	font-size: clamp(1.5rem, 3vw, 2rem);
	color: var(--mag-dark);
	margin: 0 0 8px;
}

.tool-page-header p {
	font-size: 0.92rem;
	color: var(--mag-mid);
	margin: 0;
	line-height: 1.65;
}

.tool-card {
	background: #fff;
	border: 1px solid var(--mag-border);
	border-radius: 8px;
	padding: 28px;
}

.tool-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--mag-muted);
	text-transform: uppercase;
	letter-spacing: .06em;
	margin-bottom: 6px;
}

textarea.tool-in,
textarea.tool-out,
input.tool-in {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid var(--mag-border);
	border-radius: 6px;
	padding: 12px 14px;
	font-size: 0.88rem;
	font-family: 'Courier New', monospace;
	resize: vertical;
	background: var(--mag-bg);
	color: var(--mag-dark);
}

textarea.tool-in  { min-height: 160px; }
textarea.tool-out { min-height: 160px; background: #fafafa; }
input.tool-in     { height: 42px; resize: none; }

textarea.tool-in:focus,
input.tool-in:focus {
	outline: none;
	border-color: #c0392b;
	background: #fff;
}

.tool-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 12px;
}

.tool-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.btn-tool {
	padding: 9px 18px;
	border: none;
	border-radius: 5px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s;
	font-family: var(--mag-sans);
}

.btn-tool:hover          { opacity: .82; }
.btn-tool--primary       { background: #c0392b; color: #fff; }
.btn-tool--secondary     { background: var(--mag-bg); color: var(--mag-dark); border: 1px solid var(--mag-border); }
.btn-tool--copy          { background: #2980b9; color: #fff; }

.tool-status {
	font-size: 0.82rem;
	padding: 8px 12px;
	border-radius: 5px;
	margin-top: 10px;
	display: none;
}

.tool-status.ok  { background: #e8f5e9; color: #2e7d32; display: block; }
.tool-status.err { background: #fdecea; color: #b71c1c; display: block; }

/* ─── TOOLS HUB GRID ─────────────────────────────────────────────── */
.tools-hub-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-top: 36px;
}

.tools-hub-card {
	border: 1px solid var(--mag-border);
	border-radius: 8px;
	padding: 24px 20px;
	text-decoration: none;
	color: inherit;
	transition: border-color .15s, box-shadow .15s;
	display: block;
}

.tools-hub-card:hover {
	border-color: #c0392b;
	box-shadow: 0 2px 12px rgba(0,0,0,.07);
	text-decoration: none;
}

.tools-hub-card__label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #c0392b;
	margin-bottom: 8px;
}

.tools-hub-card__title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--mag-dark);
	margin: 0 0 8px;
	line-height: 1.35;
}

.tools-hub-card__desc {
	font-size: 0.82rem;
	color: var(--mag-muted);
	margin: 0;
	line-height: 1.55;
}

@media (max-width: 640px) {
	.tools-hub-grid { grid-template-columns: 1fr; }
	.tool-row       { grid-template-columns: 1fr; }
}

@media (min-width: 641px) and (max-width: 900px) {
	.tools-hub-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── TOOLS OTHER ─────────────────────────────────────────────────── */
.tool-other-tools {
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid var(--mag-border);
}

.tool-other-tools h2 {
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--mag-muted);
	margin: 0 0 16px;
}

.tool-other-tools ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.tool-other-tools ul li a {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--mag-border);
	border-radius: 20px;
	font-size: 0.82rem;
	color: var(--mag-mid);
	text-decoration: none;
	transition: border-color .12s, color .12s;
}

.tool-other-tools ul li a:hover {
	border-color: #c0392b;
	color: #c0392b;
}
