/* RL Post List
   ------------------------------------------------------------------ */

.rlpl {
	--rlpl-thumb-w: 110px;
	--rlpl-thumb-r: 1/1;
	--rlpl-row-gap: 22px;
	--rlpl-thumb-gap: 16px;
	--rlpl-radius: 0px;
	--rlpl-cat: #8a5a2b;
	--rlpl-badge-bg: #e7623d;
	--rlpl-badge-fg: #fff;
	--rlpl-title: #1a1a1a;
	--rlpl-hover: #e7623d;
	--rlpl-meta: #8a8a8a;
	--rlpl-excerpt: #5a5a5a;
	--rlpl-divider: rgba(0, 0, 0, 0.1);
	--rlpl-number: #d8d8d8;
	--rlpl-accent: #e7623d;
	--rlpl-title-lines: 2;
	box-sizing: border-box;
}

.rlpl *,
.rlpl *::before,
.rlpl *::after {
	box-sizing: inherit;
}

.rlpl__list {
	display: flex;
	flex-direction: column;
	gap: var(--rlpl-row-gap);
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: rlpl;
}

/* ------------------------------------------------------------- item */

.rlpl-item {
	display: flex;
	align-items: flex-start;
	gap: var(--rlpl-thumb-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.rlpl--align-middle .rlpl-item {
	align-items: center;
}

.rlpl--thumb-right .rlpl-item {
	flex-direction: row-reverse;
}

/* Dividers sit between rows, never after the last one. */
.rlpl--divided .rlpl-item + .rlpl-item {
	padding-top: var(--rlpl-row-gap);
	border-top: 1px solid var(--rlpl-divider);
}

.rlpl--divided .rlpl__list {
	gap: 0;
}

.rlpl--divided .rlpl-item {
	padding-bottom: 0;
}

.rlpl--divided .rlpl-item:not(:last-child) {
	padding-bottom: var(--rlpl-row-gap);
}

/* ---------------------------------------------------------- number */

.rlpl-item__num {
	flex: 0 0 auto;
	min-width: 1.2em;
	color: var(--rlpl-number);
	font-size: 30px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
}

/* ------------------------------------------------------- thumbnail */

.rlpl-item__thumb {
	position: relative;
	flex: 0 0 var(--rlpl-thumb-w);
	width: var(--rlpl-thumb-w);
	overflow: hidden;
	border-radius: var(--rlpl-radius);
	background: #ececec;
	aspect-ratio: var(--rlpl-thumb-r);
}

.rlpl-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.rlpl-img--placeholder {
	background: linear-gradient(135deg, #e4e4e4 0%, #cfcfcf 100%);
}

.rlpl-item:hover .rlpl-img {
	transform: scale(1.06);
}

/* ------------------------------------------------------------ body */

.rlpl-item__body {
	flex: 1 1 auto;
	min-width: 0;
}

/* Category as a plain colored label — the reference style. */
.rlpl-item__cat {
	display: inline-block;
	margin-bottom: 5px;
	color: var(--rlpl-cat);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: opacity 0.2s ease;
}

.rlpl-item__cat:hover,
.rlpl-item__cat:focus {
	color: var(--rlpl-cat);
	opacity: 0.75;
	text-decoration: none;
}

/* Optional filled-chip variant. */
.rlpl--cat-badge .rlpl-item__cat {
	padding: 4px 10px;
	background: var(--rlpl-badge-bg);
	color: var(--rlpl-badge-fg);
	font-size: 11px;
}

.rlpl--cat-badge .rlpl-item__cat:hover,
.rlpl--cat-badge .rlpl-item__cat:focus {
	color: var(--rlpl-badge-fg);
	filter: brightness(0.92);
	opacity: 1;
}

.rlpl-item__title {
	margin: 0;
	color: var(--rlpl-title);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.rlpl-item__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.rlpl-item__title a:hover,
.rlpl-item__title a:focus {
	color: var(--rlpl-hover);
	text-decoration: none;
}

.rlpl--clamp .rlpl-item__title a {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--rlpl-title-lines);
	line-clamp: var(--rlpl-title-lines);
}

.rlpl-item__excerpt {
	margin: 8px 0 0;
	color: var(--rlpl-excerpt);
	font-size: 14px;
	line-height: 1.6;
}

.rlpl-meta {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 7px;
	color: var(--rlpl-meta);
	font-size: 12.5px;
}

.rlpl-meta__sep {
	opacity: 0.6;
}

/* ----------------------------------------------------------- empty */

.rlpl--empty {
	padding: 16px 20px;
	border: 1px dashed #c8c8c8;
	background: #fafafa;
	color: #555;
	font-size: 14px;
}

.rlpl--empty p {
	margin: 0;
}

/* ------------------------------------------------------ a11y focus */

.rlpl a:focus-visible {
	outline: 2px solid var(--rlpl-accent);
	outline-offset: 3px;
}

/* ------------------------------------------------------ responsive */

@media (max-width: 480px) {
	.rlpl {
		--rlpl-thumb-w: 88px;
	}

	.rlpl-item__title {
		font-size: 15.5px;
	}

	.rlpl-item__num {
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rlpl-img {
		transition: none !important;
	}
}
