/* ========================================= */
/* 1. RESET & GLOBAL VARIABLES               */
/* ========================================= */
:root {
    --primary-text: #242424;
    --secondary-text: #6b6b6b;
    --bg-color: #ffffff;
    --border-color: #e5e5e5;
    --highlight-bg: #f7f7f7;
    --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--primary-text);
    font-family: var(--font-ui);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
img { display: block; max-width: 100%; }

/* Layout Containers */
.container, .container-nav, .footer-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

main { padding: 40px 0 80px 0; min-height: 60vh; }

/* ========================================= */
/* 2. HEADER & NAVIGATION                    */
/* ========================================= */
header {
    border-bottom: 1px solid var(--border-color);
    height: 65px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 1000;
}

.container-nav { display: flex; justify-content: space-between; align-items: center; }
.logo-link { display: flex; align-items: center; }
.logo-img { height: 32px; width: auto; }

.search-box {
    display: flex; align-items: center; background-color: #f9f9f9;
    border-radius: 20px; padding: 8px 16px; width: 240px; border: 1px solid transparent;
}
.search-box:focus-within { border-color: #ddd; background: #fff; }
.search-icon { width: 18px; height: 18px; color: #999; margin-right: 10px; flex-shrink: 0; }
.search-input { border: none; background: transparent; outline: none; width: 100%; font-size: 0.9rem; }

/* ========================================= */
/* 3. INDEX PAGE STYLES                      */
/* ========================================= */
.feed-list { max-width: 800px; margin: 0 auto; padding: 0 24px; }

.article-card {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 48px; cursor: pointer;
}
.card-content { flex: 1; padding-right: 24px; padding-top: 4px; }
.card-meta-top { display: flex; align-items: center; font-size: 0.85rem; margin-bottom: 8px; }
.mini-avatar { width: 20px; height: 20px; border-radius: 50%; margin-right: 8px; }
.author-name { font-weight: 500; color: var(--primary-text); }
.card-title { font-weight: 700; font-size: 1.25rem; line-height: 1.25; margin-bottom: 8px; color: #000; }
.card-excerpt {
    font-family: var(--font-serif); color: var(--secondary-text); font-size: 1rem;
    line-height: 1.5; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta-bottom { display: flex; align-items: center; font-size: 0.8rem; color: var(--secondary-text); flex-wrap: wrap; gap: 8px; }
.tag-pill { background-color: #f2f2f2; padding: 3px 10px; border-radius: 100px; white-space: nowrap; }
.tag-pill:hover { background-color: #e6e6e6; }

.card-image {
    width: 112px; height: 112px; flex-shrink: 0; background-color: #eee;
    position: relative; overflow: hidden; border-radius: 4px;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }

.article-card.highlight {
    background-color: var(--highlight-bg); padding: 32px; border-radius: 12px;
    margin-bottom: 60px;
}
.article-card.highlight .card-content { padding-right: 40px; padding-top: 10px; }
.article-card.highlight .card-title { font-size: 1.8rem; line-height: 1.2; margin-bottom: 12px; }
.article-card.highlight .card-excerpt { -webkit-line-clamp: 4; margin-bottom: 24px; }
.article-card.highlight .card-image {
    width: 260px; height: 260px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-radius: 6px;
}

.separator { border: none; height: 1px; background-color: #e0e0e0; margin: 48px 0; display: block; width: 100%; }

.pagination-container { display: flex; justify-content: center; margin: 60px 0 80px 0; gap: 8px; }
.page-link {
    display: inline-flex; justify-content: center; align-items: center; min-width: 40px; height: 40px;
    padding: 0 12px; border-radius: 4px; font-size: 0.95rem; color: var(--secondary-text);
}
.page-link:hover { background-color: #f5f5f5; color: #000; }
.page-link.active { background-color: #000; color: #fff; font-weight: 500; }
.page-link.disabled { color: #e0e0e0; pointer-events: none; }


/* ========================================= */
/* 4. DETAIL PAGE STYLES                     */
/* ========================================= */
.story-wrapper { max-width: 680px; margin: 0 auto; padding: 0 24px; }

.breadcrumb { font-size: 0.85rem; color: var(--secondary-text); margin-bottom: 24px; font-family: var(--font-ui); display: flex; align-items: center; flex-wrap: wrap; }
.breadcrumb a:hover { color: #000; text-decoration: underline; }
.breadcrumb-separator { margin: 0 8px; color: #ccc; font-size: 0.8rem; }
.breadcrumb-current { color: #000; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

.post-title { font-family: var(--font-ui); font-weight: 800; font-size: 2.5rem; line-height: 1.25; color: #242424; margin-bottom: 12px; }
.post-subtitle { font-family: var(--font-ui); font-size: 1.3rem; color: var(--secondary-text); line-height: 1.4; margin-bottom: 32px; font-weight: 400; }
.post-meta { display: flex; align-items: center; margin-bottom: 48px; }
.meta-avatar { width: 44px; height: 44px; border-radius: 50%; margin-right: 16px; }
.meta-info h4 { font-size: 1rem; font-weight: 500; margin-bottom: 2px; }
.meta-info span { font-size: 0.85rem; color: var(--secondary-text); }

.post-content { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.6; color: #242424; }
.post-content p { margin-bottom: 32px; margin-top: 0; }
.post-content h2 { font-family: var(--font-ui); font-weight: 700; font-size: 1.5rem; margin-top: 56px; margin-bottom: 16px; }
.post-content blockquote { border-left: 3px solid #242424; padding-left: 20px; margin: 40px 0; font-style: italic; font-size: 1.35rem; line-height: 1.4; }
pre { background-color: #f9f9f9; padding: 24px; overflow-x: auto; border-radius: 4px; font-family: "Courier New", monospace; font-size: 0.9rem; margin: 40px 0; }

figure { margin: 56px 0; width: 100%; }
figcaption { text-align: center; font-family: var(--font-ui); font-size: 0.9rem; color: var(--secondary-text); margin-top: 12px; }
.zoomable-image { width: 100%; height: auto; max-height: 500px; object-fit: cover; object-position: top; border-radius: 4px; display: block; cursor: zoom-in; transition: opacity 0.2s ease; }
.zoomable-image:hover { opacity: 0.95; }
.tags-section { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--border-color); }

.lightbox-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; }
.lightbox-modal.show { opacity: 1; }
.lightbox-content { max-width: 95%; max-height: 95vh; border-radius: 4px; object-fit: contain; animation: zoomIn 0.3s ease; }
.close-btn { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; z-index: 2001; }
@keyframes zoomIn { from {transform:scale(0.9); opacity: 0;} to {transform:scale(1); opacity: 1;} }

/* ========================================= */
/* 5. FOOTER STYLING & SOCIAL MEDIA          */
/* ========================================= */
footer { padding: 60px 0 30px 0; font-size: 0.9rem; }
.footer-content { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 40px; }
.footer-brand h3 { font-family: var(--font-serif); margin-bottom: 10px; font-size: 1.4rem; }
.footer-brand p { max-width: 300px; }

/* [NEW] Right Column Wrapper (Links + Social) */
.footer-right-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Rata kanan di desktop */
    gap: 16px; /* Jarak antara Links dan Social Icons */
}

/* Links */
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { text-decoration: underline; }

/* Social Icons Styling */
.footer-social { display: flex; gap: 16px; align-items: center; }
.social-icon { width: 24px; height: 24px; fill: currentColor; transition: opacity 0.2s; }
.social-icon:hover { opacity: 0.7; }

.footer-bottom { max-width: 1000px; margin: 40px auto 0; padding: 20px 24px 0; text-align: center; font-size: 0.8rem; }

/* Footer DARK */
.footer-dark { background-color: #191919; color: #ffffff; }
.footer-dark .footer-brand h3 { color: #fff; }
.footer-dark .footer-brand p { color: #aaa; }
.footer-dark .footer-links a, .footer-dark .footer-social a { color: #aaa; }
.footer-dark .footer-links a:hover, .footer-dark .footer-social a:hover { color: #fff; }
.footer-dark .footer-bottom { border-top: 1px solid #333; color: #777; }

/* Footer LIGHT */
.footer-light { background-color: #fff; color: #242424; border-top: 1px solid #f0f0f0; }
.footer-light .footer-brand h3 { color: #000; }
.footer-light .footer-brand p { color: #666; }
.footer-light .footer-links a, .footer-light .footer-social a { color: #666; }
.footer-light .footer-links a:hover, .footer-light .footer-social a:hover { color: #000; }
.footer-light .footer-bottom { border-top: 1px solid #e5e5e5; color: #999; }

/* ========================================= */
/* 6. RESPONSIVE                             */
/* ========================================= */
@media (max-width: 768px) {
    .container, .container-nav { padding: 0 16px; }
    .search-box { width: 140px; padding: 8px 10px; }
    .search-box:focus-within { width: 95%; position: absolute; left: 2.5%; top: 10px; z-index: 10; border: 1px solid #ccc; }

    .article-card.highlight { flex-direction: column; padding: 20px; }
    .article-card.highlight .card-content { order: 1; padding-right: 0; margin-bottom: 20px; }
    .article-card.highlight .card-image { order: 2; width: 100%; height: auto; aspect-ratio: 1/1; }

    .article-card:not(.highlight) { align-items: center; margin-bottom: 32px; }
    .article-card:not(.highlight) .card-excerpt { display: none; }
    .article-card:not(.highlight) .card-content { padding-right: 16px; padding-top: 0; }
    .article-card:not(.highlight) .card-image { width: 80px; height: 80px; }

    .footer-content { flex-direction: column; align-items: center; text-align: center; }
    .footer-right-column { align-items: center; margin-top: 20px; } /* Center di mobile */
    .footer-links { justify-content: center; }
    .page-link.hide-mobile { display: none; }
    
    .post-title { font-size: 2rem; }
    figure { width: 100vw; margin-left: -24px; margin-right: -24px; }
    .zoomable-image { border-radius: 0; }
    
    .medium-pagination { flex-direction: column; gap: 10px; }
}

/* ========================================= */
/* 7. LOADING BAR STYLES                     */
/* ========================================= */
#nprogress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px; /* Ketebalan garis */
    background-color: #777; /* Warna bar (Hitam sesuai tema) */
    z-index: 9999; /* Harus lebih tinggi dari Header (1000) */
    width: 0%; /* Mulai dari 0 */
    transition: width 0.3s ease, opacity 0.4s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); /* Sedikit glow */
}

/* Animasi Fade Out saat selesai */
.nprogress-hidden {
    opacity: 0;
    pointer-events: none;
}

/* --- CSS PAGINATION CUSTOM --- */
.medium-pagination {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 60px; font-family: var(--font-ui); font-size: 0.95rem;
}
.medium-pagination a {
    color: var(--secondary-text); padding: 8px 16px; border-radius: 4px; transition: color 0.2s;
}
.medium-pagination a:hover { color: #242424; text-decoration: underline; }
.medium-pagination .disabled { color: #ddd; padding: 8px 16px; cursor: not-allowed; }

.medium-pagination .page-numbers a { margin: 0 4px; }
.medium-pagination .page-numbers a.active {
    color: #242424; font-weight: bold; text-decoration: underline;
}

/* CSS TAMBAHAN KHUSUS SEARCH INFO */
.search-info-container {
    max-width: 800px;
    margin: 0 auto 30px auto;
    padding: 0 24px;
    align-items: center;
    justify-content: space-between;
}

.search-text {
    font-family: var(--font-ui);
    color: var(--secondary-text);
    font-size: 1rem;
}

.search-keyword {
    color: var(--primary-text);
    font-weight: 700;
    font-style: italic;
}

.btn-clear-search {
    font-size:11px;
    background: transparent;
    border: 1px solid #ddd;
    padding: 1px 6px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--secondary-text);
}

.btn-clear-search:hover {
    border-color: #333;
    color: #333;
}