:root {
    --gap: 24px;
    --content-gap: 20px;
    --nav-width: 1024px;
    --main-width: 1140px;
    --header-height: 60px;
    --footer-height: 60px;
    --radius: 0.5rem; /* 8px */
    
    /* Light Theme Colors (Tailwind-inspired) */
    --color-bg: #f9fafb; /* gray-50 */
    --color-card-bg: #ffffff; /* white */
    --color-text-primary: #111827; /* gray-900 */
    --color-text-secondary: #6b7280; /* gray-500 */
    --color-border: #e5e7eb; /* gray-200 */
    --color-interactive-bg: #f3f4f6; /* gray-100 */
    --color-brand: #5c7c64; /* Sage Green */
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Crimson Text", serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--color-bg);
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
a:hover { color: var(--color-brand); }

/* Layout */
.container {
    max-width: var(--main-width);
    margin: 0 auto;
    padding: 0 var(--gap);
    width: 100%;
}

/* Header */
.site-header {
    background-color: var(--color-card-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem var(--gap);
    margin: 0;
    max-width: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header-inner {
    max-width: var(--nav-width);
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header img { height: 40px; width: auto; }

/* Header Search (Rounded Pill Style) */
.header-search {
    flex-grow: 1;
    max-width: 400px;
    margin-left: 20px;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 10px 48px 10px 20px;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    background-color: var(--color-interactive-bg);
    border: 1px solid transparent;
    border-radius: 9999px; /* rounded-full */
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); /* shadow-inner */
    -webkit-appearance: none;
}

.search-input:focus {
    background-color: #fff;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(92, 124, 100, 0.2); /* focus ring */
}

.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    color: var(--color-text-secondary);
    background: none;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-button:hover {
    color: var(--color-text-primary);
    background-color: rgba(0,0,0,0.05);
}
.search-button svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 640px) {
    .header-search {
        max-width: 100%;
        margin-left: 15px;
    }
}

/* Featured Section (Magazine Style) */
.featured-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Kiri lebih kecil, Kanan lebih besar */
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
    height: 340px; /* Fixed height agar compact */
    overflow: hidden; /* Prevent overlap */
}
.featured-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}
.featured-left .feat-card {
    flex: 1;
    height: auto;
}
.featured-right {
    height: 100%;
}
.feat-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: var(--color-card-bg);
    height: 100%;
}
.feat-card a {
    display: block;
    height: 100%;
    width: 100%;
}
.feat-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.feat-card:hover img {
    transform: scale(1.05);
}
.feat-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.feat-content h2 {
    font-size: 1.25rem;
    margin: 0 0 5px 0;
    font-weight: 700;
    line-height: 1.3;
}
.feat-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    display: none; /* Sembunyikan snippet di card kecil */
}
.feat-big .feat-content p { display: block; } /* Tampilkan snippet di card besar */
.feat-big .feat-content h2 { font-size: 1.75rem; }

/* Post List (Home) */
.posts { margin-top: var(--gap); }

.post-card {
    margin-bottom: var(--gap);
    padding: var(--gap);
    background: var(--color-card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Premium Shadow */
    transition: all 0.2s ease-in-out;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: var(--color-card-bg);
}

.post-card .post-link {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    color: inherit;
}

.post-card .post-image {
    flex: 0 0 240px;
}

.post-card .post-info {
    flex: 1;
}

.post-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.post-card .post-info p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.post-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 0;
    display: block;
}

/* Single Post */
.single {
    background: var(--color-card-bg);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Premium Shadow */
}

/* Article Header (Premium Style) */
.article-header {
    background-color: #f4f7f6; /* Sage-50-ish */
    padding: 3rem 0;
    margin-bottom: 2.5rem;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}
.article-header h1 {
    font-family: "Crimson Text", serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}
.article-header .meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.875rem;
    color: #4b5563;
    margin-top: 1.5rem;
}
.article-header .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid var(--color-border);
}
.article-header svg {
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

/* Single Post Content */
.single h1 {
    /* H1 inside article is removed, but keeping style just in case */
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.single img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 0 0 30px 0; /* Margin bawah diperbesar */
    width: 100%; /* Full width image */
}

.content { 
    font-size: 1.125rem; 
    color: #374151;
}
.content h2 { 
    margin-top: 40px; 
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}
.content p { margin-bottom: 20px; }

/* TOC */
.toc {
    margin: 20px 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-interactive-bg);
    font-size: 15px;
}
.toc details summary {
    cursor: pointer;
    padding: 10px 15px;
    font-weight: 600;
    user-select: none;
    outline: none;
}
.toc details[open] summary {
    border-bottom: 1px solid var(--color-border);
}
.toc .inner {
    padding: 10px 15px;
}
.toc ul {
    padding: 0;
    margin: 0;
    list-style: none;
}
.toc li {
    margin-bottom: 5px;
}
.toc li a:hover { text-decoration: underline; }
.toc-h2 { margin-left: 0; font-weight: 500; }
.toc-h3 { margin-left: 20px; font-size: 0.95em; color: var(--color-text-secondary); }

/* Footer */
.site-footer {
    padding: 2rem 0;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-top: auto;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-card-bg);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.footer-right {
    display: flex;
    gap: 1.5rem;
}
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .site-header { padding: 15px; }
    .post-card h2 { font-size: 20px; }
    .single { padding: 20px; }
    .single h1 { font-size: 26px; }
}

/* You May Also Like (Grid) */
.related-posts {
    margin-top: 40px;
    border-top: 1px solid var(--color-border);
    padding-top: 20px;
}
.related-posts h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

/* Read Also Injection */
.read-also {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-left: 4px solid var(--color-brand);
    font-weight: 500;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px -5px rgba(92, 124, 100, 0.15), 0 8px 10px -6px rgba(92, 124, 100, 0.1); /* Colored Shadow */
    border: 1px solid rgba(92, 124, 100, 0.1);
}
.read-also a {
    text-decoration: none;
    color: var(--color-text-primary);
    display: inline;
}
.read-also a:hover {
    color: var(--color-brand);
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 40px;
    width: 100%;
}
.pagination a {
    padding: 12px 28px;
    background: #fff;
    border: 1px solid var(--color-brand);
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    color: var(--color-brand);
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px 0 rgba(92, 124, 100, 0.39); /* Colored Shadow */
}
.pagination a:hover {
    background: var(--color-brand);
    color: #fff;
    box-shadow: 0 6px 20px rgba(92, 124, 100, 0.23);
    transform: translateY(-2px);
}
/* Jika hanya ada tombol Next (halaman 1), paksa ke kanan */
.pagination .next-btn:only-child {
    margin-left: auto;
}

/* Sidebar */
.sidebar {
    margin-top: 0;
    padding: 0;
    background: transparent;
    width: 320px;
    flex-shrink: 0;
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 40px);
}
.sidebar .sidebar-inner-widget {
    background: var(--color-card-bg);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}
.sidebar h3 { 
    margin-top: 0; 
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar li {
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
}
.sidebar li:last-child { border-bottom: none; }
.sidebar li a {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}
.sidebar .meta {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: flex;
    gap: 10px;
}

/* Page Layout (2 Columns) */
.page-layout {
    display: flex;
    gap: 40px;
    margin-top: var(--gap);
    margin-bottom: 40px; /* Add space before footer */
}
.content-column {
    flex: 1;
    min-width: 0; /* Mencegah overflow pada grid di dalam flex */
}

@media (max-width: 900px) {
    .page-layout { flex-direction: column; }
    .sidebar { width: 100%; position: static; top: auto; }
}

@media (max-width: 600px) {
    .post-card .post-link { flex-direction: column; }
    .post-card .post-image { width: 100%; margin-bottom: 15px; }
    .post-card img { height: 200px; }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-brand);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(92, 124, 100, 0.39);
    z-index: 50;
    border: none;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(92, 124, 100, 0.5), 0 8px 10px -6px rgba(92, 124, 100, 0.1);
}
.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Static Page Layout */
.static-page-layout {
    max-width: 56rem; /* 896px, max-w-4xl */
    margin-left: auto;
    margin-right: auto;
    margin-top: var(--gap);
    margin-bottom: var(--gap);
}
.static-page-content {
    background: var(--color-card-bg);
    padding: 3rem;
    border-radius: 1rem; /* rounded-2xl */
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.static-page-content h1 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}
.static-page-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

/* Contact Form Styles */
.contact-container {
    margin-top: 2rem;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: 0 0 0 3px rgba(92, 124, 100, 0.2);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
input[type="submit"] {
    background-color: var(--color-brand);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
}
input[type="submit"]:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.thank-you-message {
    display: none;
    font-size: 1.125rem;
    color: var(--color-brand);
    text-align: center;
    padding: 40px 20px;
    background-color: var(--color-interactive-bg);
    border-radius: var(--radius);
}

@media (max-width: 768px) {
    .featured-wrapper {
        grid-template-columns: 1fr;
        height: auto;
    }
    .featured-left { height: auto; }
    .featured-right { min-height: 0; }
    .feat-card { height: 240px; }
}