/* =========================================
   DETAIL BERITA – AUKYCLOTH MODERN STYLE
   ========================================= */

:root {
    --primary: #8CC63F;
    --primary-dark: #7bb539;
    --text-dark: #1f2d3d;
    --text-medium: #4f5b67;
    --text-light: #8a99a8;
    --border: #e5e7eb;
    --bg-light: #f6f7f9;
    --shadow: rgba(0,0,0,0.07);
    --radius: 18px;
}

/* -------- GENERAL -------- */
body {
    background: var(--bg-light);
    font-family: "Inter", sans-serif;
    color: var(--text-dark);
    padding-top: 80px; /* Adjust based on header height */
}

/* -------- HEADER BREADCRUMB -------- */
.article-header {
    padding: 190px 0 60px;
    background: white;
}

@media (max-width: 768px) {
    .article-header {
        padding: 60px 0 30px;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 40px 0 20px;
    }
}

.breadcrumb {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto 18px;
    font-size: 15px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.article-title {
    font-size: 38px;
    font-weight: 800;
    margin: 0 0 30px;
}

/* -------- META -------- */
.article-meta {
    font-size: 15px;
    color: var(--text-light);
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta i {
    color: var(--primary);
}

/* -------- LAYOUT -------- */
.article-layout {
    max-width: 1300px;
    margin: 50px auto 80px;
    display: grid;
    grid-template-columns: 1.55fr 0.8fr; /* ✔ article lebih lebar */
    gap: 45px;
    padding: 0 20px;
}

.article-content {
    background: white;
    padding: 40px 45px;
    border-radius: var(--radius);
    box-shadow: 0 6px 20px var(--shadow);
    margin-top: -165px;
}

/* -------- IMAGE -------- */
.article-image img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 30px;
}

/* -------- BODY -------- */
.article-body {
    font-size: 18px;
    line-height: 1.85;
    margin-bottom: 50px;
    text-align: justify;
}

/* -------- SHARE -------- */
.article-share {
    padding-top: 50px;
    border-top: 1px solid var(--border);
}

.article-share h4 {
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 18px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: 0.2s ease;
    text-decoration: none !important;
}

.share-btn:hover {
    transform: translateY(-2px);
}

/* Share colors */
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.instagram { background: #E4405F; }
.share-btn.whatsapp { background: #25d366; }

/* -------- SIDEBAR -------- */
.article-sidebar {
    position: sticky;
    top: 315px;
    height: fit-content;
}

/* -------- STICKY HEADER -------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.sidebar-section {
    background: white;
    padding: 22px 22px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px var(--shadow);
    margin-top: -185px;
    margin-bottom: 25px;
}

.sidebar-section h3 {
    font-size: 20px;
    margin-bottom: 18px;
    font-weight: 700;
}

/* RELATED NEWS */
.related-news {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 600px; /* Set max height for scrolling */
    overflow-y: auto; /* Enable vertical scrolling */
    padding-right: 8px; /* Add some padding for scrollbar */
}

/* Custom scrollbar for related news */
.related-news::-webkit-scrollbar {
    width: 6px;
}

.related-news::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.related-news::-webkit-scrollbar-thumb {
    background: #8CC63F;
    border-radius: 10px;
}

.related-news::-webkit-scrollbar-thumb:hover {
    background: #7bb539;
}

.related-item {
    display: flex;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    transition: 0.25s ease;
    text-decoration: none;
}

.related-item:hover {
    transform: translateX(6px);
}

.related-item:last-child {
    border-bottom: none;
}

.related-image {
    width: 120px;
    height: 85px;
    border-radius: 10px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content h4 {
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark) !important;
    text-decoration: none !important;
}

.related-content span {
    font-size: 12px;
    color: var(--text-light);
}

/* Back button */
.btn-back-to-news {
    display: block;
    text-align: center;
    padding: 14px 0;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
}

.btn-back-to-news:hover {
    background: var(--primary-dark);
}

/* -------- RESPONSIVE -------- */
@media (max-width: 1200px) {
    .article-layout {
        gap: 30px;
        padding: 0 15px;
    }

    .article-title {
        font-size: 34px;
    }
}

@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }

    .article-sidebar {
        position: static;
    }

    .sidebar-section {
        margin-top: 0;
    }

    .article-content {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .article-layout {
        gap: 20px;
        padding: 0 15px;
    }

    .article-content {
        padding: 30px 20px;
        margin-top: -90px;
    }

    .sidebar-section {
        padding: 20px;
        margin-top: 0;
    }

    .article-title {
        font-size: 28px;
    }

    .article-meta {
        flex-direction: row;
        gap: 15px;
    }

    .share-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .share-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .article-layout {
        padding: 0 5px;
        gap: 15px;
    }

    .article-content {
        padding: 20px 15px;
    }

    .sidebar-section {
        padding: 15px;
    }

    .article-title {
        font-size: 24px;
    }

    .article-body {
        font-size: 16px;
        line-height: 1.7;
    }

    .related-item {
        flex-direction: column;
        text-align: center;
    }

    .related-image {
        width: 100%;
        height: 120px;
    }
}
