/*
Theme Name: Singkawang Information
Theme URI: https://singkawanginformation.com
Author: Singkawang Information
Author URI: https://singkawanginformation.com
Description: Tema WordPress portal berita modern berwarna hijau dan putih untuk Singkawang Information. Mendukung banner iklan, berita utama pilihan, ticker, berita populer berbasis tayangan, berita terkait, tombol berbagi, dan pengaturan kategori beranda.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: singkawang-information
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --si-green: #087f3d;
  --si-green-dark: #045c2b;
  --si-green-light: #eaf7ef;
  --si-white: #ffffff;
  --si-bg: #f4f6f5;
  --si-text: #17201b;
  --si-muted: #65716a;
  --si-border: #dfe7e2;
  --si-danger: #d62828;
  --si-radius: 14px;
  --si-shadow: 0 10px 30px rgba(13, 63, 34, 0.08);
  --si-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--si-text);
  background: var(--si-bg);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.7;
}
body.search-is-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--si-green); text-decoration: none; }
a:hover { color: var(--si-green-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.container { width: min(calc(100% - 32px), var(--si-container)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.topbar { background: var(--si-green-dark); color: #fff; font-size: 12px; }
.topbar-inner { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar a { color: #fff; }
.topbar-date { opacity: .9; }
.topbar-links { display: flex; gap: 18px; }

.site-header { background: var(--si-white); border-bottom: 1px solid var(--si-border); }
.header-main { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 10px; }
.site-branding { display: flex; align-items: center; gap: 14px; min-width: 230px; }
.custom-logo { max-height: 72px; width: auto; }
.site-title { margin: 0; font-size: clamp(22px, 3vw, 34px); line-height: 1.05; font-weight: 800; letter-spacing: -1px; }
.site-title a { color: var(--si-green-dark); }
.site-description { margin: 7px 0 0; color: var(--si-muted); font-size: 12px; }
.header-ad-wrap { flex: 0 1 728px; min-width: 0; }

.ad-slot { position: relative; width: 100%; margin-inline: auto; text-align: center; }
.ad-slot img { width: 100%; height: auto; object-fit: contain; margin-inline: auto; }
.ad-header { max-width: 728px; }
.ad-header img { max-height: 90px; }
.ad-sidebar { max-width: 300px; }
.ad-home, .ad-article_mid, .ad-article_bottom { max-width: 728px; margin-block: 24px; }
.ad-label { display: block; color: var(--si-muted); font-size: 9px; line-height: 1.4; letter-spacing: .8px; text-transform: uppercase; margin-bottom: 4px; }
.ad-placeholder { min-height: 76px; border: 1px dashed #b9c9bf; border-radius: 10px; color: #87948c; display: grid; place-items: center; background: #fafcfb; font-size: 12px; padding: 10px; }
.ad-sidebar.ad-placeholder { min-height: 250px; }
.sidebar > .ad-sidebar { background: #fff; border: 1px solid var(--si-border); border-radius: var(--si-radius); box-shadow: var(--si-shadow); padding: 14px; max-width: none; }
.sidebar > .ad-sidebar img { max-width: 300px; }
.home-feed-ad { background: #fff; border: 1px solid var(--si-border); border-radius: var(--si-radius); box-shadow: var(--si-shadow); padding: 14px; }
.article-inline-ad, .article-bottom-ad { border-block: 1px solid var(--si-border); padding-block: 18px; }

.main-nav { background: var(--si-green); position: sticky; top: 0; z-index: 50; box-shadow: 0 4px 14px rgba(4,92,43,.18); }
.nav-inner { min-height: 52px; display: flex; align-items: center; justify-content: space-between; }
.primary-menu { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.primary-menu li { position: relative; }
.primary-menu a { display: block; color: #fff; padding: 15px 14px; font-size: 13px; font-weight: 700; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { background: rgba(255,255,255,.14); }
.primary-menu .sub-menu { position: absolute; top: 100%; left: 0; min-width: 210px; list-style: none; margin: 0; padding: 7px; background: #fff; border-radius: 0 0 10px 10px; box-shadow: var(--si-shadow); display: none; }
.primary-menu .sub-menu a { color: var(--si-text); padding: 10px 12px; border-radius: 7px; }
.primary-menu .sub-menu a:hover { color: var(--si-green); background: var(--si-green-light); }
.primary-menu li:hover > .sub-menu { display: block; }
.menu-toggle { display: none; border: 0; background: transparent; color: #fff; padding: 12px; font-weight: 700; }
.nav-search { border: 0; color: #fff; background: transparent; padding: 12px 14px; display: flex; align-items: center; font-size: 24px; line-height: 1; }

.breaking-news { background: #fff; border-bottom: 1px solid var(--si-border); }
.breaking-inner { min-height: 44px; display: flex; align-items: center; gap: 12px; overflow: hidden; }
.breaking-label { flex: 0 0 auto; color: #fff; background: var(--si-danger); border-radius: 5px; padding: 5px 9px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; z-index: 2; }
.breaking-window { flex: 1; min-width: 0; overflow: hidden; }
.breaking-track { display: flex; width: max-content; animation: siTicker var(--si-ticker-speed, 35s) linear infinite; }
.breaking-window:hover .breaking-track { animation-play-state: paused; }
.breaking-group { display: flex; align-items: center; gap: 24px; padding-right: 24px; white-space: nowrap; }
.breaking-group a { color: var(--si-text); font-size: 12px; font-weight: 700; }
.breaking-group span { color: var(--si-green); font-size: 10px; }
@keyframes siTicker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .breaking-track { animation: none; } }

.search-modal[hidden] { display: none; }
.search-modal { position: fixed; inset: 0; z-index: 999; display: grid; place-items: start center; padding-top: min(18vh, 150px); }
.search-modal-backdrop { position: absolute; inset: 0; background: rgba(5, 25, 14, .75); backdrop-filter: blur(4px); }
.search-modal-dialog { position: relative; z-index: 2; width: min(calc(100% - 32px), 620px); background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.3); padding: 32px; }
.search-modal-dialog h2 { margin: 0 40px 18px 0; }
.search-close { position: absolute; top: 14px; right: 15px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--si-green-light); color: var(--si-green-dark); font-size: 27px; line-height: 1; }
.search-modal .search-field { font-size: 17px; padding: 14px; }
.search-modal .search-submit { padding-inline: 22px; }

.site-main { padding: 28px 0 50px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; color: var(--si-muted); font-size: 11px; }
.breadcrumbs a { font-weight: 700; }

.hero-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 18px; margin-bottom: 28px; }
.hero-main, .hero-small { position: relative; overflow: hidden; border-radius: var(--si-radius); background: #dce7e0; min-height: 280px; }
.hero-main { min-height: 490px; }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hero-small { min-height: 236px; }
.hero-main img, .hero-small img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .4s ease; }
.hero-main:hover img, .hero-small:hover img { transform: scale(1.035); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 28%, rgba(0,0,0,.88)); }
.hero-content { position: absolute; inset: auto 0 0; padding: 26px; color: #fff; z-index: 2; }
.hero-small .hero-content { padding: 17px; }
.hero-content a { color: #fff; }
.hero-title { margin: 9px 0 8px; font-size: clamp(24px, 3vw, 38px); line-height: 1.2; }
.hero-small .hero-title { font-size: 17px; margin-bottom: 4px; }
.hero-labels, .entry-labels, .card-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.post-meta { color: var(--si-muted); font-size: 11px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-content .post-meta { color: rgba(255,255,255,.82); }
.category-badge { display: inline-flex; padding: 4px 8px; border-radius: 5px; color: #fff !important; background: var(--si-green); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px; }
.editorial-label { display: inline-flex; padding: 4px 8px; border-radius: 5px; color: #fff; background: #7a4b00; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .35px; }
.editorial-label-sponsored { background: #7b1fa2; }
.editorial-label-mitra { background: #1565c0; }
.hero-content .editorial-label { background: rgba(0,0,0,.65); }

.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.content-column { min-width: 0; }
.section-card, .widget, .article-single, .page-card { background: #fff; border: 1px solid var(--si-border); border-radius: var(--si-radius); box-shadow: var(--si-shadow); }
.section-card { padding: 22px; margin-bottom: 26px; }
.section-heading { margin: 0 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--si-border); padding-bottom: 11px; }
.section-heading h2, .section-heading h1 { margin: 0; font-size: 21px; line-height: 1.25; position: relative; }
.section-heading h2::after, .section-heading h1::after { content: ''; position: absolute; height: 3px; width: 70px; background: var(--si-green); left: 0; bottom: -13px; }
.section-heading a { font-size: 12px; font-weight: 700; }

.news-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px; }
.news-card { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--si-border); }
.news-card:nth-last-child(-n+2) { padding-bottom: 0; border-bottom: 0; }
.news-thumb { display: block; aspect-ratio: 16/10; overflow: hidden; border-radius: 10px; background: #e5ece8; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.news-card:hover .news-thumb img, .related-card:hover .news-thumb img { transform: scale(1.04); }
.news-title { margin: 7px 0 7px; font-size: 17px; line-height: 1.4; }
.news-title a { color: var(--si-text); }
.news-title a:hover { color: var(--si-green); }
.news-excerpt { color: var(--si-muted); font-size: 12px; margin: 7px 0 0; }
.card-labels { min-height: 22px; }
.card-labels .category-badge, .card-labels .editorial-label { font-size: 8px; padding: 3px 6px; }

.category-block { margin-top: 26px; }
.category-feature { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; }
.feature-card .news-thumb { aspect-ratio: 16/9; }
.feature-card .news-title { font-size: 22px; }
.feature-card .card-labels { margin-top: 10px; }
.mini-list { display: grid; gap: 14px; }
.mini-card { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 12px; align-items: start; }
.mini-card .news-thumb { border-radius: 8px; }
.mini-card .news-title { font-size: 13px; margin-top: 2px; }

.sidebar { display: grid; gap: 22px; }
.widget { padding: 20px; }
.widget-title { margin: 0 0 16px; font-size: 17px; border-left: 4px solid var(--si-green); padding-left: 10px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 10px 0; border-bottom: 1px solid var(--si-border); }
.widget li:last-child { border-bottom: 0; }
.popular-item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding-block: 10px; border-bottom: 1px solid var(--si-border); }
.popular-item:last-child { border-bottom: 0; }
.popular-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--si-green-light); color: var(--si-green); font-weight: 900; }
.popular-title { display: block; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--si-text); }
.popular-views { display: block; margin-top: 4px; color: var(--si-muted); font-size: 9px; }

.article-single, .page-card { padding: clamp(22px, 4vw, 42px); }
.entry-title { margin: 9px 0 13px; font-size: clamp(27px, 4vw, 42px); line-height: 1.2; letter-spacing: -.5px; }
.article-meta { border-bottom: 1px solid var(--si-border); padding-bottom: 16px; }
.entry-featured { margin: 24px 0; border-radius: 12px; overflow: hidden; }
.entry-featured img { width: 100%; }
.entry-content { font-family: Verdana, Geneva, Tahoma, sans-serif; line-height: 1.9; overflow-wrap: break-word; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content h2, .entry-content h3 { line-height: 1.35; margin-top: 1.5em; }
.entry-content blockquote { margin: 1.4em 0; padding: 18px 22px; border-left: 5px solid var(--si-green); background: var(--si-green-light); border-radius: 0 10px 10px 0; }
.entry-content iframe { max-width: 100%; }
.entry-footer { border-top: 1px solid var(--si-border); margin-top: 28px; padding-top: 18px; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.post-tags a { padding: 5px 9px; border-radius: 6px; background: var(--si-green-light); font-size: 11px; font-weight: 700; }
.author-box { display: flex; gap: 16px; margin-top: 25px; padding: 20px; border-radius: 12px; background: #f7faf8; }
.author-box img { border-radius: 50%; width: 64px; height: 64px; }
.author-box p { margin: 4px 0 0; color: var(--si-muted); font-size: 12px; }

.share-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.share-buttons a, .share-buttons button { border: 1px solid var(--si-border); border-radius: 7px; color: var(--si-text); background: #fff; padding: 7px 11px; font-size: 10px; font-weight: 700; }
.share-buttons a:hover, .share-buttons button:hover { border-color: var(--si-green); color: var(--si-green); }
.share-buttons .share-whatsapp { color: #fff; background: #128c4a; border-color: #128c4a; }

.related-posts { margin-top: 26px; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.related-card .news-title { font-size: 14px; }
.related-card .news-thumb { aspect-ratio: 16/9; }

.post-navigation { margin: 24px 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-navigation a { display: block; height: 100%; background: #fff; border: 1px solid var(--si-border); border-radius: 10px; padding: 14px; color: var(--si-text); font-size: 12px; font-weight: 700; }

.archive-list { display: grid; gap: 20px; }
.archive-list .news-card { grid-template-columns: 250px minmax(0,1fr); }
.pagination { margin-top: 28px; }
.nav-links { display: flex; gap: 7px; flex-wrap: wrap; }
.page-numbers { min-width: 38px; height: 38px; display: grid; place-items: center; background: #fff; border: 1px solid var(--si-border); border-radius: 7px; font-weight: 700; }
.page-numbers.current, .page-numbers:hover { color: #fff; background: var(--si-green); border-color: var(--si-green); }

.search-form { display: flex; }
.search-field { width: 100%; border: 1px solid var(--si-border); border-radius: 8px 0 0 8px; padding: 10px 12px; min-width: 0; }
.search-submit { border: 0; color: #fff; background: var(--si-green); padding: 10px 14px; border-radius: 0 8px 8px 0; }

.site-footer { color: rgba(255,255,255,.86); background: var(--si-green-dark); }
.footer-widgets { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); gap: 28px; padding: 44px 0; }
.footer-title { color: #fff; margin: 0 0 14px; font-size: 18px; }
.site-footer a { color: rgba(255,255,255,.86); }
.site-footer a:hover { color: #fff; }
.footer-widgets ul { list-style: none; padding: 0; margin: 0; }
.footer-widgets li { padding: 6px 0; }
.footer-about p { font-size: 12px; }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.footer-social a { border: 1px solid rgba(255,255,255,.25); border-radius: 6px; padding: 5px 8px; font-size: 9px; }
.copyright { border-top: 1px solid rgba(255,255,255,.14); padding: 18px 0; font-size: 11px; text-align: center; }

.comments-area { margin-top: 26px; padding: 26px; background: #fff; border: 1px solid var(--si-border); border-radius: var(--si-radius); }
.comment-list { padding-left: 20px; }
.comment-body { padding: 15px 0; border-bottom: 1px solid var(--si-border); }
.comment-form input:not([type=submit]), .comment-form textarea { width: 100%; border: 1px solid var(--si-border); border-radius: 8px; padding: 10px; }
.form-submit .submit { border: 0; border-radius: 8px; color: #fff; background: var(--si-green); padding: 11px 18px; font-weight: 700; }

.not-found { text-align: center; padding: 70px 25px; }
.not-found h1 { font-size: 80px; margin: 0; color: var(--si-green); line-height: 1; }

@media (max-width: 1050px) {
  .header-main { align-items: center; }
  .site-branding { min-width: 210px; }
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .hero-main { min-height: 440px; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar > .ad-sidebar { max-width: none; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card:nth-last-child(-n+2) { padding-bottom: 20px; border-bottom: 1px solid var(--si-border); }
  .news-card:last-child { padding-bottom: 0; border-bottom: 0; }
  .footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar-links { display: none; }
  .header-main { flex-direction: column; align-items: stretch; min-height: 0; padding-block: 14px; gap: 12px; }
  .site-branding { justify-content: center; min-width: 0; text-align: center; }
  .custom-logo-link { margin-inline: auto; }
  .header-ad-wrap { flex: none; width: 100%; }
  .ad-header { max-width: 100%; }
  .ad-header img { max-height: none; }
  .menu-toggle { display: block; }
  .nav-inner { flex-wrap: wrap; }
  .menu-primary-container { width: 100%; display: none; order: 3; }
  .menu-primary-container.is-open { display: block; }
  .primary-menu { flex-direction: column; align-items: stretch; width: 100%; padding-bottom: 10px; }
  .primary-menu a { padding: 11px 8px; }
  .primary-menu .sub-menu { position: static; display: block; box-shadow: none; background: rgba(255,255,255,.09); padding-left: 15px; }
  .primary-menu .sub-menu a { color: #fff; }
  .breaking-label { font-size: 9px; }
  .breaking-group a { font-size: 11px; }
  .hero-grid { gap: 12px; }
  .hero-main { min-height: 370px; }
  .hero-side { gap: 12px; }
  .hero-small { min-height: 200px; }
  .hero-content { padding: 18px; }
  .hero-small .hero-title { font-size: 14px; }
  .category-feature, .footer-widgets { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .news-card, .archive-list .news-card { grid-template-columns: 130px minmax(0,1fr); gap: 12px; }
  .news-title { font-size: 14px; margin-top: 3px; }
  .news-excerpt { display: none; }
  .entry-title { font-size: 28px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .post-navigation .nav-links { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { width: min(calc(100% - 22px), var(--si-container)); }
  .hero-side { grid-template-columns: 1fr; }
  .hero-small { min-height: 210px; }
  .section-card { padding: 16px; }
  .news-card, .archive-list .news-card { grid-template-columns: 112px minmax(0,1fr); }
  .post-meta { gap: 6px; }
  .site-description { display: none; }
  .article-single, .page-card { padding: 18px; }
  .related-grid { grid-template-columns: 1fr; }
  .search-modal-dialog { padding: 24px 18px; }
  .share-buttons a, .share-buttons button { flex: 1 1 auto; text-align: center; }
}
