/* ==========================================================================
   02.B — CHỨNG NHẬN CÔNG TRÌNH XANH EDGE (BẢO CHỨNG PHÁT TRIỂN BỀN VỮNG)
   - Layout: Cột Trái (Intro & Logo) + Cột Phải (Slider 1 hình nổi bật + các hình ẩn hiện bên phải)
   - Điều hướng: Mũi tên qua lại (Prev / Next) + Bộ đếm trang (01 / 04)
   - Bấm vào thẻ để mở Lightbox Modal xem chứng chỉ IFC World Bank độ phân giải cao
   - Thiết kế Luxury Dark Navy Ambiance (#050F1C) hòa quyện cùng section Kiến Trúc
   ========================================================================== */

.tc-edge {
	background-color: #050F1C;
	background-image: 
		radial-gradient(ellipse 60% 50% at 10% 20%, rgba(197, 155, 39, 0.08) 0%, transparent 70%),
		radial-gradient(ellipse 50% 60% at 90% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 70%),
		linear-gradient(180deg, #020912 0%, #050F1C 15%, #050F1C 85%, #0B1E36 100%);
	position: relative;
	width: 100%;
	padding: clamp(4.5rem, 4rem + 3.5vw, 7.5rem) 0;
	color: #FFFFFF;
	overflow: hidden;
	z-index: 15;
}

/* Ambient glow accents */
.tc-edge__bg-glow {
	position: absolute;
	width: 480px;
	height: 480px;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(100px);
	opacity: 0.5;
	z-index: 1;
}
.tc-edge__bg-glow--left {
	top: 10%;
	left: -120px;
	background: radial-gradient(circle, rgba(197, 155, 39, 0.22) 0%, transparent 70%);
}
.tc-edge__bg-glow--right {
	bottom: 10%;
	right: -120px;
	background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, transparent 70%);
}

.tc-edge .tc-container {
	position: relative;
	z-index: 2;
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 clamp(1.25rem, 1rem + 2vw, 3rem);
}

/* ==========================================================================
   LAYOUT: GRID TRÁI (INFO) & PHẢI (SLIDER)
   ========================================================================== */
.tc-edge__layout {
	display: grid;
	grid-template-columns: minmax(360px, 440px) 1fr;
	gap: clamp(2.5rem, 2rem + 3vw, 5rem);
	align-items: center;
}

/* ==========================================================================
   CỘT TRÁI: INTRO & LOGO EDGE (ĐÃ BỎ TEXT & BỎ NÚT CTA)
   ========================================================================== */
.tc-edge__info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

/* Logo wrap: Đứng độc lập trang nhã, không text kế bên */
.tc-edge__logo-wrap {
	display: inline-flex;
	align-items: center;
	margin-bottom: 2rem;
	padding: 0.35rem 0;
}

.tc-edge__logo-img {
	height: clamp(48px, 42px + 1vw, 62px);
	width: auto;
	object-fit: contain;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
	display: block;
	transition: transform 0.3s ease;
}

.tc-edge__logo-wrap:hover .tc-edge__logo-img {
	transform: scale(1.04);
}

/* Heading H2 */
.tc-edge__heading {
	margin: 0 0 1.35rem;
	font-family: var(--font-heading);
	line-height: 1.35;
	overflow: visible; /* không clip dấu tiếng Việt */
}

.tc-edge__heading-sub {
	display: block;
	font-size: clamp(1.4rem, 1.2rem + 1vw, 2.1rem);
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #FFFFFF;
	text-transform: uppercase;
	margin-bottom: 0.35rem;
}

.tc-edge__heading-main {
	display: block;
	font-size: clamp(1.95rem, 1.6rem + 1.6vw, 3.0rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.45;          /* đủ rộng cho dấu tiếng Việt trên mobile WebKit */
	padding-bottom: 0.3em;      /* tăng thêm cho mobile strict */
	background: linear-gradient(135deg, #FFF0BD 0%, #E0BD5E 40%, #C59B27 75%, #9E7915 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	text-transform: uppercase;
}

/* Subtitle / Authority line */
.tc-edge__authority {
	font-family: var(--font-body);
	font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.12rem);
	font-weight: 600;
	line-height: 1.5;
	color: #E0BD5E;
	margin: 0 0 1.45rem;
	padding-left: 1.25rem;
	border-left: 3px solid #C59B27;
}

/* Body description */
.tc-edge__desc {
	font-family: var(--font-body);
	font-size: clamp(0.92rem, 0.88rem + 0.2vw, 1.05rem);
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.82);
	margin: 0;
}

/* ==========================================================================
   CỘT PHẢI: SLIDER 1 HÌNH NỔI BẬT & CÁC HÌNH ẨN HIỆN BÊN PHẢI
   ========================================================================== */
.tc-edge__cards-col {
	width: 100%;
	min-width: 0;
	position: relative;
}

.tc-edge__slider {
	position: relative;
	width: 100%;
}

/* Viewport che phần tràn */
.tc-edge__slider-viewport {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding: 1.25rem 0.5rem 1.25rem 0.25rem;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
}

.tc-edge__slider-viewport.is-dragging {
	cursor: grabbing;
}

/* Track trượt ngang — không dùng will-change để tránh GPU OOM trên mobile */
.tc-edge__slider-track {
	display: flex;
	gap: 1.5rem;
	transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* ==========================================================================
   THẺ CHỨNG CHỈ (CARD): 1 THẺ NỔI BẬT + CÁC THẺ CÒN LẠI ẨN HIỆN
   ========================================================================== */
.tc-edge-card {
	flex: 0 0 350px;
	width: 350px;
	max-width: 350px;
	background: rgba(11, 30, 54, 0.85);
	border: 1px solid rgba(197, 155, 39, 0.24);
	border-radius: 20px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	cursor: pointer;
	position: relative;
	user-select: none;
	-webkit-user-select: none;
	/* Trạng thái mặc định: mờ nhẹ — chỉ opacity, không transform/filter */
	opacity: 0.4;
	transition: opacity 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.tc-edge__slider-viewport.is-dragging .tc-edge-card {
	cursor: grabbing;
}

.tc-edge-card img,
.tc-edge-card__media {
	pointer-events: none;
	-webkit-user-drag: none;
	user-drag: none;
}

.tc-edge-card__zoom-badge,
.tc-edge-card__tier-tag {
	pointer-events: none;
}

/* Trạng thái Hover vào thẻ phụ */
.tc-edge-card:not(.is-active):hover {
	opacity: 0.7;
	border-color: rgba(197, 155, 39, 0.5);
}

/* TRẠNG THÁI ACTIVE: 1 HÌNH NỔI BẬT */
.tc-edge-card.is-active {
	opacity: 1;
	border-color: rgba(197, 155, 39, 0.88);
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55),
	            0 0 25px rgba(197, 155, 39, 0.2);
	cursor: pointer;
}

/* Media Thumbnail Container */
.tc-edge-card__media {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1.2;
	background: #081628;
	overflow: hidden;
}

.tc-edge-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1);
	display: block;
}

.tc-edge-card.is-active:hover .tc-edge-card__img {
	transform: scale(1.05);
}

/* Zoom badge on top right */
.tc-edge-card__zoom-badge {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(7, 20, 38, 0.85);
	border: 1px solid rgba(197, 155, 39, 0.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #FFE8A3;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.9;
	transition: all 0.3s ease;
	box-shadow: 0 4px 14px rgba(0,0,0,0.45);
}

.tc-edge-card.is-active:hover .tc-edge-card__zoom-badge {
	background: #C59B27;
	border-color: #C59B27;
	color: #071426;
	transform: scale(1.12);
	opacity: 1;
	box-shadow: 0 6px 20px rgba(197, 155, 39, 0.45);
}

/* Tier tag on bottom left of media */
.tc-edge-card__tier-tag {
	position: absolute;
	bottom: 12px;
	left: 12px;
	padding: 5px 11px;
	border-radius: 6px;
	font-family: var(--font-body);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.tc-edge-card__tier-tag--advanced {
	background: linear-gradient(135deg, #10B981, #047857);
	color: #FFFFFF;
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.tc-edge-card__tier-tag--standard {
	background: linear-gradient(135deg, #C59B27, #8C6810);
	color: #FFFFFF;
	border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Card Content (Đã loại bỏ nút xem chứng chỉ) */
.tc-edge-card__content {
	padding: 1.25rem 1.15rem 1.35rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	background: linear-gradient(180deg, rgba(11, 30, 54, 0.4) 0%, rgba(7, 20, 38, 0.95) 100%);
}

.tc-edge-card__title {
	font-family: var(--font-heading);
	font-size: 1.12rem;
	font-weight: 700;
	color: #FFFFFF;
	margin: 0 0 0.25rem;
	letter-spacing: 0.03em;
}

.tc-edge-card__subtitle {
	font-family: var(--font-body);
	font-size: 0.78rem;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.65);
	margin: 0 0 1rem;
}

/* 3 Metrics Box */
.tc-edge-card__metrics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.35rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 10px;
	padding: 0.65rem 0.45rem;
	margin-top: auto;
}

.tc-edge-metric {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.tc-edge-metric__label {
	font-family: var(--font-body);
	font-size: 0.64rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.6);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.tc-edge-metric__val {
	font-family: var(--font-heading);
	font-size: 0.95rem;
	font-weight: 700;
	color: #34D399; /* Green accent for environmental savings */
	margin-top: 2px;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   ĐIỀU HƯỚNG MŨI TÊN QUA LẠI & BỘ ĐẾM TRANG (SLIDER CONTROLS)
   ========================================================================== */
.tc-edge__slider-controls {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	margin-top: 1.75rem;
	padding-left: 0.25rem;
}

.tc-edge__nav-btn {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: rgba(11, 30, 54, 0.85);
	border: 1px solid rgba(197, 155, 39, 0.45);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #FFE8A3;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.tc-edge__nav-btn:hover {
	background: #C59B27;
	border-color: #C59B27;
	color: #071426;
	transform: scale(1.08);
	box-shadow: 0 8px 24px rgba(197, 155, 39, 0.35);
}

.tc-edge__nav-btn:active {
	transform: scale(0.96);
}

/* Bộ đếm slide (01 / 04) */
.tc-edge__slider-counter {
	font-family: var(--font-heading);
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 1.05rem;
	letter-spacing: 0.1em;
	color: #E0BD5E;
	user-select: none;
	min-width: 70px;
	justify-content: center;
}

.tc-edge__counter-current {
	font-size: 1.25rem;
	font-weight: 700;
	color: #FFFFFF;
	text-shadow: 0 0 12px rgba(197, 155, 39, 0.5);
	transition: all 0.3s ease;
}

.tc-edge__counter-sep {
	opacity: 0.45;
	font-size: 0.95rem;
}

.tc-edge__counter-total {
	opacity: 0.7;
	font-size: 0.95rem;
	font-weight: 600;
}

/* ==========================================================================
   LIGHTBOX MODAL XEM CHỨNG CHỈ TOÀN MÀN HÌNH
   ========================================================================== */
.tc-cert-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

.tc-cert-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	touch-action: none; /* khóa scroll trang trên mobile qua CSS thay vì passive:false JS */
}

.tc-cert-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 10, 20, 0.94);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
}

.tc-cert-modal__dialog {
	position: relative;
	z-index: 2;
	width: min(94vw, 760px);
	max-height: 94vh;
	display: flex;
	flex-direction: column;
	background: #081628;
	border: 1px solid rgba(197, 155, 39, 0.45);
	border-radius: 20px;
	box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85),
	            0 0 40px rgba(197, 155, 39, 0.2);
	overflow: hidden;
	animation: tcCertModalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tcCertModalPop {
	from {
		opacity: 0;
		transform: scale(0.94) translateY(15px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.tc-cert-modal__header {
	padding: 1.1rem 1.4rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(197, 155, 39, 0.2);
	background: rgba(11, 30, 54, 0.7);
}

.tc-cert-modal__badge {
	display: block;
	font-family: var(--font-body);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	color: #C59B27;
	text-transform: uppercase;
	margin-bottom: 0.2rem;
}

.tc-cert-modal__title {
	margin: 0;
	font-family: var(--font-heading);
	font-size: 1.15rem;
	font-weight: 700;
	color: #FFFFFF;
	letter-spacing: 0.04em;
}

.tc-cert-modal__close {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.25s ease;
}

.tc-cert-modal__close:hover {
	background: #C59B27;
	border-color: #C59B27;
	color: #071426;
	transform: rotate(90deg);
}

.tc-cert-modal__body {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem 1rem;
	background: #040B14;
	overflow: hidden;
}

.tc-cert-modal__img-wrapper {
	max-height: calc(88vh - 150px);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	border-radius: 8px;
	overflow: hidden;
	background: #FFFFFF;
}

.tc-cert-modal__img {
	max-height: calc(88vh - 150px);
	max-width: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.tc-cert-modal__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(11, 30, 54, 0.85);
	border: 1px solid rgba(197, 155, 39, 0.5);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #FFE8A3;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 5;
	transition: all 0.25s ease;
}

.tc-cert-modal__nav:hover {
	background: #C59B27;
	color: #071426;
	transform: translateY(-50%) scale(1.1);
}

.tc-cert-modal__nav--prev {
	left: 14px;
}

.tc-cert-modal__nav--next {
	right: 14px;
}

.tc-cert-modal__footer {
	padding: 0.75rem 1.4rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-top: 1px solid rgba(197, 155, 39, 0.2);
	background: rgba(11, 30, 54, 0.7);
}

.tc-cert-modal__indicator {
	font-family: var(--font-heading);
	font-size: 0.88rem;
	font-weight: 700;
	color: #C59B27;
	letter-spacing: 0.1em;
}

.tc-cert-modal__hint {
	font-family: var(--font-body);
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.55);
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */
@media (max-width: 1200px) {
	.tc-edge__layout {
		grid-template-columns: 1fr;
		gap: 3.5rem;
	}
	.tc-edge__info {
		max-width: 760px;
	}
	.tc-edge-card {
		flex: 0 0 340px;
		width: 340px;
		max-width: 340px;
	}
}

@media (max-width: 768px) {
	.tc-edge {
		padding: 4rem 0 4.5rem;
	}
	.tc-edge__logo-wrap {
		margin-bottom: 1.5rem;
	}
	.tc-edge__bg-glow {
		display: none;
	}
	.tc-edge-card {
		flex: 0 0 84vw;
		width: 84vw;
		max-width: 330px;
	}
	.tc-edge__nav-btn {
		width: 44px;
		height: 44px;
	}
	.tc-cert-modal__dialog {
		width: 96vw;
		max-height: 96vh;
		border-radius: 14px;
	}
	.tc-cert-modal__nav {
		width: 38px;
		height: 38px;
	}
	.tc-cert-modal__nav--prev {
		left: 8px;
	}
	.tc-cert-modal__nav--next {
		right: 8px;
	}
	.tc-cert-modal__hint {
		display: none;
	}
}

/* ==========================================================================
   2K & 4K HIGH RESOLUTION OPTIMIZATIONS
   ========================================================================== */
@media (min-width: 2048px) {
	.tc-edge .tc-container {
		max-width: 1920px;
	}
	.tc-edge__layout {
		grid-template-columns: 500px 1fr;
		gap: 5.5rem;
	}
	.tc-edge-card {
		flex: 0 0 420px;
		width: 420px;
		max-width: 420px;
	}
	.tc-edge__heading-sub {
		font-size: 2.2rem;
	}
	.tc-edge__heading-main {
		font-size: 3.2rem;
	}
	.tc-edge__desc {
		font-size: 1.15rem;
	}
	.tc-edge-card__title {
		font-size: 1.25rem;
	}
	.tc-cert-modal__dialog {
		width: min(90vw, 1000px);
	}
}

@media (min-width: 3200px) {
	.tc-edge .tc-container {
		max-width: 2600px;
	}
	.tc-edge__layout {
		grid-template-columns: 660px 1fr;
		gap: 7.5rem;
	}
	.tc-edge-card {
		flex: 0 0 540px;
		width: 540px;
		max-width: 540px;
	}
	.tc-edge__heading-sub {
		font-size: 3rem;
	}
	.tc-edge__heading-main {
		font-size: 4.4rem;
	}
	.tc-edge__desc {
		font-size: 1.45rem;
	}
	.tc-edge-card__title {
		font-size: 1.65rem;
	}
	.tc-cert-modal__dialog {
		width: min(85vw, 1300px);
	}
}
