/* ==========================================================================
   OPENCLAW STANDALONE BLOG DESIGN SYSTEM (한솔원격어학원 블로그)
   - Canvas Background: Pale Sky Blue (#eef5fb)
   - Post Cards: Warm Ivory Beige (#fdfbf7)
   - Navigation: Pure Crystal Light (#ffffff / #0284c7)
   - High-Contrast Light Sidebar (#fffdfa / #2563eb)
   - GEO (Generative Engine Optimization) & Semantic Visual Components
   ========================================================================== */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
    /* 页面基底：极其柔和的暖米黄 (Soft Warm Cream/Beige) */
    --bg-page: #fbf8f3;
    --bg-page-subtle: #f5eedf;
    
    /* 文章卡片：温暖象牙白/白瓷色 (Warm Ivory & Pearl) */
    --bg-card: #ffffff;
    --bg-card-hover: #fffdfa;
    --border-card: #ebdcc5;
    --border-card-hover: #dcbfa0;
    --bg-badge: #fff3e0;
    --text-badge: #b25e00;
    --border-badge: #ffe0b2;
    
    /* 纯白表面与导航 */
    --bg-white: #ffffff;
    --border-subtle: #ebdcc5;
    --border-subtle-2: #dcbfa0;
    
    /* 侧边栏 (Warm and bright sidebar) */
    --bg-sidebar: #fffdfa;
    --border-sidebar: #ebdcc5;
    --bg-sidebar-btn: #ffffff;
    --border-sidebar-btn: #f5ebd5;
    --text-sidebar-btn: #334155;
    --bg-sidebar-btn-hover: #fff3e0;
    --border-sidebar-btn-hover: #ffb74d;
    --text-sidebar-btn-hover: #b25e00;
    
    /* 文字颜色层级 */
    --text-heading: #0f172a;        /* 标题深黑曜灰 (Slate-900) */
    --text-body: #334155;           /* 正文典雅石板灰 (Slate-700) */
    --text-muted: #64748b;          /* 摘要/辅助 (Slate-500) */
    --text-dim: #94a3b8;            /* 日期/微弱提示 (Slate-400) */
    
    /* 品牌与强调色 */
    --brand-sky: #0284c7;           /* Sky Blue 600 */
    --brand-sky-hover: #0369a1;     /* Sky Blue 700 */
    --brand-blue: #2563eb;          /* Royal Blue 600 */
    --brand-blue-hover: #1d4ed8;    /* Royal Blue 700 */
    --accent-gold: #f59e0b;         /* Amber 500 */
    
    /* GEO 与特殊区块色彩 */
    --geo-bg: #f0fdf4;              /* AI Direct Answer 浅绿底 */
    --geo-border: #86efac;          /* AI Direct Answer 边框 */
    --geo-accent: #16a34a;          /* AI Direct Answer 强调色 */
    --geo-text: #14532d;            /* AI Direct Answer 文字 */
    --error-bg: #fff1f2;            /* 오답노트 浅红 */
    --error-border: #fecdd3;        /* 오답노트 边框 */
    --error-text: #be123c;          /* 오답노트 文字 */
    --code-bg: #fef2f2;             /* 拼音/代码背景 */
    --code-text: #dc2626;           /* 拼音/代码文字 */
    --code-border: #fecaca;         /* 拼音/代码边框 */
    
    /* 阴影规范 */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
    --shadow-card: 0 2px 8px -1px rgba(70, 90, 120, 0.05), 0 10px 24px -4px rgba(70, 90, 120, 0.06), 0 0 0 1px rgba(237, 228, 212, 0.9);
    --shadow-card-hover: 0 6px 16px -2px rgba(70, 90, 120, 0.08), 0 16px 36px -6px rgba(70, 90, 120, 0.12), 0 0 0 1px rgba(223, 208, 188, 1);
    --shadow-sidebar: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(15, 23, 42, 0.04);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 9999px;
    
    /* 字体 */
    --font-sans: \"Pretendard Variable\", Pretendard, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Noto Sans KR\", sans-serif;
}

/* 基础重置 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.75;
    letter-spacing: -0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

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

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   顶部导航条 (Clean Light Topbar & Navbar)
   -------------------------------------------------------------------------- */
.site-topbar {
    background: #faf4e8;
    border-bottom: 1px solid #f1e4d0;
    padding: 7px 0;
    font-size: 12.5px;
    color: #475569;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #475569;
}

.topbar-item:hover {
    color: var(--brand-sky);
}

.site-header {
    background: var(--bg-white);
    border-bottom: 2px solid #f1e4d0;
    box-shadow: 0 4px 18px -2px rgba(178, 94, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    font-size: 21px;
    font-weight: 850;
    color: var(--text-heading);
    letter-spacing: -0.03em;
}

.brand-badge {
    background: #ffe0b2;
    color: #b25e00;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    letter-spacing: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 650;
    color: var(--text-heading);
    border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link.active {
    background: #ffe0b2;
    color: #b25e00;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-cta {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 750;
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    box-shadow: 0 3px 12px rgba(2, 132, 199, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.38);
}

/* --------------------------------------------------------------------------
   主体网格布局 (Main Grid)
   -------------------------------------------------------------------------- */
.main-layout {
    padding: 40px 0 80px;
    flex: 1;
}

.layout-grid {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 32px;
    align-items: start;
}

/* --------------------------------------------------------------------------
   博客卡片流 (Beige Post Cards)
   -------------------------------------------------------------------------- */
.posts-stream {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    box-shadow: var(--shadow-card);
    transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.post-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--border-card-hover);
}

.card-meta-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.category-badge {
    background: var(--bg-badge);
    color: var(--text-badge);
    font-size: 12px;
    font-weight: 750;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-badge);
}

.category-badge:hover {
    background: var(--brand-sky);
    color: #ffffff;
}

.post-date {
    font-size: 13px;
    color: var(--text-muted);
}

.post-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.42;
    color: var(--text-heading);
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.post-title a:hover {
    color: var(--brand-sky);
}

.post-summary {
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-card);
    padding-top: 16px;
    margin-top: auto;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-badge);
    color: var(--text-badge);
    border: 1px solid var(--border-badge);
    padding: 7px 16px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    font-weight: 750;
}

.btn-read-more:hover {
    background: var(--brand-sky);
    color: #ffffff;
    border-color: var(--brand-sky);
    transform: translateX(3px);
}

.card-author-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   右侧高辨识度明朗侧边栏 (High-Visibility Light Sidebar)
   -------------------------------------------------------------------------- */
.sidebar-sticky {
    position: sticky;
    top: 92px;
}

.sidebar-box {
    background: var(--bg-sidebar);
    border: 2px solid var(--border-sidebar);
    border-radius: var(--radius-xl);
    padding: 24px 20px;
    box-shadow: var(--shadow-sidebar);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.sidebar-box::before {
    content: \"\";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0284c7, #2563eb);
}

.sidebar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sb-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-sidebar-btn);
    border: 1.5px solid var(--border-sidebar-btn);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    color: var(--text-sidebar-btn);
    font-size: 14px;
    font-weight: 650;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.sb-btn:hover {
    background: var(--bg-sidebar-btn-hover);
    border-color: var(--border-sidebar-btn-hover);
    color: var(--text-sidebar-btn-hover);
    transform: translateX(4px);
    box-shadow: 0 3px 12px rgba(2, 132, 199, 0.12);
}

.sb-btn.primary {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}

.sb-btn.primary:hover {
    background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.38);
}

.sb-btn.kakao {
    background: #fee500;
    border: 1.5px solid #fde047;
    color: #371d1e !important;
    font-weight: 750;
}

.sb-btn.kakao:hover {
    background: #facc15;
    border-color: #eab308;
    box-shadow: 0 3px 12px rgba(250, 204, 21, 0.3);
}

.sb-icon {
    font-size: 18px;
    margin-right: 8px;
}

.sb-arrow {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 750;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sb-btn:hover .sb-arrow {
    color: var(--brand-sky);
    transform: translateX(3px);
}

.sb-btn.primary .sb-arrow {
    color: rgba(255, 255, 255, 0.85);
}

/* 侧栏分类与标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background: #f1f5f9;
    border: 1px solid var(--border-subtle);
    color: var(--text-body);
    font-size: 12.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.tag-item:hover {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* --------------------------------------------------------------------------
   单篇详情页 (Single Article View & GEO Components)
   -------------------------------------------------------------------------- */
.article-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    padding: 48px 56px;
    box-shadow: var(--shadow-card);
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb-nav a:hover {
    color: var(--brand-sky);
}

.article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-card);
}

.article-title {
    font-size: 30px;
    font-weight: 850;
    line-height: 1.38;
    color: var(--text-heading);
    margin-bottom: 18px;
    letter-spacing: -0.03em;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-muted);
}

.author-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--text-heading);
}

/* GEO: AI Direct Answer 核心摘要盒 */
.geo-direct-answer {
    background: var(--geo-bg);
    border: 1.5px solid var(--geo-border);
    border-left: 6px solid var(--geo-accent);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin: 32px 0;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.08);
}

.geo-badge-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.geo-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--geo-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.geo-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid #bbf7d0;
}

.geo-summary-text {
    font-size: 16px;
    line-height: 1.8;
    color: #14532d;
    font-weight: 550;
}

/* 正文排版 */
.article-body {
    font-size: 17px;
    line-height: 1.88;
    color: var(--text-body);
}

.article-body p {
    margin-bottom: 1.6em;
}

.article-body h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-heading);
    margin: 42px 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-card);
    letter-spacing: -0.025em;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 750;
    color: var(--text-heading);
    margin: 30px 0 14px;
    letter-spacing: -0.02em;
}

.article-body strong {
    color: var(--text-heading);
    font-weight: 750;
}

.article-body ul,
.article-body ol {
    margin: 1.4em 0 1.6em 1.5em;
}

.article-body li {
    margin-bottom: 0.6em;
}

.article-body a {
    color: var(--brand-sky);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body a:hover {
    color: var(--brand-sky-hover);
}

.article-body code {
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
    font-size: 0.92em;
    padding: 2px 7px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 语法总结与提示盒 */
.article-body blockquote {
    background: #fdf8f0;
    border-left: 4px solid #f59e0b;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 20px 24px;
    margin: 32px 0;
    color: var(--text-body);
    border-top: 1px solid #f1e4d0;
    border-right: 1px solid #f1e4d0;
    border-bottom: 1px solid #f1e4d0;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* 中韩对照表格 */
.article-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 32px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-card);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.article-body th {
    background: #f8f4ed;
    color: var(--text-heading);
    font-weight: 750;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-card);
    border-right: 1px solid var(--border-card);
    text-align: left;
    font-size: 15px;
}

.article-body th:last-child {
    border-right: none;
}

.article-body td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-card);
    border-right: 1px solid var(--border-card);
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.65;
}

.article-body td:last-child {
    border-right: none;
}

.article-body tr:nth-child(even) td {
    background: #fdfbf8;
}

.article-body tr:last-child td {
    border-bottom: none;
}

/* 오답노트 (Common Mistakes Callout) */
.mistake-box {
    background: var(--error-bg);
    border: 1.5px solid var(--error-border);
    border-left: 5px solid var(--error-text);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 28px 0;
}

.mistake-title {
    font-weight: 800;
    color: var(--error-text);
    margin-bottom: 8px;
    font-size: 15.5px;
}

/* FAQ 折叠问答 (SEO Schema 对应) */
.faq-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border-card);
}

.faq-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 20px;
}

.faq-item {
    background: #ffffff;
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    font-weight: 750;
    color: var(--text-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-answer {
    padding: 0 20px 16px 20px;
    color: var(--text-body);
    font-size: 15.5px;
    line-height: 1.7;
    border-top: 1px dashed var(--border-card);
    padding-top: 14px;
}

/* 讲师与课程推荐底栏 */
.author-cta-card {
    margin-top: 48px;
    background: linear-gradient(135deg, #f0f7ff 0%, #fefce8 100%);
    border: 2px solid #bae6fd;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.author-cta-info h4 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.author-cta-info p {
    font-size: 14.5px;
    color: #475569;
    margin: 0;
}

/* --------------------------------------------------------------------------
   分页 (Pagination)
   -------------------------------------------------------------------------- */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 16px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-body);
    font-size: 14.5px;
    font-weight: 650;
    box-shadow: var(--shadow-sm);
}

.page-btn:hover {
    background: #ffffff;
    color: var(--text-heading);
    border-color: var(--border-card-hover);
}

.page-btn.active {
    background: var(--brand-sky);
    border-color: var(--brand-sky);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
}

/* --------------------------------------------------------------------------
   页脚 (Footer)
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--bg-white);
    border-top: 2px solid #f1e4d0;
    padding: 48px 0 32px;
    margin-top: auto;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-body);
    font-weight: 600;
}

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

.footer-brand-title {
    font-size: 18px;
    font-weight: 850;
    color: var(--text-heading);
}

/* --------------------------------------------------------------------------
   响应式 (Responsive)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-stream {
        grid-template-columns: 1fr;
    }
    
    .article-container {
        padding: 32px 24px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .author-cta-card {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav {
        display: none;
    }
}
