:root {
    --bg: #ffffff;
    --fg: #0f172a;       /* slate-900 */
    --muted: #475569;    /* slate-600 */
    --primary: #2563eb;  /* blue-600 */
    --border: #e2e8f0;   /* slate-200 */
}
* { 
    box-sizing: border-box; 
}
html, body { 
    margin: 0; 
    padding: 0; 
    background: var(--bg); 
    color: var(--fg); 
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; 
    line-height: 1.5; 
}
a { 
    color: var(--primary); 
    text-decoration: none; 
}
a:hover { 
    text-decoration: underline; 
}

/* Header & Navigation */
.header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
    z-index: 999;
}
.navigation {
    max-width: 1100px;
    margin: auto;
    padding: 8px 10px;
    display: flex;
    align-items: center;
}
.logo a {
    font-size: 22px;
    font-weight: 700;
    color: #e11d48;
    text-decoration: none;
}
.nav-logo {
    margin-bottom: -9px;
}
.nav-menu {
    display: flex;
    gap: 24px;
    margin: auto;
}
.nav-menu a {
    display: block;
    text-decoration: none;
    color: #54595d;
    padding: 3px 5px;
    border-radius: 4px;
    transition: background-color .2s ease, color .2s ease;
}
.nav-menu a:hover {
    background-color: #eaecf0;
    color: #000;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.search-box {
    position: relative;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 14px;
}
.search-box input {
    width: 200px;
    padding: 7px 12px 7px 34px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
}
.search-box input:focus {
    outline: none;
    border-color: #e11d48;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}
.search-box {
    display: flex;
    align-items: center;
    padding: 0;
    background: #fff;
}
#searchResult {
    padding: 5px 0;
    position: fixed;
    background: #fff;
    border: 1px solid #a2a9b1;
    z-index: 99999;
    display: none;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 10px;
}
.search-listo a {
    display: block;
    max-width: 50ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* breadcrumb */
.breadcrumb {
    background: #fff;
    border-bottom: 1px solid #eee;
}
.breadcrumb-list {
    max-width: 1100px;
    margin: auto;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.breadcrumb-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    font-size: 14px;
}
.breadcrumb-left a {
    color: #54595d;
    text-decoration: none;
    white-space: nowrap;
}
.breadcrumb-left span {
    color: #aaa;
}
.breadcrumb-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #525252;
}
.breadcrumb-share button {
    background: #54595d;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
}
.breadcrumb-share i {
    margin-right: 6px;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
    .navigation {
        justify-content: space-between;
    }
    .nav-menu {
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 16px;
       gap: 14px;
        display: none;
        border-bottom: 1px solid #eee;
    }
    .nav-menu.active {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .breadcrumb-title {
        max-width: 140px;
    }
}

/* Article */
#gempa-wiki {
    max-width: 900px;
    margin: auto;
    padding: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #202122;
}
#gempa-wiki h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid #a2a9b1;
    padding-bottom: 4px;
}
#gempa-wiki .meta {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
}
#gempa-wiki .infobox {
    float: right;
    clear: right;
    margin: 0 0 20px 20px;
    width: 280px;
    font-size: 14px;
    background: #f8f9fa;
    border: 1px solid #eaecf0;
    border-collapse: collapse;
}
#gempa-wiki .infobox caption {
    background: #dce2e8;
    font-weight: bold;
    text-align: center;
    padding: 6px;
    border-bottom: 1px solid #a2a9b1;
}
#gempa-wiki .infobox td {
    padding: 6px;
    border-bottom: 1px solid #eaecf0;
}
#gempa-wiki #map {
    width: 100%;
    height: 220px;
    background: #ccc;
}
#gempa-wiki p {
    margin: 12px 0;
    font-size: 15px;
}

/* responsive */
@media (max-width: 768px) {
    #gempa-wiki .infobox {
        float: none;
        margin: 20px auto;
        width: 100%;
    }
}
#map {
    width: 100%;
    height: 220px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin: 10px 0;
    z-index: 99;
}

.gempa-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
}
.gempa-list li {

    border-bottom: 1px solid #ddd;
    margin-bottom: 5px;
}
.gempa-list li:last-child {
    border-bottom: none;
}
.gempa-list strong {
    display: block;
    font-weight: bold;
    color: #333;
}
.gempa-list .meta {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}
.gempa-list .mag {
    color: #c00;
    font-weight: bold;
}

/* Container, Sidebar & Main Content */
.container {
    max-width: 1100px;
    margin: auto;
    padding-top: 10px;
    padding-right: 10px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
}
.sidebar {
    padding: 10px;
}
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar h2 {
    margin: 0;
}
.sidebar a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}
.article {
    min-width: 0;
}
.article h1 {
    font-size: 28px;
    line-height: 1.3;
    margin: 0 0 8px;
}
.meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}
.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 16px 0;
}
.article-body p {
    margin-bottom: 16px;
    font-size: 16px;
}
@media (max-width: 900px) {
    .container {
        grid-template-columns: 1fr;
        padding: 0 10px;
        margin-top: 20px;
    }
    .article {
        order: 1;
    }
    .sidebar {
        order: 2;
        margin-top: 24px;
        padding: 0;
    }
}

/* Home Table List Gempa */
.wiki-plus {
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wiki-row {
    display: flex;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid #eaecf0;
}
.wiki-left {
    min-width: 52px;
    text-align: center;
}
.mag {
    font-size: 18px;
    font-weight: 600;
    color: #202122;
}
.sr {
    font-size: 11px;
    color: #54595d;
}
.wiki-right {
    flex: 1;
}
.wiki-title {
    font-size: 16px;
    display: block;
    text-decoration: none;
    color: #202122;
    padding: 3px 5px;
    border-radius: 4px;
    transition: background-color .2s ease, color .2s ease;
}
.wiki-title:hover {
    color: #4e524f;
    text-decoration: none;
}
.wiki-meta {
    font-size: 13px;
    color: #54595d;
    margin-top: 2px;
}

/* Magazine */
.gempa-wrap{
    max-width: 1100px;
    margin: 10px auto;
    padding: 0 10px;
}
.judul-gempa{
    font-size: 18px;
    font-weight:700;
    margin-bottom:5px;
    padding-bottom:5px;
}
.judul-gempa span{
    font-size:13px;
    font-weight:500;
    color:#54595d;
}
.gempa-row{
    display:flex;
    gap:5px;
    overflow-x:auto;
    padding-bottom:8px;
}
.gempa-row::-webkit-scrollbar{
    height:6px;
}
.gempa-row::-webkit-scrollbar-thumb{
    background:#d0d0d0;
    border-radius:10px;
}
.gempa-card{
    min-width:135px;
    max-width:135px;
    background:#fff;
    border:1px solid #dcdcdc;
    border-radius: 6px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}
.map-box{
    height:82px;
    overflow:hidden;
    background:#eaeaea;
    position:relative;
}
.map-box img{
    width:100%;
    position:absolute;
    left:0;
    top:0;
    transform: translateY(-20px) scale(1.52);
}
.gempa-info{
    padding: 7px 10px;
    line-height:1.4;
    display:flex;
    flex-direction:column;
    flex:1;
}
.gempa-info strong{
    font-size:15px;
    color:#54595d;
}
.gempa-info span{
    font-size:14px;
    margin-top:2px;
}
.gempa-info small{
    margin-top:auto;
    font-size:12px;
    color:#64748b;
}
.gempa-link{
    display:flex;
    text-decoration:none;
    color:inherit;
}
.gempa-link:hover{
    text-decoration: none;
}
.gempa-link *{
    color:inherit;
}
.gempa-card{
    height:100%;
}

/* LEFTBAR – WIKI MODERN */
.wiki-leftbar {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #202122;
}
.wiki-leftbar-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #eaecf0;
}
.wiki-leftbar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wiki-leftbar-item {
    padding: 8px 0;
    border-bottom: 1px dotted #eaecf0;
}
.wiki-leftbar-item:last-child {
    border-bottom: none;
}
.wiki-leftbar-item a {
    color: #202122;
    text-decoration: none;
    font-weight: 600;
}
.wiki-leftbar-item a:hover {
    text-decoration: none;
    color: #4e524f;
}
.wiki-leftbar-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 12px;
    color: #54595d;
}
.wiki-mag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
    background: #f8f9fa;
    border: 1px solid #eaecf0;
}
.wiki-mag.high {
    color: #b32424;
    border-color: #f3c0c0;
    background: #fff5f5;
}
@media (max-width: 900px) {
    .wiki-leftbar {
        margin: 0;
        padding: 0;
    }
}

/* Sidebar Gempa Terbaru */
.gempa-terbaru{
    list-style:none;
    margin:0;
    padding:0;
    font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
    font-size:14px;
    line-height:1.5;
}
.gempa-terbaru li{
    padding:5px 0;
    border-bottom:1px solid #eaecf0;
}
.gempa-terbaru li:last-child{
    border-bottom:none;
}
.gempa-wilayah{
    max-width:260px; /* sesuaikan */
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    color:#00000;
}
.gempa-meta{
    color:#54595d;
    font-size:13px;
}
.gempa-mag{
    color:#54595d;
}
.gempa-time{
    font-size:12px;
    color:#72777d;
    margin-top:2px;
}
.gempa-potensi{
    font-size:13px;
    color:#54595d;
    margin-top:2px;
}
@media (max-width: 768px) {
    .gempa-wilayah {
        max-width: 380px;
    }
}

/* IMAGE FLOAT LEFT */
.wiki-thumb{
    width:130px;
    float:left;
    margin:0 10px 5px 0;
    border:1px solid #c8ccd1;
    background:#f8f9fa;
    padding:0;
    font-size:13px;
}
.thumb-wrap{
    cursor:pointer;
    background:#fff;
}
.thumb-wrap img{
    width:100%;
    display:block;
}
.wiki-caption{
    padding:6px 4px 2px;
    line-height:1.4;
}
.wiki-caption .copyright{
    float:right;
    font-size:12px;
    color:#54595d;
}
a{
    color:#0645ad;
    text-decoration:none;
}
a:hover{
    text-decoration:underline;
}
.clearfix::after{
    content:"";
    display:block;
    clear:both;
}
.lightbox{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.85);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
}
.lightbox img{
    max-width:90%;
    max-height:90%;
}
.lightbox .close{
    position:absolute;
    top:20px;
    right:30px;
    font-size:32px;
    color:#fff;
    cursor:pointer;
}

/* Footer Style */
.footer {
    max-width: 1100px;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    margin-top: 10px;
    font-size: 13px;
    color: var(--muted);
    padding: var(--footer-padding) 12px;
}
.footer__inner{
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 10px 10px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}
.footer__left{
    min-width: 220px;
    flex: 1 1 600px;
}
.footer__last-edited{
    color: var(--text);
    margin-bottom: 10px;
    font-size: 14px;
}
.footer__license{
    margin-bottom: 10px;
    line-height: 1.35;
}
.footer__license a,
.footer__links a{
    color: var(--link);
    text-decoration: underline;
}
.footer__links{
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.footer__links a{
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
}
.footer__links a:hover{
    color:var(--link);
    text-decoration: underline;
}
.footer__right{
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}
.badge{
    display:inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 4px;
    min-width: 82px;
    height: 36px;
}
.badge img{
    max-height:22px;
    display:block;
}

@media (max-width:640px){
    .footer__inner{
        gap: 10px;
        padding: 10px 10px;
        margin: 10px 0;
    }
    .footer__right{
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }
    .footer__left{
        order: 2;
    }
    .footer__right{
        order: 1;
    }
}