/* ==========================================================================
   Wise Addons: blog listings, single posts, pages, comments, search and 404.
   ========================================================================== */

/* Category nav under the blog header ------------------------------------- */

.cat-nav { margin-top: 28px; }
.cat-nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }

/* Listing ---------------------------------------------------------------- */

.blog-list { padding-bottom: clamp(72px, 10vw, 120px); }

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(20px, 2.5vw, 32px);
}

.post-card {
	position: relative;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--wa-border);
	border-radius: 22px;
	background: #fff;
	transition: transform .25s var(--wa-ease), box-shadow .25s, border-color .25s;
}

.post-card:hover {
	border-color: transparent;
	box-shadow: 0 2px 6px rgba(22, 26, 43, .04), 0 28px 56px -28px rgba(53, 40, 170, .35);
	transform: translateY(-3px);
}

.post-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--wa-bg);
}

.post-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s var(--wa-ease);
}

.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card:hover .post-card__media .post-placeholder__mark { transform: scale(1.08) rotate(-4deg); }

.post-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 22px 24px 24px;
}

.post-card__body .chip--cat { position: relative; z-index: 2; }

.post-card__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 740;
	line-height: 1.3;
	letter-spacing: -.02em;
}

.post-card__link { color: var(--wa-text); text-decoration: none; }
.post-card__link:hover { color: var(--wa-text); }
.post-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

@supports selector(:has(*)) {
	.post-card__link:focus-visible { outline: none; }
	.post-card:has(.post-card__link:focus-visible) { outline: 3px solid var(--wa-primary); outline-offset: 3px; }
}

.post-card__excerpt { flex: 1; margin: 0; color: var(--wa-muted); font-size: .975rem; line-height: 1.6; }

/* Featured (first post on the blog page) */
.post-card--featured {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	margin-bottom: clamp(24px, 3vw, 40px);
	border-radius: 28px;
}

.post-card--featured .post-card__media { aspect-ratio: auto; min-height: 340px; }
.post-card--featured .post-card__body { justify-content: center; gap: 16px; padding: clamp(28px, 4vw, 52px); }
.post-card--featured .post-card__title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); line-height: 1.15; letter-spacing: -.035em; }
.post-card--featured .post-card__excerpt { flex: none; font-size: 1.0625rem; }

/* Placeholder when a post has no featured image */
.post-placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	overflow: hidden;
	background: linear-gradient(135deg, #5b4cf5 0%, #6d5dfc 40%, #22b8cf 100%);
}

.post-placeholder::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, .25) 1px, transparent 1.2px);
	background-size: 20px 20px;
	-webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent);
	mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent);
}

.post-placeholder--1 { background: linear-gradient(135deg, #161a2d 0%, #3d2fd0 60%, #6d5dfc 100%); }
.post-placeholder--2 { background: linear-gradient(135deg, #22b8cf 0%, #6d5dfc 100%); }
.post-placeholder--3 { background: linear-gradient(135deg, #ff4d8d 0%, #6d5dfc 70%, #5b4cf5 100%); }

.post-placeholder .post-placeholder__mark {
	position: relative;
	width: 64px;
	height: 64px;
	object-fit: contain;
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 22px;
	background: rgba(255, 255, 255, .16);
	box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .4);
}

/* Meta line */
.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	color: var(--wa-muted);
	font-size: .875rem;
	font-weight: 550;
}

.post-meta__author { display: inline-flex; align-items: center; gap: 10px; }
.post-meta__author a { position: relative; z-index: 2; color: var(--wa-text); font-weight: 680; text-decoration: none; }
.post-meta__author a:hover { color: var(--wa-primary); }
.post-meta__avatar { border-radius: 50%; }
.post-meta__item { display: inline-flex; align-items: center; gap: 6px; }
.post-meta__item .wa-icon { color: var(--wa-subtle); }

/* Pagination */
.pagination { margin-top: clamp(40px, 5vw, 64px); }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--wa-border);
	border-radius: 999px;
	background: #fff;
	color: var(--wa-ink-2);
	font-weight: 650;
	text-decoration: none;
}

.pagination a.page-numbers:hover { border-color: #c9c3ff; color: var(--wa-primary); }
.pagination .page-numbers.current { border-color: var(--wa-dark); background: var(--wa-dark); color: #fff; }
.pagination .page-numbers.dots { border-color: transparent; background: none; }

@media (max-width: 1000px) {
	.post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.post-card--featured { grid-template-columns: minmax(0, 1fr); }
	.post-card--featured .post-card__media { min-height: 0; aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
	.post-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Single post ------------------------------------------------------------ */

.single-hero { padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 4vw, 48px); }

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	color: var(--wa-subtle);
	font-size: .875rem;
	font-weight: 650;
}

.breadcrumbs a { color: var(--wa-primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.single-hero__title {
	margin: 0;
	font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.5rem);
	font-weight: 800;
	line-height: 1.07;
	letter-spacing: -.04em;
}

.single-hero__lead { margin: 18px 0 0; color: var(--wa-muted); font-size: 1.1875rem; line-height: 1.6; }
.single-hero .post-meta { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--wa-border); }

.single-media { margin-top: 0; margin-bottom: clamp(32px, 5vw, 56px); }

.single-media img {
	display: block;
	width: 100%;
	max-height: 620px;
	object-fit: cover;
	border-radius: var(--wa-radius-lg);
	box-shadow: var(--wa-shadow-lg);
}

.single-media figcaption { margin-top: 12px; color: var(--wa-muted); font-size: .875rem; text-align: center; }

.single-entry .entry-content.prose { padding-bottom: 8px; }
.single-footer { padding-top: 32px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }

.author-box {
	display: flex;
	align-items: flex-start;
	gap: 18px;
	padding: 24px;
	border: 1px solid var(--wa-border);
	border-radius: 22px;
	background: linear-gradient(135deg, #faf9ff, #f3fbfc);
}

.author-box__avatar { flex: none; border-radius: 50%; }
.author-box__eyebrow { margin: 0; color: var(--wa-muted); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.author-box__name { margin: 2px 0 6px; font-size: 1.125rem; font-weight: 750; }
.author-box__name a { color: var(--wa-text); text-decoration: none; }
.author-box__bio { margin: 0; color: var(--wa-muted); font-size: .975rem; }

.post-nav { margin-top: 32px; }
.post-nav .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-nav .nav-next { grid-column: 2; text-align: right; }

.post-nav a {
	display: flex;
	flex-direction: column;
	gap: 6px;
	height: 100%;
	padding: 18px 20px;
	border: 1px solid var(--wa-border);
	border-radius: 18px;
	color: var(--wa-text);
	text-decoration: none;
	transition: border-color .2s, box-shadow .2s;
}

.post-nav a:hover { border-color: #d0caff; box-shadow: var(--wa-shadow); }

.post-nav__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wa-muted);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.nav-next .post-nav__label { justify-content: flex-end; }
.post-nav__title { font-weight: 700; line-height: 1.35; }

.related {
	margin-top: clamp(48px, 7vw, 80px);
	padding: clamp(56px, 8vw, 96px) 0;
	background: var(--wa-bg);
}

.related__title { margin: 0 0 32px; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem); letter-spacing: -.035em; }
.related .post-card__title { font-size: 1.125rem; }

@media (max-width: 640px) {
	.post-nav .nav-links { grid-template-columns: minmax(0, 1fr); }
	.post-nav .nav-next { grid-column: auto; }
	.author-box { flex-direction: column; }
}

/* Pages ------------------------------------------------------------------ */

.page-hero--simple { padding-bottom: clamp(32px, 4vw, 48px); }
.page-entry .entry-content.prose { padding-bottom: clamp(56px, 8vw, 96px); }
.page-entry__media { margin: 0 0 40px; }
.page-entry__media img { display: block; width: 100%; border-radius: var(--wa-radius-lg); }

/* Comments --------------------------------------------------------------- */

.comments { padding: 48px 0 8px; }
.page-entry .comments { padding-bottom: clamp(56px, 8vw, 96px); }
.comments__title,
.comment-reply-title { margin: 0 0 24px; font-size: 1.5rem; letter-spacing: -.03em; }
.comment-reply-title small { margin-left: 12px; font-size: .875rem; font-weight: 600; }

.comment-list,
.comment-list .children { margin: 0; padding: 0; list-style: none; }
.comment-list .children { margin-left: clamp(16px, 4vw, 48px); }
.comment-list > li + li { margin-top: 16px; }

.comment-body {
	margin-top: 16px;
	padding: 20px 22px;
	border: 1px solid var(--wa-border);
	border-radius: 18px;
	background: #fff;
}

.comment-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: .875rem; }
.comment-author { display: flex; align-items: center; gap: 10px; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .fn { color: var(--wa-text); font-style: normal; font-weight: 700; }
.comment-author .says { display: none; }
.comment-metadata a { color: var(--wa-muted); text-decoration: none; }
.comment-content { color: #2b3046; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 10px; font-size: .875rem; font-weight: 650; }
.comment-respond { margin-top: 40px; }

.comment-form { display: grid; gap: 16px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; margin-bottom: 6px; color: var(--wa-text); font-size: .9rem; font-weight: 650; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wa-border-strong);
	border-radius: 12px;
	background: #fff;
	color: var(--wa-text);
	font: inherit;
	font-size: 1rem;
	transition: border-color .15s, box-shadow .15s;
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--wa-primary); outline: none; box-shadow: 0 0 0 4px rgba(91, 76, 245, .16); }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 10px; }
.comment-form-cookies-consent label { margin: 0; font-weight: 500; }
.comment-notes,
.logged-in-as { color: var(--wa-muted); font-size: .9rem; }
.form-submit .btn { border: 0; }

/* Empty state, search and 404 -------------------------------------------- */

.empty-state {
	max-width: 560px;
	margin: 0 auto;
	padding: 48px 24px;
	border: 1px dashed var(--wa-border-strong);
	border-radius: 24px;
	text-align: center;
}

.empty-state__icon {
	display: inline-grid;
	place-items: center;
	width: 60px;
	height: 60px;
	border-radius: 18px;
	background: var(--wa-tint);
	color: var(--wa-primary);
}

.empty-state__title { margin: 16px 0 8px; font-size: 1.5rem; }
.empty-state p { color: var(--wa-muted); }
.empty-state__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

.not-found { padding: clamp(64px, 10vw, 128px) 0 clamp(80px, 12vw, 144px); text-align: center; }

.not-found__code {
	margin: 0;
	background: var(--wa-gradient-text);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: clamp(6rem, 3rem + 14vw, 11rem);
	font-weight: 820;
	line-height: .9;
	letter-spacing: -.07em;
}

.not-found__title { margin: 20px auto 0; font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); letter-spacing: -.035em; }
.not-found__lead { max-width: 52ch; margin: 16px auto 0; color: var(--wa-muted); font-size: 1.125rem; }
.not-found__search { max-width: 520px; margin: 32px auto 0; text-align: left; }

.not-found__links {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 40px 0 0;
	padding: 0;
	list-style: none;
}

.not-found__links a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 18px 12px;
	border: 1px solid var(--wa-border);
	border-radius: 18px;
	background: #fff;
	color: var(--wa-text);
	font-size: .95rem;
	font-weight: 650;
	text-decoration: none;
	transition: border-color .2s, box-shadow .2s, transform .2s var(--wa-ease);
}

.not-found__links a:hover { border-color: #d0caff; box-shadow: var(--wa-shadow); transform: translateY(-2px); }
.not-found__links .wa-icon { color: var(--wa-primary); }

@media (max-width: 640px) {
	.not-found__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
