/* ============================================================================
   Vòng 5 — làn "linhvuc" (góp ý khách 30/10, mục 1.6 · 2.1 · 2.3)
   A. Trang chủ: 4 thẻ lĩnh vực (template-parts/home/linh-vuc.php, lớp tdc-lv4__*)
   B. Trang lĩnh vực: khối "Nội dung hoạt động" + bài + bảng dự án có cột giai đoạn (lớp tdc-lv5__*)
   Màu CHỈ brand kit: thang xanh hue 199° + đỏ. Chữ nhỏ không dùng #0495D8 (3,34) — dùng blue-ink.
   ========================================================================= */

/* ---------- A. Trang chủ: 4 thẻ cân ---------- */
.tdc-fields .tdc-fields__grid.tdc-lv4__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	max-width: var(--tdc-wrap, 1340px);
	margin: 0 auto;
	padding: 0 20px;
}
.tdc-lv4__card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
	text-decoration: none !important;
	color: inherit;
	box-shadow: 0 1px 3px rgba(1, 47, 69, .10);
	transition: transform .25s ease, box-shadow .25s ease;
}
.tdc-lv4__card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(1, 47, 69, .16); }

/* Ô màu: mỗi thẻ một bậc trong thang xanh + một hoa văn theo loại công trình (nét riêng 1.6b). */
.tdc-lv4__panel {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 180px;
	color: #fff;
	overflow: hidden;
	background: linear-gradient(135deg, var(--tdc-blue, #0495D8), var(--tdc-blue-ink, #0374A8));
}
.tdc-lv4__card--duong-bo .tdc-lv4__panel { background: linear-gradient(135deg, var(--tdc-blue-ink, #0374A8), var(--tdc-blue-deep, #02567D)); }
.tdc-lv4__card--ha-tang-ky-thuat .tdc-lv4__panel { background: linear-gradient(135deg, var(--tdc-blue-deep, #02567D), var(--tdc-navy-deep, #02405E)); }
.tdc-lv4__card--cang-duong-thuy .tdc-lv4__panel { background: linear-gradient(135deg, var(--tdc-navy-deep, #02405E), #012F45); }
.tdc-lv4__panel::before {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
}
/* Cầu – Hầm: vòm nhịp cầu */
.tdc-lv4__card--cau-ham .tdc-lv4__panel::before {
	background: radial-gradient(ellipse 60px 46px at 50% 100%, transparent 96%, #fff 97%, #fff 100%, transparent 101%) 0 100% / 120px 60px repeat-x;
}
/* Đường bộ: vạch tim đường đứt khúc */
.tdc-lv4__card--duong-bo .tdc-lv4__panel::before {
	background: repeating-linear-gradient(90deg, #fff 0 28px, transparent 28px 52px) 0 calc(100% - 22px) / 100% 4px no-repeat;
	opacity: .22;
}
/* Hạ tầng: ô lưới quy hoạch */
.tdc-lv4__card--ha-tang-ky-thuat .tdc-lv4__panel::before {
	background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
	background-size: 24px 24px;
	opacity: .10;
}
/* Cảng: sóng nước */
.tdc-lv4__card--cang-duong-thuy .tdc-lv4__panel::before {
	background: radial-gradient(circle at 50% 0, transparent 9px, #fff 10px, #fff 11px, transparent 12px) 0 calc(100% - 10px) / 24px 14px repeat-x,
	            radial-gradient(circle at 50% 0, transparent 9px, #fff 10px, #fff 11px, transparent 12px) 12px calc(100% - 26px) / 24px 14px repeat-x;
	opacity: .2;
}
.tdc-lv4__so {
	position: absolute; top: 6px; right: 14px;
	font-size: 64px; line-height: 1; font-weight: 800; letter-spacing: -.02em;
	color: rgba(255, 255, 255, .22);
	font-variant-numeric: tabular-nums;
}
.tdc-lv4__icon { position: relative; width: 96px; height: 96px; transition: transform .35s ease; }
.tdc-lv4__card:hover .tdc-lv4__icon { transform: scale(1.06); }
.tdc-lv4__body {
	display: flex; flex-direction: column; flex: 1;
	padding: 18px 20px 20px;
}
.tdc-lv4__name {
	display: block;
	min-height: 2.7em;
	color: var(--tdc-navy-deep, #02405E);
	font-size: 1.05rem; line-height: 1.35; font-weight: 700;
}
.tdc-lv4__name::after {
	content: ""; display: block; width: 32px; height: 3px; margin-top: 8px;
	background: var(--tdc-red, #EA232A); transition: width .3s ease;
}
.tdc-lv4__card:hover .tdc-lv4__name::after { width: 56px; }
.tdc-lv4__nhan {
	margin: 12px 0 6px;
	font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	color: var(--tdc-blue-ink, #0374A8);
}
.tdc-lv4__body ul { margin: 0 0 16px; padding: 0; list-style: none; flex: 1; }
.tdc-lv4__body li {
	position: relative; padding-left: 18px; margin: 0 0 5px;
	font-size: 14.5px; line-height: 1.5; color: var(--tdc-text, #333);
}
.tdc-lv4__body li::before {
	content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px;
	background: var(--tdc-blue, #0495D8);
}
.tdc-lv4__chan {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding-top: 14px; border-top: 1px solid #e3ebf1;
}
.tdc-lv4__dem { font-size: 14px; color: var(--tdc-muted, #5b6770); }
.tdc-lv4__dem strong { color: var(--tdc-blue-ink, #0374A8); font-size: 18px; }
.tdc-lv4__nut {
	display: inline-block; padding: 8px 14px; border-radius: 2px;
	background: var(--tdc-blue-deep, #02567D); color: #fff;
	font-size: 15px; font-weight: 700; white-space: nowrap;
	transition: background .2s ease;
}
.tdc-lv4__card:hover .tdc-lv4__nut { background: var(--tdc-red, #EA232A); }

@media (max-width: 1099px) {
	.tdc-fields .tdc-fields__grid.tdc-lv4__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.tdc-fields .tdc-fields__grid.tdc-lv4__grid { grid-template-columns: 1fr; gap: 14px; }
	.tdc-lv4__panel { height: 112px; justify-content: flex-start; padding-left: 20px; }
	.tdc-lv4__icon { width: 72px; height: 72px; }
	.tdc-lv4__so { font-size: 50px; top: 8px; right: 16px; }
	.tdc-lv4__name { min-height: 0; }
	.tdc-lv4__body { padding: 14px 16px 16px; }
	.tdc-lv4__body li { font-size: 14px; }
}

/* ---------- B. Trang lĩnh vực ---------- */
.tdc-lv5__mo {
	display: grid;
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	margin: 6px 0 10px;
}
.tdc-lv5__nd {
	background: var(--tdc-sky, #DFF3FE);
	border-top: 4px solid var(--tdc-blue, #0495D8);
	padding: 18px 20px 14px;
}
.tdc-page__body .tdc-lv5__nd h2 {
	margin: 0 0 10px !important;
	font-size: 14px !important; letter-spacing: .06em; text-transform: uppercase;
	color: var(--tdc-blue-deep, #02567D);
}
.tdc-page__body .tdc-lv5__nd h2::after { display: none; }
.tdc-lv5__nd ul { margin: 0; padding: 0; list-style: none; }
.tdc-lv5__nd li {
	position: relative; padding: 7px 0 7px 18px; margin: 0;
	border-bottom: 1px solid rgba(2, 86, 125, .14);
	font-size: 14.5px; line-height: 1.5; color: var(--tdc-navy-deep, #02405E);
}
.tdc-lv5__nd li:last-child { border-bottom: 0; }
.tdc-lv5__nd li::before {
	content: ""; position: absolute; left: 0; top: 1.05em; width: 9px; height: 2px;
	background: var(--tdc-red, #EA232A);
}
.tdc-lv5__bai > p:first-child { margin-top: 0; }
.tdc-lv5__bai h3 { color: var(--tdc-blue-deep, #02567D); }

.tdc-page__body h2.tdc-lv5__bang-td { margin-top: 2.4rem; scroll-margin-top: 100px; }
.tdc-lv5__loc {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
	margin: 0 0 14px;
}
.tdc-lv5__loc[hidden] { display: none; }
.tdc-lv5__loc label { margin: 0; flex: 1 1 260px; max-width: 420px; }
.tdc-lv5__loc label:nth-child(2) { flex: 0 1 240px; }
.tdc-lv5__loc input,
.tdc-lv5__loc select {
	width: 100%; height: 42px; margin: 0;
	padding: 0 12px; border: 1px solid #c7d6e1; border-radius: 2px;
	background: #fff; font-size: 15px; color: var(--tdc-text, #333);
}
.tdc-lv5__loc input:focus,
.tdc-lv5__loc select:focus { outline: 2px solid var(--tdc-blue, #0495D8); outline-offset: 0; border-color: var(--tdc-blue, #0495D8); }
.tdc-lv5__dem { margin: 0 !important; font-size: 14px; color: var(--tdc-muted, #5b6770); }
.tdc-lv5__dem strong { color: var(--tdc-blue-ink, #0374A8); font-size: 18px; }

.tdc-page__body table.tdc-lv5__bang { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tdc-page__body table.tdc-lv5__bang th {
	position: sticky; top: var(--tdc-mobile-header-h, 64px); z-index: 2;
	background: var(--tdc-blue-deep, #02567D); color: #fff;
	padding: 9px 12px; text-align: left;
	font-size: 13px; line-height: 20px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
	border: 0;
}
/* Header máy tính neo cao 80px (vòng 5, từ 02/11; trước 96–100px). */
@media (min-width: 1100px) {
	.tdc-page__body table.tdc-lv5__bang th { top: 80px; }
}
/* page.css (bảng web cũ không có <thead>) biến hàng ĐẦU TIÊN thành hàng tiêu đề neo ⇒ ở bảng mới đó
   là dự án số 1. Trả nó về hàng thường. */
.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child td {
	position: static; top: auto; z-index: auto;
	padding: 10px 12px; font-size: inherit; line-height: 1.5;
	text-transform: none; letter-spacing: 0; box-shadow: none;
}
.tdc-page__body table.tdc-lv5__bang td {
	padding: 10px 12px; vertical-align: top; line-height: 1.5;
	border: 0; border-bottom: 1px solid #e3ebf1;
}
.tdc-page__body table.tdc-lv5__bang tbody tr:nth-child(even) td { background: #f6f9fb; }
.tdc-page__body table.tdc-lv5__bang tbody tr:hover td { background: var(--tdc-sky, #DFF3FE); }
.tdc-page__body table.tdc-lv5__bang .tdc-lv5__stt { width: 52px; text-align: center; color: var(--tdc-muted, #5b6770); font-variant-numeric: tabular-nums; }
.tdc-page__body table.tdc-lv5__bang td:nth-child(3) { width: 26%; color: var(--tdc-muted, #4f5b64); }
.tdc-page__body table.tdc-lv5__bang .tdc-lv5__gd { width: 19%; }
.tdc-gd {
	display: inline-block; margin: 0 4px 4px 0; padding: 1px 7px;
	border: 1px solid #b9d7e8; border-radius: 2px; background: #fff;
	font-size: 12.5px; line-height: 20px; font-weight: 600; white-space: nowrap;
	color: var(--tdc-blue-deep, #02567D);
}
.tdc-gd[title] { cursor: help; }
.tdc-gd--trong { border-color: transparent; background: transparent; color: #9aa6ae; }

.tdc-lv5__anh { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 28px 0 0; }
.tdc-lv5__anh figure { margin: 0; }
.tdc-lv5__anh img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tdc-lv5__anh figcaption { margin-top: 6px; font-size: 13.5px; color: var(--tdc-muted, #5b6770); }

@media (max-width: 900px) {
	.tdc-lv5__mo { grid-template-columns: 1fr; gap: 18px; }
}
/* Điện thoại: bảng 4 cột không đọc nổi ở 390px ⇒ mỗi dự án thành một thẻ. */
@media (max-width: 700px) {
	.tdc-page__body table.tdc-lv5__bang,
	.tdc-page__body table.tdc-lv5__bang tbody,
	.tdc-page__body table.tdc-lv5__bang tr,
	.tdc-page__body table.tdc-lv5__bang td { display: block; width: auto !important; }
	.tdc-page__body table.tdc-lv5__bang thead { display: none; }
	.tdc-page__body table.tdc-lv5__bang tr {
		position: relative; padding: 12px 12px 8px 46px;
		border-bottom: 1px solid #e3ebf1;
	}
	.tdc-page__body table.tdc-lv5__bang tr[hidden] { display: none; }
	.tdc-page__body table.tdc-lv5__bang tbody tr:nth-child(even) { background: #f6f9fb; }
	.tdc-page__body table.tdc-lv5__bang td,
	.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child td {
		padding: 0 0 6px; border: 0; background: transparent !important;
	}
	.tdc-page__body table.tdc-lv5__bang td.tdc-lv5__stt {
		position: absolute; left: 10px; top: 12px; width: 28px !important; text-align: left;
		font-weight: 700; color: var(--tdc-blue-ink, #0374A8);
	}
	.tdc-page__body table.tdc-lv5__bang td:nth-child(2) { font-weight: 600; color: var(--tdc-navy-deep, #02405E); }
	.tdc-page__body table.tdc-lv5__bang td:nth-child(3) { font-size: 13.5px; }
	.tdc-lv5__loc label, .tdc-lv5__loc label:nth-child(2) { flex: 1 1 100%; max-width: none; }
	.tdc-lv5__anh { grid-template-columns: 1fr; }
}
.tdc-page__body table.tdc-lv5__bang th.tdc-lv5__stt { color: #fff; }
/* Ô "Nội dung hoạt động": gỡ dấu nhấn trước h2, lề trên h2 (v5-giaodien ép 2,6rem ở điện thoại) và thụt lề ul của theme. */
#the7-body .tdc-page__body .tdc-lv5__nd h2 { margin-top: 0 !important; padding-left: 0; }
#the7-body .tdc-page__body .tdc-lv5__nd h2::before { display: none; }
#the7-body .tdc-page__body .tdc-lv5__nd ul { margin: 0 !important; padding: 0 !important; }
#the7-body .tdc-page__body .tdc-lv5__nd li { margin: 0; }

/* page.css nạp SAU file này và cùng độ ưu tiên ⇒ phải có #the7-body mới gỡ được kiểu "hàng đầu = tiêu đề". */
#the7-body.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child td {
	position: static; top: auto; z-index: auto;
	padding: 10px 12px; font-size: inherit; line-height: 1.5; font-weight: inherit;
	text-transform: none; letter-spacing: 0; box-shadow: none;
	color: inherit; background: transparent;
}
#the7-body.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child td:nth-child(3) { color: var(--tdc-muted, #4f5b64); }
#the7-body.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child:hover td { background: var(--tdc-sky, #DFF3FE); }
@media (max-width: 700px) {
	#the7-body.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child td { padding: 0 0 6px; }
	#the7-body.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child td.tdc-lv5__stt { position: absolute; top: 12px; left: 10px; }
	#the7-body.tdc-linh-vuc-con .tdc-page__body table.tdc-lv5__bang tbody tr:first-child td:nth-child(2) { font-weight: 600; }
}

/* Trang đầu mục "Lĩnh vực": 4 thẻ ⇒ lưới 2×2 cân, bỏ kiểu "thẻ cuối nằm ngang" (dành cho 4/7 thẻ trên lưới 3). */
@media (min-width: 621px) {
	#the7-body:is(.page-id-187, .page-id-457) .tdc-hub { grid-template-columns: repeat(2, 1fr); }
	#the7-body:is(.page-id-187, .page-id-457) .tdc-hub__card:nth-child(3n+1):last-child { grid-column: auto; flex-direction: column; }
	#the7-body:is(.page-id-187, .page-id-457) .tdc-hub__card:nth-child(3n+1):last-child .tdc-hub__media { flex: none; min-height: 0; position: static; width: auto; }
	#the7-body:is(.page-id-187, .page-id-457) .tdc-hub__card:nth-child(3n+1):last-child .tdc-hub__media img { position: static; aspect-ratio: 16 / 9; height: auto; }
	#the7-body:is(.page-id-187, .page-id-457) .tdc-hub__card:nth-child(3n+1):last-child .tdc-hub__body { align-self: auto; padding: 18px 20px 20px; }
}
