/* ============================================
   DETAIL BERITA - STYLE KHUSUS
   ============================================ */

/* ============================================
   ROOT VARIABLES (sesuaikan dengan tema utama)
   ============================================ */
:root {
    --primary: #0056b3;
    --primary-dark: #003d82;
    --primary-light: #e8f0fe;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #dc2626;
    --dark: #1a1a2e;
    --text: #2c3e50;
    --text-light: #666;
    --gray: #888;
    --gray-light: #f5f7fa;
    --border: #e8e8e8;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --transition: all 0.3s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   BASE
   ============================================ */
.article-detail {
    padding: 30px 0 60px;
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    margin-bottom: 30px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb li + li::before {
    content: '/';
    margin: 0 8px;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.breadcrumb a i {
    margin-right: 6px;
}

.breadcrumb li:last-child {
    color: var(--text-light);
    font-weight: 500;
}

/* ============================================
   ARTICLE HEADER
   ============================================ */
.article-header {
    margin-bottom: 30px;
}

.article-category {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.article-category .category-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 20px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: var(--transition);
}

.article-category .category-badge:hover {
    background: var(--primary-dark);
}

.headline-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--secondary);
    color: white;
    padding: 4px 16px;
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--danger);
    color: white;
    padding: 4px 16px;
    border-radius: 25px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.article-header h1 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 20px;
}

/* ============================================
   ARTICLE META
   ============================================ */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 30px;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.95rem;
}

.author-role {
    font-size: 0.75rem;
    color: var(--gray);
}

.meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    flex: 1;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 0.85rem;
}

.meta-item i {
    color: var(--primary);
    width: 16px;
    text-align: center;
}

/* ============================================
   FEATURED IMAGE
   ============================================ */
.article-featured-image {
    margin: 30px 0 40px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-light);
    box-shadow: var(--shadow);
}

.article-featured-image figure {
    margin: 0;
    position: relative;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    display: block;
}

.article-featured-image figcaption {
    padding: 12px 20px;
    background: var(--gray-light);
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
    border-top: 1px solid var(--border);
}

/* ============================================
   ARTICLE CONTENT LAYOUT
   ============================================ */
.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 20px;
}

.article-main {
    min-width: 0;
}

/* ============================================
   CONTENT BODY
   ============================================ */
.content-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text);
}

.content-body p {
    margin-bottom: 20px;
}

.content-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--dark);
}

.content-body h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--dark);
}

.content-body h4 {
    font-size: 1.2rem;
    margin: 25px 0 15px;
    color: var(--dark);
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 20px 0;
}

.content-body ul,
.content-body ol {
    margin: 15px 0 20px 25px;
}

.content-body li {
    margin-bottom: 8px;
}

.content-body blockquote {
    margin: 25px 0;
    padding: 20px 30px;
    background: var(--gray-light);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.content-body blockquote p {
    margin-bottom: 0;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.content-body table th,
.content-body table td {
    padding: 12px;
    border: 1px solid var(--border);
}

.content-body table th {
    background: var(--gray-light);
    font-weight: 700;
}

/* ============================================
   TAGS
   ============================================ */
.article-tags {
    margin: 30px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.tags-label {
    font-weight: 700;
    color: var(--dark);
    margin-right: 10px;
}

.tag {
    display: inline-block;
    padding: 5px 16px;
    margin: 3px 5px 3px 0;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.95rem;
}

.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000000; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.telegram { background: #0088cc; }
.share-btn.email { background: #ea4335; }
.share-btn.copy {
    background: #6c757d;
    position: relative;
}

.share-btn.copy.copied {
    background: var(--success);
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================
   ARTICLE NAVIGATION
   ============================================ */
.article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 2px solid var(--border);
}

.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--dark);
    max-width: 45%;
    padding: 10px 15px;
    border-radius: 10px;
    background: var(--gray-light);
    transition: var(--transition);
}

.nav-prev:hover,
.nav-next:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-prev i,
.nav-next i {
    font-size: 1.2rem;
    flex-shrink: 0;
    color: var(--primary);
}

.nav-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gray);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav-title {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.nav-empty {
    flex: 1;
}

/* ============================================
   SIDEBAR
   ============================================ */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary);
}

/* Popular Sidebar */
.popular-list-sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-list-sidebar li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.popular-list-sidebar li:last-child {
    border-bottom: none;
}

.popular-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.popular-link:hover {
    color: var(--primary);
}

.popular-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-text {
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.3;
}

.popular-view-count {
    display: block;
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: 4px;
    margin-left: 40px;
}

/* Related Sidebar */
.related-item {
    margin-bottom: 15px;
}

.related-item:last-child {
    margin-bottom: 0;
}

.related-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    align-items: center;
}

.related-link:hover {
    color: var(--primary);
}

.related-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--gray-light);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    flex: 1;
    min-width: 0;
}

.related-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 5px;
    line-height: 1.3;
}

.related-date {
    font-size: 0.75rem;
    color: var(--gray);
}

.related-date i {
    margin-right: 3px;
}

/* Newsletter Widget */
.newsletter-widget p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.sidebar-newsletter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-newsletter input {
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: var(--font);
}

.sidebar-newsletter input:focus {
    outline: none;
    border-color: var(--primary);
}

.sidebar-newsletter button {
    padding: 10px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.sidebar-newsletter button:hover {
    background: var(--primary-dark);
}

/* ============================================
   ADS (Iklan) - tambahan untuk sidebar
   ============================================ */
.sidebar-ad {
    margin: 0;
}

.ad-container {
    text-align: center;
    margin: 10px 0;
}

.ad-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.default-ad {
    padding: 20px;
    background: var(--gray-light);
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--gray);
    font-size: 0.9rem;
}

.sidebar-ads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.ad-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 10px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 9999;
    text-align: center;
    display: none;
}

.ad-sticky.visible {
    display: block;
    animation: slideUp 0.5s ease;
}

.ad-sticky .close-sticky {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet & Desktop kecil */
@media (max-width: 1024px) {
    .article-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .article-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.8rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .meta-details {
        flex-wrap: wrap;
        gap: 10px;
    }

    .article-featured-image img {
        max-height: 350px;
    }

    .content-body {
        font-size: 1rem;
    }

    .content-body h2 {
        font-size: 1.5rem;
    }

    .content-body h3 {
        font-size: 1.2rem;
    }

    .article-navigation {
        flex-direction: column;
    }

    .nav-prev,
    .nav-next {
        max-width: 100%;
        justify-content: center;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.4rem;
    }

    .article-featured-image img {
        max-height: 250px;
    }

    .content-body {
        font-size: 0.95rem;
    }

    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .article-meta {
        padding: 10px 0;
        gap: 8px;
    }

    .meta-author {
        flex-wrap: wrap;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
    }

    .sidebar-widget {
        padding: 18px;
    }

    .related-image {
        width: 60px;
        height: 60px;
    }
}