/* ============================================
   SINGLE POST - DESKTOP STYLE
   ============================================ */

/* 1. Layout Wrapper (Kiri: Konten, Kanan: Sidebar) */
.single-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 40px 0;
}

.single-content-area {
    flex: 0 0 68%; /* Lebar konten 68% */
    max-width: 68%;
}

.single-sidebar {
    flex: 0 0 30%; /* Lebar sidebar 30% */
    max-width: 30%;
    position: sticky;
    top: 20px;
}

/* 2. Kategori Badge */
.single-meta-top {
    margin-bottom: 15px;
}

.single-category-badge {
    display: inline-block;
    background: #d32f2f;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.single-category-badge:hover {
    background: #b71c1c;
}

/* 3. Judul Berita (H1) */
.single-title {
    font-size: 2.5rem; /* 40px */
    font-weight: 800;
    line-height: 1.25;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    letter-spacing: -0.5px;
}

/* 4. Meta Informasi (Penulis & Tanggal) */
/* ============================================
   SINGLE META INFO - STYLE BARU (SEPERTI GAMBAR)
   ============================================ */

/* 1. Excerpt / Ringkasan Berita */
.single-excerpt {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #555555;
    margin: 0 0 20px 0;
    font-style: italic;
     
}
/* ============================================
   SINGLE META WRAPPER - RAPID & CLEAN
   ============================================ */

/* Wrapper Utama */
.single-meta-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px 0;
    margin-bottom: 5px;
}

/* === BAGIAN KIRI: AUTHOR INFO === */
.single-meta-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Avatar Author */
.author-avatar-small {
    flex-shrink: 0;
}

.author-avatar-small img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

/* Detail Author (Nama, Sumber, Tanggal) */
.author-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.3;
}

/* Baris 1: Nama - Sumber */
.author-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #1a1a1a;
    flex-wrap: wrap;
}

.author-name {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.9rem;
}

.author-separator {
    color: #ccc;
    font-weight: 300;
    font-size: 0.85rem;
}

.source-name {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Baris 2: Tanggal */
.meta-date {
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* === BAGIAN KANAN: SHARE BUTTONS === */
.single-share-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Label "Share" */
.share-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-right: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Ikon Share */
.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 50%;
    background: transparent;
}

.share-icon svg {
    width: 16px;
    height: 16px;
}

/* Hover Effects */
.share-icon:hover {
    transform: translateY(-2px);
}

.share-icon.fb:hover { color: #1877f2; background: rgba(24, 119, 242, 0.1); }
.share-icon.tw:hover { color: #1da1f2; background: rgba(29, 161, 242, 0.1); }
.share-icon.wa:hover { color: #25d366; background: rgba(37, 211, 102, 0.1); }
.share-icon.in:hover { color: #0077b5; background: rgba(0, 119, 181, 0.1); }
.share-icon.tg:hover { color: #0088cc; background: rgba(0, 136, 204, 0.1); }
.share-icon.link:hover { color: #d32f2f; background: rgba(211, 47, 47, 0.1); }

/* === GARIS PEMISAH === */
.single-meta-divider {
    height: 1px;
    background: linear-gradient(to right, #e5e5e5 0%, transparent 100%);
    margin: 10px 0 25px;
}

/* === RESPONSIVE MOBILE === */
@media (max-width: 767px) {
    .single-meta-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 10px 0;
    }

    .single-meta-info {
        width: 100%;
    }

    .author-avatar-small img {
        width: 32px;
        height: 32px;
    }

    .author-source {
        font-size: 0.85rem;
    }

    .author-name,
    .source-name {
        font-size: 0.85rem;
    }

    .meta-date {
        font-size: 0.75rem;
    }

    .single-share-buttons {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 8px;
        border-top: 1px solid #f0f0f0;
    }

    .share-label {
        width: 100%;
        margin-bottom: 4px;
        font-size: 0.8rem;
    }

    .share-icon {
        width: 34px;
        height: 34px;
        background: #f8f8f8;
    }

    .share-icon svg {
        width: 15px;
        height: 15px;
    }
}
/* 5. Featured Image (Gambar Utama) */
.single-featured-image {
    margin: 0 0 30px 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Caption Gambar Utama - Bersih dan Normal */
.image-caption {
    font-size: 0.85rem;
    color: #888;
    padding: 8px 0 0 0; /* Atas 8px, Kiri & Kanan 0, Bawah 0 */
    font-style: normal; /* Tidak lagi italic */
    text-align: left;
    margin: 0;
}

/* 6. Isi Konten Berita (TYPOGRAPHY FOKUS) */
.single-entry-content {
    font-family: 'Manrope', sans-serif;
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    color: #333333;
}

.single-entry-content p {
    margin-bottom: 1.5em;
}

.single-entry-content h2, 
.single-entry-content h3, 
.single-entry-content h4 {
    color: #1a1a1a;
    font-weight: 700;
    margin: 1.5em 0 0.8em;
    line-height: 1.3;
}

.single-entry-content h2 { font-size: 1.8rem; }
.single-entry-content h3 { font-size: 1.5rem; }

.single-entry-content ul, 
.single-entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.single-entry-content li {
    margin-bottom: 0.5em;
}

.single-entry-content blockquote {
    border-left: 4px solid #d32f2f;
    margin: 2em 0;
    padding: 10px 20px;
    background: #f9f9f9;
    font-style: italic;
    color: #555;
}

.single-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
}

.single-entry-content a {
    color: #d32f2f;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.single-entry-content a:hover {
    color: #b71c1c;
}

/* ============================================
   TAGS DI BAWAH NASKAH
   ============================================ */

.single-tags-wrapper {
    margin: 30px 0 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.single-tag-item {
    display: inline-block;
    background: #f0f0f0; /* Abu-abu terang sesuai gambar */
    color: #1a1a1a; /* Hitam pekat */
    padding: 8px 16px;
    border-radius: 4px; /* Sudut sedikit melengkung */
    font-size: 0.9rem;
    font-weight: 700; /* Tebal sesuai gambar */
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.single-tag-item:hover {
    background: #d32f2f; /* Merah saat hover */
    color: #ffffff;
    transform: translateY(-2px);
}
/* 8. Share Buttons */
.single-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    
}

.single-share-buttons > span {
    font-weight: 700;
    color: #1a1a1a;
    margin-right: 5px;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.share-btn:hover { opacity: 0.8; }
.share-btn.fb { background: #1877f2; }
.share-btn.wa { background: #25d366; }
.share-btn.tw { background: #1da1f2; }

/* 9. Author Box */
.single-author-box {
    display: flex;
    gap: 20px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid #e5e5e5;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info { flex: 1; }

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.author-bio {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* 10. Related Posts */
.single-related-posts {
    margin-top: 40px;
    margin-bottom: 40px;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #d32f2f;
    display: inline-block;
    color: #1a1a1a;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-thumb {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    aspect-ratio: 16/9;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-item:hover .related-thumb img {
    transform: scale(1.05);
}

/* ============================================
   RELATED POSTS - CATEGORY & TITLE UPDATE
   ============================================ */

/* Nama Kategori di atas Judul */
.related-item-category {
    display: block;
    color: #d32f2f; /* Warna Merah */
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: none; /* TIDAK UPPERCASE */
    margin-bottom: 4px;
    letter-spacing: 0;
    line-height: 1.2;
}

/* Judul Related Post - Batasi 3 Baris */
.related-item-title {
    font-size: 0.85rem;
     line-height: 1.4;
    color: #1a1a1a;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* BATASI 3 BARIS (sebelumnya 2) */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.related-item-link:hover .related-item-title {
    color: #d32f2f;
}



/* ============================================
   SINGLE POST PAGINATION - CLEAN & NEAT
   ============================================ */
.single-entry-content .post-pages,
.single-entry-content .page-links {
    margin: 40px 0 30px;
    padding: 0;
    border: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px; /* Jarak standar antar tombol angka */
}

/* 1. Label "Halaman:" - Bersih & Jarak Khusus */
.single-entry-content .post-pages .page-label,
.single-entry-content .page-links .page-label {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a1a;
    margin-right: 12px; /* Jarak spesifik antara Label dan Angka pertama */
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
    height: auto;
    width: auto;
}

/* 2. Tombol Angka (Base Style - Lingkaran) */
.single-entry-content .post-page-numbers,
.single-entry-content .page-links a,
.single-entry-content .page-links > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 50%;
    color: #555555;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* 3. Halaman Aktif (Current) - Merah Solid Tanpa Border */
.single-entry-content .post-page-numbers.current,
.single-entry-content .page-links > span {
    border: none !important;
    background: #d32f2f !important;
    color: #ffffff !important;
    font-weight: 600;
    cursor: default;
}

/* 4. Hover Effect (Hanya untuk yang tidak aktif) */
.single-entry-content .post-page-numbers:not(.current):hover,
.single-entry-content .page-links a:hover {
    border-color: #d32f2f;
    color: #d32f2f;
}

/* 5. Tombol "Show All" - Bentuk Pill */
.single-entry-content .post-page-numbers.all-pages-link,
.single-entry-content .page-links a.all-pages-link {
    width: auto;
    border-radius: 20px;
    padding: 0 16px;
    font-size: 0.9rem;
}

/* ============================================
   GAMBAR & CAPTION DI KONTEN ARTIKEL
   ============================================ */

/* Wrapper Caption (wp-caption) */
.single-entry-content .wp-caption,
.entry-content .wp-caption {
    max-width: 100%;
    margin: 20px 0;
}

.single-entry-content .wp-caption img,
.entry-content .wp-caption img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Caption Text - WAJIB RATA KIRI */
.single-entry-content .wp-caption-text,
.entry-content .wp-caption-text,
.single-entry-content figcaption,
.entry-content figcaption {
    font-size: 0.85rem;
    color: #888;
    padding: 8px 0 0 0;
    font-style: normal;
    text-align: left !important; /* PAKSA RATA KIRI */
    margin: 0 !important;
    line-height: 1.5;
}

/* ============================================
   COMMENT SECTION - DESKTOP STYLE
   ============================================ */

/* Wrapper Utama */
.single-comment-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
    font-family: 'Manrope', sans-serif;
}

/* Judul Section */
.comment-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* ============================================
   FORM KOMENTAR
   ============================================ */
.comment-form-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.comment-form {
    margin: 0;
}

/* Textarea */
.comment-input {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    color: #1a1a1a;
    line-height: 1.5;
    min-height: 80px;
    padding: 8px 4px;
    background: transparent;
}

.comment-input::placeholder {
    color: #9ca3af;
}

.comment-input:focus {
    outline: none;
}

/* Footer Form (Counter + Tombol) */
.comment-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
    margin-top: 8px;
}

/* Counter Karakter */
.char-counter {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

/* Tombol Kirim */
.comment-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e3a8a; /* Biru tua sesuai gambar */
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.comment-submit-btn:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

.comment-submit-btn svg {
    width: 14px;
    height: 14px;
}

/* ============================================
   TAB FILTER KOMENTAR
   ============================================ */
.comment-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.comment-tab {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #4b5563;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.comment-tab:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.comment-tab.active {
    background: #1e3a8a; /* Biru tua */
    color: #ffffff;
    border-color: #1e3a8a;
}

.comment-tab.active:hover {
    background: #1e40af;
}

/* ============================================
   STATE KOSONG (BELUM ADA KOMENTAR)
   ============================================ */
.comment-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    margin-bottom: 20px;
}

.empty-icon svg {
    width: 120px;
    height: 120px;
    opacity: 0.9;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.empty-subtitle {
    font-size: 0.95rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.5;
    max-width: 400px;
}

/* ============================================
   BADGE JUMLAH KOMENTAR
   ============================================ */
.comment-count-badge {
    font-size: 0.85em; /* Sedikit lebih kecil dari judul utama */
    color: #6b7280;    /* Warna abu-abu netral */
    font-weight: 600;
    margin-left: 4px;
}

/* ============================================
   COMMENT LIST - DESKTOP (CLEAN & MODERN)
   ============================================ */

/* Reset List */
.comment-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.comment-list ol {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Setiap Item Komentar */
.comment-item {
    margin-bottom: 0;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

/* Body: Avatar + Konten */
.comment-body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

/* Avatar */
.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar .avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f3f4f6;
}

/* Konten Utama */
.comment-main {
    flex: 1;
    min-width: 0;
}

/* Header: Nama + Tanggal + Reply */
.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-author-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
}

.comment-date {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 400;
}

.comment-reply-link {
    font-size: 0.8rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    margin-left: auto; /* Push ke kanan */
}

.comment-reply-link:hover {
    color: #1e3a8a;
}

/* Teks Komentar */
.comment-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 10px;
}

.comment-text p {
    margin: 0 0 8px 0;
}

.comment-text p:last-child {
    margin-bottom: 0;
}

/* Action Buttons (Like/Dislike) */
.comment-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.2s;
    font-family: inherit;
}

.action-btn:hover {
    color: #1e3a8a;
}

.action-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   NESTED COMMENTS (REPLIES)
   ============================================ */
.children {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 0 0 52px !important;
    border-left: 2px solid #e5e7eb;
}

.children .comment-item {
    padding: 16px 0 16px 20px;
}

/* Deep nested */
.children .children {
    margin-left: 0 !important;
    padding-left: 32px !important;
}

/* Avatar dengan Inisial Teks */
.avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Fallback untuk Gravatar default */
.comment-avatar img[src*="default"],
.comment-avatar img[src*="d=mm"],
.comment-avatar img[src*="d=identicon"] {
    display: none;
}

.comment-avatar .avatar-initials {
    display: block;
}