/* ==========================================================================
   SINGLE ARTICLE - KOMPAS.COM STYLE
   ========================================================================== */

/* --- Breadcrumb --- */
.single-breadcrumb {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #e55225;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.single-breadcrumb a {
    color: #e55225;
    text-decoration: none;
    transition: color 0.2s ease;
}

.single-breadcrumb a:hover {
    color: #8B0000;
}

.breadcrumb-separator {
    color: #999;
    font-weight: 400;
}

/* --- Judul Artikel --- */
.single-title {
    font-family: 'Manrope', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

/* --- Meta Bar (UPDATED: SVG Halus + Pill Google + Tanpa Border) --- */
.single-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.single-meta-info {
    display: flex;
    align-items: center;
    gap: 0px;
    flex-wrap: wrap;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: #5f6368;
    flex: 1;
    min-width: 0;
}

.meta-site {
    font-weight: 600;
    color: #3c4043;
}

.meta-date {
    color: #5f6368;
    font-weight: 400;
}

.single-meta-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tombol Lingkaran Halus (Style Google) */
.action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f3f4;
    color: #5f6368;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.action-btn:hover {
    background: #e8eaed;
    color: #8B0000;
    transform: translateY(-1px);
}

/* Tombol "Add on Google" (Pill) */
.action-btn-google {
    width: auto;
    height: auto;
    border-radius: 8px;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    color: #3c4043;
    padding: 6px 12px;
    gap: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.action-btn-google:hover {
    background: #f8f9fa;
    color: #3c4043;
    border-color: #dadce0;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
    transform: none;
}

.action-btn-google svg {
    width: 18px;
    height: 18px;
}

/* --- Author Info --- */
.single-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-initial {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.author-role {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #888;
}

/* --- Featured Image --- */
.single-featured-image {
    position: relative;
    margin: 0 0 8px 0;
    overflow: hidden;
}

.single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Caption dipindah ke bawah gambar */
.image-caption {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    background: transparent;
    color: #666666;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    padding: 8px 0 0 0;
    margin: 0;
    line-height: 1.5;
    text-align: left;
}

/* Tombol Lihat Foto tetap di pojok kanan atas gambar */
.btn-see-photos {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    transition: background 0.2s ease;
    z-index: 2;
}

.btn-see-photos:hover {
    background: rgba(0, 0, 0, 0.9);
    color: #ffffff;
}

/* ==========================================================================
   SINGLE CONTENT WRAPPER (2 Kolom: Konten + Ads Sidebar)
   ========================================================================== */
.single-content-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-top: 20px;
}

/* --- Kolom Kiri: Konten Utama (Fleksibel) --- */
.single-content-main {
    flex: 1;
    min-width: 0;
}

/* --- Kolom Kanan: Ads Sidebar 160x600 Sticky --- */
.single-ads-sidebar {
    width: 160px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.ads-160x600-wrapper {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.ads-placeholder {
    width: 160px;
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ads-label {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Manrope', sans-serif;
    font-size: 9px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ISI KONTEN ARTIKEL (Single Content Body)
   ========================================================================== */
.single-content {
    font-family: 'Manrope', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: #3d3d3d;
    line-height: 1.8;
    letter-spacing: 0.2px;
    padding-top: 10px;
}

/* --- Paragraf --- */
.single-content p {
    margin: 0 0 20px 0;
}

/* --- Heading --- */
.single-content h2,
.single-content h3,
.single-content h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #1a1a1a;
    margin: 32px 0 16px 0;
    line-height: 1.4;
}

.single-content h2 {
    font-size: 22px;
}

.single-content h3 {
    font-size: 19px;
}

.single-content h4 {
    font-size: 17px;
}

/* --- Link --- */
.single-content a {
    color: #8B0000;
    text-decoration: underline;
    text-decoration-color: rgba(139, 0, 0, 0.3);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.single-content a:hover {
    color: #5a0000;
    text-decoration-color: #5a0000;
}

/* --- Gambar dalam Konten --- */
.single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 24px 0;
}

.single-content figure {
    margin: 24px 0;
}

.single-content figure img {
    margin: 0;
}

.single-content figcaption {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: #888;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

/* --- Blockquote --- */
.single-content blockquote {
    border-left: 4px solid #8B0000;
    background: #fafafa;
    padding: 16px 20px;
    margin: 24px 0;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-style: italic;
    color: #555;
    border-radius: 0 6px 6px 0;
}

.single-content blockquote p {
    margin: 0;
}

/* --- List --- */
.single-content ul,
.single-content ol {
    margin: 20px 0;
    padding-left: 24px;
}

.single-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.single-content ul li {
    list-style-type: disc;
}

.single-content ol li {
    list-style-type: decimal;
}

/* --- Embed (Video, Tweet, dll) --- */
.single-content .wp-block-embed,
.single-content iframe {
    margin: 24px 0;
    border-radius: 6px;
    overflow: hidden;
}

/* --- Table --- */
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
}

.single-content th,
.single-content td {
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    text-align: left;
}

.single-content th {
    background: #f5f5f5;
    font-weight: 700;
    color: #1a1a1a;
}

/* --- Horizontal Rule --- */
.single-content hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 32px 0;
}

/* ==========================================================================
   TAG BERITA
   ========================================================================== */
.single-tags {
    margin: 32px 0 24px 0;
}

.single-tags-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.single-tags-label i {
    color: #8B0000;
    font-size: 14px;
}

.single-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.single-tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #f5f5f5;
    color: #555;
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.single-tag-pill:hover {
    background: #8B0000;
    color: #ffffff;
    border-color: #8B0000;
    transform: translateY(-1px);
}

/* ==========================================================================
   DIVIDER
   ========================================================================== */
.single-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 32px 0;
}

/* ==========================================================================
   RESPONSIVE: TABLET (768px - 999px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 999px) {
    .single-content-wrapper {
        gap: 20px;
    }

    .single-ads-sidebar {
        width: 140px;
    }

    .ads-placeholder {
        width: 140px;
        height: 500px;
    }
}

/* ==========================================================================
   RESPONSIVE: MOBILE (max-width: 767px)
   ========================================================================== */
@media (max-width: 767px) {
    
    /* 1. Jadikan parent utama sebagai Flexbox agar properti 'order' bisa digunakan */
    .single-article {
        display: flex;
        flex-direction: column;
    }

    /* 2. "Melebur" wrapper meta-bar agar anak-anaknya bisa diatur urutannya secara mandiri */
    .single-meta-bar {
        display: contents;
    }

    /* 3. Atur urutan elemen dari atas ke bawah secara eksplisit (DIPERBAIKI) */
    .single-breadcrumb { order: 1; }
    .single-header { order: 2; }
    .single-excerpt { order: 3; } /* <-- PERBAIKAN: Excerpt tepat di bawah judul */
    
    .single-meta-info { 
        order: 4; 
        margin-bottom: 12px; 
    }
    
    .single-author { 
        order: 5; 
        margin-bottom: 16px; 
    }

    /* 4. Pindahkan Actions ke bawah Author */
    .single-meta-actions {
        order: 6;
        width: 100%;
        justify-content: space-between;
        margin-bottom: 20px;
        padding-top: 16px;
        border-top: 1px solid #eeeeee;
    }

    /* 5. Pastikan elemen lainnya tetap di bawahnya */
    .single-featured-image { order: 7; }
    .single-content-wrapper { order: 8; }
    .single-tags { order: 9; }
    .single-divider { order: 10; }
    .related-posts { order: 11; }

    /* --- PERBAIKAN UTAMA: Sembunyikan Ads Sidebar Sepenuhnya di Mobile --- */
    .single-ads-sidebar {
        display: none !important;
    }

    /* --- Penyesuaian Ukuran & Layout Mobile Lainnya --- */
    .single-title {
        font-size: 24px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
    }

    /* Google pill jadi lingkaran logo saja di mobile */
    .action-btn-google {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        border: none;
    }

    .action-btn-google .google-text {
        display: none;
    }

    /* Featured Image: Rapat tepi kiri kanan layar (Full Bleed) */
    .single-featured-image {
        margin-left: -16px;  
        margin-right: -16px; 
        border-radius: 0;    
        width: calc(100% + 32px); 
    }

    .image-caption {
        padding: 8px 16px 0 16px;
    }

    .single-content-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .single-content-main {
        width: 100%;
    }

    /* Konten artikel */
    .single-content {
        font-size: 16px;
        line-height: 1.7;
    }
 
    .single-content h2 {
        font-size: 20px;
    }

    .single-content h3 {
        font-size: 18px;
    }

    .single-content blockquote {
        padding: 12px 16px;
        font-size: 15px;
    }

    .single-tag-pill {
        font-size: 12px;
        padding: 5px 12px;
    }

    /* Single Excerpt Mobile adjustment */
    .single-excerpt {
        font-size: 14px;
        margin-bottom: 16px;
    }
}

/* ==========================================================================
   BERITA TERKAIT (RELATED POSTS) - KOMPAS STYLE
   ========================================================================== */
.related-posts {
    margin-top: 8px;
}

.related-posts-header {
    margin-bottom: 4px;
}

.related-posts-title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

/* Grid 2 kolom, tanpa row-gap karena border-bottom jadi pemisah */
.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 0;
}

.related-post-item {
    padding: 12px 0;
    border-bottom: 1px solid #eeeeee;
}

.related-post-item a {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
    letter-spacing: -0.2px;
}

.related-post-item a:hover {
    color: #8B0000;
}

/* Mobile: 1 kolom */
@media (max-width: 767px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .related-post-item {
        padding: 16px 0;
    }

    .related-post-item a {
        font-size: 15px;
    }
}

/* ==========================================================================
   SINGLE EXCERPT (RINGKASAN DI BAWAH JUDUL)
   ========================================================================== */
.single-excerpt {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.6;
    margin: 0 0 20px 0;
}