/* ============================================================
   Magelang Bisnis — Tema Portal Berita (Ghost)
   Design system terinspirasi ProMedia (inimagelangraya.com)
   ============================================================ */

:root {
    --primary: #0090ff;
    --primary-dark: #003d6d;
    --primary-soft: #e6f4ff;
    --text: #14142b;
    --text-muted: #6e7191;
    --text-light: #a0a3bd;
    --bg: #ffffff;
    --bg-alt: #f5f6fa;
    --border: #e6e8f0;
    --orange: #ea580c;
    --red: #cd201f;
    --radius: 8px;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --container: 1200px;
    --shadow: 0 2px 12px rgba(20, 20, 43, 0.06);
    --shadow-lg: 0 6px 24px rgba(20, 20, 43, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

.mb-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.mb-site { min-height: 100vh; display: flex; flex-direction: column; }
.mb-main { flex: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.mb-header { background: var(--bg); position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }

.mb-topbar {
    background: var(--primary-dark);
    color: #fff;
    font-size: 12px;
}
.mb-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
    gap: 12px;
}
.mb-topbar-date { font-weight: 500; }
.mb-topbar-tagline { opacity: 0.85; }

.mb-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}
.mb-logo { display: inline-flex; align-items: center; }
.mb-logo img { max-height: 48px; width: auto; }
.mb-logo-text {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

.mb-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mb-nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--primary-dark);
    border-radius: 2px;
    transition: 0.2s;
}

.mb-nav { background: var(--primary); }
.mb-nav .nav {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
}
.mb-nav .nav li { display: flex; }
.mb-nav .nav a {
    display: block;
    padding: 12px 16px;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px 6px 0 0;
    transition: background 0.15s;
}
.mb-nav .nav a:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.mb-nav .nav li.nav-current a { background: rgba(255, 255, 255, 0.22); }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.mb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--primary);
    margin-bottom: 18px;
    padding-bottom: 8px;
}
.mb-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.mb-section-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}
.mb-section-header-light .mb-section-title { color: #fff; }
.mb-section-header-light { border-bottom-color: rgba(255,255,255,0.4); }
.mb-section-header-light .mb-section-more { color: #fff; }

/* ============================================================
   HERO
   ============================================================ */
.mb-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #004a8a 100%);
    padding: 28px 0 32px;
}
.mb-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
}
.mb-hero-feature a { display: block; }
.mb-hero-figure img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius);
}
.mb-hero-body { padding: 14px 4px 0; color: #fff; }
.mb-hero-category {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.mb-hero-title { font-size: 24px; color: #fff; margin-bottom: 8px; }
.mb-hero-title:hover { color: #cfe8ff; }
.mb-hero-excerpt { color: rgba(255,255,255,0.85); font-size: 14px; margin-bottom: 8px; }
.mb-hero-date { color: rgba(255,255,255,0.7); font-size: 12px; }

.mb-hero-side { display: flex; flex-direction: column; gap: 14px; }
.mb-hero-side-inner {
    display: flex;
    gap: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 10px;
    align-items: center;
}
.mb-hero-side-figure { flex: 0 0 96px; }
.mb-hero-side-figure img {
    width: 96px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
}
.mb-hero-side-title { font-size: 14px; color: #fff; line-height: 1.4; }
.mb-hero-side-title:hover { color: #cfe8ff; }

/* ============================================================
   LAYOUT
   ============================================================ */
.mb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    padding-top: 28px;
    padding-bottom: 40px;
    align-items: start;
}
.mb-layout-main { min-width: 0; }

.mb-rubric { margin-bottom: 36px; }

/* ============================================================
   CARD GRID
   ============================================================ */
.mb-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.mb-card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.mb-card-grid-4 { grid-template-columns: repeat(4, 1fr); }

.mb-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.mb-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.mb-card-link { display: block; }
.mb-card-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mb-card-body { padding: 14px 16px 16px; }
.mb-card-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--primary);
    margin-bottom: 6px;
}
.mb-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mb-card-date { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.mb-sidebar { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 130px; }
.mb-widget { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.mb-widget-title {
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 16px;
}
.mb-popular-list { padding: 6px 0; }
.mb-popular-item { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.mb-popular-item:last-child { border-bottom: none; }
.mb-popular-item:hover { background: var(--bg-alt); }
.mb-popular-number {
    flex: 0 0 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 14px;
    border-radius: 6px;
}
.mb-popular-text { display: flex; flex-direction: column; gap: 2px; }
.mb-popular-title { font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mb-popular-cat { font-size: 11px; color: var(--primary); font-weight: 600; text-transform: uppercase; }

.mb-latest-list { padding: 6px 0; }
.mb-latest-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); align-items: center; }
.mb-latest-item:last-child { border-bottom: none; }
.mb-latest-item:hover { background: var(--bg-alt); }
.mb-latest-img { flex: 0 0 60px; width: 60px; height: 44px; object-fit: cover; border-radius: 4px; }
.mb-latest-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mb-latest-title { font-size: 13px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mb-latest-date { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   ARTICLE
   ============================================================ */
.mb-article-container { padding-top: 24px; }
.mb-breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mb-breadcrumb a { color: var(--primary); }
.mb-breadcrumb-sep { color: var(--text-light); }
.mb-breadcrumb-current { color: var(--text); font-weight: 500; }

.mb-article-header { margin-bottom: 20px; }
.mb-article-category {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.mb-article-category:hover { background: var(--primary-dark); color: #fff; }
.mb-article-title { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 14px; }
.mb-article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--text-muted); font-size: 13px; }
.mb-article-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.mb-article-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mb-article-date { font-size: 13px; }

.mb-article-figure { margin-bottom: 22px; }
.mb-article-img { width: 100%; border-radius: var(--radius); }

.mb-article-content {
    font-size: 17px;
    line-height: 1.8;
    color: #222232;
}
.mb-article-content p { margin-bottom: 18px; }
.mb-article-content h2 { font-size: 24px; margin: 28px 0 14px; color: var(--primary-dark); }
.mb-article-content h3 { font-size: 20px; margin: 24px 0 12px; }
.mb-article-content a { color: var(--primary); text-decoration: underline; }
.mb-article-content img { border-radius: 6px; margin: 10px 0; }
.mb-article-content blockquote { border-left: 4px solid var(--primary); padding: 8px 16px; margin: 18px 0; background: var(--bg-alt); border-radius: 0 6px 6px 0; font-style: italic; color: var(--text-muted); }
.mb-article-content ul, .mb-article-content ol { margin: 0 0 18px 22px; }
.mb-article-content li { margin-bottom: 6px; }
.mb-article-content figure figcaption { font-size: 13px; color: var(--text-muted); text-align: center; margin-top: 6px; }
.mb-article-content hr { border: none; border-top: 1px solid var(--border); margin: 26px 0; }

.mb-article-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 24px 0; }
.mb-article-tags-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.mb-tag { font-size: 12px; color: var(--primary-dark); background: var(--primary-soft); padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.mb-tag:hover { background: var(--primary); color: #fff; }

.mb-article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0; }
.mb-article-nav-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.mb-article-nav-item:hover { border-color: var(--primary); }
.mb-article-nav-prev { text-align: right; }
.mb-article-nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); font-weight: 700; }
.mb-article-nav-title { font-size: 14px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.mb-related { margin-top: 10px; }

/* ============================================================
   TAG / RUBRIK ARCHIVE
   ============================================================ */
.mb-tag-header { background: var(--primary-dark); padding: 30px 0; color: #fff; margin-bottom: 6px; }
.mb-tag-title { font-size: 30px; color: #fff; }
.mb-tag-description { color: rgba(255,255,255,0.85); margin-top: 6px; max-width: 720px; }

.mb-empty { padding: 40px 0; color: var(--text-muted); text-align: center; }

/* ============================================================
   PAGE / ERROR
   ============================================================ */
.mb-page { padding-top: 32px; padding-bottom: 48px; max-width: 820px; }
.mb-page-header { margin-bottom: 20px; }
.mb-page-title { font-size: 30px; }

.mb-error { text-align: center; padding: 80px 20px; }
.mb-error-code { font-family: var(--font-heading); font-size: 80px; font-weight: 800; color: var(--primary); line-height: 1; }
.mb-error-title { font-size: 24px; margin: 16px 0 8px; }
.mb-error-text { color: var(--text-muted); margin-bottom: 24px; }
.mb-error-home { display: inline-block; background: var(--primary); color: #fff; padding: 12px 24px; border-radius: 6px; font-weight: 600; }
.mb-error-home:hover { background: var(--primary-dark); color: #fff; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 30px; flex-wrap: wrap; }
.pagination .page-number, .pagination .newer-posts, .pagination .older-posts { padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-weight: 600; }
.pagination .page-number.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.mb-footer { background: var(--primary-dark); color: #fff; margin-top: 40px; }
.mb-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 36px 0 24px; }
.mb-footer-logo { max-height: 48px; margin-bottom: 10px; }
.mb-footer-title { color: #fff; font-size: 20px; margin-bottom: 8px; }
.mb-footer-brand p { color: rgba(255,255,255,0.8); font-size: 14px; }
.mb-footer-nav h4 { color: #fff; font-size: 14px; text-transform: uppercase; margin-bottom: 10px; }
.mb-footer-nav .nav { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.mb-footer-nav .nav a { color: rgba(255,255,255,0.85); font-size: 14px; }
.mb-footer-nav .nav a:hover { color: #fff; }
.mb-footer-bottom { border-top: 1px solid rgba(255,255,255,0.2); padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,0.75); }
.mb-footer-powered { font-style: italic; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .mb-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; }
    .mb-card-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .mb-card-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .mb-layout { grid-template-columns: 1fr; }
    .mb-sidebar { position: static; }
    .mb-hero-grid { grid-template-columns: 1fr; }
    .mb-hero-side { flex-direction: row; flex-wrap: wrap; }
    .mb-hero-side-inner { flex: 1 1 45%; }
}

@media (max-width: 768px) {
    .mb-nav-toggle { display: flex; }
    .mb-nav { display: none; }
    .mb-nav.open { display: block; }
    .mb-nav .nav { flex-direction: column; }
    .mb-nav .nav a { border-radius: 0; padding: 12px 20px; }
    .mb-topbar-tagline { display: none; }
    .mb-card-grid { grid-template-columns: 1fr; }
    .mb-card-grid-3, .mb-card-grid-4 { grid-template-columns: 1fr 1fr; }
    .mb-article-title { font-size: 24px; }
    .mb-article-nav { grid-template-columns: 1fr; }
    .mb-article-nav-prev { text-align: left; }
    .mb-footer-grid { grid-template-columns: 1fr; }
    .mb-hero-side { flex-direction: column; }
    .mb-hero-side-inner { flex: 1 1 100%; }
}

@media (max-width: 480px) {
    .mb-card-grid-3, .mb-card-grid-4 { grid-template-columns: 1fr; }
    .mb-section-title { font-size: 17px; }
    .mb-hero-title { font-size: 20px; }
    .mb-article-content { font-size: 16px; }
}
