/* =========================
   DETAIL BERITA
========================= */
.detail-berita {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* JUDUL */
.detail-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #1a1a1a;
}

/* META */
.detail-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

/* GAMBAR TAJUK */
.detail-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #f3f3f3;
    margin-bottom: 30px;
}

.detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* PENTING */
}


/* ISI BERITA */
.detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* PARAGRAF */
.detail-content p {
    margin-bottom: 18px;
}

/* HEADING DALAM KONTEN */
.detail-content h2,
.detail-content h3,
.detail-content h4 {
    margin: 30px 0 15px;
    line-height: 1.4;
    color: #1a1a1a;
}

/* IMAGE DALAM KONTEN (DARI EDITOR) */
.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
}

/* LIST */
.detail-content ul,
.detail-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

/* BLOCKQUOTE */
.detail-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 15px;
    margin: 20px 0;
    color: #555;
    font-style: italic;
    background: #f8f9fa;
}

/* LINK */
.detail-content a {
    color: #0d6efd;
    text-decoration: none;
}

.detail-content a:hover {
    text-decoration: underline;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .detail-title {
        font-size: 24px;
    }

    .detail-thumb {
        max-height: 260px;
    }

    .detail-content {
        font-size: 15px;
    }
}

/* =========================
   LAYOUT DETAIL
========================= */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin-top: 40px;
}

/* SIDEBAR */
.detail-sidebar {
    position: sticky;
    top: 90px;
}

.sidebar-title {
    font-size: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #0d6efd;
    padding-left: 10px;
}

.sidebar-item {
    display: flex;
    align-items: flex-start; /* sejajar atas */
    gap: 14px;
    margin-bottom: 18px;
    text-decoration: none;
    color: #000;
}

.sidebar-item .thumb {
    width: 90px;        /* KUNCI LEBAR */
    height: 65px;       /* KUNCI TINGGI */
    flex-shrink: 0;     /* AGAR TIDAK CIUT */
    border-radius: 10px;
    overflow: hidden;
    background: #eee;
}

.sidebar-item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* POTONG PROPORSIONAL */
    display: block;
}

.sidebar-item .info {
    flex: 1;
}

.sidebar-item .info h4 {
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 4px;
    font-weight: 600;

    display: -webkit-box;
    -webkit-line-clamp: 2;  /* maksimal 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-item .info span {
    font-size: 12px;
    color: #777;
}


.sidebar-item:hover h4 {
    color: #0d6efd;
}

.sidebar-item:hover {
    transform: translateX(2px);
    transition: .2s ease;
}


.sidebar-thumb {
    width: 90px;
    height: 70px;
    overflow: hidden;
    border-radius: 8px;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-text h4 {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.sidebar-text span {
    font-size: 12px;
    color: #777;
}

/* =========================
   NAV BERITA
========================= */
.nav-berita {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 50px 0;
}

.nav-berita a {
    flex: 1;
    padding: 16px;
    border-radius: 12px;
    background: #f8f9fa;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
    transition: .3s;
}

.nav-berita a:hover {
    background: #e9ecef;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    display: none;               /* PENTING */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    flex-direction: column;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.4);
}

.lightbox-caption {
    color: #ddd;
    margin-top: 12px;
    font-size: 14px;
    text-align: center;
    max-width: 80%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
}

/* NAV */
.lightbox .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    opacity: .7;
}

.lightbox .nav:hover {
    opacity: 1;
}

.lightbox .prev { left: 30px; }
.lightbox .next { right: 30px; }

/* UX */
.detail-content img {
    cursor: zoom-in;
}

/* =========================
   IMAGE ALIGN (WordPress-like)
========================= */

.detail-content img.alignleft {
    float: left;
    margin: 5px 20px 15px 0;
    max-width: 45%;
    height: auto;
}

.detail-content img.alignright {
    float: right;
    margin: 5px 0 15px 20px;
    max-width: 45%;
    height: auto;
}

.detail-content img.aligncenter {
    display: block;
    margin: 20px auto;
    max-width: 80%;
}

/* Clear float setelah paragraf */
.detail-content::after {
    content: "";
    display: block;
    clear: both;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
    .detail-content img.alignleft,
    .detail-content img.alignright {
        float: none;
        display: block;
        margin: 15px auto;
        max-width: 100%;
    }
}


/* =========================
   TAG BERITA
========================= */
.detail-tags {
    margin: 10px 0 25px;
}

.detail-tags .tag-item {
    display: inline-block;
    padding: 5px 12px;
    margin: 4px 6px 4px 0;
    font-size: 13px;
    background: #f1f3f5;
    color: #333;
    border-radius: 20px;
    text-decoration: none;
    transition: all .2s ease;
}

.detail-tags .tag-item:hover {
    background: #0d6efd;
    color: #fff;
}


