/* --- STYLE GLOBAL --- */
:root {
    --primary-blue: #0A3D62;
    --accent-blue: #3C6382;
    --text-dark: #2C3E50;
    --text-muted: #7F8C8D;
    --bg-light: #F8F9FA;
    --border-color: #E9ECEF;
    --wa-green: #25D366;
    --fb-blue: #1877F2;
}

* { box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--bg-light); 
    margin: 0; 
    padding: 0; 
    color: var(--text-dark); 
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.2s ease; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- NAVBAR --- */
nav { 
    background: white; 
    padding: 15px 0; 
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-content { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}
.nav-brand { 
    color: var(--primary-blue); 
    font-weight: 700; 
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-back { 
    background: var(--bg-light); 
    color: var(--text-dark); 
    padding: 8px 16px; 
    border-radius: 6px; 
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}
.btn-back:hover { 
    background: var(--primary-blue); 
    color: white; 
    border-color: var(--primary-blue);
}

/* --- LAYOUT UTAMA --- */
.detail-wrapper {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 30px;
    margin-bottom: 80px;
    align-items: start; /* Mencegah sidebar stretch */
}

/* --- ARTIKEL UTAMA --- */
.main-article { 
    background: white; 
    padding: 40px; 
    border-radius: 16px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.02); 
}

.article-title { 
    font-size: 2.2rem; 
    font-weight: 800; 
    color: var(--primary-blue); 
    margin: 0 0 15px 0; 
    line-height: 1.3; 
}

.article-meta { 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    margin-bottom: 30px; 
    padding-bottom: 20px; 
    border-bottom: 1px solid var(--border-color);
    display: flex; 
    gap: 20px; 
    flex-wrap: wrap;
    align-items: center;
}

.article-meta span { display: flex; align-items: center; gap: 6px; }

/* --- PENGATURAN GAMBAR --- */
/* Gambar Utama (Thumbnail) */
.article-main-img { 
    width: 100%; 
    max-height: 500px;
    object-fit: cover; 
    border-radius: 12px; 
    margin-bottom: 30px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Pengaturan Konten dari CKEditor & Gambar Tambahan */
.article-content { 
    font-size: 1.05rem; 
    line-height: 1.8; 
    color: #3b4249;
}

.article-content p { margin-bottom: 1.5rem; }

/* Mengatur <figure> dan <img> bawaan CKEditor & Sisipan Otomatis */
.article-content figure {
    margin: 2.5rem auto !important;
    text-align: center;
    max-width: 650px !important; /* Membatasi lebar gambar di tengah paragraf */
    width: 100%;
}

.article-content figure img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    display: block;
    margin: 0 auto;
}

/* Jika ada caption dari gambar */
.article-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* --- SHARE BUTTONS --- */
.share-section {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-label { 
    font-weight: 600; 
    color: var(--text-dark); 
    font-size: 0.95rem;
}

.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-share {
    display: inline-flex; 
    align-items: center; 
    gap: 8px;
    padding: 8px 18px; 
    border-radius: 50px;
    color: white; 
    font-size: 0.9rem; 
    font-weight: 500;
    border: none;
    cursor: pointer;
}
.btn-share:hover { opacity: 0.85; transform: translateY(-2px); }

.share-wa { background: var(--wa-green); }
.share-fb { background: var(--fb-blue); }
.share-copy { background: var(--accent-blue); }

/* --- SIDEBAR BERITA LAINNYA --- */
.sidebar-container {
    position: sticky;
    top: 90px;
}

.sidebar-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    color: var(--text-dark); 
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 4px;
}

.side-news-item {
    display: flex; 
    gap: 15px; 
    margin-bottom: 15px; 
    background: white; 
    padding: 12px;
    border-radius: 12px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.02); 
}

.side-news-item:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.side-thumb { 
    width: 90px; 
    height: 75px; 
    object-fit: cover; 
    border-radius: 8px; 
    flex-shrink: 0; 
}

.side-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.side-info h4 { 
    font-size: 0.95rem; 
    margin: 0 0 5px; 
    line-height: 1.4; 
    color: var(--text-dark); 
    font-weight: 600;
}

.side-info span { 
    font-size: 0.8rem; 
    color: var(--text-muted); 
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- FOOTER --- */
footer {
    background: white; 
    color: var(--text-muted); 
    padding: 25px 20px; 
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

/* --- RESPONSIVE MOBILE & TABLET --- */
@media (max-width: 992px) {
    .detail-wrapper { grid-template-columns: 1fr; gap: 40px; }
    .sidebar-container { position: static; }
}

@media (max-width: 768px) {
    .main-article { padding: 25px; border-radius: 12px; }
    .article-title { font-size: 1.6rem; }
    .article-main-img { max-height: 300px; }
    .share-section { flex-direction: column; align-items: flex-start; }
    .article-meta { gap: 12px; }
}

@media (max-width: 480px) {
    .nav-brand span { display: none; } /* Sembunyikan teks brand, sisakan ikon jika ada */
    .nav-brand::after { content: "SMAN 1 Koba"; }
    .main-article { padding: 15px; }
    .article-title { font-size: 1.4rem; }
    .side-thumb { width: 80px; height: 70px; }
}
.nav-logo {
    height: 40px; /* Sesuaikan angka ini jika logo kebesaran/kekecilan */
    width: auto;
    object-fit: contain;
}

/* Modifikasi sedikit untuk tampilan mobile agar logo tetap proporsional */
@media (max-width: 480px) {
    .nav-logo {
        height: 32px;
    }
}