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

/* ─── FONTS ──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&family=Noto+Serif+KR:wght@700&display=swap');

/* ─── VARIABLES ──────────────────────────────────────────────────── */
:root {
    --mag-serif:    'Noto Serif KR', Georgia, serif;
    --mag-sans:     'Noto Sans KR', -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;
    --accent:       #1e73be;
}

/* ─── 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;
}

/* ─── SITE SUBTITLE ─────────────────────────────────────────────── */
.mag-site-subtitle {
    margin: 12px 0 24px;
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.03em;
    font-weight: 400;
}

/* ─── 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); }

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

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

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

/* ─── 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; }
}
