/* style.css */

:root {
    --color-primary: #111111;
    --color-primary-dark: #000000;

    --color-point: #8f0000;
    --color-point-dark: #660000;

    --color-bg: #f5f5f5;
    --color-surface: #ffffff;

    --color-border: #bdbdbd;
    --color-border-soft: #d4d4d4;

    --color-text: #111111;
    --color-text-soft: #3f3f3f;
    --color-muted: #6f6f6f;

    --color-chip-bg: #ffffff;
    --color-chip-border: #bdbdbd;

    --color-heading-line: #8f0000;
    --color-accent: #eeeeee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Nanum Gothic", "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.62;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */

.header {
    background: var(--color-primary);
    color: #fff;
    border-bottom: 1px solid var(--color-border);
}

.inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.header > .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.logo img {
    display: block;
}

.menu ul,
.sub-menu ul {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu a {
    position: relative;
    display: block;
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.menu a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;
    height: 2px;
    background: #fff;
    opacity: 0;
    transform: scaleX(0.4);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.menu a:hover::after,
.menu a[aria-current="page"]::after {
    opacity: 1;
    transform: scaleX(1);
}

.burger {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.burger span {
    display: block;
    height: 2px;
    margin: 6px 0;
    background: #fff;
}

/* Sub menu */

.sub-menu {
    background: var(--color-surface);
}

.sub-menu ul {
    justify-content: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 13px 20px;
    flex-wrap: wrap;
    gap: 7px;
}

.sub-menu a {
    display: block;
    padding: 7px 13px;
    border: 1px solid var(--color-chip-border);
    border-radius: 8px;
    color: #111111;
    background: var(--color-chip-bg);
    font-size: 15px;
    font-weight: 600;
}

.sub-menu a:hover {
    border-color: #111111;
    background: #f8f8f8;
}

/* Content */

.content {
    max-width: 1080px;
    margin: 20px auto;
    padding: 0 20px;
}

.post {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.post-header {
    margin-bottom: 34px;
}

/* H1: 박스형 포인트 제목 */

.post-header h1 {
    margin: 0 0 12px;
    padding: 12px 14px 12px 14px;
    border-left: 4px solid var(--color-heading-line);
    border-bottom: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #f2f2f2, transparent);
    font-size: 27px;
    line-height: 1.35;
    letter-spacing: -0.04em;
}

.post-header h1::after {
    content: none;
}

.post-header p {
    margin: 0;
    color: var(--color-text-soft);
    font-size: 17px;
    line-height: 1.58;
}

/* List */

.post-list {
    margin: 34px 0;
}

.post-list h2,
.post-content h2 {
    position: relative;
    margin: 16px 0;
    padding-bottom: 14px;
    border-bottom: 0;
    font-size: 25px;
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.post-list h2::after,
.post-content h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: var(--color-heading-line);
}

.post-list h2::before,
.post-content h2::before {
    content: none;
}

.post-list ul {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.post-list li {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.035);
}

.post-list li > a:first-child {
    display: block;
}

.post-list img {
    display: block;
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}

.post-list strong {
    display: block;
    position: relative;
    font-size: 16px;
    line-height: 1.24;
    letter-spacing: -0.02em;
    padding: 8px 12px 8px 24px;
    border-bottom: 1px dotted var(--color-border);
}

.post-list strong::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 16px;
    width: 4px;
    height: 4px;
    background: var(--color-text);
}

.post-list span {
    display: block;
    padding: 0 12px;
    margin: 0;
    color: var(--color-text-soft);
    font-size: 14px;
    line-height: 1.2;
    margin:10px 0px;
}

.post-list span + span {
    margin-top: 0;
}

.post-list li > a:last-child {
    display: block;
    width: calc(100% - 24px);
    margin: 20px auto 10px;
    padding: 10px 12px;
    border-radius: 6px;
    background: var(--color-point);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
}

.post-list li > a:last-child::after {
    content: " ›";
    display: inline-block;
    margin-left: 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    vertical-align: 0px;
}

.post-list li > a:last-child:hover {
    background: var(--color-point-dark);
}

/* Post content */

.post-content {
    margin-top: 34px;
}

/* H3: 이전 포인트 라인 스타일 복구 */

.post-content h3 {
    position: relative;
    margin: 28px 0 11px;
    padding-bottom: 8px;
    font-size: 21px;
    line-height: 1.4;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--color-border-soft);
}

.post-content h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 44px;
    height: 1px;
    background: var(--color-heading-line);
}

.post-content p {
    margin: 10px 0;
    line-height: 1.66;
}

.post-content ul,
.post-content ol {
    padding-left: 24px;
}

.post-content li {
    margin: 5px 0;
}

/* Footer */

.footer {
    margin-top: 52px;
    padding: 34px 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 14px;
    text-align: center;
}

.footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 10px;
}

.footer a {
    color: var(--color-text-soft);
}

.footer a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.footer p {
    margin: 0;
}

/* Tablet */

@media (max-width: 1080px) {
    .post-list ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */

@media (max-width: 880px) {
    .header > .inner {
        flex-wrap: wrap;
        min-height: auto;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .burger {
        display: block;
    }

    .menu {
        display: none;
        width: 100%;
        padding: 12px 0 0;
    }

    .menu.is-open {
        display: block;
    }

    .menu ul {
        display: block;
        text-align: center;
    }
    
    .menu a {
        position: relative;
        display: inline-block;
        padding: 12px 0;
        text-align: center;
    }
    
    .menu a::after {
        left: 50%;
        right: auto;
        bottom: 7px;
        width: 42px;
        height: 2px;
        transform: translateX(-50%) scaleX(0.4);
    }
    
    .menu a:hover::after,
    .menu a[aria-current="page"]::after {
        opacity: 1;
        transform: translateX(-50%) scaleX(1);
    }

    .sub-menu ul {
        justify-content: flex-start;
    }

    .post {
        border-radius: 10px;
    }

    .post-header h1 {
        font-size: 25px;
    }

    .post-list ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 660px) {
    .content {
        margin: 26px auto;
        padding: 0 14px;
    }

    .inner {
        padding-left: 14px;
        padding-right: 14px;
    }

    .header > .inner {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .sub-menu ul {
        padding: 12px 14px;
    }

    .post-list ul {
        grid-template-columns: 1fr;
    }

    .post-header h1 {
        font-size: 22px;
    }

    .post-list h2,
    .post-content h2 {
        font-size: 22px;
    }
}