/* 吉屋出租：水泥牆上貼一張紅紙告示，分類做成直書撕條；文章是貼在牆上的白紙。 */

:root {
	--nt-red: var(--wp--preset--color--accent-1);
	--nt-strip: 7.5rem;
	--nt-pad: clamp(1.5rem, 5vw, 3rem);
	--nt-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 10px 20px -12px rgb(0 0 0 / 0.45);
}

body {
	background:
		radial-gradient(rgb(0 0 0 / 0.07) 1px, transparent 1.4px) 0 0 / 7px 7px,
		radial-gradient(rgb(255 255 255 / 0.35) 1px, transparent 1.4px) 3px 4px / 11px 11px,
		var(--wp--preset--color--accent-5);
}

/* 紅紙告示 */
.av-hero {
	--wp--style--global--content-size: 100%;
	position: relative;
	box-sizing: border-box;
	width: min(38rem, 100% - 3rem);
	margin: clamp(2.5rem, 7vw, 4.5rem) auto 0;
	padding: clamp(2rem, 5vw, 3rem) var(--nt-pad) 0;
	background: linear-gradient(var(--nt-red) 0 0) top / 100% calc(100% - var(--nt-strip)) no-repeat;
	text-align: center;
	transform: rotate(-1.2deg);
	filter: drop-shadow(0 6px 6px rgb(0 0 0 / 0.22));
}

.av-hero::before,
.av-hero::after {
	content: "";
	position: absolute;
	top: -0.9rem;
	width: 5.5rem;
	height: 1.8rem;
	background: rgb(237 231 218 / 0.85);
}

.av-hero::before {
	left: 8%;
	transform: rotate(-7deg);
}

.av-hero::after {
	right: 8%;
	transform: rotate(6deg);
}

.av-hero .wp-block-site-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(2rem, 6.5vw, 3.2rem);
	line-height: 1.25;
}

.av-hero .wp-block-site-title a {
	color: inherit;
	text-decoration: none;
}

.av-hero .wp-block-site-tagline {
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.1rem;
}

/* 撕條：一條一個分類 */
.av-hero__cats {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	height: var(--nt-strip);
	margin: 2rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 1.05rem;
}

.av-hero__cats a {
	display: block;
	box-sizing: border-box;
	height: var(--nt-strip);
	padding: 0.8rem 0.6rem;
	border-top: 2px dashed rgb(0 0 0 / 0.45);
	background: var(--nt-red);
	color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	text-decoration: none;
	writing-mode: vertical-rl;
}

.av-hero__cats a:hover,
.av-hero__cats a:focus-visible {
	transform: translateY(0.35rem) rotate(4deg);
}

/* 文章：貼在牆上的白紙 */
.av-home {
	--wp--style--global--content-size: 60rem;
	padding-block: clamp(3rem, 8vw, 5rem) 1rem;
}

.av-list {
	--wp--preset--font-size--large: clamp(1.2rem, 2.2vw, 1.45rem);
}

.av-list .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
	gap: 2rem 1.75rem;
	margin: 0;
}

.av-list .wp-block-post {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	align-content: start;
	column-gap: 0.75rem;
	margin: 0;
	padding: 1.5rem 1.5rem 1.75rem;
	background: var(--wp--preset--color--base);
	box-shadow: var(--nt-shadow);
}

.av-list .wp-block-post:nth-child(3n + 1) {
	transform: rotate(-0.6deg);
}

.av-list .wp-block-post:nth-child(3n + 2) {
	transform: rotate(0.5deg);
}

.av-list__date,
.av-list__cat {
	grid-row: 1;
	font-size: 0.8rem;
	color: var(--wp--preset--color--accent-4);
}

.av-list__cat a {
	color: var(--nt-red);
	text-decoration: none;
}

.av-list__title,
.av-list__excerpt {
	grid-column: 1 / -1;
}

.av-list__excerpt p {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.av-list__title {
	margin: 0.5rem 0 0;
	line-height: 1.4;
}

.av-list__title a {
	text-decoration: none;
}

.av-list__title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--nt-red);
	text-decoration-thickness: 3px;
}

.av-list__excerpt {
	margin-top: 0.5rem;
	font-size: 0.95rem;
	color: var(--wp--preset--color--accent-4);
}

.av-list .post-password-required .av-list__excerpt {
	display: none;
}

.av-list .post-password-required::before {
	content: "付費";
	position: absolute;
	top: -0.7rem;
	right: 1.25rem;
	padding: 0.15rem 0.7rem;
	background: var(--nt-red);
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	transform: rotate(3deg);
	box-shadow: var(--nt-shadow);
}

/* 單篇文章 */
header.wp-block-template-part .wp-block-site-title {
	display: inline-block;
	padding: 0.35em 0.9em;
	background: var(--nt-red);
	font-family: var(--wp--preset--font-family--heading);
	transform: rotate(-1.5deg);
	box-shadow: var(--nt-shadow);
}

header.wp-block-template-part .wp-block-site-title a {
	text-decoration: none;
}

.single main > .alignfull:first-child {
	box-sizing: border-box;
	max-width: min(52rem, 100% - 2rem);
	margin-inline: auto;
	background: var(--wp--preset--color--base);
	box-shadow: var(--nt-shadow);
}

.wp-block-post-content h2 {
	width: fit-content;
	background: linear-gradient(transparent 58%, rgb(210 38 30 / 0.35) 0);
}

.av-paywall {
	position: relative;
	border: 0;
	border-radius: 0;
	background: var(--nt-red);
	transform: rotate(-0.8deg);
	box-shadow: var(--nt-shadow);
}

.av-paywall::before {
	content: "";
	position: absolute;
	top: -0.8rem;
	left: calc(50% - 2.75rem);
	width: 5.5rem;
	height: 1.6rem;
	background: rgb(237 231 218 / 0.85);
	transform: rotate(-3deg);
}

.av-paywall__price {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.6rem;
}

.av-paywall a:not(.wp-element-button) {
	font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
	.av-hero__cats a {
		transition: transform 0.2s;
	}
}
