/*
 * SA Base — CSS utama.
 * Mobile-first. Breakpoint: 640px (tablet) dan 960px (desktop).
 * Tanpa font eksternal, tanpa framework.
 */

:root {
	--sa-primary: #1e3a8a;
	--sa-primary-dark: #172554;
	--sa-accent: #f59e0b;
	--sa-text: #111827;
	--sa-muted: #4b5563;
	--sa-bg: #ffffff;
	--sa-bg-alt: #f8fafc;
	--sa-border: #e2e8f0;
	--sa-radius: 12px;
	--sa-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
	--sa-container: 1120px;
	--sa-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--sa-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Reset ringan ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	font-family: var(--sa-font);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--sa-text);
	background: var(--sa-bg);
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--sa-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--sa-primary-dark);
}

:focus-visible {
	outline: 3px solid var(--sa-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

h1,
h2,
h3,
h4 {
	line-height: 1.25;
	margin: 0 0 0.5em;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.sa-container {
	width: 100%;
	max-width: var(--sa-container);
	margin: 0 auto;
	padding: 0 1rem;
}

.sa-main {
	display: block;
	min-height: 40vh;
}

.sa-section {
	padding: 2.5rem 0;
}

.sa-section--alt {
	background: var(--sa-bg-alt);
	border-block: 1px solid var(--sa-border);
}

.sa-section__title {
	margin-bottom: 1.25rem;
}

/* ---------- Skip link ---------- */
.sa-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--sa-primary);
	color: #fff;
	padding: 0.6rem 1rem;
	border-radius: 0 0 var(--sa-radius) 0;
}

.sa-skip-link:focus {
	left: 0;
	color: #fff;
}

/* ---------- Header ---------- */
.sa-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	border-bottom: 1px solid var(--sa-border);
	backdrop-filter: saturate(180%) blur(8px);
}

.sa-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 64px;
}

.sa-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	color: var(--sa-text);
	text-decoration: none;
	font-size: 1.05rem;
}

.sa-logo__mark {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: var(--sa-primary);
	color: #fff;
	font-size: 0.8rem;
	letter-spacing: 0.02em;
}

.sa-nav-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: none;
	border: 1px solid var(--sa-border);
	border-radius: 8px;
	padding: 0.5rem 0.75rem;
	font: inherit;
	color: var(--sa-text);
	cursor: pointer;
}

.sa-nav-toggle__bars,
.sa-nav-toggle__bars::before,
.sa-nav-toggle__bars::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	position: relative;
	content: "";
}

.sa-nav-toggle__bars::before { position: absolute; top: -6px; }
.sa-nav-toggle__bars::after  { position: absolute; top: 6px; }

.sa-nav {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: var(--sa-bg);
	border-bottom: 1px solid var(--sa-border);
	padding: 1rem;
	box-shadow: var(--sa-shadow);
}

.sa-nav.is-open {
	display: block;
}

.sa-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.sa-menu a {
	display: block;
	padding: 0.5rem 0.25rem;
	color: var(--sa-text);
	text-decoration: none;
	font-weight: 500;
}

.sa-menu a:hover {
	color: var(--sa-primary);
}

.sa-nav__actions {
	margin-top: 0.75rem;
}

/* ---------- Tombol ---------- */
.sa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1.1rem;
	border-radius: 999px;
	border: 2px solid transparent;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sa-btn--primary {
	background: var(--sa-primary);
	color: #fff;
}

.sa-btn--primary:hover {
	background: var(--sa-primary-dark);
	color: #fff;
}

.sa-btn--outline {
	background: transparent;
	border-color: var(--sa-primary);
	color: var(--sa-primary);
}

.sa-btn--outline:hover {
	background: var(--sa-primary);
	color: #fff;
}

.sa-btn--wa {
	background: #128c7e;
	color: #fff;
}

.sa-btn--wa:hover {
	background: #0b6b60;
	color: #fff;
}

/* ---------- Hero ---------- */
.sa-hero {
	padding: 3rem 0 2.5rem;
	background: linear-gradient(180deg, var(--sa-bg-alt), var(--sa-bg));
	border-bottom: 1px solid var(--sa-border);
}

.sa-hero h1 {
	max-width: 22ch;
}

.sa-hero p {
	max-width: 60ch;
	color: var(--sa-muted);
	font-size: 1.075rem;
}

.sa-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

/* ---------- Grid & kartu ---------- */
.sa-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

.sa-card {
	display: flex;
	flex-direction: column;
	background: var(--sa-bg);
	border: 1px solid var(--sa-border);
	border-radius: var(--sa-radius);
	overflow: hidden;
	box-shadow: var(--sa-shadow);
}

.sa-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--sa-bg-alt);
}

.sa-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sa-card__body {
	padding: 1rem 1.1rem 1.2rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

.sa-card__title {
	font-size: 1.1rem;
	margin: 0;
}

.sa-card__title a {
	color: var(--sa-text);
	text-decoration: none;
}

.sa-card__title a:hover {
	color: var(--sa-primary);
	text-decoration: underline;
}

.sa-card__excerpt {
	margin: 0;
	color: var(--sa-muted);
	font-size: 0.95rem;
}

.sa-badge {
	display: inline-block;
	align-self: flex-start;
	padding: 0.15rem 0.6rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--sa-primary) 10%, white);
	color: var(--sa-primary-dark);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* ---------- Meta & breadcrumbs ---------- */
.sa-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	color: var(--sa-muted);
	font-size: 0.875rem;
	margin: 0;
}

.sa-breadcrumbs {
	font-size: 0.85rem;
	margin: 1.25rem 0;
	color: var(--sa-muted);
}

.sa-breadcrumbs ol {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0;
	padding: 0;
}

.sa-breadcrumbs li + li::before {
	content: "›";
	margin-right: 0.35rem;
	color: var(--sa-muted);
}

.sa-breadcrumbs a {
	color: var(--sa-muted);
}

/* ---------- Daftar isi ---------- */
.sa-toc {
	background: var(--sa-bg-alt);
	border: 1px solid var(--sa-border);
	border-radius: var(--sa-radius);
	padding: 1rem 1.25rem;
	margin: 0 0 1.5rem;
	font-size: 0.95rem;
}

.sa-toc__title {
	font-size: 1rem;
	margin: 0 0 0.5rem;
}

.sa-toc ol {
	margin: 0;
	padding-left: 1.2rem;
}

.sa-toc li {
	margin: 0.2rem 0;
}

/* ---------- Single / page ---------- */
.sa-single__header,
.sa-page__header {
	margin-bottom: 1.25rem;
}

.sa-single__title,
.sa-page__title {
	margin-bottom: 0.5rem;
}

.sa-single__media {
	margin: 0 0 1.5rem;
	border-radius: var(--sa-radius);
	overflow: hidden;
}

.sa-single__media img {
	display: block;
	width: 100%;
}

.sa-single__layout {
	max-width: 72ch;
}

.sa-related {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--sa-border);
}

/* ---------- Prose ---------- */
.entry-content {
	max-width: none;
}

.sa-prose {
	max-width: 72ch;
}

.entry-content > * + * {
	margin-top: 1em;
}

.entry-content h2 {
	margin-top: 2rem;
	scroll-margin-top: 84px;
}

.entry-content h3 {
	margin-top: 1.5rem;
	scroll-margin-top: 84px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4rem;
}

.entry-content li + li {
	margin-top: 0.35rem;
}

.entry-content blockquote {
	margin: 1.5rem 0;
	padding: 0.75rem 1.25rem;
	border-left: 4px solid var(--sa-primary);
	background: var(--sa-bg-alt);
	color: var(--sa-muted);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--sa-border);
	padding: 0.5rem 0.65rem;
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: var(--sa-bg-alt);
}

.entry-content figure {
	margin: 1.5rem 0;
}

.entry-content figcaption {
	font-size: 0.85rem;
	color: var(--sa-muted);
	margin-top: 0.4rem;
}

.entry-content code {
	font-family: var(--sa-mono);
	font-size: 0.9em;
	background: var(--sa-bg-alt);
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
}

.entry-content pre {
	overflow-x: auto;
	padding: 1rem;
	background: #0f172a;
	color: #e2e8f0;
	border-radius: var(--sa-radius);
}

.entry-content pre code {
	background: none;
	padding: 0;
	color: inherit;
}

/* ---------- Komponen konten halaman ---------- */
.sa-steps {
	list-style: none;
	counter-reset: sa-step;
	padding: 0;
	margin: 1.5rem 0;
}

.sa-steps > li {
	counter-increment: sa-step;
	position: relative;
	padding-left: 3rem;
	margin: 0 0 1rem;
}

.sa-steps > li::before {
	content: counter(sa-step);
	position: absolute;
	left: 0;
	top: 0;
	width: 2rem;
	height: 2rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--sa-primary);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
}

.sa-callout {
	border-left: 4px solid var(--sa-primary);
	background: color-mix(in srgb, var(--sa-primary) 6%, white);
	padding: 1rem 1.25rem;
	border-radius: 0 var(--sa-radius) var(--sa-radius) 0;
	margin: 1.5rem 0;
}

.sa-callout--warn {
	border-left-color: var(--sa-accent);
	background: color-mix(in srgb, var(--sa-accent) 12%, white);
}

.sa-faq {
	margin: 1.5rem 0;
}

.sa-faq__item {
	border: 1px solid var(--sa-border);
	border-radius: var(--sa-radius);
	padding: 0.75rem 1rem;
	margin-bottom: 0.6rem;
	background: var(--sa-bg);
}

.sa-faq__item summary {
	cursor: pointer;
	font-weight: 600;
}

.sa-faq__item > div {
	margin-top: 0.6rem;
	color: var(--sa-muted);
}

.sa-table {
	overflow-x: auto;
	margin: 1.5rem 0;
	border: 1px solid var(--sa-border);
	border-radius: var(--sa-radius);
}

.sa-table table {
	margin: 0;
	border: 0;
	min-width: 480px;
}

/* ---------- CTA ---------- */
.sa-cta-box {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	border-radius: var(--sa-radius);
	background: var(--sa-primary-dark);
	color: #fff;
	margin: 2rem 0;
}

.sa-cta-box a {
	color: #fff;
}

.sa-cta-box__title {
	margin: 0 0 0.35rem;
	font-size: 1.25rem;
}

.sa-cta-box p {
	margin: 0;
	color: #e2e8f0;
}

.sa-cta-box__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.sa-cta-box .sa-btn--outline {
	border-color: #fff;
	color: #fff;
}

.sa-cta-box .sa-btn--outline:hover {
	background: #fff;
	color: var(--sa-primary-dark);
}

/* ---------- Arsip ---------- */
.sa-archive,
.sa-404 {
	padding-top: 1rem;
	padding-bottom: 3rem;
}

.sa-archive__header,
.sa-404__header {
	margin-bottom: 2rem;
}

.sa-archive__desc {
	color: var(--sa-muted);
	max-width: 65ch;
}

.sa-empty {
	color: var(--sa-muted);
}

/* ---------- Form pencarian ---------- */
.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 32rem;
	margin: 1rem 0;
}

.search-form label {
	flex: 1;
}

.search-form .search-field {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--sa-border);
	border-radius: 8px;
	font: inherit;
}

.search-form .search-submit {
	padding: 0.55rem 1rem;
	border: 0;
	border-radius: 8px;
	background: var(--sa-primary);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* ---------- Paginasi ---------- */
.pagination {
	margin: 2rem 0 0;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.pagination .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.6rem;
	border: 1px solid var(--sa-border);
	border-radius: 8px;
	text-decoration: none;
	color: var(--sa-text);
}

.pagination .page-numbers.current {
	background: var(--sa-primary);
	border-color: var(--sa-primary);
	color: #fff;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Footer ---------- */
.sa-footer {
	margin-top: 3rem;
	padding: 2.5rem 0 1.5rem;
	background: #0f172a;
	color: #cbd5e1;
}

.sa-footer a {
	color: #e2e8f0;
}

.sa-footer a:hover {
	color: #fff;
}

.sa-footer__cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.75rem;
}

.sa-footer__brand {
	font-weight: 700;
	font-size: 1.05rem;
	color: #fff;
	margin: 0 0 0.4rem;
}

.sa-footer__title {
	font-size: 0.95rem;
	color: #fff;
	margin: 0 0 0.5rem;
}

.sa-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sa-footer__menu li {
	margin: 0.3rem 0;
}

.sa-footer__bottom {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid #1e293b;
	font-size: 0.85rem;
	color: #94a3b8;
}

.sa-footer__bottom p {
	margin: 0.4rem 0;
}

/* ---------- WhatsApp mengambang ---------- */
.sa-wa-float {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 60;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.65rem 1rem;
	border-radius: 999px;
	background: #128c7e;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

.sa-wa-float:hover {
	background: #0b6b60;
	color: #fff;
}

.sa-wa-float__icon {
	display: inline-flex;
}

/* ---------- Breakpoint 640px ---------- */
@media (min-width: 640px) {
	.sa-container {
		padding: 0 1.5rem;
	}

	.sa-grid--2,
	.sa-grid--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sa-section {
		padding: 3.5rem 0;
	}

	.sa-cta-box {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 2rem;
	}

	.sa-cta-box__content {
		max-width: 60ch;
	}

	.sa-footer__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------- Breakpoint 960px ---------- */
@media (min-width: 960px) {
	.sa-header__inner {
		min-height: 72px;
	}

	.sa-nav-toggle {
		display: none;
	}

	.sa-nav {
		display: flex !important;
		position: static;
		align-items: center;
		gap: 1.5rem;
		padding: 0;
		border: 0;
		box-shadow: none;
		background: none;
	}

	.sa-menu {
		flex-direction: row;
		gap: 1.25rem;
	}

	.sa-menu a {
		padding: 0.35rem 0;
	}

	.sa-nav__actions {
		margin-top: 0;
	}

	.sa-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sa-footer__cols {
		grid-template-columns: 2fr 1fr 1fr;
	}

	.sa-single__layout {
		max-width: none;
	}

	.sa-single__layout .entry-content {
		max-width: 72ch;
	}

	.sa-wa-float {
		right: 1.5rem;
		bottom: 1.5rem;
	}
}

/* ---------- Hormati prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

.sa-card__title { margin: 0 0 0.5rem; }
