/*
Theme Name: GeneratePress Parenting Child
Template:   generatepress
Version:    1.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:       #fafafa;
	--mag-max:      1140px;
	--mag-accent:   #e67e7e;
}

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

.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: 56px;
}

.mag-hero__link {
	display: block;
	position: relative;
	height: 500px;
	background: var(--hero-bg, #f8e8e8) 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, .80) 0%,
		rgba(0, 0, 0, .25) 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.6rem, 3.5vw, 2.5rem);
	font-weight: 700;
	line-height: 1.3;
	margin: 10px 0 14px;
	color: #fff;
	max-width: 640px;
	letter-spacing: -.01em;
}

.mag-hero__excerpt {
	font-size: 1rem;
	color: rgba(255, 255, 255, .85);
	margin: 0;
	max-width: 520px;
	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, #e67e7e);
	border-left: 3px solid var(--badge-color, #e67e7e);
	padding: 1px 7px;
	line-height: 1.5;
	text-decoration: none;
}

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

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

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

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

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

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

.mag-pillar-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--mag-border);
	border-radius: 4px;
	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-accent);
}

.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(--mag-accent); }

.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: 32px 24px;
}

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

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

.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: 6px;
}

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

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

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

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

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

.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: 18px;
}

.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__subdesc {
	font-size: 11px;
	color: var(--mag-muted);
	margin: 4px 0 0;
	line-height: 1.4;
}

.mag-cat-block__empty {
	padding: 20px 0;
	color: var(--mag-muted);
	font-size: .88rem;
	font-style: italic;
}

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

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

.mag-cat-lead h3 {
	font-family: var(--mag-serif);
	font-size: .9rem;
	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(--mag-accent); }

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

.mag-side-list li {
	padding: 8px 0;
	border-bottom: 1px solid var(--mag-border);
	font-size: .84rem;
	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(--mag-accent); }

/* ─── CATEGORY OVERVIEW GRID (homepage) ─────────────────────────── */
.mag-cat-overview {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px 56px;
	margin: 48px 0 72px;
}

.mag-cat-panel {
	border-top: 3px solid var(--mag-dark);
	padding-top: 16px;
}

.mag-cat-panel__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 18px;
}

.mag-cat-panel__name {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	border-bottom: 2px solid;
	padding-bottom: 3px;
	margin-bottom: 6px;
}

.mag-cat-panel__desc {
	font-size: 12px;
	color: var(--mag-muted);
	margin: 4px 0 0;
	line-height: 1.4;
}

.mag-cat-panel__body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 18px;
}

.mag-cat-panel__empty {
	padding: 24px 0;
	color: var(--mag-muted);
	font-size: .88rem;
}

.mag-cat-panel__empty p { margin: 0 0 8px; }
.mag-cat-panel__empty a { text-decoration: none; font-weight: 600; font-size: .85rem; }

/* ─── SINGLE POST ────────────────────────────────────────────────── */
.single .entry-title {
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	line-height: 1.35;
	font-weight: 700;
}

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

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

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

/* ─── HEADER ─────────────────────────────────────────────────────── */
.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: 280px; }
	.mag-hero__title     { font-size: 1.35rem; }
	.mag-hero__excerpt   { display: none; }
	.mag-pillars__grid   { grid-template-columns: 1fr; gap: 16px; }
	.mag-grid--3         { grid-template-columns: 1fr; gap: 28px; }
	.mag-cats__grid      { grid-template-columns: 1fr; gap: 40px; }
	.mag-cat-overview    { grid-template-columns: 1fr; gap: 36px; }
	.mag-cat-panel__body { grid-template-columns: 1fr; }
	.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: 36px 36px; }
}
