/* ============================================
   CNADAILY INDEX & CONTENT - DESKTOP STYLES
   ============================================ */

/* ============================================
   LAYOUT UTAMA - 2 KOLOM (Home Index + Sidebar)
   ============================================ */
.site-main {
    min-height: 60vh;
}

.home-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Kolom Kiri: Home Index */
.home-index {
    flex: 1;
    min-width: 0; /* Mencegah overflow pada flex item */
}

/* Kolom Kanan: Sidebar */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 130px;
}

/* ============================================
   NEWS GRID (HOMEPAGE)
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.news-card .post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.news-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.news-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.news-card .category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.news-card .category-badge a { color: #fff; text-decoration: none; }

.news-card .news-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card .entry-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 10px 0;
    color: var(--text-dark);
}

.news-card .entry-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.news-card .entry-title a:hover { color: var(--primary); }

.news-card .entry-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-card .entry-meta .author { font-weight: 600; color: #555; }
.news-card .entry-meta .separator { color: #ddd; }

.news-card .entry-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.news-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: gap 0.3s;
}

.news-card .read-more:hover { gap: 10px; }

/* Featured Post (Artikel Pertama) */
.news-card.featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.news-card.featured .post-thumbnail {
    width: 50%;
    aspect-ratio: auto;
}

.news-card.featured .news-content {
    width: 50%;
    padding: 30px;
    justify-content: center;
}

.news-card.featured .entry-title { font-size: 1.8rem; }

/* ============================================
   SINGLE POST (DETAIL ARTIKEL)
   ============================================ */
.single-post-header { margin-bottom: 24px; }

.single-post-header .category-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.single-post-header .category-badge a { color: #fff; text-decoration: none; }

.single-post-header .entry-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-dark);
    margin: 0 0 16px 0;
}

.single-post-header .entry-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.single-post-header .entry-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-post-header .entry-meta .author-info { display: flex; flex-direction: column; }
.single-post-header .entry-meta .author-name { font-weight: 700; color: var(--text-dark); }
.single-post-header .entry-meta .post-date { font-size: 12px; color: #888; }

.featured-image {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.featured-image img { width: 100%; height: auto; display: block; }

/* Entry Content Typography */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.entry-content p { margin-bottom: 1.5em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 800;
    color: var(--text-dark);
}
.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.1rem; }

.entry-content img { max-width: 100%; height: auto; border-radius: 6px; margin: 1.5em 0; }
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin: 1.5em 0;
    background: var(--bg-light);
    font-style: italic;
    color: #555;
}
.entry-content ul, .entry-content ol { margin: 1em 0; padding-left: 2em; }
.entry-content a { color: var(--primary); text-decoration: underline; }

/* Post Tags */
.entry-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.entry-tags strong { font-size: 13px; color: var(--text-dark); }
.entry-tags a {
    display: inline-block;
    background: #f0f0f0;
    color: #555;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s;
}
.entry-tags a:hover { background: var(--primary); color: #fff; }

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 6px;
}
.share-buttons span { font-weight: 700; font-size: 13px; color: var(--text-dark); }
.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: #555;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.share-buttons a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid var(--primary);
}
.author-box .author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box .author-info h4 { font-size: 16px; font-weight: 800; margin: 0 0 4px 0; }
.author-box .author-info .author-role { font-size: 12px; color: #888; margin-bottom: 8px; }
.author-box .author-info p { font-size: 14px; color: #555; margin: 0; }

/* Related Posts */
.related-posts { margin-top: 40px; }
.related-posts h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}
.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-post-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.related-post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.related-post-card .post-thumbnail { aspect-ratio: 16/9; overflow: hidden; }
.related-post-card .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.related-post-card:hover .post-thumbnail img { transform: scale(1.05); }
.related-post-card .post-title { padding: 12px; font-size: 14px; font-weight: 700; line-height: 1.4; margin: 0; }
.related-post-card .post-title a { color: var(--text-dark); text-decoration: none; }
.related-post-card .post-title a:hover { color: var(--primary); }

/* ============================================
   PAGE (STATIS)
   ============================================ */
.page-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid var(--border-light); }
.page-header .entry-title { font-size: 2rem; font-weight: 800; color: var(--text-dark); margin: 0; }
.page-content { font-size: 16px; line-height: 1.8; color: #333; }

/* ============================================
   SIDEBAR & WIDGETS
   ============================================ */
.sidebar .widget {
    margin-bottom: 20px;
 }
.sidebar .widget-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}
.sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar .widget ul li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar .widget ul li a { color: #333; text-decoration: none; font-size: 14px; transition: all 0.3s; display: block; }
.sidebar .widget ul li a:hover { color: var(--primary); padding-left: 5px; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { margin-top: 40px; display: flex; justify-content: center; gap: 8px; }
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.pagination .page-numbers:hover { background: #f0f0f0; color: var(--primary); }
.pagination .page-numbers.current { background: var(--primary); color: #fff; }

/* ============================================
   COMMENTS
   ============================================ */
.comments-area { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--border-light); }
.comments-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment { padding: 20px; background: var(--bg-light); border-radius: 8px; margin-bottom: 16px; }
.comment-author { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.comment-author .avatar { width: 48px; height: 48px; border-radius: 50%; }
.comment-author .fn { font-weight: 700; font-size: 15px; }
.comment-metadata { font-size: 12px; color: #888; }
.comment-content { font-size: 14px; line-height: 1.6; color: #555; }
.comment-respond { margin-top: 30px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color 0.3s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--primary); outline: none; }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"] {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}
.comment-form input[type="submit"]:hover { background: var(--primary-dark); }

/* ============================================
   IKLAN TOP & CENTER - STYLE BARU
   ============================================ */

/* Wrapper Iklan (Top & Center) */
.ads-top-wrapper,
.ads-center-wrapper {
    width: 100%;
    margin-bottom: 30px;
    padding: 0;
    text-align: center;
}

/* Label Advertisement */
.ads-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

/* Content Area Iklan */
.ads-top-content,
.ads-center-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gambar Iklan */
.ads-top-image,
.ads-center-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Placeholder Style - Persis Gambar */
.ads-placeholder {
    background: #e5e5e5;
    border-radius: 8px;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ads-placeholder span {
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ads-top-wrapper,
    .ads-center-wrapper {
        margin-bottom: 20px;
    }
    
    .ads-placeholder {
        min-height: 250px;
    }
    
    .ads-label {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .ads-top-wrapper,
    .ads-center-wrapper {
        margin-bottom: 16px;
    }
    
    .ads-placeholder {
        min-height: 200px;
    }
}
/* ============================================
   MOBILE FIX - PAKSA (Tambahkan di paling bawah index.css)
   ============================================ */
@media (max-width: 767px) {
    
    /* Paksa sidebar tidak menutupi konten */
    .content-wrapper {
        flex-direction: column !important;
    }
    
    .content-area {
        order: 1 !important;
        width: 100% !important;
    }
    
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex-shrink: 1 !important;
        position: static !important;
        top: auto !important;
        order: 2 !important;
        margin-top: 20px !important;
    }
}


/* ============================================
   KONTROL TAMPILAN WIDGET MOBILE
   ============================================ */

/* 1. DESKTOP: Sembunyikan semua widget area khusus mobile */
.mobile-widget-area {
    display: none !important;
}

/* 2. MOBILE (Layar < 768px): Tampilkan kembali */
@media (max-width: 767px) {
    .mobile-widget-area {
        display: block !important;
        margin-bottom: 20px; /* Beri jarak agar tidak menempel dengan section di bawahnya */
         
    }
    
    /* Merapikan widget di dalam area mobile */
    .mobile-widget-area .widget {
        margin-bottom: 15px;
         
       
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
}