/* =========================================================
   Võ Hạnh — main.css
   Editorial personal-brand theme · navy/teal + bronze
   ========================================================= */

:root {
	--vh-ink: var(--wp--preset--color--ink);
	--vh-navy: var(--wp--preset--color--navy);
	--vh-teal: var(--wp--preset--color--teal);
	--vh-teal-deep: var(--wp--preset--color--teal-deep);
	--vh-bronze: var(--wp--preset--color--bronze);
	--vh-bronze-deep: var(--wp--preset--color--bronze-deep);
	--vh-cream: var(--wp--preset--color--cream);
	--vh-paper: var(--wp--preset--color--paper);
	--vh-line: var(--wp--preset--color--line);
	--vh-body: var(--wp--preset--color--body);
	--vh-muted: var(--wp--preset--color--muted);
	--vh-display: var(--wp--preset--font-family--display);
	--vh-sans: var(--wp--preset--font-family--body);
	--vh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

::selection { background: var(--vh-bronze); color: #fff; }

/* Subtle paper grain / atmosphere on the body background */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(1200px 600px at 100% -10%, rgba(30,122,140,0.06), transparent 60%),
		radial-gradient(900px 500px at -10% 110%, rgba(192,137,74,0.07), transparent 60%);
}
.wp-site-blocks { position: relative; z-index: 1; }

/* ---------- Eyebrow / kicker label ---------- */
.vh-eyebrow,
.vh-eyebrow p {
	font-family: var(--vh-sans) !important;
	font-size: 0.72rem !important;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--vh-bronze-deep);
	margin: 0;
}
.vh-eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.6rem;
	height: 2px;
	background: var(--vh-bronze);
	vertical-align: middle;
	margin-right: 0.6rem;
	transform: translateY(-1px);
}

/* =========================================================
   HEADER
   ========================================================= */
.vh-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(250, 247, 241, 0.82);
	backdrop-filter: saturate(160%) blur(10px);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--vh-line);
}
.vh-header .wp-block-site-title a {
	text-decoration: none;
	color: var(--vh-ink);
	background: linear-gradient(transparent 70%, rgba(192,137,74,0.28) 0) no-repeat;
	background-size: 0% 100%;
	transition: background-size 0.4s var(--vh-ease);
}
.vh-header .wp-block-site-title a:hover { background-size: 100% 100%; }

/* Navigation links */
.vh-header .wp-block-navigation {
	font-family: var(--vh-sans);
	font-size: 0.95rem;
	font-weight: 500;
}
.vh-header .wp-block-navigation-item__content {
	color: var(--vh-ink);
	text-decoration: none;
	padding-bottom: 3px;
	position: relative;
}
.vh-header .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	width: 100%; height: 2px;
	background: var(--vh-bronze);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.32s var(--vh-ease);
}
.vh-header .wp-block-navigation-item__content:hover::after,
.vh-header .current-menu-item .wp-block-navigation-item__content::after { transform: scaleX(1); }

/* Header CTA button */
.vh-header .wp-block-button__link {
	box-shadow: 0 8px 20px -10px rgba(192,137,74,0.8);
}

/* =========================================================
   HERO (home intro)
   ========================================================= */
.vh-hero {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--gradient--hero);
	color: #eaf1f5;
	border-radius: 22px;
}
.vh-hero::after {
	content: "";
	position: absolute;
	right: -8%; top: -30%;
	width: 46%; aspect-ratio: 1;
	background: radial-gradient(circle, rgba(192,137,74,0.32), transparent 62%);
	pointer-events: none;
}
.vh-hero .vh-eyebrow,
.vh-hero .vh-eyebrow p { color: #e9c79a; }
.vh-hero .vh-eyebrow::before { background: var(--vh-bronze); }
.vh-hero h1,
.vh-hero h2 { color: #fff; }
.vh-hero p { color: rgba(234,241,245,0.86); }
.vh-hero .wp-block-button__link { background: var(--vh-bronze); }
.vh-hero .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255,255,255,0.45);
}
.vh-hero .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255,255,255,0.1);
	border-color: #fff;
}

/* Staggered page-load reveal for hero children */
@media (prefers-reduced-motion: no-preference) {
	.vh-hero > * > * { animation: vh-rise 0.7s var(--vh-ease) both; }
	.vh-hero > * > *:nth-child(1) { animation-delay: 0.05s; }
	.vh-hero > * > *:nth-child(2) { animation-delay: 0.14s; }
	.vh-hero > * > *:nth-child(3) { animation-delay: 0.23s; }
	.vh-hero > * > *:nth-child(4) { animation-delay: 0.32s; }
}
@keyframes vh-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* =========================================================
   SECTION HEADINGS (between blocks)
   ========================================================= */
.vh-section-title { display: flex; align-items: baseline; gap: 0.9rem; }
.vh-section-title h2 { margin: 0; }

/* =========================================================
   POST CARDS (query loop)
   ========================================================= */
.vh-cards .wp-block-post {
	background: var(--vh-paper);
	border: 1px solid var(--vh-line);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--card);
	transition: transform 0.4s var(--vh-ease), box-shadow 0.4s var(--vh-ease), border-color 0.4s var(--vh-ease);
	display: flex;
	flex-direction: column;
	height: 100%;
}
.vh-cards .wp-block-post:hover {
	transform: translateY(-6px);
	box-shadow: var(--wp--preset--shadow--lift);
	border-color: #d9d0bf;
}
.vh-cards .wp-block-post-featured-image {
	margin: 0;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}
.vh-cards .wp-block-post-featured-image img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.6s var(--vh-ease);
}
.vh-cards .wp-block-post:hover .wp-block-post-featured-image img { transform: scale(1.05); }

/* Card body padding wrapper */
.vh-card-body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; }

.vh-cards .wp-block-post-title { margin: 0.35rem 0 0.5rem; line-height: 1.22; }
.vh-cards .wp-block-post-title a { text-decoration: none; color: var(--vh-ink); transition: color 0.25s var(--vh-ease); }
.vh-cards .wp-block-post-title:hover a { color: var(--vh-teal-deep); }
.vh-cards .wp-block-post-excerpt { color: var(--vh-body); }
.vh-cards .wp-block-post-excerpt__excerpt { font-size: 0.98rem; line-height: 1.62; }

/* Category pill on cards */
.vh-cat-pill a,
.wp-block-post-terms.vh-cat-pill a {
	font-family: var(--vh-sans);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--vh-teal-deep);
	text-decoration: none;
}

/* Meta row */
.vh-meta, .vh-meta p {
	font-family: var(--vh-sans);
	font-size: 0.82rem;
	color: var(--vh-muted);
	margin: 0;
}
.vh-meta .wp-block-post-date { color: var(--vh-muted); }

/* "Đọc tiếp" link */
.vh-readmore a,
.vh-readmore .wp-block-read-more {
	font-family: var(--vh-sans);
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--vh-bronze-deep);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}
.vh-readmore a::after { content: "→"; transition: transform 0.3s var(--vh-ease); }
.vh-readmore a:hover::after { transform: translateX(4px); }

/* =========================================================
   SINGLE POST
   ========================================================= */
.vh-post-header { text-align: center; }
.vh-post-header .wp-block-post-title { margin: 0.4rem auto 0.8rem; max-width: 16ch; }
.vh-post-cover img { border-radius: 18px; box-shadow: var(--wp--preset--shadow--card); }

.vh-prose p { margin-block: 1.15em; }
.vh-prose > h2 { margin-top: 2.4em; margin-bottom: 0.6em; }
.vh-prose > h3 { margin-top: 1.8em; margin-bottom: 0.5em; }
.vh-prose ul, .vh-prose ol { padding-left: 1.2em; }
.vh-prose li { margin-block: 0.4em; }
.vh-prose ul li::marker { color: var(--vh-bronze); }
.vh-prose strong { color: var(--vh-ink); font-weight: 700; }
.vh-prose .wp-block-image img { border-radius: 14px; }

/* Lead paragraph (first para after cover) */
.vh-prose > p.has-large-font-size:first-of-type,
.vh-lead p {
	font-family: var(--vh-display);
	font-size: 1.3rem;
	line-height: 1.6;
	color: var(--vh-ink);
}

/* Author box */
.vh-author {
	background: var(--vh-paper);
	border: 1px solid var(--vh-line);
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--card);
}
.vh-author .wp-block-avatar img { border-radius: 999px; border: 3px solid var(--vh-cream); box-shadow: 0 6px 18px -8px rgba(14,36,56,0.4); }
.vh-author .vh-eyebrow { margin-bottom: 0.3rem; }

/* =========================================================
   CTA band
   ========================================================= */
.vh-cta {
	background: var(--wp--preset--gradient--hero);
	color: #eaf1f5;
	border-radius: 22px;
	position: relative;
	overflow: hidden;
}
.vh-cta::after {
	content: "";
	position: absolute; left: -10%; bottom: -40%;
	width: 50%; aspect-ratio: 1;
	background: radial-gradient(circle, rgba(192,137,74,0.3), transparent 62%);
}
.vh-cta h2, .vh-cta h3 { color: #fff; }
.vh-cta p { color: rgba(234,241,245,0.85); }
.vh-cta .wp-block-button__link { background: var(--vh-bronze); }

/* =========================================================
   FOOTER
   ========================================================= */
.vh-footer {
	background: var(--vh-ink);
	color: rgba(234,241,245,0.78);
}
.vh-footer .wp-block-site-title a { color: #fff; text-decoration: none; }
.vh-footer h2, .vh-footer h3 { color: #fff; }
.vh-footer .vh-eyebrow, .vh-footer .vh-eyebrow p { color: #e9c79a; }
.vh-footer a { color: rgba(234,241,245,0.78); text-decoration: none; transition: color 0.25s var(--vh-ease); }
.vh-footer a:hover { color: var(--vh-bronze); }
.vh-footer .wp-block-navigation { font-family: var(--vh-sans); font-size: 0.95rem; }
.vh-footer .vh-footer-rule { border-top: 1px solid rgba(255,255,255,0.12); }
.vh-footer-fine, .vh-footer-fine p { font-size: 0.82rem; color: rgba(234,241,245,0.55); }

/* =========================================================
   PAGINATION
   ========================================================= */
.wp-block-query-pagination { font-family: var(--vh-sans); gap: 0.4rem; }
.wp-block-query-pagination a,
.wp-block-query-pagination .wp-block-query-pagination-numbers .current {
	border: 1px solid var(--vh-line);
	padding: 0.45rem 0.85rem;
	border-radius: 10px;
	text-decoration: none;
	color: var(--vh-ink);
	transition: all 0.25s var(--vh-ease);
}
.wp-block-query-pagination a:hover { background: var(--vh-ink); color: #fff; border-color: var(--vh-ink); }
.wp-block-query-pagination .current { background: var(--vh-bronze); color: #fff; border-color: var(--vh-bronze); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 781px) {
	.vh-hero { border-radius: 16px; }
	.vh-cards .wp-block-post-title { font-size: 1.2rem; }
}

/* Reveal on scroll (progressive enhancement; JS adds .vh-in) */
@media (prefers-reduced-motion: no-preference) {
	.vh-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--vh-ease), transform 0.7s var(--vh-ease); }
	.vh-reveal.vh-in { opacity: 1; transform: none; }
}
