/* =========================================================
   Polresta Banggai — Tema Portal Berita
   ========================================================= */

:root {
	--theme-color: #0a2f6e;
	--theme-dark: #06214e;
	--menu-hover: #ffc107;
	--menu-gradient: linear-gradient(to right, var(--theme-color), var(--theme-dark));
	--menu-text: #ffffff;
	--secondary-bg: #f8f9fa;
	--header-bg: #eaeaea;
	--header-text: #000000;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #212529;
}

/* ---------- Lebar kontainer utama ---------- */
.polres-grid {
	width: 100%;
	max-width: 1200px;
	padding-left: 15px;
	padding-right: 15px;
}

/* ---------- Utility warna tema ---------- */
.bg-theme { background-color: var(--theme-color) !important; }
.text-theme { color: var(--theme-color) !important; }
.btn-theme {
	background-color: var(--theme-color);
	color: #fff;
	border: 1px solid var(--theme-color);
}
.btn-theme:hover { background-color: var(--theme-dark); border-color: var(--theme-dark); color: #fff; }
.btn-outline-theme { border: 1px solid var(--theme-color); color: var(--theme-color); background: transparent; }
.btn-outline-theme:hover { background-color: var(--theme-color); color: #fff; }
.hr-theme { border: 0; border-top: 2px solid var(--theme-color); opacity: 1; }

/* ---------- Header atas ---------- */
#header-top {
	background-color: var(--header-bg) !important;
	color: var(--header-text);
}
#header-top small { color: var(--header-text); }
.custom-logo { max-height: 60px; width: auto; }
#header-top .custom-logo-link img { max-height: 60px; width: auto; }

.social-circle {
	width: 34px; height: 34px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: #fff;
	color: var(--theme-color);
	border: 1px solid #ddd;
	transition: .2s;
}
.social-circle:hover { background: var(--theme-color); color: #fff; }

/* ---------- Navigasi utama ---------- */
#main-nav { background: var(--menu-gradient) !important; }
#main-nav .nav-link {
	color: var(--menu-text) !important;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .3px;
	padding: 6px 10px;
	white-space: nowrap;
}
#main-nav .nav-link:hover { color: var(--menu-hover) !important; }
#main-nav .nav-link.active {
	background-color: #fff;
	color: var(--theme-color) !important;
	border-radius: 20px;
}
#main-nav .navbar-nav { justify-content: space-between; }
#main-nav .custom-logo { max-height: 40px; }

/* ---------- Menu kategori mobile (baris horizontal, bisa di-scroll) ---------- */
.polres-cat-scroll-wrap {
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}
.polres-cat-scroll {
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;      /* Firefox */
	-ms-overflow-style: none;   /* IE/Edge lama */
}
.polres-cat-scroll::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.polres-cat-list { gap: 0; }
.polres-cat-link {
	display: inline-block;
	padding: 11px 14px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	color: #333;
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 2px solid transparent;
}
.polres-cat-link:hover,
.polres-cat-list .current-menu-item > .polres-cat-link,
.polres-cat-list .current-cat > .polres-cat-link {
	color: var(--theme-color);
	border-bottom-color: var(--theme-color);
}

/* ---------- Headline carousel ---------- */
.headline-gradient {
	background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
}
.headline-title {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.headline-time { font-size: 12px; opacity: .9; }
.circle-nav {
	width: 40px; height: 40px;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.carousel-control-prev, .carousel-control-next { width: auto; opacity: 1; }
.carousel-control-prev { left: 10px; }
.carousel-control-next { right: 10px; }

/* ---------- Badge kategori ---------- */
.id-cat {
	display: inline-block;
	background-color: var(--theme-color);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 3px;
	line-height: 1.6;
}
.id-cat:hover { background-color: var(--theme-dark); }

/* ---------- Thumbnail berita ---------- */
.berita-thumb img { transition: transform .4s ease; }
.berita-thumb:hover img { transform: scale(1.06); }
.berita-time { font-size: 12px; }
.home-berita-title { font-size: 20px; font-weight: 600; line-height: 1.35; }

/* ---------- Garis pemisah judul seksi ---------- */
.hr-dash {
	border: 0;
	border-top: 2px dashed #ced4da;
	opacity: 1;
}

/* ---------- Klem baris ---------- */
.text-truncate-3-lines {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.text-truncate-2-lines {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Scroll horizontal "Info Hari Ini" ---------- */
.scroll-container {
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
	scrollbar-width: none;
}
.scroll-container::-webkit-scrollbar { display: none; }
.scroll-title-desktop {
	font-size: 14px; font-weight: 600; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.scroll-title-overlay {
	bottom: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .75), transparent);
	border-radius: 0 0 .375rem .375rem;
}
.scroll-overlay-text {
	display: -webkit-box;
	font-size: 14px; font-weight: 600; line-height: 1.4;
	color: #fff;
	-webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden;
	text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

/* ---------- Sidebar ---------- */
.polres-sidebar { width: 340px; max-width: 340px; }
@media (max-width: 991.98px) {
	.polres-sidebar { width: 100%; max-width: 100%; margin-top: 2rem; }
}
.polres-ad-widget { margin-bottom: 1.5rem; }
.polres-ad-widget img { width: 100%; height: auto; border-radius: 6px; }

.polres-widget-title {
	display: flex; align-items: center; gap: 8px; margin-bottom: 1rem;
}
.polres-widget-title > span:first-child {
	font-weight: 700; text-transform: uppercase; font-size: 16px;
}
.polres-widget-title .polres-line {
	flex: 1; height: 0; border-top: 2px dashed #ced4da;
}

/* Terpopuler */
.pop-num {
	width: 44px; height: 44px;
	background: #f8f9fa;
	color: var(--theme-color);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700;
}

/* List berita widget */
.polres-list-thumb {
	width: 80px; height: 80px; border-radius: 6px; overflow: hidden;
}
.polres-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.polres-list-title {
	font-size: 15px; font-weight: 600; line-height: 1.4;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Konten artikel tunggal ---------- */
.single h1 { font-size: 34px; }
@media (max-width: 767px) { .single h1 { font-size: 24px; } }
.content { font-size: 17px; line-height: 1.75; }
.content img { max-width: 100%; height: auto; border-radius: 6px; }
.content p { margin-bottom: 1.2rem; }
.content h2, .content h3 { margin-top: 1.8rem; margin-bottom: .8rem; font-weight: 700; }
.content blockquote {
	border-left: 4px solid var(--theme-color);
	padding-left: 1rem; color: #555; font-style: italic; margin: 1.5rem 0;
}

/* ---------- Pagination ---------- */
.pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 3px;
	border-radius: 6px;
	background: #f1f3f5;
	color: var(--theme-color);
	text-decoration: none;
	font-weight: 600;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--theme-color); color: #fff; }
.navigation.pagination { display: flex; justify-content: center; }

/* ---------- Banner header (di atas slider) ---------- */
.polres-header-banner { text-align: center; }
.polres-header-banner img { border-radius: 10px; }
.polres-header-banner a { display: block; }

/* ---------- Footer elegan ---------- */
.polres-footer { margin-top: 3rem; color: #cfd6e4; }
.polres-footer-top {
	background: linear-gradient(135deg, #0a2f6e 0%, #06214e 100%);
	background: linear-gradient(135deg, var(--theme-color) 0%, var(--theme-dark) 100%);
	padding: 3.5rem 0 2.5rem;
	position: relative;
	overflow: hidden;
}
.polres-footer-top::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 15% 20%, rgba(255,255,255,.06), transparent 40%),
		radial-gradient(circle at 85% 0%, rgba(255,193,7,.08), transparent 45%);
	pointer-events: none;
}
.polres-footer-top > * { position: relative; z-index: 1; }
.polres-footer-logo { max-height: 64px; width: auto; filter: brightness(0) invert(1); }
.polres-footer-about { font-size: 14px; line-height: 1.7; color: #b9c2d6; max-width: 340px; }

.polres-footer-title {
	color: #fff;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: .5px;
	margin-bottom: 1.1rem;
	padding-bottom: .6rem;
	position: relative;
}
.polres-footer-title::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	width: 40px; height: 3px;
	background: var(--menu-hover);
	border-radius: 2px;
}

.polres-footer-menu li,
.polres-contact li { margin-bottom: .7rem; }
.polres-footer-menu a,
.polres-contact a {
	color: #b9c2d6;
	text-decoration: none;
	transition: .2s;
	font-size: 14px;
}
.polres-footer-menu a:hover,
.polres-contact a:hover { color: var(--menu-hover); padding-left: 4px; }
.polres-footer-menu a::before {
	content: "›";
	margin-right: 8px;
	color: var(--menu-hover);
	font-weight: 700;
}

.polres-contact li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14px;
	color: #b9c2d6;
}
.polres-contact li svg { flex-shrink: 0; margin-top: 3px; color: var(--menu-hover); }

.polres-social-link {
	width: 38px; height: 38px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: rgba(255,255,255,.1);
	color: #fff;
	transition: .25s;
}
.polres-social-link:hover {
	background: var(--menu-hover);
	color: #06214e;
	transform: translateY(-3px);
}

.polres-footer-bottom {
	background: rgba(0,0,0,.25);
	color: #aeb7cc;
	font-size: 13px;
	padding: 1rem 0;
	border-top: 1px solid rgba(255,255,255,.08);
}
.polres-footer-bottom a { color: var(--menu-hover); text-decoration: none; }

/* ---------- Form pencarian ---------- */
#idSearch .form-control:focus,
.input-group .form-control:focus {
	box-shadow: none;
	border-color: var(--theme-color);
}

/* ---------- Responsif kolom sidebar ---------- */
@media (max-width: 991.98px) {
	.col-auto:has(.polres-sidebar) { width: 100%; }
}
