/*
Theme Name: VitalSigns
Theme URI: https://vitalsignsreview.com
Author: VitalSignsReview
Description: Custom editorial theme for VitalSignsReview — an evidence-based health publication. Medical-journal rigor with premium magazine warmth.
Version: 1.0.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: vitalsigns
*/

/* ============ Tokens ============ */
:root {
	--navy: #0F2A47;
	--navy-deep: #0A1F36;
	--navy-ink: #1C3550;
	--teal: #159895;
	--teal-dark: #0E7B79;
	--green: #57C84D;
	--green-dark: #3E9E36;
	--mint: #EAF6F6;
	--paper: #F7FBFA;
	--white: #FFFFFF;
	--red: #D64545;
	--line: #D9E9E8;
	--text: #24384A;
	--text-soft: #5A6E7F;
	--display: "Fraunces", Georgia, serif;
	--serif: "Source Serif 4", Georgia, serif;
	--sans: "Public Sans", -apple-system, sans-serif;
	--radius: 14px;
	--shadow: 0 10px 30px -12px rgba(15, 42, 71, 0.18);
	--shadow-lg: 0 24px 50px -20px rgba(15, 42, 71, 0.28);
	--wrap: 1160px;
	--wrap-narrow: 760px;
}

/* ============ Reset-lite ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--text);
	background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
a:hover { color: var(--teal); }

.skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--navy); color: #fff; padding: 10px 18px; z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

.vsr-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.vsr-wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 24px; }

/* ============ Header ============ */
.vsr-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(247, 251, 250, 0.92);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}
.vsr-header-rule {
	height: 3px;
	background: linear-gradient(90deg, var(--navy) 0%, var(--teal) 55%, var(--green) 100%);
}
.vsr-header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 24px; padding-top: 14px; padding-bottom: 14px;
}
.vsr-brand {
	display: flex; align-items: center; gap: 10px;
	text-decoration: none; color: var(--navy);
}
.vsr-logo-mark { width: 40px; height: 40px; flex: none; }
.vsr-brand-text {
	font-family: var(--display);
	font-weight: 700; font-size: 1.35rem; letter-spacing: -0.01em;
	color: var(--navy);
}
.vsr-brand-text em { font-style: normal; color: var(--teal); }

.vsr-nav ul { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.vsr-nav li { margin: 0; }
.vsr-nav a {
	display: inline-block; padding: 8px 14px;
	font-weight: 600; font-size: 0.95rem; text-decoration: none;
	color: var(--navy-ink); border-radius: 999px;
	transition: background 0.18s ease, color 0.18s ease;
}
.vsr-nav a:hover { background: var(--mint); color: var(--teal-dark); }
.vsr-nav-cta a { background: var(--navy); color: #fff; }
.vsr-nav-cta a:hover { background: var(--teal-dark); color: #fff; }

.vsr-nav-toggle { display: none; }
.vsr-burger { display: none; }

/* ============ Hero ============ */
.vsr-hero {
	background:
		radial-gradient(1200px 500px at 85% -10%, rgba(21, 152, 149, 0.25), transparent 60%),
		radial-gradient(900px 420px at 5% 110%, rgba(87, 200, 77, 0.16), transparent 55%),
		var(--navy-deep);
	color: var(--mint);
	overflow: hidden;
}
.vsr-hero-inner { padding: 84px 24px 64px; max-width: 900px; }
.vsr-hero-kicker {
	margin: 0 0 18px;
	font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
	color: var(--green);
	animation: vsr-rise 0.7s ease both;
}
.vsr-hero-title {
	margin: 0 0 22px;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(2.4rem, 5.6vw, 4.2rem);
	line-height: 1.06; letter-spacing: -0.02em;
	color: #fff;
	animation: vsr-rise 0.7s 0.08s ease both;
}
.vsr-hero-accent {
	color: var(--green);
	font-style: italic;
	font-weight: 700;
}
.vsr-hero-sub {
	margin: 0 0 30px; max-width: 640px;
	font-family: var(--serif);
	font-size: 1.2rem; line-height: 1.7;
	color: rgba(234, 246, 246, 0.85);
	animation: vsr-rise 0.7s 0.16s ease both;
}
.vsr-hero-ekgline { color: var(--teal); max-width: 560px; animation: vsr-rise 0.7s 0.24s ease both; }
.vsr-ekg { display: block; width: 100%; height: 44px; }
.vsr-ekg-path {
	stroke-dasharray: 1200;
	stroke-dashoffset: 1200;
	animation: vsr-draw 2.4s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.vsr-trust {
	list-style: none; margin: 26px 0 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 12px 28px;
	animation: vsr-rise 0.7s 0.32s ease both;
}
.vsr-trust li {
	display: flex; align-items: center; gap: 8px;
	font-weight: 600; font-size: 0.95rem; color: rgba(234, 246, 246, 0.92);
}
.vsr-check { width: 18px; height: 18px; flex: none; }

@keyframes vsr-rise {
	from { opacity: 0; transform: translateY(18px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes vsr-draw { to { stroke-dashoffset: 0; } }

/* ============ Buttons & chips ============ */
.vsr-btn {
	display: inline-block;
	background: var(--navy); color: #fff;
	font-weight: 700; font-size: 0.95rem; text-decoration: none;
	padding: 12px 24px; border-radius: 999px;
	box-shadow: var(--shadow);
	transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.vsr-btn:hover { background: var(--teal-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.vsr-btn-kofi { background: var(--teal); }
.vsr-btn-kofi:hover { background: var(--green-dark); }

.vsr-chip {
	display: inline-block;
	background: var(--mint); color: var(--teal-dark);
	border: 1px solid var(--line);
	font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
	text-decoration: none;
	padding: 5px 12px; border-radius: 999px;
	transition: background 0.15s ease;
}
.vsr-chip:hover { background: #DDF0EF; color: var(--teal-dark); }
.vsr-chip-latest { background: var(--green); border-color: var(--green); color: #fff; }

.vsr-badge {
	display: inline-flex; align-items: center; gap: 6px;
	background: #fff; border: 1px solid var(--line);
	font-weight: 700; font-size: 0.78rem; color: var(--navy);
	padding: 5px 12px; border-radius: 999px;
}
.vsr-badge .vsr-check { width: 15px; height: 15px; }

.vsr-meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	font-size: 0.85rem; font-weight: 600; color: var(--text-soft);
}

/* ============ Featured card ============ */
.vsr-featured { padding: 56px 0 8px; }
.vsr-featured-card {
	display: grid; grid-template-columns: 1.15fr 1fr; align-items: center;
	background: #fff; border: 1px solid var(--line); border-radius: 22px;
	overflow: hidden; box-shadow: var(--shadow-lg);
}
.vsr-featured-media img { width: 100%; height: 100%; object-fit: cover; }
.vsr-featured-body { padding: 40px 44px; display: grid; gap: 16px; justify-items: start; }
.vsr-featured-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; letter-spacing: -0.01em; }
.vsr-featured-title a { color: var(--navy); text-decoration: none; }
.vsr-featured-title a:hover { color: var(--teal-dark); }

/* ============ Sections & cards ============ */
.vsr-latest { padding: 56px 0 80px; }
.vsr-related { padding: 8px 0 80px; }
.vsr-section-head { margin-bottom: 34px; }
.vsr-section-head h2 {
	margin: 0 0 10px;
	font-family: var(--display); font-weight: 600;
	font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em;
	color: var(--navy);
}
.vsr-section-ekg { color: var(--teal); max-width: 260px; opacity: 0.85; }
.vsr-section-ekg .vsr-ekg { height: 30px; }
.vsr-section-ekg .vsr-ekg-path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }

.vsr-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.vsr-card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; display: flex; flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.vsr-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--teal); }
.vsr-card-media { display: block; aspect-ratio: 1200 / 630; overflow: hidden; }
.vsr-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.vsr-card:hover .vsr-card-media img { transform: scale(1.04); }
.vsr-card-body { padding: 22px 24px 24px; display: grid; gap: 12px; align-content: start; justify-items: start; }
.vsr-card-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.22rem; line-height: 1.25; }
.vsr-card-title a { color: var(--navy); text-decoration: none; }
.vsr-card-title a:hover { color: var(--teal-dark); }
.vsr-card-excerpt { margin: 0; font-size: 0.95rem; color: var(--text-soft); }

/* Pagination */
.pagination, .nav-links { display: flex; gap: 8px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.nav-links .page-numbers {
	display: inline-block; padding: 9px 16px; border-radius: 999px;
	border: 1px solid var(--line); background: #fff;
	color: var(--navy); font-weight: 700; font-size: 0.9rem; text-decoration: none;
}
.nav-links .page-numbers.current, .nav-links .page-numbers:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ============ Archive head ============ */
.vsr-archive-head { background: var(--mint); padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.vsr-archive-title { margin: 0 0 8px; font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 4vw, 3rem); color: var(--navy); letter-spacing: -0.015em; }
.vsr-archive-desc { margin: 0 0 12px; max-width: 640px; color: var(--text-soft); font-family: var(--serif); font-size: 1.1rem; }

/* ============ Article ============ */
.vsr-article-head { padding: 60px 0 10px; }
.vsr-article-head .vsr-chip { margin-bottom: 18px; }
.vsr-article-title {
	margin: 10px 0 20px;
	font-family: var(--display); font-weight: 600;
	font-size: clamp(1.9rem, 4.4vw, 3rem);
	line-height: 1.12; letter-spacing: -0.02em;
	color: var(--navy);
}
.vsr-article-meta { padding-bottom: 10px; }
.vsr-article-hero { margin: 22px 0 8px; }
.vsr-article-hero img { border-radius: 18px; box-shadow: var(--shadow-lg); }

.entry-content {
	font-family: var(--serif);
	font-size: 1.17rem; line-height: 1.78;
	padding: 26px 0 70px;
}
.entry-content > p:nth-of-type(2)::first-letter {
	font-family: var(--display);
	font-weight: 700;
	font-size: 3.4em; line-height: 0.82;
	float: left; padding: 6px 10px 0 0;
	color: var(--teal-dark);
}
.entry-content h2 {
	font-family: var(--display); font-weight: 600;
	font-size: 1.7rem; line-height: 1.2; letter-spacing: -0.01em;
	color: var(--navy);
	margin: 2.2em 0 0.6em;
	padding-bottom: 10px;
	background: linear-gradient(90deg, var(--teal), var(--green)) left bottom / 64px 3px no-repeat;
}
.entry-content h3 {
	font-family: var(--sans); font-weight: 700;
	font-size: 1.12rem; color: var(--navy);
	margin: 1.8em 0 0.5em;
}
.entry-content a { color: var(--teal-dark); text-decoration-color: rgba(21, 152, 149, 0.4); text-underline-offset: 3px; }
.entry-content a:hover { color: var(--green-dark); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.45em; }
.entry-content li::marker { color: var(--teal); font-weight: 700; }
.entry-content hr {
	border: 0; height: 1px;
	background: var(--line);
	margin: 2.6em 0;
	position: relative;
}
.entry-content img { border-radius: 14px; }
.entry-content sup { font-family: var(--sans); font-size: 0.68em; color: var(--teal-dark); font-weight: 700; }

/* "Medically referenced" opening note -> callout */
.entry-content > p:first-of-type:has(> em:only-child) {
	background: var(--mint);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 14px 18px;
	font-family: var(--sans);
	font-size: 0.92rem; line-height: 1.6;
	color: var(--navy-ink);
}
.entry-content > p:first-of-type:has(> em:only-child) em { font-style: normal; }
.entry-content > p:first-of-type:has(> em:only-child)::before {
	content: "\2713\00a0 Evidence-checked";
	display: block;
	font-weight: 700; font-size: 0.72rem;
	letter-spacing: 0.12em; text-transform: uppercase;
	color: var(--teal-dark);
	margin-bottom: 6px;
}

/* References block: <hr><p><strong>References</strong></p><ol> */
.entry-content hr + p:has(+ ol) {
	font-family: var(--sans); font-weight: 700;
	font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--navy);
	margin-bottom: 10px;
}
.entry-content hr + p + ol {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 18px 22px 18px 38px;
	font-family: var(--sans);
	font-size: 0.9rem; line-height: 1.6;
	color: var(--text-soft);
}
.entry-content hr + p + ol li { margin-bottom: 0.5em; }

/* Ko-fi CTA inside content -> pill button */
.entry-content a[href*="ko-fi.com"] {
	display: inline-block;
	background: linear-gradient(90deg, var(--teal), var(--green-dark));
	color: #fff !important;
	font-family: var(--sans);
	font-weight: 700; font-size: 1rem;
	text-decoration: none;
	padding: 14px 26px;
	border-radius: 999px;
	box-shadow: var(--shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.entry-content a[href*="ko-fi.com"]:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.entry-content a[href*="ko-fi.com"] span { color: rgba(255, 255, 255, 0.85); }

/* ============ Footer ============ */
.vsr-footer { background: var(--navy-deep); color: var(--mint); margin-top: 40px; }
.vsr-footer-ekg { color: var(--teal); opacity: 0.6; }
.vsr-footer-ekg .vsr-ekg { height: 36px; }
.vsr-footer-ekg .vsr-ekg-path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
.vsr-footer-grid {
	display: grid; grid-template-columns: 1.6fr 1fr 1fr;
	gap: 44px; padding-top: 34px; padding-bottom: 40px;
}
.vsr-brand-footer .vsr-brand-text { color: #fff; }
.vsr-footer-tag { margin: 14px 0 20px; max-width: 380px; color: rgba(234, 246, 246, 0.75); font-size: 0.95rem; }
.vsr-footer-col h3 {
	margin: 6px 0 14px;
	font-family: var(--sans); font-weight: 700;
	font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
	color: var(--green);
}
.vsr-footer-col ul { list-style: none; margin: 0; padding: 0; }
.vsr-footer-col li { margin-bottom: 9px; }
.vsr-footer-col a { color: rgba(234, 246, 246, 0.85); text-decoration: none; font-size: 0.95rem; }
.vsr-footer-col a:hover { color: var(--green); }
.vsr-footer-legal {
	border-top: 1px solid rgba(234, 246, 246, 0.14);
	padding-top: 22px; padding-bottom: 30px;
	font-size: 0.8rem; color: rgba(234, 246, 246, 0.55);
}
.vsr-footer-legal a { color: rgba(234, 246, 246, 0.75); }

/* ============ Responsive ============ */
@media (max-width: 900px) {
	.vsr-featured-card { grid-template-columns: 1fr; }
	.vsr-featured-body { padding: 28px; }
	.vsr-grid { grid-template-columns: repeat(2, 1fr); }
	.vsr-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.vsr-grid { grid-template-columns: 1fr; }
	.vsr-footer-grid { grid-template-columns: 1fr; gap: 30px; }
	.vsr-hero-inner { padding: 60px 24px 48px; }

	.vsr-burger {
		display: flex; flex-direction: column; gap: 5px;
		width: 44px; height: 44px; align-items: center; justify-content: center;
		border: 1px solid var(--line); border-radius: 10px; background: #fff;
		cursor: pointer;
	}
	.vsr-burger span { display: block; width: 18px; height: 2px; background: var(--navy); transition: transform 0.2s ease, opacity 0.2s ease; }
	.vsr-nav {
		display: none;
		position: absolute; left: 0; right: 0; top: 100%;
		background: #fff; border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow-lg);
		padding: 12px 20px 20px;
	}
	.vsr-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.vsr-nav a { display: block; padding: 12px 14px; border-radius: 10px; }
	.vsr-nav-toggle:checked ~ .vsr-nav { display: block; }
	.vsr-nav-toggle:checked ~ .vsr-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.vsr-nav-toggle:checked ~ .vsr-burger span:nth-child(2) { opacity: 0; }
	.vsr-nav-toggle:checked ~ .vsr-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}
