/*
 * Beauty Bytes: the post index, category pages, and single posts.
 * The index hero reuses services-index.css.
 */

/* ---------- Index: fixed-width cards ---------- */

.post-list { background: var(--surface-soft); padding: clamp(40px, 5vw, 80px) var(--gutter) clamp(60px, 7vw, 110px); }
.post-list-inner { max-width: var(--max-w); margin: 0 auto; }

/* Three equal columns like the live site; each picture fills its column at 4:3. */
.post-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4vw, 64px) clamp(32px, 3.5vw, 64px); }

.post-card { display: flex; flex-direction: column; min-width: 0; }

.post-card-image { display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-warm); margin-bottom: 40px; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card:hover .post-card-image img { transform: scale(1.04); }

/* A post with no picture shows the Javan mark instead of an empty box. */
.post-card-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--surface-warm); }
.post-card-placeholder img { width: 38%; height: auto; object-fit: contain; opacity: .55; transition: none; }
.post-card:hover .post-card-placeholder img { transform: none; }

.post-card-meta,
.post-head-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-family: var(--ui);
	font-size: var(--fs-label);
	letter-spacing: var(--label-tracking);
	text-transform: uppercase;
	color: var(--ink-soft);
	margin-bottom: 12px;
}
.post-card-meta a:hover,
.post-head-meta a:hover { color: var(--link); }
.post-card-meta .dot,
.post-head-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.post-card h2 { font-size: var(--fs-h3); line-height: 1.2; margin-bottom: 20px; }
.post-card h2 a:hover { color: var(--link); }
.post-card-excerpt { font-size: var(--fs-body); line-height: 1.75; color: var(--ink-soft); margin-bottom: 28px; flex: 1; }
.post-card-read {
	display: block;
	font-family: var(--ui);
	font-size: var(--fs-label);
	letter-spacing: var(--label-tracking);
	text-transform: uppercase;
	color: var(--link);
	padding-bottom: 22px;
	border-bottom: 1px solid var(--gold);
}
.post-card-read:hover { color: var(--link); }

.post-list-empty { font-size: var(--fs-body); color: var(--ink-soft); }
.post-archive-back { margin-top: 18px; }

/* Page numbers */
.post-pagination { margin-top: clamp(48px, 6vw, 90px); }
.post-pagination .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.post-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.post-pagination .page-numbers {
	font-family: var(--ui);
	font-size: var(--fs-button);
	font-weight: var(--menu-weight);
	letter-spacing: var(--label-tracking);
	text-transform: uppercase;
	padding: 12px 18px;
	border: 1px solid var(--ink);
	color: var(--ink);
	transition: background .2s ease, color .2s ease;
}
.post-pagination a.page-numbers:hover { background: var(--ink); color: var(--paper); }
.post-pagination .page-numbers.current { background: var(--gold-surface); border-color: var(--gold-surface); color: var(--on-gold); }
.post-pagination .page-numbers.dots { border: 0; }


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

.post-head { max-width: 900px; margin: 0 auto; padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(24px, 3vw, 40px); text-align: center; }
.post-head .hero-rule { display: block; width: 56px; height: 1px; background: var(--gold); margin: 0 auto 22px; }
.post-head-meta { justify-content: center; margin-bottom: 18px; }
.post-head h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.08; }

.post-picture { max-width: 900px; margin: 0 auto clamp(32px, 4vw, 56px); padding: 0 var(--gutter); }
.post-picture img { width: 100%; height: auto; border-radius: var(--radius-photo); }

.post-body { max-width: 900px; padding-bottom: clamp(40px, 5vw, 64px); }
.post-body p, .post-body li { font-size: var(--fs-body); }
.post-body .wp-block-image img,
.post-body figure img { border-radius: var(--radius-photo); }
.post-body .wp-block-spacer { height: 24px !important; }
.post-body .wp-block-button__link { display: inline-flex; font-family: var(--ui); font-size: var(--fs-button); letter-spacing: var(--label-tracking); text-transform: uppercase; padding: 15px 26px; border: 1px solid var(--ink); color: var(--ink); background: transparent; border-radius: 0; }
.post-body .wp-block-button__link:hover { background: var(--ink); color: var(--paper); }

.post-nav .label { display: block; margin-bottom: 6px; }

@media (max-width: 1000px) {
	.post-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.post-cards { grid-template-columns: 1fr; }
	.post-card-image { margin-bottom: 24px; }
}
