/**
 * HALINK C8 — Dịch vụ archive / single (Dola match)
 */

.c8-services-page {
	padding: 28px 0 60px;
	background: var(--c8-bg, #f0efeb);
}

.c8-services-page__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 1.75rem;
	align-items: start;
}

.c8-services-page__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
}

.c8-services-page__empty {
	margin: 2rem 0;
	color: #666;
}

.c8-services-page__pagination {
	margin-top: 2rem;
	text-align: center;
}

.c8-services-page__pagination .nav-links {
	display: inline-flex;
	gap: 0.35rem;
	flex-wrap: wrap;
	justify-content: center;
}

.c8-services-page__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 0.55rem;
	border-radius: 4px;
	background: #fff;
	color: #121f38;
	text-decoration: none;
	font-size: 0.9rem;
}

.c8-services-page__pagination .page-numbers.current,
.c8-services-page__pagination .page-numbers:hover {
	background: #121f38;
	color: #fff;
}

/* ---------- Card (Dola item-dichvu) ---------- */
.c8-svc-card {
	--c8-svc-mask: url("../images/ser-mask-img.png");
	background: #fff;
	border-radius: 30px 10px;
	box-shadow: 0 2px 14px rgba(18, 31, 56, 0.06);
	overflow: hidden;
	height: 100%;
}

.c8-svc-card__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 10px 1.15rem;
	text-align: center;
	height: 100%;
}

.c8-svc-card__image {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	padding-bottom: 100%;
	margin: 0 0 0.75rem;
	overflow: hidden;
	flex-shrink: 0;
	background: #fff;
	border-radius: 20px;
	-webkit-mask-image: var(--c8-svc-mask);
	mask-image: var(--c8-svc-mask);
	-webkit-mask-position: center center;
	mask-position: center center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.c8-svc-card__img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform: scale(1);
	transition: transform 1s ease;
}

.c8-svc-card:hover .c8-svc-card__img {
	transform: scale(1.1);
}

.c8-svc-card__title {
	margin: 0 0 0.4rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: clamp(1.15rem, 1.8vw, 1.5rem);
	font-weight: 700;
	line-height: 1.3;
	color: #121f38;
}

.c8-svc-card__title a {
	color: inherit;
	text-decoration: none;
}

.c8-svc-card__title a:hover {
	color: #9a563a;
}

.c8-svc-card__desc {
	margin: 0 0 0.65rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: #444;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex-grow: 1;
}

.c8-svc-card__meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	align-items: baseline;
	gap: 0.35rem 0.75rem;
	list-style: none;
	margin: 0 0 0.85rem;
	padding: 0;
	width: 100%;
	font-size: 0.95rem;
	font-weight: 700;
	color: #121f38;
	line-height: 1.4;
}

.c8-svc-card__meta-label {
	font-weight: 700;
	color: #121f38;
}

.c8-svc-card__meta b {
	color: #9a563a;
	font-weight: 700;
}

.c8-svc-card__btn {
	display: inline-block;
	margin-top: auto;
	padding: 8px 30px;
	border-radius: 20px 5px 20px 5px;
	background: #121f38;
	color: #fff !important;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease;
}

.c8-svc-card__btn:hover {
	background: #9a563a;
	color: #fff !important;
}

@media (max-width: 767px) {
	.c8-svc-card {
		border-radius: 15px 5px;
	}

	.c8-svc-card__title {
		font-size: 1.125rem;
	}

	.c8-svc-card__meta {
		font-size: 0.875rem;
	}

	.c8-svc-card__meta b {
		display: inline;
	}
}

/* ---------- Sidebar ---------- */
.c8-svc-sidebar__box {
	padding: 14px 16px 10px;
	background: #f7f5f0;
	border: 1px solid #e4ddd2;
	border-top: 3px solid #9a563a;
	border-radius: 6px;
}

.c8-svc-sidebar__title {
	margin: 0 0 0.65rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #e4ddd2;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1.15rem;
	font-weight: 700;
	color: #121f38;
}

.c8-svc-sidebar__nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.c8-svc-sidebar__nav li {
	border-bottom: 1px dashed #e0d9ce;
}

.c8-svc-sidebar__nav li:last-child {
	border-bottom: 0;
}

.c8-svc-sidebar__nav a {
	display: block;
	padding: 0.55rem 0;
	font-size: 0.9rem;
	line-height: 1.4;
	color: #333;
	text-decoration: none;
}

.c8-svc-sidebar__nav li.is-active > a,
.c8-svc-sidebar__nav a:hover {
	color: #9a563a;
}

/* ---------- Single detail ---------- */
.c8-svc-detail {
	padding: 28px 0 60px;
	background: var(--c8-bg, #f0efeb);
	overflow-x: clip;
	max-width: 100%;
}

.c8-svc-detail__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
	gap: 1.75rem;
	align-items: start;
	min-width: 0;
}

.c8-svc-detail__main,
.c8-svc-detail__side {
	min-width: 0;
	max-width: 100%;
}

.c8-svc-detail__hero {
	position: relative;
	width: 100%;
	max-width: 100%;
	height: 0;
	padding-bottom: 62.5%; /* 16 / 10 */
	margin: 0 0 1.25rem;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.c8-svc-detail__hero-img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
}

.c8-svc-detail__content {
	padding: 1.5rem 1.6rem 1.75rem;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 14px rgba(18, 31, 56, 0.05);
	font-size: 0.975rem;
	line-height: 1.75;
	color: #444;
}

.c8-svc-detail__content > *:first-child {
	margin-top: 0;
}

.c8-svc-detail__content h2,
.c8-svc-detail__content h3 {
	margin: 1.5rem 0 0.65rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-weight: 700;
	color: #121f38;
	line-height: 1.35;
}

.c8-svc-detail__content h2 {
	font-size: 1.35rem;
}

.c8-svc-detail__content h3 {
	font-size: 1.1rem;
}

.c8-svc-detail__content p {
	margin: 0 0 0.9rem;
}

.c8-svc-detail__content ul,
.c8-svc-detail__content ol {
	margin: 0 0 1rem 1.15rem;
	padding: 0;
}

.c8-svc-detail__content li {
	margin: 0 0 0.4rem;
}

.c8-svc-detail__content strong {
	color: #121f38;
}

/* Sidebar stack */
.c8-svc-aside {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
	position: sticky;
	top: 1rem;
}

.c8-svc-aside__book {
	padding: 1.35rem 1.25rem 1.4rem;
	background: #121f38;
	border-radius: 10px;
	color: #fff;
}

.c8-svc-aside__book-title {
	margin: 0 0 0.75rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}

.c8-svc-aside__book-desc {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
}

.c8-svc-aside__book-meta {
	list-style: none;
	margin: 0 0 1.15rem;
	padding: 0;
	font-size: 0.95rem;
}

.c8-svc-aside__book-meta li {
	margin: 0 0 0.35rem;
}

.c8-svc-aside__book-meta b {
	color: #e07a4f;
	font-weight: 700;
}

.c8-svc-aside__book-btn {
	display: block;
	width: 100%;
	padding: 12px 16px;
	border-radius: 6px;
	background: #9a563a;
	color: #fff !important;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: background 0.2s ease;
}

.c8-svc-aside__book-btn:hover {
	background: #7f452e;
	color: #fff !important;
}

.c8-svc-aside__support {
	padding: 1.25rem 1.15rem 1.3rem;
	background: #f7f5f0;
	border: 1px solid #e4ddd2;
	border-radius: 10px;
	text-align: center;
}

.c8-svc-aside__support-icon {
	display: flex;
	justify-content: center;
	margin-bottom: 0.5rem;
}

.c8-svc-aside__support-title {
	margin: 0 0 0.5rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1.2rem;
	font-weight: 700;
	color: #121f38;
}

.c8-svc-aside__support-desc {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: #555;
}

.c8-svc-aside__support-btn {
	display: inline-block;
	padding: 10px 22px;
	border-radius: 6px;
	background: #121f38;
	color: #fff !important;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-weight: 500;
	text-decoration: none;
}

.c8-svc-aside__support-btn:hover {
	background: #9a563a;
	color: #fff !important;
}

.c8-svc-aside__support-tel {
	display: block;
	margin-top: 0.65rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: #9a563a;
	text-decoration: none;
}

.c8-svc-aside__related-title {
	margin: 0 0 0.85rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1.35rem;
	font-weight: 700;
	color: #121f38;
	text-align: center;
}

.c8-svc-related {
	position: relative;
	padding: 0 1.6rem;
}

.c8-svc-related__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.15rem 0.85rem 1.25rem;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(18, 31, 56, 0.06);
	text-align: center;
}

.c8-svc-related__image {
	display: block;
	width: 120px;
	height: 120px;
	margin: 0 auto 0.85rem;
	border-radius: 50%;
	overflow: hidden;
}

.c8-svc-related__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.c8-svc-related__name {
	margin: 0 0 0.45rem;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.35;
	color: #121f38;
}

.c8-svc-related__name a {
	color: inherit;
	text-decoration: none;
}

.c8-svc-related__name a:hover {
	color: #9a563a;
}

.c8-svc-related__desc {
	margin: 0 0 0.65rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #666;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.c8-svc-related__meta {
	list-style: none;
	margin: 0 0 0.85rem;
	padding: 0;
	font-size: 0.85rem;
	color: #333;
	width: 100%;
}

.c8-svc-related__meta b {
	color: #9a563a;
}

.c8-svc-related__btn {
	display: inline-block;
	padding: 8px 22px;
	border-radius: 6px;
	background: #121f38;
	color: #fff !important;
	font-family: var(--c8-font-display, Lora, Georgia, serif);
	font-size: 0.9rem;
	text-decoration: none;
}

.c8-svc-related__btn:hover {
	background: #9a563a;
	color: #fff !important;
}

.c8-svc-related__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 50%;
	background: #e8e4dc;
	color: #121f38;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}

.c8-svc-related__nav:hover {
	background: #121f38;
	color: #fff;
}

.c8-svc-related__nav--prev {
	left: 0;
}

.c8-svc-related__nav--next {
	right: 0;
}

/* Legacy single (unused) kept harmless */
.c8-services-page--single {
	padding-top: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.c8-services-page__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.c8-services-page__layout {
		grid-template-columns: 1fr;
	}

	.c8-services-page__side {
		order: -1;
	}

	.c8-svc-detail__layout {
		grid-template-columns: 1fr;
	}

	.c8-svc-aside {
		position: static;
	}

	.c8-svc-related {
		padding: 0 2rem;
		max-width: 100%;
	}
}

@media (max-width: 560px) {
	.c8-services-page__grid {
		grid-template-columns: 1fr;
		max-width: 380px;
		margin: 0 auto;
	}

	.c8-svc-detail {
		padding: 16px 0 48px;
	}

	.c8-svc-detail__content {
		padding: 1.15rem;
	}

	.c8-svc-detail__content img,
	.c8-svc-detail__content table,
	.c8-svc-detail__content iframe,
	.c8-svc-detail__content video {
		max-width: 100% !important;
		height: auto !important;
	}

	.c8-svc-aside__book-title {
		font-size: 1.2rem;
	}

	.c8-svc-related {
		padding: 0 1.75rem;
	}
}
