/**
 * Homepage Articles — OJS 3.5
 * Desain baris memanjang ke samping, warna dasar #013BA9.
 * Semua selector diawali .hpa agar tidak bentrok dengan tema.
 */

.hpa {
	--hpa-base: #013ba9;
	--hpa-dark: #012a78;
	--hpa-tint: #eaf0fc;
	--hpa-line: #d5e1f6;
	--hpa-ink: #0b1b3f;
	--hpa-muted: #51618a;
	margin: 2.5rem 0;
	color: var(--hpa-ink);
	font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.5;
	box-sizing: border-box;
}

.hpa *,
.hpa *::before,
.hpa *::after {
	box-sizing: border-box;
}

.hpa a,
.hpa a:hover,
.hpa a:focus {
	text-decoration: none;
}

.hpa a:focus-visible {
	outline: 3px solid var(--hpa-base);
	outline-offset: 3px;
	border-radius: 6px;
}

/* ---------- Header ---------- */

.hpa__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75rem 2rem;
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 3px solid var(--hpa-base);
}

.hpa .hpa__title {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--hpa-base);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.hpa .hpa__subtitle {
	margin: 0.3rem 0 0;
	color: var(--hpa-muted);
	font-size: 0.98rem;
}

.hpa .hpa__archive {
	display: inline-block;
	padding: 0.55rem 1.2rem;
	border: 2px solid var(--hpa-base);
	border-radius: 999px;
	color: var(--hpa-base);
	font-size: 0.88rem;
	font-weight: 700;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hpa .hpa__archive:hover,
.hpa .hpa__archive:focus {
	background: var(--hpa-base);
	color: #fff;
}

/* ---------- Daftar memanjang ke samping ---------- */

.hpa__list {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.hpa-item {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem 2rem;
	padding: 1.15rem 1.4rem 1.15rem 1.75rem;
	background: #fff;
	border: 1px solid var(--hpa-line);
	border-radius: 14px;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* garis aksen kiri */
.hpa-item::before {
	content: "";
	position: absolute;
	top: 14px;
	bottom: 14px;
	left: 0;
	width: 5px;
	border-radius: 0 5px 5px 0;
	background: var(--hpa-base);
}

.hpa-item:hover,
.hpa-item:focus-within {
	background: var(--hpa-tint);
	border-color: var(--hpa-base);
}

.hpa-item__date {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--hpa-base);
	font-size: 0.78rem;
	font-weight: 700;
}

.hpa .hpa-item__title {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.4;
}

.hpa .hpa-item__title a {
	color: var(--hpa-ink);
}

/* seluruh baris bisa diklik lewat link judul */
.hpa .hpa-item__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 14px;
}

.hpa .hpa-item__title a:hover {
	color: var(--hpa-base);
}

.hpa .hpa-item__authors {
	display: flex;
	align-items: flex-start;
	gap: 0.45rem;
	margin: 0.4rem 0 0;
	color: var(--hpa-muted);
	font-size: 0.88rem;
}

.hpa-item__authors svg {
	flex: none;
	margin-top: 0.22rem;
	color: var(--hpa-base);
}

/* ---------- Chip DOI & Halaman ---------- */

.hpa-item__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.7rem;
}

.hpa-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	max-width: 100%;
	padding: 0.15rem 0.7rem;
	border-radius: 999px;
	background: var(--hpa-tint);
	color: var(--hpa-dark);
	font-size: 0.8rem;
	font-weight: 600;
	word-break: break-all;
}

.hpa-item:hover .hpa-chip:not(.hpa-chip--doi) {
	background: #fff;
}

.hpa-chip--issue,
.hpa-item:hover .hpa-chip--issue {
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--hpa-base);
	color: var(--hpa-base);
}

/* di atas overlay link judul agar tetap bisa diklik */
.hpa .hpa-chip--issue a {
	position: relative;
	z-index: 1;
	color: var(--hpa-base);
}

.hpa .hpa-chip--issue a:hover {
	text-decoration: underline;
}

.hpa-chip--doi {
	background: var(--hpa-base);
	color: #fff;
}

.hpa-chip--doi b {
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	opacity: 0.8;
}

/* di atas overlay link judul agar tetap bisa diklik */
.hpa .hpa-chip--doi a {
	position: relative;
	z-index: 1;
	color: #fff;
}

.hpa .hpa-chip--doi a:hover {
	text-decoration: underline;
}

.hpa .hpa-chip--doi a:focus-visible {
	outline-color: #fff;
}

/* ---------- View & Download ---------- */

.hpa-item__stats {
	display: flex;
	gap: 0.5rem;
	padding-left: 2rem;
	border-left: 1px solid var(--hpa-line);
}

.hpa-stat {
	min-width: 5.5rem;
	padding: 0.6rem 0.9rem;
	border-radius: 12px;
	background: var(--hpa-tint);
	text-align: center;
	transition: background-color 0.2s ease;
}

.hpa-item:hover .hpa-stat {
	background: #fff;
}

.hpa-stat__num {
	display: block;
	color: var(--hpa-base);
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

.hpa-stat__label {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--hpa-muted);
	font-size: 0.75rem;
	font-weight: 600;
}

/* ---------- Responsif & aksesibilitas ---------- */

@media (max-width: 720px) {
	.hpa-item {
		grid-template-columns: 1fr;
		padding: 1.1rem 1.1rem 1.1rem 1.5rem;
	}
	.hpa-item__stats {
		padding-left: 0;
		border-left: 0;
	}
	.hpa-stat {
		flex: 1;
	}
}

@media (max-width: 480px) {
	.hpa .hpa__archive {
		width: 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hpa-item,
	.hpa-stat,
	.hpa .hpa__archive {
		transition: none;
	}
}
