/* ============================================================
   Vua Mắm — Blog + chi tiết bài viết
   ============================================================ */

/* Bài nổi bật */
.vm-feat-wrap { padding-top: 40px; padding-bottom: 20px; }

.vm-feat {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	background: #fff;
	border: 1px solid var(--vm-line);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(74, 16, 14, 0.07);
	transition: box-shadow 0.25s;
}

.vm-feat:hover { box-shadow: 0 24px 50px rgba(74, 16, 14, 0.13); }

.vm-feat__img { position: relative; height: 360px; display: block; background: var(--vm-cream); }
.vm-feat__img img { width: 100%; height: 100%; object-fit: cover; }
.vm-feat__img .vm-catchip { top: 16px; left: 16px; }

.vm-feat__body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }

.vm-feat__kicker { font-size: 12px; color: var(--vm-gold); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }

.vm-feat__title {
	font-family: var(--vm-font-head);
	font-weight: 800;
	font-size: 28px;
	line-height: 1.25;
	color: var(--vm-ink);
	margin: 12px 0 14px;
	display: block;
}

.vm-feat:hover .vm-feat__title { color: var(--vm-red); }
.vm-feat__excerpt { font-size: 15px; line-height: 1.75; color: var(--vm-ink-2); margin-bottom: 20px; display: block; }
.vm-feat__meta { font-size: 12.5px; color: var(--vm-ink-4); display: block; }
.vm-feat__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--vm-red); font-weight: 700; font-size: 14px; }

/* Chips chuyên mục */
.vm-blog-chips { padding-top: 24px; padding-bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

.vm-bchip {
	padding: 9px 18px;
	border-radius: 22px;
	border: 1px solid var(--vm-line-2);
	background: #fff;
	color: var(--vm-ink-2);
	font-size: 13.5px;
	font-weight: 500;
	transition: all 0.15s;
}

.vm-bchip:hover { border-color: var(--vm-red); color: var(--vm-red); }
.vm-bchip.is-active { background: var(--vm-red); border-color: var(--vm-red); color: #fff; font-weight: 700; }

/* Grid bài viết */
.vm-blog-grid {
	padding-top: 20px;
	padding-bottom: 66px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 26px;
}

.vm-bcard {
	background: #fff;
	border: 1px solid var(--vm-line);
	border-radius: 18px;
	overflow: hidden;
	display: block;
	height: 100%;
	transition: transform 0.25s, box-shadow 0.25s;
}

.vm-bcard:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(74, 16, 14, 0.11); }

.vm-bcard__img { position: relative; display: block; width: 100%; height: 200px; background: var(--vm-cream); overflow: hidden; }
.vm-bcard__img img { width: 100%; height: 100%; object-fit: cover; }

.vm-bcard__body { display: block; padding: 22px; }
.vm-bcard__title { display: block; font-weight: 700; font-size: 16.5px; color: var(--vm-ink); line-height: 1.35; }
.vm-bcard:hover .vm-bcard__title { color: var(--vm-red); }
.vm-bcard__excerpt { display: block; font-size: 13.5px; line-height: 1.65; color: var(--vm-ink-3); margin-top: 10px; }
.vm-bcard__meta { display: flex; align-items: center; gap: 10px; color: var(--vm-ink-4); font-size: 12.5px; margin-top: 14px; }

.vm-bcard--sm .vm-bcard__img { height: 168px; }
.vm-bcard--sm .vm-bcard__title { font-size: 15px; }
.vm-bcard--sm .vm-bcard__meta { margin-top: 10px; }

/* ---------- Chi tiết bài viết ---------- */
.vm-post__head { max-width: 800px; margin: 0 auto; padding: 30px 28px 0; }
.vm-post__head .vm-crumb { margin-bottom: 20px; }

.vm-catchip.is-inline { position: static; display: inline-block; }

.vm-post__head h1 {
	font-family: var(--vm-font-head);
	font-weight: 800;
	font-size: 38px;
	line-height: 1.2;
	color: var(--vm-ink);
	margin: 16px 0;
}

.vm-post__meta {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 13.5px;
	color: var(--vm-ink-3);
	padding-bottom: 24px;
	border-bottom: 1px solid var(--vm-line);
}

.vm-post__author { display: flex; align-items: center; gap: 8px; }

.vm-post__author .ava {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--vm-cream);
	color: var(--vm-red);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
}

.vm-post__hero { max-width: 800px; margin: 0 auto; padding: 26px 28px 0; }
.vm-post__hero .frame { border-radius: 18px; overflow: hidden; box-shadow: 0 16px 40px rgba(74, 16, 14, 0.08); }
.vm-post__hero img { width: 100%; height: 420px; object-fit: cover; display: block; }

.vm-post__body { max-width: 800px; margin: 0 auto; padding: 34px 28px 20px; }

/* Nội dung bài viết */
.vm-entry { font-size: 16px; line-height: 1.9; color: #4a3c33; }
.vm-entry > p:first-child { font-size: 17px; line-height: 1.85; color: #3a2c25; font-weight: 500; }
.vm-entry p { margin-bottom: 22px; }

.vm-entry h2, .vm-entry h3 {
	font-family: var(--vm-font-head);
	font-weight: 700;
	color: var(--vm-ink);
	margin: 34px 0 14px;
}

.vm-entry h2 { font-size: 26px; }
.vm-entry h3 { font-size: 24px; }

.vm-entry ul, .vm-entry ol { margin: 0 0 22px 22px; }
.vm-entry ul { list-style: disc; }
.vm-entry ol { list-style: decimal; }
.vm-entry li { margin-bottom: 8px; font-size: 15.5px; }
.vm-entry li::marker { color: var(--vm-red); font-weight: 700; }

/* Heading có anchor: chừa chỗ cho header sticky khi cuộn tới */
.vm-entry h2[id], .vm-entry h3[id] { scroll-margin-top: 112px; }

/* ---------- Mục lục bài viết ---------- */
.vm-toc {
	background: #fff;
	border: 1px solid var(--vm-line);
	border-radius: 14px;
	padding: 16px 20px;
	margin: 0 0 28px;
}

.vm-toc__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.vm-toc__title {
	display: flex;
	align-items: center;
	gap: 9px;
	font-family: var(--vm-font-head);
	font-weight: 700;
	font-size: 17px;
	color: var(--vm-ink);
}

.vm-toc__title svg { color: var(--vm-red); }

.vm-toc__toggle {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--vm-cream);
	color: var(--vm-red);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s;
}

.vm-toc.is-closed .vm-toc__toggle { transform: rotate(-90deg); }

/* Specificity cao hơn .vm-entry ol để không bị đánh số kép */
.vm-entry .vm-toc .vm-toc__list,
.vm-toc__list {
	list-style: none;
	margin: 12px 0 0;
	padding: 12px 0 0;
	border-top: 1px solid var(--vm-line);
	display: flex;
	flex-direction: column;
	gap: 4px;
	counter-reset: vmtoc;
}

.vm-toc.is-closed .vm-toc__list { display: none; }

.vm-toc__list li { margin: 0; counter-increment: vmtoc; }

.vm-toc__list a {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 6px 8px;
	border-radius: 8px;
	font-size: 14.5px;
	font-weight: 500;
	color: var(--vm-ink-2);
	line-height: 1.5;
	transition: background 0.15s, color 0.15s;
}

.vm-toc__list a::before {
	content: counter(vmtoc, decimal-leading-zero);
	font-family: var(--vm-font-head);
	font-weight: 700;
	font-size: 13px;
	color: var(--vm-gold);
	flex: none;
}

.vm-toc__list a:hover { background: var(--vm-cream); color: var(--vm-red); }
.vm-toc__list li.is-sub a { padding-left: 26px; font-size: 13.5px; }

/* ---------- Hộp tác giả ---------- */
.vm-author {
	display: flex;
	gap: 16px;
	background: #fff;
	border: 1px solid var(--vm-line);
	border-radius: 16px;
	padding: 22px 24px;
	margin-top: 30px;
}

.vm-author__ava {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(140deg, #a5291f, #791512);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--vm-font-head);
	font-weight: 700;
	font-size: 24px;
	flex: none;
}

.vm-author__meta { min-width: 0; }
.vm-author__by { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--vm-ink-4); font-weight: 600; }
.vm-author__name { display: block; font-family: var(--vm-font-head); font-weight: 700; font-size: 19px; color: var(--vm-ink); margin: 3px 0 6px; }
.vm-author__bio { font-size: 13.5px; line-height: 1.7; color: var(--vm-ink-3); }
a.vm-author__name { text-decoration: none; transition: color 0.2s; }
a.vm-author__name:hover { color: var(--vm-red); }
.vm-author__socials { display: flex; gap: 8px; margin-top: 12px; }
.vm-author__socials a {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--vm-cream);
	color: var(--vm-red);
	border: 1px solid var(--vm-line);
	transition: background 0.2s, color 0.2s;
}
.vm-author__socials a:hover { background: var(--vm-red); color: #fff; }

/* ---------- Trang tác giả (author.php) — hero căn giữa ---------- */
.vm-authorpage { padding-bottom: 30px; }
.vm-authorpage__hero { max-width: 720px; margin: 0 auto; padding: 56px 24px 34px; text-align: center; }
.vm-authorpage__ava {
	width: 92px;
	height: 92px;
	border-radius: 50%;
	background: linear-gradient(140deg, #a5291f, #791512);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--vm-font-head);
	font-weight: 700;
	font-size: 40px;
	box-shadow: 0 12px 30px rgba(138, 30, 27, 0.28);
}
.vm-authorpage__by {
	display: block;
	margin-top: 18px;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--vm-ink-4);
	font-weight: 700;
}
.vm-authorpage__name {
	font-family: var(--vm-font-head);
	font-weight: 800;
	font-size: 34px;
	color: var(--vm-ink);
	margin: 6px 0 12px;
}
.vm-authorpage__bio {
	font-size: 15px;
	line-height: 1.75;
	color: var(--vm-ink-3);
	max-width: 560px;
	margin: 0 auto;
}
.vm-authorpage__foot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 24px;
	flex-wrap: wrap;
}
.vm-authorpage__socials { display: flex; gap: 10px; }
.vm-authorpage__socials a {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--vm-red);
	border: 1px solid var(--vm-line);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	transition: background 0.2s, color 0.2s, transform 0.2s;
}
.vm-authorpage__socials a:hover { background: var(--vm-red); color: #fff; transform: translateY(-2px); }
.vm-authorpage__count {
	font-size: 14px;
	color: var(--vm-ink-3);
	font-weight: 600;
	padding-left: 18px;
	border-left: 1px solid var(--vm-line);
}

.vm-entry blockquote {
	margin: 0 0 24px;
	padding: 20px 26px;
	background: #fff;
	border-left: 4px solid var(--vm-red);
	border-radius: 0 12px 12px 0;
	font-family: var(--vm-font-head);
	font-style: italic;
	font-size: 18px;
	line-height: 1.6;
	color: var(--vm-ink-2);
}

.vm-entry img { border-radius: 14px; margin: 8px 0 22px; }
.vm-entry a { color: var(--vm-red); font-weight: 600; }

.vm-post__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding: 22px 0;
	border-top: 1px solid var(--vm-line);
	border-bottom: 1px solid var(--vm-line);
	margin-top: 10px;
}

.vm-post__tags { display: flex; gap: 8px; flex-wrap: wrap; }

.vm-post__tags a {
	background: var(--vm-cream);
	color: var(--vm-red);
	font-size: 12.5px;
	font-weight: 600;
	padding: 6px 13px;
	border-radius: 20px;
	transition: background 0.15s;
}

.vm-post__tags a:hover { background: #efe2c8; }

.vm-post__share { display: flex; align-items: center; gap: 8px; }
.vm-post__share > span { font-size: 13px; color: var(--vm-ink-4); }

.vm-post__share a, .vm-post__share button {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--vm-cream);
	color: var(--vm-red);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
}

.vm-post__share a:hover, .vm-post__share button:hover { background: var(--vm-red); color: #fff; }

.vm-post__related { max-width: 1100px; margin: 0 auto; padding: 40px 28px 66px; }
.vm-post__related h2 { font-family: var(--vm-font-head); font-weight: 800; font-size: 26px; color: var(--vm-ink); margin-bottom: 22px; text-align: center; }
/* Bài viết liên quan = bộ trượt dùng chung (desktop 3 thẻ vừa khít → mũi tên tự ẩn; mobile vuốt ngang) */
.vm-brelslider { position: relative; }
.vm-brelslider__track {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 6px;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.vm-brelslider__track::-webkit-scrollbar { display: none; }
.vm-brelslider__track .vm-bcard { flex: 0 0 calc((100% - 48px) / 3); scroll-snap-align: start; }
.vm-brelslider__nav {
	position: absolute;
	top: 40%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--vm-line);
	background: #fff;
	color: var(--vm-red);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
	transition: background 0.2s, color 0.2s, opacity 0.2s;
	z-index: 2;
}
.vm-brelslider__nav:hover { background: var(--vm-red); color: #fff; }
.vm-brelslider__nav.is-prev { left: -18px; }
.vm-brelslider__nav.is-next { right: -18px; }
.vm-brelslider__nav.is-off { opacity: 0.35; pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.vm-feat { grid-template-columns: 1fr; }
	.vm-feat__img { height: 260px; }
	.vm-feat__body { padding: 26px; }
	.vm-blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.vm-blog-grid { grid-template-columns: 1fr; }
	.vm-post__head h1 { font-size: 28px; }
	.vm-post__hero img { height: 240px; }
	.vm-feat__title { font-size: 22px; }

	/* Liên quan: thẻ ~84% (lộ mép thẻ kế báo vuốt được), mũi tên sát mép */
	.vm-post__related { padding: 34px 18px 54px; }
	.vm-brelslider__track { gap: 14px; }
	.vm-brelslider__track .vm-bcard { flex: 0 0 84%; }
	.vm-brelslider__nav.is-prev { left: -6px; }
	.vm-brelslider__nav.is-next { right: -6px; }

	/* Trang tác giả gọn trên mobile */
	.vm-authorpage__hero { padding: 40px 18px 26px; }
	.vm-authorpage__ava { width: 78px; height: 78px; font-size: 34px; }
	.vm-authorpage__name { font-size: 27px; }
	.vm-authorpage__bio { font-size: 14px; }
	.vm-authorpage__foot { gap: 12px; }
	.vm-authorpage__count { padding-left: 0; border-left: none; }
}
