/* ===============================
   DETAIL BERITA
================================ */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.news-detail {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

/* JUDUL */
.news-detail h1 {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #111;
}

/* META */
.news-detail .meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

/* GAMBAR */
.news-detail img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px 0;
}

/* ISI BERITA */
.news-detail .content {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
}

.news-detail .content p {
    margin-bottom: 18px;
}

/* TAGS */
.news-detail .tags {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.news-detail .tags strong {
    margin-right: 10px;
}

.news-detail .tags a {
    display: inline-block;
    margin: 5px 6px 0 0;
    padding: 6px 12px;
    font-size: 13px;
    background: #f2f2f2;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    transition: all .2s ease;
}

.news-detail .tags a:hover {
    background: #222;
    color: #fff;
}

/* BREADCRUMB */
.breadcrumb {
    font-size: 14px;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #0077cc;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .news-detail {
        padding: 20px;
    }

    .news-detail h1 {
        font-size: 24px;
    }

    .news-detail .content {
        font-size: 16px;
    }
}

/* ===============================
   LAYOUT DETAIL + SIDEBAR
================================ */
.detail-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    align-items: start;
}

/* konten utama */
.news-detail {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,.06);
}

/* sidebar kanan */
.sidebar-detail {
    position: sticky;
    top: 90px;
}

.sidebar-box {
    background: #f7f7f7;
    padding: 15px;
    border-radius: 8px;
}

/* LIST BERITA TERKAIT */
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    margin-bottom: 12px;
}

.related-list a {
    color: #111;
    font-size: 15px;
    text-decoration: none;
}

.related-list a:hover {
    color: #0077cc;
    text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-detail {
        position: static;
    }
}
/* ==== */

/* LIST BERITA TERKAIT */
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    margin-bottom: 12px;
}

.related-list a {
    color: #111;
    font-size: 15px;
    line-height: 1.4;
    text-decoration: none;
    transition: color .2s;
}

.related-list a:hover {
    color: #0077cc;
}

/* EMPTY */
.sidebar-box .empty {
    font-size: 14px;
    color: #888;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .detail-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
}


.sidebar-detail {
  align-self: flex-start;
}

}

/* hilangkan underline di post berita */

/* ================= UNDELINE REMOVE ================= */

/* Berita terbaru cards */
.cards a.card {
    text-decoration: none;
    color: inherit; /* biar warna teks tetap normal */
}

/* Headline lainnya */
.sidebar .box ul li a {
    text-decoration: none;
    color: inherit;
}

/* Berita populer */
.sidebar .box ol li a {
    text-decoration: none;
    color: inherit;
}

/* Optional: hover effect */
.cards a.card:hover,
.sidebar .box ul li a:hover,
.sidebar .box ol li a:hover {
    text-decoration: underline; /* atau efek lain */
    color: #007BFF; /* contoh warna saat hover */
}
/* ================= KOMENTAR ================= */

.comments {
    margin-top: 50px;
}

.comment-box {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.comment-box strong {
    display: block;
    font-size: 15px;
}

.comment-box small {
    font-size: 12px;
    color: #888;
}

.comment-form {
    margin-top: 25px;
}

.comment-form .form-group {
    margin-bottom: 12px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.comment-form textarea {
    min-height: 90px;
    resize: vertical;
}

.comment-form button {
    background: #0077cc;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
}

.comment-form button:hover {
    background: #005fa3;
}


/* warning komentar */
.comment-alert {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
}

.comment-alert.success {
    background: #e9f7ef;
    color: #1e7e34;
    border: 1px solid #b7e4c7;
}

/* bagian berita terkait pindah ke bawah */
/* ================= DESKTOP ================= */
.detail-layout {
    display: flex;
    gap: 30px;
}

.news-detail {
    flex: 3;
}

.sidebar-detail {
    flex: 1;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .detail-layout {
        flex-direction: column;
    }

    /* pastikan urutannya:
       1. konten
       2. komentar
       3. berita terkait
    */

    .news-detail {
        order: 1;
    }

    .sidebar-detail {
        order: 2;
        margin-top: 30px;
    }
}
@media (max-width: 768px) {
    .sidebar-box {
        padding: 15px;
    }

    .sidebar-detail {
        border-top: 1px solid #ddd;
        padding-top: 20px;
    }
}
