/* =============================================
   블로그 메인 스타일 - 따뜻하고 감성적인 테마
   ============================================= */

:root {
    --warm-cream: #faf6f1;
    --warm-beige: #f0e9df;
    --warm-brown: #8b6f47;
    --warm-brown-light: #c9a882;
    --warm-brown-dark: #5c4228;
    --text-dark: #2d2520;
    --text-mid: #6b5a4e;
    --text-light: #a89080;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(90, 60, 30, 0.08);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: var(--warm-cream);
    color: var(--text-dark);
    line-height: 1.7;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; height: auto; display: block; }

/* =============================================
   헤더
   ============================================= */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--warm-beige);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(90, 60, 30, 0.06);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 30px;
    height: 70px;
}

.blog-brand { flex: 0 0 auto; }

.blog-title-link { text-decoration: none; }

.blog-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--warm-brown-dark);
    letter-spacing: -0.5px;
}

.blog-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
    font-weight: 300;
}

.header-nav {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-mid);
    border-radius: 20px;
    transition: all 0.2s;
    font-weight: 400;
}

.nav-link:hover,
.nav-link.active {
    background: var(--warm-beige);
    color: var(--warm-brown-dark);
    font-weight: 500;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.lang-btn {
    font-size: 12px;
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--warm-brown);
    font-weight: 700;
}

.lang-divider { color: var(--warm-beige); font-size: 12px; }

/* =============================================
   메인 콘텐츠
   ============================================= */
.main-content {
    min-height: calc(100vh - 70px - 120px);
    padding: 50px 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--text-light);
    font-size: 15px;
}

/* =============================================
   히어로 포스트 (첫 번째 글)
   ============================================= */
.hero-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.hero-image {
    height: 380px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image:hover img { transform: scale(1.03); }

.hero-content {
    padding: 40px 40px 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 카테고리 뱃지 */
.post-category {
    display: inline-block;
    font-size: 11px;
    color: var(--warm-brown);
    background: var(--warm-beige);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 28px;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.hero-title a:hover { color: var(--warm-brown); }

.post-excerpt {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
}

/* =============================================
   글 그리드
   ============================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 50px;
}

.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(90, 60, 30, 0.12);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .card-image img { transform: scale(1.05); }

.card-content { padding: 20px; }

.card-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-dark);
    margin: 8px 0 12px;
}

.card-title a:hover { color: var(--warm-brown); }

/* =============================================
   페이지네이션
   ============================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn {
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--warm-beige);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-mid);
    transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
    background: var(--warm-brown);
    color: var(--white);
    border-color: var(--warm-brown);
}

/* =============================================
   글 상세 페이지
   ============================================= */
.post-main { padding: 50px 0 80px; }

.post-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.post-header { margin-bottom: 30px; }

.post-title {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 32px;
    line-height: 1.4;
    color: var(--text-dark);
    margin: 12px 0 16px;
}

.post-thumb {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
}

.post-thumb img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

/* 본문 스타일 */
.post-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-dark);
    margin-bottom: 50px;
}

.post-content p { margin-bottom: 20px; }
.post-content h2 {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 22px;
    margin: 36px 0 16px;
    color: var(--text-dark);
}
.post-content h3 {
    font-size: 18px;
    margin: 28px 0 12px;
    color: var(--text-mid);
}
.post-content img {
    border-radius: 8px;
    margin: 20px 0;
    width: 100%;
}
.post-content a { color: var(--warm-brown); text-decoration: underline; }
.post-content blockquote {
    border-left: 3px solid var(--warm-brown-light);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--warm-beige);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-mid);
}

/* 광고 영역 */
.ad-area {
    margin: 30px 0;
    min-height: 10px;
}

/* 이전/다음 글 */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 40px 0;
    padding-top: 30px;
    border-top: 1px solid var(--warm-beige);
}

.nav-post {
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--warm-beige);
    transition: all 0.2s;
}

.nav-post:hover {
    border-color: var(--warm-brown-light);
    box-shadow: var(--shadow);
}

.next-post { text-align: right; }

.nav-label {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.nav-title {
    display: block;
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.4;
}

.back-to-list {
    text-align: center;
    margin-top: 20px;
}

.back-to-list a {
    font-size: 14px;
    color: var(--warm-brown);
}

.back-to-list a:hover { text-decoration: underline; }

/* =============================================
   푸터
   ============================================= */
.site-footer {
    background: var(--warm-brown-dark);
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

.footer-copy { font-size: 12px; }

/* =============================================
   소개 / 개인정보처리방침 페이지
   ============================================= */
.simple-page {
    max-width: 760px;
    margin: 60px auto;
    padding: 0 24px;
}

.simple-page h1 {
    font-family: 'Nanum Myeongjo', serif;
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.simple-page h2 {
    font-size: 18px;
    margin: 30px 0 12px;
    color: var(--text-dark);
}

.simple-page p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-mid);
    margin-bottom: 16px;
}

/* =============================================
   반응형
   ============================================= */
@media (max-width: 900px) {
    .hero-post { grid-template-columns: 1fr; }
    .hero-image { height: 250px; }
    .hero-content { padding: 24px; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .header-nav { display: none; }
}

@media (max-width: 600px) {
    .posts-grid { grid-template-columns: 1fr; }
    .post-navigation { grid-template-columns: 1fr; }
    .blog-title { font-size: 18px; }
    .post-title { font-size: 24px; }
}

/* ===================== 관련 글 ===================== */
.related-posts {
    margin: 50px 0 30px;
    padding-top: 40px;
    border-top: 1px solid #f0ebe4;
}
.related-title {
    font-size: 16px;
    font-weight: 600;
    color: #5c4228;
    margin-bottom: 20px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.related-card {
    display: block;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #f0ebe4;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.related-img {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f5f0eb;
}
.related-img img { width: 100%; height: 100%; object-fit: cover; }
.related-img-empty { background: linear-gradient(135deg, #f5f0eb, #ede5dc); }
.related-info { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.related-post-title {
    font-size: 13px;
    color: #3d2b1f;
    font-weight: 500;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-date { font-size: 11px; color: #bbb; }
@media (max-width: 640px) {
    .related-grid { grid-template-columns: 1fr; }
}

/* ===================== 본문 구분선 ===================== */
.post-content hr {
    border: none;
    border-top: 1px solid #e8ddd4;
    margin: 12px 0;
    width: 100%;
}
.post-content p + hr { margin-top: 8px; }
.post-content hr + p { margin-top: 8px; }
.ql-editor hr {
    border: none;
    border-top: 2px dashed #e0d8d0;
    margin: 4px 0;
    width: 100%;
}
