/*
Theme Name: PressSwift
Theme URI: https://digisignia.com
Author: Digisignia
Author URI: https://digisignia.com
Description: Tema blog berita profesional yang ringan, cepat, mobile-friendly, dan SEO-ready.
Version: 1.1.8
License: GNU General Public License v2 or later
Text Domain: PressSwift
*/

/* ===== VARIABLES ===== */
:root {
    --primary-color: #1a1a1a;
    --accent-color: #d32f2f;
    --bg-color: #f8f9fa;
    --text-color: #333333;
    --light-gray: #e9ecef;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-width: 1200px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}
body { 
    font-family: var(--font-main); 
    background: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.6; 
    font-size: 16px; 
    overflow-x: hidden;
    width: 100%;
}
a { text-decoration: none; color: var(--primary-color); transition: color 0.2s; }
a:hover { color: var(--accent-color); }
img, video, iframe { max-width: 100%; height: auto; display: block; }

/* ===== LAYOUT CONTAINER ===== */
.container { 
    width: 100%;
    max-width: var(--container-width); 
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}

/* ===== HEADER LAYOUT ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--light-gray); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 4px rgba(0,0,0,0.03); width: 100%; }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; padding-bottom: 1rem; gap: 2rem; width: 100%; }
.site-title { font-size: 1.5rem; font-weight: 800; color: var(--accent-color); text-transform: uppercase; letter-spacing: -0.5px; white-space: nowrap; flex-shrink: 0; }

/* ===== NAVIGATION & DROPDOWN ===== */
.main-navigation { flex-shrink: 0; }
.main-navigation ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.main-navigation a { font-weight: 600; font-size: 0.95rem; padding: 0.5rem 0; display: inline-block; position: relative; }
.main-navigation a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--accent-color); transition: width 0.3s ease; }
.main-navigation a:hover::after { width: 100%; }
.main-navigation li { position: relative; }
.main-navigation .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px; padding: 0.75rem 0; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.12); border: 1px solid var(--light-gray); z-index: 200; flex-direction: column; gap: 0; margin-top: 0.5rem; }
.main-navigation li:last-child .sub-menu, .main-navigation li:nth-last-child(2) .sub-menu { left: auto; right: 0; }
.main-navigation li:hover > .sub-menu { display: flex; }
.main-navigation .sub-menu li { padding: 0 1rem; }
.main-navigation .sub-menu a { padding: 0.5rem 0; font-size: 0.9rem; font-weight: 500; display: block; white-space: nowrap; }
.main-navigation .sub-menu a::after { display: none; }
.mobile-menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 0.5rem; color: var(--primary-color); flex-shrink: 0; }

/* ===== MAIN CONTENT GRID ===== */
.site-content { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; margin-top: 2rem; margin-bottom: 3rem; width: 100%; }
.primary-content { min-width: 0; width: 100%; }
.sidebar { min-width: 0; width: 100%; }

/* ===== POST CARD - DESKTOP ===== */
.post-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 1.5rem; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: row; align-items: stretch; width: 100%; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.post-card .post-thumbnail-wrapper { flex-shrink: 0; width: 280px; overflow: hidden; }
.post-card .post-thumbnail { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post-card:hover .post-thumbnail { transform: scale(1.05); }
.post-card .post-content { padding: 1.25rem 1.5rem; flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.post-card .post-meta { font-size: 0.8rem; color: #666; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.post-card .post-meta .category { color: var(--accent-color); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.post-card .post-title { font-size: 1.1rem; margin-bottom: 0.75rem; line-height: 1.4; font-weight: 700; }
.post-card .post-title a { color: var(--primary-color); }
.post-card .post-title a:hover { color: var(--accent-color); }
.post-card .post-excerpt { font-size: 0.9rem; line-height: 1.6; color: #555; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .read-more { display: inline-block; color: var(--accent-color); font-weight: 600; font-size: 0.85rem; margin-top: auto; align-self: flex-start; }

/* ===== SIDEBAR & WIDGETS ===== */
.sidebar .widget { background: #fff; padding: 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); width: 100%; overflow: hidden; }
.widget-title { font-size: 1.1rem; border-bottom: 2px solid var(--accent-color); padding-bottom: 0.5rem; margin-bottom: 1rem; display: inline-block; color: var(--primary-color); }
.widget_search .search-form { display: flex; gap: 0.5rem; }
.widget_search .search-field { flex: 1; padding: 0.6rem 0.875rem; border: 1px solid #ddd; border-radius: 4px; font-size: 0.9rem; min-width: 0; }
.widget_search .search-submit { background: var(--accent-color); color: #fff; border: none; padding: 0.6rem 1rem; border-radius: 4px; cursor: pointer; flex-shrink: 0; }
.widget_recent_entries ul, .widget_archive ul, .widget_categories ul { list-style: none; padding: 0; margin: 0; }
.widget_recent_entries li, .widget_archive li, .widget_categories li { padding: 0.6rem 0; border-bottom: 1px solid var(--light-gray); font-size: 0.9rem; word-wrap: break-word; }
.widget_recent_entries li:last-child, .widget_archive li:last-child, .widget_categories li:last-child { border-bottom: none; }
.widget_recent_entries a, .widget_archive a, .widget_categories a { color: var(--text-color); }
.widget_recent_entries a:hover, .widget_archive a:hover, .widget_categories a:hover { color: var(--accent-color); }
.widget_recent_entries .post-date { display: block; font-size: 0.75rem; color: #888; margin-top: 0.2rem; }

/* ===== FOOTER ===== */
.site-footer { background: var(--primary-color); color: #fff; text-align: center; padding: 2rem; margin-top: auto; width: 100%; }
.site-footer a { color: #fff; text-decoration: underline; }

/* ===== SINGLE POST & LIST STYLING (DIPERBAIKI) ===== */
.single-post .post-title { font-size: 2rem; margin-bottom: 1rem; line-height: 1.3; }
.single-post .entry-content { font-size: 1.1rem; line-height: 1.8; overflow-wrap: break-word; }
.single-post .entry-content p { margin-bottom: 1.5rem; }

/* --- PERBAIKAN KHUSUS: BULLETED & NUMBERED LIST --- */
.single-post .entry-content ul,
.single-post .entry-content ol,
.single-post .entry-content .wp-block-list {
    margin-bottom: 1.5rem;
    padding-left: 2rem; /* Indentasi ke dalam agar bullet/angka tidak keluar garis */
    list-style-position: outside; /* Bullet/angka tetap di luar teks tapi di dalam area padding */
}

.single-post .entry-content ul {
    list-style-type: disc;
}

.single-post .entry-content ol {
    list-style-type: decimal;
}

.single-post .entry-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    padding-left: 0.25rem; /* Ruang kecil agar teks tidak nempel bullet */
}

.single-post .entry-content li:last-child {
    margin-bottom: 0;
}

/* Nested lists (List di dalam list) */
.single-post .entry-content ul ul,
.single-post .entry-content ol ol,
.single-post .entry-content ul ol,
.single-post .entry-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem; /* Indentasi lebih dalam untuk sub-list */
}
/* --------------------------------------------------- */

/* ===== POST NAVIGATION ===== */
.post-navigation { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--light-gray); width: 100%; }
.post-navigation-item { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1rem; padding: 1rem; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: transform 0.2s, box-shadow 0.2s; width: 100%; }
.post-navigation-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.post-navigation-item.next { flex-direction: row-reverse; text-align: right; }
.nav-thumbnail { flex-shrink: 0; width: 100px; height: 75px; border-radius: 6px; overflow: hidden; background: var(--light-gray); }
.nav-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.nav-thumbnail-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--light-gray); color: #999; font-size: 0.7rem; }
.nav-content { flex: 1; display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 0 0.5rem; }
.nav-label { font-size: 0.75rem; color: var(--accent-color); font-weight: 600; margin-bottom: 0.25rem; text-transform: uppercase; }
.nav-title { font-size: 0.95rem; font-weight: 700; line-height: 1.3; color: var(--primary-color); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-navigation-item a { display: flex; width: 100%; color: inherit; align-items: center; }
.post-navigation-item a:hover .nav-title { color: var(--accent-color); }

/* ===== COMMENT FORM ===== */
.comment-form { max-width: 100%; margin: 2rem 0; padding: 2rem; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); width: 100%; }
.comment-form p { margin-bottom: 1.5rem; display: flex; flex-direction: column; }
.comment-form label { font-weight: 600; margin-bottom: 0.5rem; color: var(--primary-color); font-size: 0.95rem; }
.comment-form input, .comment-form textarea { width: 100%; padding: 0.75rem 1rem; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; font-family: var(--font-main); }
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form .submit { background: var(--accent-color); color: #fff; border: none; padding: 0.875rem 2rem; font-size: 1rem; font-weight: 600; border-radius: 4px; cursor: pointer; width: auto; }

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */

/* Tablet */
@media (max-width: 1024px) {
    .post-card .post-thumbnail-wrapper { width: 220px; }
    .container { padding-left: 20px !important; padding-right: 20px !important; }
}

/* =========================================
   MOBILE (≤ 768px)
   ========================================= */
@media (max-width: 768px) {
    .container { padding-left: 20px !important; padding-right: 20px !important; margin-left: auto !important; margin-right: auto !important; }
    .header-inner { padding-top: 0.875rem; padding-bottom: 0.875rem; }
    
    .mobile-menu-toggle { display: block; }
    .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--light-gray); padding: 1rem 20px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); width: 100%; }
    .main-navigation.active { display: block; }
    .main-navigation ul { flex-direction: column; gap: 0.75rem; }
    .main-navigation a { padding: 0.75rem 0; border-bottom: 1px solid var(--light-gray); display: block; }
    .main-navigation a::after { display: none; }
    .main-navigation .sub-menu { position: static; box-shadow: none; border: none; padding: 0.5rem 0 0.5rem 1rem; background: #f8f9fa; width: 100%; }

    .site-content { grid-template-columns: 1fr !important; gap: 1.5rem; margin-top: 1.5rem; }
    .primary-content { display: grid; grid-template-columns: repeat(2, 1fr) !important; gap: 16px; width: 100% !important; }
    
    .post-card { display: flex !important; flex-direction: column !important; margin-bottom: 0; border-radius: 6px; overflow: hidden; height: 100%; width: 100% !important; }
    .post-card .post-thumbnail-wrapper { width: 100% !important; height: 140px; flex-shrink: 0; }
    .post-card .post-thumbnail { width: 100% !important; height: 100%; object-fit: cover; border-radius: 6px 6px 0 0; }
    .post-card .post-content { padding: 12px; flex: 1; display: flex; flex-direction: column; min-width: 0; }
    .post-card .post-meta { font-size: 0.7rem; margin-bottom: 0.25rem; }
    .post-card .post-meta .category { color: #e67e22; font-weight: 700; font-size: 0.75rem; }
    .post-card .post-title { font-size: 0.85rem; line-height: 1.35; font-weight: 700; margin-bottom: 0; overflow-wrap: break-word; }
    .post-card .post-title a { color: #000; }
    .post-card .post-excerpt, .post-card .read-more { display: none; }
    
    .sidebar { width: 100% !important; }
    .sidebar .widget { padding: 1.25rem; width: 100% !important; }
    
    .single-post .primary-content { display: block !important; }
    .single-post .post-title { font-size: 1.5rem; }
    
    /* List di Mobile: Indentasi sedikit dikurangi agar muat */
    .single-post .entry-content ul,
    .single-post .entry-content ol {
        padding-left: 1.5rem;
    }
    .single-post .entry-content ul ul,
    .single-post .entry-content ol ol {
        padding-left: 1.25rem;
    }
    
    .post-navigation { margin-top: 2rem; padding-top: 1.5rem; width: 100% !important; }
    .post-navigation-item { gap: 1.25rem; padding: 0.875rem; width: 100% !important; }
    .nav-thumbnail { width: 80px; height: 60px; flex-shrink: 0; }
    .nav-content { padding: 0 0.375rem; }
    .nav-label { font-size: 0.7rem; }
    .nav-title { font-size: 0.85rem; }
    
    .comment-form { padding: 1.25rem; width: 100% !important; }
    .comment-form .submit { width: 100%; }
}

/* Mobile Sangat Kecil (≤ 480px) */
@media (max-width: 480px) {
    .container { padding-left: 16px !important; padding-right: 16px !important; }
    .header-inner { padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .site-title { font-size: 1.25rem; }
    
    .primary-content { gap: 12px; }
    .post-card .post-thumbnail-wrapper { height: 120px; }
    .post-card .post-content { padding: 10px; }
    .post-card .post-title { font-size: 0.8rem; }
    
    .post-navigation-item { gap: 1rem; padding: 0.75rem; }
    .nav-thumbnail { width: 70px; height: 52px; }
    .nav-content { padding: 0 0.25rem; }
    .nav-title { font-size: 0.8rem; }
    
    .comment-form { padding: 1rem; }
    .sidebar .widget { padding: 1rem; }
}

/* Layar Sangat Lebar (> 1400px) */
@media (min-width: 1400px) {
    .container { padding-left: 40px !important; padding-right: 40px !important; }
}