/*
 * Health365 – trang Lien he (Mau 11), Chinh sach (Mau 12), Gioi thieu, Tin tuc va Du an (Mau 13), dien thoai (Mau 14).
 * Nap theo khoi health365/pages (block.json "style"): chi co o cac trang tren.
 * Mau chi dung bien --wp--preset--color--* (D-024). Diem gay: 782px (781px trong media query) va 480px.
 * Vung bam toi thieu 44px (--wp--custom--touch-target).
 */

/* ---------- Khung chung ---------- */
.h365-pgwrap {
	padding-top: var(--wp--preset--spacing--40);
	padding-bottom: var(--wp--preset--spacing--60);
}

.h365-pgwrap > * + * {
	margin-block-start: var(--wp--preset--spacing--40);
}

.h365-pg-crumbs,
.h365-pgwrap > .h365-pg-crumbs + * {
	margin-block-start: 0;
}

/* Muc duong dan co vung bam 44px: can giua theo chieu doc de dau "/" thang hang. */
.h365-pg .h365-crumbs ol {
	align-items: center;
}

.h365-page-title,
.h365-policy__title,
.h365-news-head__title,
.h365-page-hero__title {
	margin: 0.5rem 0 0;
	font-size: var(--wp--preset--font-size--huge);
	line-height: 1.1;
	letter-spacing: var(--wp--custom--tracking--title);
	color: var(--wp--preset--color--contrast);
}

.h365-empty {
	padding: var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--muted);
}

/* The chon (chip): thanh loc tin tuc, chinh sach lien quan. */
.h365-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.h365-chip {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: var(--wp--custom--touch-target);
	padding: 0.5rem 1.125rem;
	border: var(--wp--custom--border-width) solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--pill);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.h365-chip:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.h365-chip.is-current {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

/* ---------- Lien he (Mau 11) ---------- */
.h365-page-hero {
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	border-radius: var(--wp--custom--radius--large);
	background: radial-gradient(ellipse at 50% 0%, var(--wp--preset--color--tint) 0%, var(--wp--preset--color--base) 80%);
}

.h365-page-hero__title {
	font-size: var(--wp--preset--font-size--page-title);
	letter-spacing: -1.6px;
}

.h365-page-hero__lead {
	max-width: 38.75rem;
	margin-block-start: 0.5rem;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.6;
	color: var(--wp--preset--color--body);
}

.h365-page-hero__lead > * {
	margin: 0 0 0.75rem;
}

.h365-contact__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 2.5rem;
	align-items: flex-start;
}

.h365-contact__grid > .h365-contact-info {
	flex: 1 1 22.5rem;
	min-width: 0;
}

.h365-contact__grid > .h365-form-section {
	flex: 1 1 30rem;
	min-width: 0;
	margin-block-start: 0;
	padding: 2.25rem;
}

.h365-contact-info {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.h365-contact-card {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	padding: 1.625rem;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--surface);
}

.h365-contact-card > * {
	margin: 0;
}

.h365-contact-card__value {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.h365-contact-card__value.is-main {
	font-size: 1.5rem;
	font-weight: 700;
}

.h365-contact-card__value:hover {
	color: var(--wp--preset--color--primary);
}

.h365-contact-card__text {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--wp--preset--color--contrast);
}

.h365-contact-card__note {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

.h365-contact-info__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.h365-contact-info__actions .h365-btn {
	padding-inline: 1.75rem;
}

/* Ban do: chi lien ket mo the moi, khong nhung iframe (CSP, rieng tu). */
.h365-map {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.75rem;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	border-radius: var(--wp--custom--radius--large);
	background: var(--wp--preset--color--tint);
}

.h365-map > * {
	margin: 0;
}

.h365-map__title {
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--contrast);
}

.h365-map__address {
	max-width: 40rem;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.6;
	color: var(--wp--preset--color--contrast);
}

.h365-map__note {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

/* The lien ket (lien he, trang gioi thieu). */
.h365-help-links__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr));
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.h365-help-links__item {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	box-sizing: border-box;
	height: 100%;
	min-height: var(--wp--custom--touch-target);
	padding: 1.625rem;
	border: var(--wp--custom--border-width) solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--medium);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.h365-help-links__item strong {
	font-size: 1.0625rem;
}

.h365-help-links__item span {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.h365-help-links__item:hover {
	border-color: var(--wp--preset--color--primary);
}

.h365-help-links__item:hover strong {
	color: var(--wp--preset--color--primary);
}

.h365-subpages__title,
.h365-related__title,
.h365-policy-related__title {
	margin: 0 0 1rem;
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--contrast);
}

/* Thong tin doanh nghiep (chu so huu website, ve chung toi). */
.h365-company {
	padding: 1.5rem 1.75rem;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--surface);
}

.h365-company > .h365-eyebrow {
	margin: 0 0 0.75rem;
}

.h365-company__list {
	display: grid;
	grid-template-columns: minmax(8rem, max-content) 1fr;
	gap: 0.5rem 1.25rem;
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.h365-company__list dt {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

.h365-company__list dd {
	margin: 0;
	color: var(--wp--preset--color--body);
	overflow-wrap: anywhere;
}

/* ---------- Chinh sach (Mau 12) ---------- */
.h365-policy-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	max-width: 51.25rem;
}

.h365-policy-meta__date {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

.h365-policy-meta__print {
	padding-block: 0.5rem;
	font-size: var(--wp--preset--font-size--small);
}

.h365-policy__layout {
	display: flex;
	flex-wrap: wrap;
	gap: 3.5rem;
	align-items: flex-start;
}

.h365-toc {
	position: sticky;
	top: 1rem;
	flex: 0 0 15rem;
	box-sizing: border-box;
	padding: 1.375rem 1.5rem;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--surface);
}

.h365-toc__title {
	margin: 0 0 0.5rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.h365-toc__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.h365-toc__item a {
	display: flex;
	gap: 0.375rem;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.35;
	color: var(--wp--preset--color--body);
	text-decoration: none;
}

.h365-toc__item--h3 a {
	padding-left: 1rem;
	font-size: 0.8125rem;
}

.h365-toc__item a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
}

.h365-toc__num {
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

.h365-policy__content {
	flex: 1 1 32.5rem;
	min-width: 0;
	max-width: 51.25rem;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.8;
	color: var(--wp--preset--color--body);
}

.h365-policy__content > * {
	margin-block: 0 1.125rem;
}

.h365-policy__content h2,
.h365-policy__content h3 {
	margin-block: 2rem 0.5rem;
	line-height: 1.3;
	color: var(--wp--preset--color--contrast);
	scroll-margin-top: 1.5rem;
}

.h365-policy__content h2 {
	font-size: 1.625rem;
	letter-spacing: var(--wp--custom--tracking--tight);
}

.h365-policy__content h3 {
	font-size: 1.1875rem;
}

.h365-policy__num {
	color: var(--wp--preset--color--primary);
}

.h365-policy__content ul,
.h365-policy__content ol {
	padding-left: 1.375rem;
}

.h365-policy__content li + li {
	margin-top: 0.5rem;
}

/* Dau CHO XAC NHAN: de nhin thay khi duyet ban nhap. */
.h365-pending {
	padding: 0 0.25rem;
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.h365-pending-note {
	padding: 1rem 1.25rem;
	border-radius: 1.25rem;
	background: var(--wp--preset--color--tint);
	font-size: 0.9375rem;
}

.h365-tpl-page-feedback .h365-form-section {
	max-width: 70rem;
}

/* ---------- Tin tuc (Mau 13) ---------- */
.h365-news-head > * {
	margin-block: 0 1.25rem;
}

.h365-news-head__lead {
	max-width: 40rem;
	color: var(--wp--preset--color--body);
}

.h365-news-grid .wp-block-post-template {
	gap: 1.75rem;
}

.h365-news-grid .h365-card {
	gap: 0.625rem;
}

.h365-news-grid .h365-card > * {
	margin: 0;
}

.h365-card__media,
.h365-ncard__media,
.h365-proj__media {
	display: block;
	align-self: stretch;
	width: 100%;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	border-radius: var(--wp--custom--radius--medium);
	background: var(--wp--preset--color--tint);
}

.h365-card__media img,
.h365-ncard__media img,
.h365-proj__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.h365-card__media.is-placeholder a {
	display: block;
	height: 100%;
}

/* O giu cho anh khi bai chua co anh: nen nhat chuyen sac, bieu tuong Health365 mo (dung lai .h365-ph; home.css khong nap o day). */
.h365-pg .h365-ph,
.h365-news .h365-ph {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 8rem;
	background: linear-gradient(135deg, var(--wp--preset--color--tint), color-mix(in srgb, var(--wp--preset--color--tint) 55%, var(--wp--preset--color--base)));
}

.h365-pg .h365-ph::after,
.h365-news .h365-ph::after {
	content: "";
	position: absolute;
	inset: 0;
	width: 4rem;
	height: 4rem;
	margin: auto;
	background: var(--wp--preset--color--brand);
	opacity: 0.35;
	-webkit-mask: url("../images/logo/health365-bieu-tuong.svg") center / contain no-repeat;
	mask: url("../images/logo/health365-bieu-tuong.svg") center / contain no-repeat;
}

.h365-card__cat,
.h365-ncard__cat {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

.h365-card__cat a {
	display: inline-flex;
	align-items: center;
	min-height: var(--wp--custom--touch-target);
	color: inherit;
	text-decoration: none;
}

.h365-news-grid .h365-card__title,
.h365-ncard__title {
	margin: 0;
	font-size: 1.1875rem;
	line-height: 1.3;
}

.h365-news-grid .h365-card__title a,
.h365-ncard__title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.h365-news-grid .h365-card__title a:hover,
.h365-ncard__title a:hover {
	color: var(--wp--preset--color--primary);
}

.h365-card__excerpt {
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

.h365-card__excerpt p {
	margin: 0;
}

.h365-card__date,
.h365-ncard__date {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

/* Trang dau Tin tuc: bai moi nhat lam bai noi bat (Mau 13). */
body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child {
	grid-column: span 2;
	grid-row: span 2;
	padding-bottom: 1.5rem;
	border-radius: var(--wp--custom--radius--large);
	background: var(--wp--preset--color--surface);
	overflow: hidden;
}

body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child .h365-card > :not(.h365-card__media) {
	padding-inline: 2rem;
}

body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child .h365-card__media {
	height: 18.75rem;
	aspect-ratio: auto;
	border-radius: 0;
}

body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child .h365-card__title {
	font-size: 1.875rem;
	letter-spacing: -0.6px;
}

/* Phan trang (khoi query-pagination, phan trang du an). */
.h365-query-pager,
.h365-pager-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-block-start: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}

.h365-query-pager a,
.h365-query-pager .page-numbers,
.h365-pager-nav .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: var(--wp--custom--touch-target);
	min-height: var(--wp--custom--touch-target);
	padding: 0.5rem 1rem;
	border: var(--wp--custom--border-width) solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.h365-query-pager .page-numbers.current,
.h365-pager-nav .page-numbers.current {
	border-color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

.h365-query-pager .page-numbers.dots,
.h365-pager-nav .page-numbers.dots {
	border-color: transparent;
}

/* Bai viet */
.h365-article__meta {
	gap: 0.75rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.h365-article__meta a {
	color: var(--wp--preset--color--primary);
}

.h365-ngrid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16.25rem, 1fr));
	gap: 1.75rem;
}

.h365-ncard {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

/* ---------- Du an (Mau 13) ---------- */
.h365-projects {
	padding: var(--wp--preset--spacing--50);
	border-radius: var(--wp--custom--radius--large);
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.h365-projects :focus-visible {
	outline-color: var(--wp--preset--color--accent);
}

.h365-projects__eyebrow {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: var(--wp--custom--tracking--label);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

.h365-projects__title {
	margin: 0.5rem 0 1.5rem;
	font-size: var(--wp--preset--font-size--xx-large);
	letter-spacing: -0.8px;
	color: inherit;
}

.h365-projects__more {
	margin: 1.5rem 0 0;
}

.h365-proj-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
	gap: 1.25rem;
}

.h365-proj {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.h365-proj > * {
	margin: 0;
}

.h365-proj__media {
	border-radius: 1.25rem;
}

.h365-proj__title {
	font-size: 1.125rem;
	line-height: 1.3;
}

.h365-proj__title a {
	color: var(--wp--preset--color--base);
	text-decoration: none;
}

.h365-proj__title a:hover {
	text-decoration: underline;
}

.h365-proj__unit,
.h365-proj__desc {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
	color: var(--wp--preset--color--on-dark);
}

.h365-proj__unit {
	font-weight: 600;
}

.h365-proj-grid--light .h365-proj__title {
	font-size: 1.25rem;
}

.h365-proj-grid--light .h365-proj__title a {
	color: var(--wp--preset--color--contrast);
}

.h365-proj-grid--light .h365-proj__title a:hover {
	color: var(--wp--preset--color--primary);
}

.h365-proj-grid--light .h365-proj__unit {
	color: var(--wp--preset--color--primary);
}

.h365-proj-grid--light .h365-proj__desc {
	color: var(--wp--preset--color--muted);
}

.h365-project-archive > * {
	margin-block: 0 1.5rem;
}

.h365-proj-meta {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* ---------- May tinh bang, dien thoai (Mau 14) ---------- */
@media (max-width: 781px) {
	.h365-page-title,
	.h365-policy__title,
	.h365-news-head__title,
	.h365-page-hero__title {
		font-size: var(--wp--preset--font-size--xx-large);
		letter-spacing: -1px;
	}

	.h365-page-hero {
		padding: var(--wp--preset--spacing--30);
		border-radius: var(--wp--custom--radius--medium);
	}

	.h365-contact__grid {
		gap: 1.5rem;
	}

	.h365-contact__grid > .h365-form-section {
		padding: 1.5rem;
	}

	.h365-policy__layout {
		gap: 1.5rem;
	}

	/* Muc luc len dau, khong dinh khi cuon. */
	.h365-toc {
		position: static;
		flex-basis: 100%;
	}

	body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child {
		grid-column: auto;
		grid-row: auto;
	}

	body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child .h365-card > :not(.h365-card__media) {
		padding-inline: 1.25rem;
	}

	body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child .h365-card__title {
		font-size: 1.375rem;
	}

	body:not(.paged) .h365-tpl-home .h365-news-grid .wp-block-post-template > li:first-child .h365-card__media {
		height: auto;
		aspect-ratio: 16 / 10;
	}

	.h365-projects {
		padding: var(--wp--preset--spacing--40) 1.375rem;
		border-radius: var(--wp--custom--radius--medium);
	}

	.h365-projects__title {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	/* Nut chinh chiem toan chieu rong (Mau 14). */
	.h365-contact-info__actions,
	.h365-map {
		align-items: stretch;
	}

	.h365-contact-info__actions .h365-btn,
	.h365-map .h365-btn,
	.h365-projects__more .h365-btn {
		width: 100%;
	}

	.h365-contact-card {
		padding: 1.25rem;
	}

	.h365-company__list {
		grid-template-columns: 1fr;
		gap: 0.125rem;
	}

	.h365-company__list dd {
		margin-bottom: 0.5rem;
	}

	.h365-policy-meta__print {
		width: 100%;
	}

	.h365-chips {
		flex-wrap: nowrap;
		margin-inline: calc(-1 * var(--wp--custom--gutter));
		padding: 0 var(--wp--custom--gutter) 0.5rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
	}

	.h365-chips > li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	.h365-policy-related .h365-chips {
		flex-wrap: wrap;
		margin-inline: 0;
		padding: 0;
		overflow: visible;
	}
}

/* ---------- In trang chinh sach ---------- */
@media print {
	.h365-header,
	.h365-footer,
	.h365-quick,
	#h365-cookie,
	.h365-toc,
	.h365-policy-related,
	.h365-policy-meta__print,
	.h365-pg-crumbs,
	.h365-form-section {
		display: none !important;
	}

	.h365-pgwrap {
		padding: 0;
	}

	.h365-policy__content {
		max-width: none;
		font-size: 11pt;
		line-height: 1.5;
	}

	.h365-policy__content a::after {
		content: " (" attr(href) ")";
		font-size: 9pt;
	}
}
