:root {
    --primary: #1CA025;
    --primary-hover: #16801d;
    --text-main: #131b28;
    --text-muted: #5e6d82;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --container: 1200px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header - Blocksy Style */
/* Main Navigation Header */
header:not(.post-header) {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.post-header {
    position: static;
    /* Ensure post title doesn't stick */
    background: transparent;
    box-shadow: none;
}

.header-inner {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: var(--text-main);
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layout - Blocksy Standard 3-Column */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.post-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.post-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumb img {
    transform: scale(1.08);
}

.post-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    padding: 4px 10px;
    background: var(--bg);
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 12px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
    color: var(--text-main);
}

.post-excerpt {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    padding-top: 16px;
    margin-top: auto;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-date {
    font-size: 13px;
    color: var(--text-muted);
}

.read-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.read-more:hover {
    color: var(--primary-hover);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 80px;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Single Post Page */
.single-post {
    padding: 60px 0;
    background: var(--surface);
}

.post-header {
    max-width: 800px;
    margin: 0 auto 40px;
}

.post-meta-top {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    justify-content: center;
}

.post-header h1 {
    font-size: 48px;
    font-weight: 800;
    text-align: center;
    line-height: 1.2;
    letter-spacing: -1.5px;
}

.featured-image {
    max-width: 900px;
    margin: 0 auto 60px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-image img {
    width: 100%;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.article-body {
    font-size: 1.15rem;
    color: #334155;
    line-height: 1.8;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 3rem 0 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text-main);
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body strong {
    color: var(--text-main);
    font-weight: 700;
}

.article-body ul,
.article-body ol {
    margin-bottom: 2rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.75rem;
}

.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    background: var(--bg);
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-muted);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.article-body th,
.article-body td {
    padding: 16px;
    border: 1px solid var(--border);
    text-align: left;
}

.article-body th {
    background: var(--bg);
    font-weight: 700;
}

.article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* Highlighter effect for links */
.article-body a:not(.btn-cta) {
    background: linear-gradient(to bottom, transparent 60%, rgba(28, 160, 37, 0.15) 60%);
    color: var(--primary);
    font-weight: 600;
    padding: 0 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
}

.article-body a:not(.btn-cta):hover {
    background: linear-gradient(to bottom, transparent 20%, rgba(28, 160, 37, 0.25) 20%);
    color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Post TOC Style Fixes */
.post-toc {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.toc-title {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--text-main);
}

.post-toc ul {
    list-style: none;
    padding: 0;
}

.post-toc li {
    margin-bottom: 8px;
}

.post-toc li.level-3 {
    margin-left: 20px;
}

.post-toc a {
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s;
}

.post-toc a:hover {
    color: var(--primary);
}

/* Post CTA Section */
.post-cta-container {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.btn-cta {
    width: 100%;
    max-width: 500px;
    padding: 20px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-platform {
    background: linear-gradient(135deg, #1fa32a, #16801d);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(28, 160, 37, 0.3);
}

.btn-kakao {
    background: #FEE500;
    color: #111111 !important;
    box-shadow: 0 4px 15px rgba(254, 229, 0, 0.2);
}

.btn-activation {
    background: #ffffff;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
}

.btn-cta:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
}

.btn-platform:hover {
    box-shadow: 0 8px 25px rgba(28, 160, 37, 0.4);
}

.btn-kakao:hover {
    box-shadow: 0 8px 25px rgba(254, 229, 0, 0.3);
}

.btn-activation:hover {
    background: var(--primary);
    color: #ffffff !important;
}

/* Inline Article CTA */
.article-cta-wrapper {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.article-cta-wrapper .btn-cta {
    max-width: 400px;
    /* Slightly smaller for inline use */
    padding: 16px 24px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #111827;
    color: #e2e8f0;
    padding: 80px 0 40px;
}

.footer-logo {
    margin-bottom: 20px;
    display: block;
}

.footer-logo img {
    height: 100px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer-logo img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 32px;
    }

    .post-header h1 {
        font-size: 36px;
    }
}