/*
Theme Name: Artikel Grid
Theme URI: https://example.com/artikel-grid
Author: Claude
Author URI: https://claude.ai
Description: Tema WordPress sederhana dengan tampilan grid, popular post, latest post, dan footer kategori/halaman berbentuk panah, sesuai wireframe.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: artikel-grid
*/

/* ---------- Reset & base ---------- */
* {
	box-sizing: border-box;
}

:root {
	--ag-purple: #5b2fe0;
	--ag-purple-dark: #4a24b8;
	--ag-black: #111111;
	--ag-gray: #666666;
	--ag-bg: #ffffff;
	--ag-footer-bg: #f4f4f6;
}

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

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ag-black);
	background: var(--ag-bg);
	line-height: 1.5;
}

a {
	color: inherit;
	text-decoration: none;
}

img {
	max-width: 100%;
	display: block;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.container {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 24px;
}

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

/* ---------- Site border wrap (like wireframe frame) ---------- */
.site-wrap {
	border: 2px solid var(--ag-purple);
	max-width: 900px;
	margin: 16px auto;
	overflow: hidden;
}

/* ---------- Header ---------- */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px 32px;
	gap: 24px;
}

.header-left {
	display: flex;
	align-items: center;
	gap: 20px;
}

.menu-toggle {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 4px;
}

.menu-toggle span {
	display: block;
	width: 34px;
	height: 4px;
	background: var(--ag-black);
	border-radius: 2px;
}

.header-divider {
	width: 3px;
	align-self: stretch;
	background: var(--ag-black);
	min-height: 44px;
}

.site-branding {
	margin: 0;
}

.site-title {
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0;
}

.site-title a {
	color: var(--ag-black);
}

.header-search {
	display: flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 15px;
	color: var(--ag-black);
}

.header-search svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: #9a9a9a;
	stroke-width: 2.4;
}

/* ---------- Primary navigation ---------- */
.primary-navigation {
	background: var(--ag-purple);
}

.primary-navigation .nav-inner {
	display: flex;
	justify-content: center;
}

.primary-navigation ul.menu,
.primary-navigation ul#primary-menu-fallback {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 32px;
	padding: 18px 24px;
}

.primary-navigation a {
	color: #ffffff;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.3px;
}

.primary-navigation .empty-nav-notice {
	display: block;
	text-align: center;
	color: #ffffff;
	font-weight: 700;
	padding: 18px 24px;
}

/* ---------- Main content layout ---------- */
.content-area {
	padding: 40px 32px 24px;
}

.content-columns {
	display: flex;
	gap: 36px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.column-grid {
	flex: 1 1 320px;
}

.column-popular {
	flex: 1 1 220px;
}

/* Grid display shield/banner shape */
.grid-display {
	position: relative;
	background: var(--ag-purple);
	color: #ffffff;
	font-weight: 700;
	font-size: 18px;
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 20px;
	clip-path: polygon(12% 6%, 88% 6%, 100% 26%, 100% 78%, 50% 100%, 0 78%, 0 26%);
}

.grid-display .grid-item-thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.35;
}

.grid-display .grid-item-label {
	position: relative;
	z-index: 1;
}

/* Section headings with icon */
.section-heading {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 18px;
	font-weight: 800;
	margin: 28px 0 14px;
}

.section-heading .icon {
	font-size: 20px;
	line-height: 1;
}

.column-grid > .section-heading:first-child {
	margin-top: 0;
}

/* Popular post list - arrow shapes */
.arrow-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.arrow-item {
	position: relative;
	background: var(--ag-purple);
	color: #ffffff;
	font-weight: 700;
	font-size: 13px;
	padding: 12px 26px 12px 16px;
	clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background 0.15s ease;
}

.arrow-item:hover {
	background: var(--ag-purple-dark);
}

/* Latest post */
.latest-post {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-top: 4px;
}

.latest-post-thumb {
	position: relative;
	width: 96px;
	height: 96px;
	flex: 0 0 auto;
	background: var(--ag-purple);
	color: #ffffff;
	font-weight: 700;
	font-size: 13px;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.latest-post-thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.latest-post-body .post-category {
	font-size: 11px;
	font-weight: 700;
	color: var(--ag-gray);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 2px;
}

.latest-post-body .post-title {
	font-size: 20px;
	font-weight: 800;
	margin: 2px 0 4px;
}

.latest-post-body .post-title a {
	color: var(--ag-black);
}

.latest-post-body .post-meta {
	font-size: 11px;
	color: var(--ag-gray);
}

/* ---------- Footer ---------- */
.site-footer {
	border-top: 4px solid var(--ag-black);
	background: var(--ag-footer-bg);
	padding: 32px;
}

.footer-columns {
	display: flex;
	gap: 40px;
	flex-wrap: wrap;
}

.footer-brand {
	flex: 0 0 auto;
	min-width: 160px;
}

.footer-brand .site-title {
	font-size: 18px;
}

.footer-copyright {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ag-gray);
	font-size: 13px;
	margin-top: 18px;
}

.footer-copyright .icon {
	font-size: 15px;
}

.footer-col {
	flex: 1 1 220px;
}

.footer-col h2 {
	font-size: 15px;
	font-weight: 800;
	margin: 0 0 14px;
}

.footer-arrow-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 14px;
}

.footer-col .arrow-list .arrow-item,
.footer-arrow-grid .arrow-item {
	font-size: 11px;
	padding: 8px 20px 8px 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.site-header {
		flex-wrap: wrap;
		padding: 20px;
	}
	.content-area {
		padding: 28px 20px;
	}
	.content-columns {
		flex-direction: column;
	}
	.footer-columns {
		flex-direction: column;
		gap: 28px;
	}
	.footer-arrow-grid {
		grid-template-columns: 1fr 1fr;
	}
}
