/* =========================================
   1. LAYOUT 2 KOLOM (Desktop)
   ========================================= */
.single-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px;
    background: #fff;
}

.single-row {
    display: flex;
    gap: 40px; /* Jarak antara Artikel dan Sidebar */
    align-items: flex-start; /* Agar sidebar mulai dari atas */
}

/* --- BAGIAN KIRI (ARTIKEL) --- */
.single-main-content {
    flex: 1; /* Mengisi sisa ruang (sekitar 70%) */
    min-width: 0; /* Mencegah konten meluber */
}

/* --- BAGIAN KANAN (SIDEBAR) --- */
.single-sidebar {
    width: 320px; /* Lebar Sidebar Tetap */
    flex-shrink: 0; /* Sidebar dilarang mengecil */
}

/* Sticky Sidebar */
.sidebar-inner {
    position: sticky;
    top: 90px; /* Jarak dari header sticky */
}


/* =========================================
   2. TYPOGRAPHY & META DATA (UPDATED)
   ========================================= */

/* Breadcrumb */
.single-breadcrumb {
    font-size: 13px; color: #888; margin-bottom: 10px;
}
.single-breadcrumb a { text-decoration: none; color: #555; font-weight: 500; }
.single-breadcrumb .separator { margin: 0 8px; font-size: 11px; color: #ccc; }

/* Judul Utama */
.single-title {
    font-size: 34px; font-weight: 800; line-height: 1.25; color: #111;
    margin-bottom: 15px;
}

/* --- META INFO BARU (RAPI & SEJAJAR DESKTOP) --- */
.single-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    /* KUNCI 1: Flexbox pada Induk */
    display: flex;       
    align-items: center; /* Ratakan vertikal semua item */
    flex-wrap: wrap;
    gap: 8px;
}

.single-meta .meta-item {
    display: inline-flex;
    align-items: center;
}

.single-meta strong { color: #000; font-weight: 700; }

/* Link Author */
.single-meta strong a {
    color: #111;
    text-decoration: none;
    transition: color 0.2s;
}
.single-meta strong a:hover {
    color: #003399;
    text-decoration: underline;
}

/* Separator (Titik) */
.meta-sep { 
    color: #ccc; 
    font-size: 10px; 
    margin: 0 2px;
    position: relative;
    top: -1px; /* Naikkan dikit biar pas tengah teks */
}

/* --- FIX IKON MATA & VIEWS (DESKTOP) --- */
.meta-views {
    display: inline-flex; /* KUNCI 2: Wadah ini harus Flex juga */
    align-items: center;  /* KUNCI 3: Ratakan Ikon & Angka */
    color: #666;
}

.meta-views svg {
    color: #999; 
    width: 14px;          /* Ukuran fix */
    height: 14px;
    margin-right: 5px;    /* Jarak ke angka */
    position: relative;
    top: -1px;            /* Trik optik: naikkan 1px biar center dengan angka */
}


/* Gambar Utama (Featured Image) */
.single-featured-image { margin-bottom: 25px; }
.single-featured-image img {
    width: 100%; height: auto; border-radius: 6px; display: block;
}
.image-caption {
    font-size: 12px; color: #777; margin-top: 8px; font-style: italic;
}


/* =========================================
   3. STYLE ISI KONTEN (Body, Image, Heading)
   ========================================= */
.single-body-content {
    font-size: 18px; line-height: 1.8; color: #2a2a2a; margin-bottom: 40px;
}
.single-body-content p { margin-bottom: 20px; }
.end-sign { font-weight: bold; margin-bottom: 30px; }

/* --- PERBAIKAN HEADING (H2, H3) --- */
.single-body-content h2,
.single-body-content h3,
.single-body-content h4 {
    color: #111;
    font-weight: 800;    
    margin-top: 40px;    /* Jarak atas lega */
    margin-bottom: 20px; /* Jarak bawah tidak mepet */
    line-height: 1.4;    
}
.single-body-content h2 { font-size: 24px; }
.single-body-content h3 { font-size: 20px; }

/* --- LIST (Bullet & Numbering) --- */
.single-body-content ul {
    list-style-type: disc !important;
    margin-bottom: 25px; padding-left: 25px; color: #333;
}
.single-body-content ul li { margin-bottom: 10px; line-height: 1.6; }

.single-body-content ol {
    list-style-type: decimal !important;
    margin-bottom: 25px; padding-left: 25px; color: #333;
}
.single-body-content ol li { margin-bottom: 10px; line-height: 1.6; }

/* --- QUOTE (Kutipan) --- */
.single-body-content blockquote {
    border-left: 5px solid #003399;
    background-color: #f9f9f9;
    margin: 30px 0; padding: 20px 25px;
    font-style: italic; font-size: 18px; color: #555;
    line-height: 1.6; border-radius: 0 8px 8px 0;
}
.single-body-content blockquote p:last-child { margin-bottom: 0; }

/* --- PERBAIKAN GAMBAR DALAM ARTIKEL --- */
.single-body-content figure,
.single-body-content .wp-block-image,
.single-body-content .wp-caption {
    margin: 30px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block; box-sizing: border-box;
}

.single-body-content img {
    width: 100%; max-width: 100%; height: auto;
    border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    display: block;
}

.single-body-content figcaption,
.wp-caption-text {
    font-size: 13px !important; color: #666;
    text-align: center; font-style: italic;
    margin-top: 12px !important; line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 0 10px;
}


/* =========================================
   4. AKSESORIS (Share, Tags, Google News)
   ========================================= */

/* Wrapper Utama Footer Artikel */
.article-footer-center {
    display: flex; flex-direction: column; align-items: center;
    width: 100%; margin-bottom: 30px;
}

/* Google News Button */
.google-news-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border: 1px solid #e0e0e0; border-radius: 50px;
    text-decoration: none; color: #333; font-size: 14px;
    background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}
.gnews-logo { font-weight: 700; font-family: sans-serif; letter-spacing: -0.5px; }

/* Share Buttons */
.share-buttons-container {
    display: flex; justify-content: center; gap: 15px;
    margin-bottom: 30px; width: 100%;
}
.share-btn {
    width: 45px; height: 45px; border-radius: 50%;
    border: 1px solid #ddd; background: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #555; transition: 0.2s;
}
.share-btn:hover { background: #f5f5f5; color: #000; border-color: #bbb; }
.share-btn.comment-pill {
    width: auto; padding: 0 20px; border-radius: 50px;
    gap: 8px; font-weight: 600; text-decoration: none;
}

/* Share Dropdown */
.share-dropdown-wrapper { position: relative; display: inline-block; }
.share-social-menu {
    position: absolute; bottom: 55px; left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex; gap: 10px; background: #fff;
    padding: 10px; border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); border: 1px solid #eee;
    opacity: 0; visibility: hidden; z-index: 100;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.share-social-menu::after {
    content: ""; position: absolute; bottom: -6px; left: 50%;
    transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px;
    background: #fff; border-right: 1px solid #eee; border-bottom: 1px solid #eee;
}
.share-social-menu.active { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.soc-share-item {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-decoration: none; transition: transform 0.2s;
}
.soc-share-item:hover { transform: scale(1.1); }
.soc-share-item svg { width: 20px; height: 20px; }
.soc-share-item.wa { background: #25D366; }
.soc-share-item.fb { background: #1877F2; }
.soc-share-item.tw { background: #000000; }
.soc-share-item.tg { background: #0088cc; }

/* Tags */
.single-tags-area {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px; margin-bottom: 40px; width: 100%;
}
.tags-label { font-weight: 700; font-size: 14px; color: #333; }
.tags-list {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; width: 100%;
}
.tag-pill {
    font-size: 13px; padding: 6px 14px; border: 1px solid #ddd;
    border-radius: 20px; text-decoration: none; color: #555;
    transition: 0.2s; background: #fff; white-space: nowrap;
}
.tag-pill:hover { border-color: #003399; color: #003399; }


/* =========================================
   5. STYLE KOMENTAR (Clean & Rapi)
   ========================================= */
.comments-area-custom {
    margin-top: 40px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
}

.comments-title-custom {
    font-size: 18px; font-weight: 700; color: #000;
    margin-bottom: 20px; border: none !important; padding-left: 0 !important;
}

/* Input Form */
.comment-input-container {
    position: relative; width: 100%; border: 1px solid #e0e0e0;
    border-radius: 8px; background: #fff; padding: 10px;
    transition: border-color 0.2s;
}
.comment-input-container:focus-within { border-color: #999; }
.comment-input-container textarea {
    width: 100%; min-height: 80px; border: none; outline: none;
    resize: vertical; font-size: 14px; color: #333;
    background: transparent; padding-bottom: 30px; font-family: inherit;
}
.comment-input-container textarea::placeholder { color: #ccc; }
.icon-send-btn {
    position: absolute; bottom: 10px; right: 15px;
    background: none; border: none; cursor: pointer;
    color: #999; padding: 5px; transition: color 0.2s;
}
.icon-send-btn:hover { color: #003399; }

/* Guest Inputs */
.comment-guest-inputs {
    display: flex; flex-direction: column; gap: 15px; margin-bottom: 15px;
}
.comment-guest-inputs input {
    width: 100%; border: 1px solid #e0e0e0; padding: 12px 15px;
    border-radius: 8px; font-size: 14px; background: #fdfdfd; transition: all 0.2s;
}
.comment-guest-inputs input:focus { border-color: #999; background: #fff; outline: none; }

/* List Komentar */
.comment-filters { display: flex; gap: 15px; margin-top: 15px; margin-bottom: 30px; font-size: 13px; }
.filter-item { color: #888; cursor: pointer; font-weight: 500; }
.filter-item.active { color: #333; font-weight: 600; }
.comment-list-custom { list-style: none; padding: 0; margin: 0; }
.comment-list-custom li { margin-bottom: 20px; border-bottom: 1px solid #f5f5f5; padding-bottom: 20px; }
.comment-body { display: flex; flex-direction: column; border-bottom: none !important; }
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.fn { font-weight: 700; color: #000; font-style: normal; }
.comment-metadata a { text-decoration: none; color: #999; font-size: 12px; }
.comment-content p { font-size: 14px; line-height: 1.5; color: #333; margin: 0; }
.reply { margin-top: 5px; font-size: 12px; }
.reply a { text-decoration: none; color: #003399; font-weight: 600; }


/* =========================================
   6. RESPONSIF MOBILE (FIXED & FINAL)
   ========================================= */
@media (max-width: 991px) {
    
    /* FIX JARAK ATAS HEADER */
    .single-post-container {
        padding-top: 80px !important; 
    }

    /* Layout Stack (Tumpuk ke bawah) */
    .single-row {
        flex-direction: column; 
        gap: 0; 
    }
    
    .single-main-content { width: 100%; }

    /* --- SIDEBAR MOBILE (PERBAIKAN JARAK & BORDER) --- */
    .single-sidebar {
        width: 100%;
        margin-top: 10px !important;
        padding-top: 10px !important;
        border-top: none !important;
        padding-left: 0;        
        padding-right: 0;
    }

    /* List Komentar di HP */
    .comment-filters {
        margin-bottom: 15px !important;
    }

    /* Typography Mobile */
    .single-title { font-size: 24px; line-height: 1.3; }
    .single-body-content { font-size: 16px; }

    /* --- UPDATE FINAL: META INFO RAPI & SEJAJAR --- */
    .single-meta {
        font-size: 11px !important; 
        gap: 6px;                   /* Beri jarak sedikit antar item */
        margin-bottom: 15px;
        flex-wrap: wrap;
        line-height: 1.5;
        align-items: center;        /* KUNCI 1: Ratakan semua item meta */
    }

    /* FIX ICON MATA GA RATA */
    .meta-views {
        display: inline-flex !important; /* KUNCI 2: Paksa jadi kotak fleksibel */
        align-items: center !important;  /* KUNCI 3: Paksa isi (ikon & teks) ke tengah vertikal */
        vertical-align: middle;
    }
    
    .meta-views svg {
        width: 12px;      
        height: 12px;
        margin-right: 4px;
        margin-bottom: 0 !important; /* Hapus margin inline yang bikin kacau */
        position: relative;
        top: -1px; /* Trik visual: Naikkan 1 pixel biar pas di tengah mata */
    }

    /* Kecilkan Nama Author & Link */
    .single-meta strong a {
        font-weight: 600; 
    }

    /* Separator (Titik) */
    .meta-sep {
        font-size: 8px;   
        margin: 0 2px;    
        color: #ddd;
        position: relative;
        top: -1px; /* Naikkan titik dikit biar sejajar */
    }
}

/* =========================================
   STYLE "BACA JUGA" (GLOBAL FIX)
   ========================================= */
/* Reset dulu style link biar tidak bentrok */
.baca-juga-box a {
    text-decoration: none;
    box-shadow: none;
}

/* Kotak Utama */
.baca-juga-box {
    border-left: 4px solid #003399; /* Garis biru di kiri */
    padding-left: 15px;             /* Jarak teks ke garis */
    margin: 30px 0;                 /* Jarak atas-bawah */
    display: flex;
    flex-direction: column;         /* Susun ke bawah */
    justify-content: center;
    background: transparent;
}

/* Label "Baca juga:" */
.baca-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;    /* Jarak tipis ke judul */
    line-height: 1.2;
    font-family: sans-serif;
    text-transform: uppercase; /* Opsional: Biar lebih tegas */
    letter-spacing: 0.5px;
}

/* Link Judul Artikel */
.baca-link {
    font-size: 18px;       /* Ukuran Desktop */
    font-weight: 800;      /* Tebal */
    color: #003399 !important; /* Paksa warna biru */
    line-height: 1.35;
    margin-top: 0;
    display: block;
}

.baca-link:hover {
    color: #002266 !important;
    text-decoration: underline;
}

/* --- KHUSUS LAYAR HP (MOBILE) --- */
@media (max-width: 768px) {
    .baca-juga-box {
        margin: 25px 0;      /* Jarak di HP lebih rapat dikit */
        padding-left: 12px;  /* Padding kiri disesuaikan */
        border-left-width: 3px; /* Garis tidak terlalu tebal di HP */
    }
    
    .baca-label {
        font-size: 13px;     /* Label lebih kecil di HP */
        margin-bottom: 2px;
    }

    .baca-link {
        font-size: 14px;     /* Judul tidak terlalu raksasa di HP */
        line-height: 1.3;
    }
}

