/**
 * Hồ Tiến RTC — templates nội dung: page header, breadcrumb, card, section, FAQ, CTA.
 */

/* Page header -------------------------------------------------------- */
.htr-page-header {
	padding: 28px 0 32px;
	background: var(--htr-light);
	border-bottom: 1px solid var(--htr-border);
}

.htr-page-header__title {
	max-width: 860px;
	margin: 6px 0 0;
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
	font-weight: 800;
	line-height: 1.3;
	color: var(--htr-secondary);
}

.htr-page-header__intro {
	max-width: 760px;
	margin-top: 12px;
	font-size: 1.05rem;
	color: var(--htr-muted);
}

.htr-page-header__intro p:last-child {
	margin-bottom: 0;
}

.htr-page-header__meta {
	margin: 12px 0 0;
	font-size: .875rem;
	color: var(--htr-muted);
}

.htr-page-header__media {
	margin-top: 28px;
	margin-bottom: 0;
}

.htr-page-header__media img {
	display: block;
	width: 100%;
	max-height: 520px;
	object-fit: cover;
	border-radius: var(--htr-radius);
}

.htr-tag {
	display: inline-block;
	margin-top: 10px;
	padding: 3px 10px;
	background: var(--htr-primary);
	border-radius: var(--htr-radius);
	color: #fff;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.htr-tag:hover {
	background: var(--htr-primary-dark);
	color: #fff;
}

/* Breadcrumbs -------------------------------------------------------- */
.htr-breadcrumbs {
	margin-bottom: 6px;
	font-size: .85rem;
	color: var(--htr-muted);
}

.htr-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.htr-breadcrumbs li {
	margin: 0;
}

.htr-breadcrumbs li + li::before {
	content: "/";
	margin: 0 8px;
	color: #b5b5b5;
}

.htr-breadcrumbs a {
	color: var(--htr-muted);
}

.htr-breadcrumbs a:hover {
	color: var(--htr-primary);
}

.htr-breadcrumbs [aria-current] {
	color: var(--htr-text);
}

/* Article body ------------------------------------------------------- */
.htr-article__body {
	max-width: 900px;
	padding-top: 32px;
	padding-bottom: 16px;
}

.htr-section {
	margin: 0 0 32px;
}

.htr-section__title {
	position: relative;
	margin: 0 0 14px;
	padding-left: 14px;
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--htr-secondary);
}

.htr-section__title::before {
	content: "";
	position: absolute;
	left: 0;
	top: .2em;
	bottom: .2em;
	width: 4px;
	background: var(--htr-primary);
}

.htr-entry {
	margin-bottom: 32px;
}

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

.htr-list li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 24px;
}

.htr-list li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: .6em;
	width: 8px;
	height: 8px;
	background: var(--htr-primary);
}

.htr-list--steps {
	counter-reset: htr-step;
}

.htr-list--steps li {
	padding: 10px 12px 10px 52px;
	background: var(--htr-light);
	border-left: 3px solid var(--htr-primary);
	counter-increment: htr-step;
}

.htr-list--steps li::before {
	content: counter(htr-step);
	left: 12px;
	top: 50%;
	width: 28px;
	height: 28px;
	transform: translateY(-50%);
	background: var(--htr-secondary);
	color: #fff;
	font-size: .85rem;
	font-weight: 700;
	line-height: 28px;
	text-align: center;
}

.htr-specs {
	margin: 0 0 16px;
	border: 1px solid var(--htr-border);
	border-radius: var(--htr-radius);
}

.htr-specs__row {
	display: grid;
	grid-template-columns: minmax(120px, 34%) 1fr;
	border-bottom: 1px solid var(--htr-border);
}

.htr-specs__row:last-child {
	border-bottom: 0;
}

.htr-specs dt,
.htr-specs dd {
	margin: 0;
	padding: 10px 14px;
}

.htr-specs dt {
	background: var(--htr-light);
	font-weight: 600;
	color: var(--htr-muted);
}

.htr-specs dd {
	font-weight: 700;
	color: var(--htr-secondary);
}

.htr-summary {
	margin-bottom: 32px;
}

.htr-summary--high .htr-specs,
.htr-summary--critical .htr-specs {
	border-color: var(--htr-primary);
}

.htr-note {
	margin-top: -16px;
	font-size: .9rem;
	color: var(--htr-muted);
}

/* FAQ ---------------------------------------------------------------- */
.htr-faq__item {
	margin-bottom: 10px;
	border: 1px solid var(--htr-border);
	border-radius: var(--htr-radius);
	background: #fff;
}

.htr-faq__question {
	position: relative;
	padding: 14px 44px 14px 16px;
	font-weight: 700;
	color: var(--htr-secondary);
	list-style: none;
	cursor: pointer;
}

.htr-faq__question::-webkit-details-marker {
	display: none;
}

.htr-faq__question::after {
	content: "+";
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.3rem;
	font-weight: 400;
	color: var(--htr-primary);
}

.htr-faq__item[open] .htr-faq__question::after {
	content: "\2212";
}

.htr-faq__answer {
	padding: 0 16px 6px;
	color: var(--htr-text);
}

/* Gallery ------------------------------------------------------------ */
.htr-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.htr-gallery li {
	margin: 0;
}

.htr-gallery img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: var(--htr-radius);
}

/* Cards / grid ------------------------------------------------------- */
.htr-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.htr-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--htr-border);
	border-radius: var(--htr-radius);
	transition: border-color var(--htr-transition), box-shadow var(--htr-transition);
}

.htr-card:hover {
	border-color: #cfcfcf;
	box-shadow: var(--htr-shadow);
}

.htr-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--htr-light);
}

.htr-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.htr-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #c4c4c4;
}

.htr-card__placeholder .htr-icon {
	width: 40px;
	height: 40px;
}

.htr-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 16px 18px 18px;
}

.htr-card__type {
	margin-bottom: 6px;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--htr-primary);
}

.htr-card__title {
	margin: 0 0 6px;
	font-size: 1.1rem;
	font-weight: 800;
	line-height: 1.35;
}

.htr-card__title a {
	color: var(--htr-secondary);
}

.htr-card__title a:hover {
	color: var(--htr-primary);
}

.htr-card__meta {
	margin: 0 0 8px;
	font-size: .8rem;
	font-weight: 600;
	color: var(--htr-muted);
}

.htr-card__excerpt {
	margin: 0 0 12px;
	font-size: .92rem;
	color: var(--htr-text);
}

.htr-card__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	font-size: .85rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--htr-primary);
}

.htr-card__more .htr-icon {
	width: 16px;
	height: 16px;
	transition: transform var(--htr-transition);
}

.htr-card__more:hover .htr-icon {
	transform: translateX(3px);
}

/* Archive ------------------------------------------------------------ */
.htr-archive__body {
	padding-top: 28px;
	padding-bottom: 40px;
}

.htr-filter {
	margin-bottom: 24px;
}

.htr-filter ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.htr-filter li {
	margin: 0;
}

.htr-filter a {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid var(--htr-border);
	border-radius: var(--htr-radius);
	font-size: .875rem;
	font-weight: 600;
	color: var(--htr-secondary);
}

.htr-filter a:hover {
	border-color: var(--htr-secondary);
}

.htr-filter a.is-active {
	background: var(--htr-secondary);
	border-color: var(--htr-secondary);
	color: #fff;
}

/* Hàng lọc cấp 2 (quận/huyện): nhỏ, nền xanh nhạt. */
.htr-filter + .htr-filter--sub {
	margin-top: -12px;
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--htr-primary-soft);
}

.htr-filter--sub a {
	padding: 5px 12px;
	border-color: transparent;
	border-radius: 999px;
	background: #fff;
	font-size: .82rem;
}

.htr-filter--sub a.is-active {
	background: var(--htr-primary);
	border-color: var(--htr-primary);
}

.htr-empty {
	padding: 40px 20px;
	background: var(--htr-light);
	border: 1px dashed var(--htr-border);
	text-align: center;
	color: var(--htr-muted);
}

.htr-empty p {
	margin: 0;
}

.htr-search__form {
	max-width: 560px;
	margin-bottom: 24px;
}

.htr-404__links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.htr-404__links li {
	margin: 0;
}

.htr-pagination {
	margin-top: 32px;
}

.htr-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.htr-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--htr-border);
	border-radius: var(--htr-radius);
	font-weight: 700;
	color: var(--htr-secondary);
}

.htr-pagination .page-numbers.current {
	background: var(--htr-primary);
	border-color: var(--htr-primary);
	color: #fff;
}

/* Related ------------------------------------------------------------ */
.htr-related {
	padding: 40px 0 8px;
	background: var(--htr-light);
	border-top: 1px solid var(--htr-border);
}

.htr-related__section {
	margin-bottom: 36px;
}

.htr-related__title {
	margin: 0 0 18px;
	font-size: 1.35rem;
	font-weight: 800;
	color: var(--htr-secondary);
}

.htr-related__more {
	margin: 20px 0 0;
	text-align: center;
}

.htr-related__more .htr-btn {
	margin: 0;
}

@media (max-width: 549px) {
	/* Card chưa có ảnh: bỏ khối placeholder để danh sách gọn trên mobile. */
	.htr-card--no-media .htr-card__media {
		display: none;
	}

	.htr-page-header {
		padding: 20px 0 24px;
	}

	.htr-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.htr-specs__row {
		grid-template-columns: 1fr;
	}

	.htr-specs dt {
		padding-bottom: 4px;
	}

	.htr-specs dd {
		padding-top: 4px;
	}
}



/* Dải đặt lịch trong bài (Tin tức + Công trình) ------------------------ */
.htr-post-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 20px;
	margin: 36px 0 0;
	padding: 20px 22px;
	border-radius: 14px;
	background: var(--htr-secondary);
	color: var(--htr-on-dark);
}

.htr-post-cta__icon {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--htr-primary);
	color: #fff;
}

.htr-post-cta__text {
	display: flex;
	flex: 1 1 240px;
	flex-direction: column;
	gap: 2px;
	font-size: .92rem;
	line-height: 1.5;
}

.htr-post-cta__text strong {
	color: #fff;
	font-size: 1.1rem;
	font-weight: 900;
}

.htr-post-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.htr-post-cta__actions .htr-btn {
	margin: 0;
}

.htr-post-cta__actions .htr-btn--outline {
	border-color: rgba(255, 255, 255, .4);
	color: #fff;
}

.htr-post-cta__actions .htr-btn--outline:hover {
	border-color: #fff;
	background: #fff;
	color: var(--htr-secondary);
}

@media (max-width: 549px) {
	.htr-post-cta {
		padding: 18px;
	}

	.htr-post-cta__actions,
	.htr-post-cta__actions .htr-btn {
		width: 100%;
	}
}

/* Công trình: dải thông tin khu vực · dịch vụ ------------------------------ */
.htr-project-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 28px;
	padding: 0;
	list-style: none;
}

.htr-project-facts li {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px 18px 12px 12px;
	border: 1px solid var(--htr-border);
	border-radius: 12px;
	background: #fff;
	font-weight: 700;
	color: var(--htr-secondary);
}

.htr-project-facts small {
	display: block;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--htr-muted);
}

.htr-project-facts a {
	color: inherit;
}

.htr-project-facts a:hover {
	color: var(--htr-primary);
}

.htr-project-facts__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: var(--htr-primary-soft);
	color: var(--htr-primary);
}

.htr-project-facts__icon .htr-icon {
	width: 20px;
	height: 20px;
}

.htr-project-cta {
	margin-top: 32px;
}
