/*
Theme Name: Necveal Mars
Theme URI: https://example.com/necveal-mars
Author: Necveal Mars
Description: Tema WordPress berita modern, responsif, cepat, dan SEO friendly. Slider utama, kartu unggulan, daftar postingan, sidebar Berita Terbaru. Warna, jumlah slider, jumlah postingan, dan jumlah berita terbaru dapat diatur dari Customizer.
Version: 1.2.1
Requires at least: 5.8
Tested up to: 6.6
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: necveal-mars
Tags: news, blog, two-columns, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ========== Variabel warna (dioverride oleh Customizer) ========== */
:root {
	--bm-primary: #990000;
	--bm-primary-dark: #7a0000;
	--bm-accent: #e60000;
	--bm-text: #222222;
	--bm-bg: #ffffff;
	--bm-on-primary: #ffffff;
	--bm-radius: 4px;
	--bm-gap: 12px;
	--bm-container: 1180px;
}

/* ========== Reset ringan ========== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bm-bg);
	color: var(--bm-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bm-primary); text-decoration: none; }
a:hover, a:focus { color: var(--bm-accent); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--bm-primary); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: #000;
	display: block; height: auto; left: 6px; padding: 12px 18px; top: 6px;
	width: auto; z-index: 100000;
}
.bm-container { max-width: var(--bm-container); margin: 0 auto; padding: 0 16px; }

/* ========== Top bar ========== */
.bm-topbar {
	background: var(--bm-primary);
	color: var(--bm-on-primary);
	font-size: 12px;
	line-height: 1.4;
	padding: 5px 0;
}
.bm-topbar .bm-container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ========== Header ========== */
.bm-header { background: var(--bm-bg); padding: 12px 0; }
.bm-header .bm-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bm-logo a, .bm-logo .site-title-text {
	display: flex; align-items: center; justify-content: center;
	background: var(--bm-primary); color: var(--bm-on-primary);
	min-width: 140px; min-height: 42px; padding: 6px 18px;
	font-weight: 700; font-size: 18px; letter-spacing: .3px; line-height: 1.2;
}
.bm-logo .custom-logo-link { background: transparent; min-width: 0; min-height: 0; padding: 0; }
.bm-logo img.custom-logo { max-height: 44px; width: auto; }
.bm-logo .site-title-text { margin: 0; }

.bm-nav { margin-left: auto; }
.bm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bm-nav li { position: relative; }
.bm-nav a {
	display: block; background: var(--bm-primary); color: var(--bm-on-primary);
	padding: 7px 16px; font-size: 14px; line-height: 1.3; text-align: center;
	border-radius: 2px;
}
.bm-nav a:hover, .bm-nav .current-menu-item > a { background: var(--bm-primary-dark); color: var(--bm-on-primary); }
.bm-nav ul ul {
	display: none; position: absolute; top: 100%; left: 0; z-index: 50;
	flex-direction: column; gap: 2px; min-width: 180px; padding-top: 2px;
}
.bm-nav li:hover > ul, .bm-nav li:focus-within > ul { display: flex; }
.bm-nav ul ul a { text-align: left; white-space: nowrap; }

.bm-menu-toggle {
	display: none; background: var(--bm-primary); color: var(--bm-on-primary);
	border: 0; padding: 8px 14px; font-size: 14px; cursor: pointer; border-radius: var(--bm-radius);
}

/* ========== Slider ========== */
.bm-slider { position: relative; overflow: hidden; background: var(--bm-primary); margin-bottom: var(--bm-gap); }
.bm-slides { display: flex; transition: transform .6s ease; will-change: transform; }
.bm-slide { position: relative; flex: 0 0 100%; min-height: 380px; display: block; color: #fff; }
.bm-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bm-slide::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.05) 65%);
}
.bm-slide-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 24px 64px 28px; max-width: 820px; }
.bm-slide-caption h2 { color: #fff; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.25; margin: 0 0 6px; }
.bm-slide-caption p { font-size: 14px; line-height: 1.5; margin: 0; font-weight: 400; opacity: .95; }
.bm-slide-nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
	background: rgba(0,0,0,.45); color: #fff; border: 0; width: 34px; height: 34px;
	font-size: 16px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.bm-slide-nav:hover { background: var(--bm-primary); }
.bm-slide-prev { left: 12px; }
.bm-slide-next { right: 12px; }
.bm-dots { position: absolute; right: 16px; bottom: 12px; z-index: 3; display: flex; gap: 6px; }
.bm-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0; }
.bm-dots button.is-active { background: #fff; }

/* ========== Kartu unggulan ========== */
.bm-featured { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--bm-gap); margin-bottom: var(--bm-gap); }
.bm-card { position: relative; display: block; min-height: 210px; background: var(--bm-primary); color: #fff; overflow: hidden; }
.bm-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bm-card:hover img { transform: scale(1.05); }
.bm-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,0) 65%); }
.bm-card-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 12px 14px; }
.bm-card-body h3 { color: #fff; font-size: 15px; line-height: 1.3; margin: 0 0 3px; }
.bm-card-body p { margin: 0; font-size: 12px; line-height: 1.4; font-weight: 400; opacity: .9; }

/* ========== Layout utama ========== */
.bm-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-bottom: 28px; }

.bm-post {
	display: grid; grid-template-columns: 240px 1fr; border: 1px solid var(--bm-accent);
	margin-bottom: var(--bm-gap); background: var(--bm-bg); min-height: 150px;
}
.bm-post-thumb { position: relative; background: var(--bm-primary); display: block; min-height: 150px; }
.bm-post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bm-post-body { padding: 14px 20px; display: flex; flex-direction: column; justify-content: center; }
.bm-post-date { color: var(--bm-primary); font-weight: 600; font-size: 12px; }
.bm-post-title { font-size: clamp(17px, 1.8vw, 22px); line-height: 1.3; margin: 3px 0 5px; }
.bm-post-title a { color: var(--bm-primary); }
.bm-post-excerpt { color: var(--bm-text); font-weight: 400; font-size: 14px; line-height: 1.55; margin: 0; }

/* ========== Sidebar ========== */
.bm-sidebar .bm-widget, .bm-latest { border: 1px solid var(--bm-accent); padding: 12px 16px 14px; background: var(--bm-bg); margin-bottom: var(--bm-gap); }
.bm-widget-title { font-size: 17px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid #ccc; text-transform: uppercase; letter-spacing: .3px; }
.bm-latest ol { list-style: none; margin: 0; padding: 0; }
.bm-latest li { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed #e5e5e5; }
.bm-latest li:last-child { border-bottom: 0; }
.bm-latest .num { font-size: 20px; font-weight: 700; color: var(--bm-primary); min-width: 28px; text-align: center; line-height: 1; }
.bm-latest a { font-weight: 600; font-size: 13px; color: var(--bm-primary); display: block; line-height: 1.35; }
.bm-latest time { display: block; font-size: 11px; font-weight: 400; color: #777; margin-top: 2px; }

/* ========== Paginasi ========== */
.bm-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: 22px 0 32px; }
.bm-pagination .page-numbers {
	background: var(--bm-primary); color: var(--bm-on-primary); min-width: 34px; height: 34px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 4px; font-size: 14px; font-weight: 600; padding: 0 10px;
}
.bm-pagination .page-numbers.current, .bm-pagination a.page-numbers:hover { background: var(--bm-accent); }
.bm-pagination .prev, .bm-pagination .next { background: transparent; color: var(--bm-primary); font-size: 16px; }
.bm-pagination .prev:hover, .bm-pagination .next:hover { background: transparent; color: var(--bm-accent); }
.bm-pagination .dots { background: transparent; color: var(--bm-primary); }

/* ========== Footer ========== */
.bm-footer { border-top: 1px solid #ddd; padding: 14px 0; text-align: center; color: #555; font-weight: 400; font-size: 13px; }
.bm-footer a { color: var(--bm-primary); }
.bm-footer-menu { list-style: none; display: flex; gap: 14px; justify-content: center; padding: 0; margin: 0 0 8px; flex-wrap: wrap; }

/* ========== Konten single / page / arsip ========== */
.bm-article { margin-bottom: 32px; }
.bm-article .entry-title { font-size: clamp(22px, 2.8vw, 30px); }
.bm-meta { color: #666; font-size: 13px; margin-bottom: 14px; }
.bm-article .bm-hero { margin: 0 0 16px; }
.bm-article .entry-content { font-size: 16px; line-height: 1.75; }
.bm-article .entry-content img { margin: 1em 0; }
.bm-article .entry-content a { text-decoration: underline; }
.bm-archive-title { font-size: 22px; border-bottom: 2px solid var(--bm-primary); padding-bottom: 6px; margin-bottom: 16px; }
.bm-breadcrumb { font-size: 13px; margin-bottom: 10px; color: #666; }
.bm-post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0; flex-wrap: wrap; font-size: 14px; }
.bm-comments { margin-top: 32px; }
.bm-comments .comment-list { list-style: none; padding: 0; }
.bm-comments .comment-body { border: 1px solid #ddd; padding: 12px; margin-bottom: 10px; }
.bm-comments input[type=text], .bm-comments input[type=email], .bm-comments input[type=url], .bm-comments textarea,
.search-form input[type=search] { width: 100%; padding: 8px 10px; border: 1px solid #bbb; font: inherit; }
.bm-comments input[type=submit], .search-submit {
	background: var(--bm-primary); color: var(--bm-on-primary); border: 0; padding: 8px 18px; cursor: pointer; font: inherit;
}
.bm-empty { padding: 32px 0; text-align: center; }

/* WordPress core alignment */
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { display: block; margin: 1em auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: 13px; color: #666; }

/* ========== Responsif ========== */
@media (max-width: 1024px) {
	.bm-featured { grid-template-columns: repeat(2, 1fr); }
	.bm-main { grid-template-columns: 1fr; }
	.bm-slide { min-height: 340px; }
}
@media (max-width: 820px) {
	.bm-menu-toggle { display: inline-block; }
	.bm-header .bm-container { flex-wrap: wrap; }
	.bm-nav { width: 100%; display: none; margin-left: 0; }
	.bm-nav.is-open { display: block; }
	.bm-nav ul { flex-direction: column; gap: 3px; }
	.bm-nav a { width: 100%; text-align: left; }
	.bm-nav ul ul { position: static; display: flex; padding-left: 14px; }
}
@media (max-width: 640px) {
	.bm-post { grid-template-columns: 1fr; }
	.bm-post-thumb { min-height: 180px; }
	.bm-post-body { padding: 12px 14px; }
	.bm-slide { min-height: 260px; }
	.bm-slide-caption { padding: 16px 48px 20px; }
	.bm-slide-caption p { display: none; }
	.bm-featured { grid-template-columns: 1fr; }
	.bm-card { min-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* ========== Sidebar sticky (desktop) ========== */
.bm-main > .bm-sidebar { align-self: start; }
@media (min-width: 1025px) {
	.bm-sticky-sidebar .bm-sidebar {
		position: -webkit-sticky;
		position: sticky;
		top: 16px;
	}
	.admin-bar.bm-sticky-sidebar .bm-sidebar { top: 48px; }
}

/* ========== Artikel serupa ========== */
.bm-similar { margin: 32px 0 26px; }
.bm-similar-heading {
	font-size: 17px; margin: 0 0 14px; padding-left: 10px;
	border-left: 4px solid var(--bm-primary); line-height: 1.2;
	text-transform: uppercase; letter-spacing: .4px;
}
.bm-similar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bm-similar-item {
	display: flex; flex-direction: column; background: var(--bm-bg);
	border: 1px solid #e4e4e4; border-radius: 6px; overflow: hidden;
	color: var(--bm-text); transition: box-shadow .2s, transform .2s;
}
.bm-similar-item:hover { box-shadow: 0 6px 18px rgba(0,0,0,.12); transform: translateY(-2px); color: var(--bm-text); }
.bm-similar-thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: var(--bm-primary); overflow: hidden; }
.bm-similar-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.bm-similar-item:hover .bm-similar-thumb img { transform: scale(1.05); }
.bm-similar-cat {
	position: absolute; left: 10px; top: 10px; z-index: 2;
	background: var(--bm-primary); color: var(--bm-on-primary);
	font-size: 11px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 3px;
}
.bm-similar-body { display: block; padding: 12px 14px 14px; }
.bm-similar-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--bm-text); margin-bottom: 6px; }
.bm-similar-item:hover .bm-similar-title { color: var(--bm-primary); }
.bm-similar-body time { display: block; font-size: 12px; color: #777; }
@media (max-width: 640px) {
	.bm-similar-grid { grid-template-columns: 1fr; }
}
