/* ==========================================================================
   Dự án đã triển khai — thẻ dự án (trang chủ), video reel + bảng thông tin (bài dự án)
   ========================================================================== */

/* ---------- Lưới thẻ dự án ---------- */
.ak-projects { padding: 4px 0 8px; }
.ak-projects__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	perspective: 1200px;
}
.ak-pcard {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--ak-line, #e5e8f0);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
	transform-style: preserve-3d;
	transition: transform 0.35s cubic-bezier(.2, .7, .2, 1), box-shadow 0.35s ease;
}
@media (hover: hover) {
	.ak-pcard:hover {
		transform: translateY(-6px) rotateX(3deg) rotateY(-3deg);
		box-shadow: 0 24px 48px rgba(22, 32, 107, 0.18);
	}
	.ak-pcard:hover .ak-pcard__img { transform: scale(1.05); }
}
.ak-pcard__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--ak-soft, #f5f7fb);
}
.ak-pcard__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}
.ak-pcard__video {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 11px 5px 9px;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	backdrop-filter: blur(4px);
}
.ak-pcard__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	padding: 16px 18px 18px;
}
.ak-pcard__loc {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: 999px;
	background: #fdecee;
	color: var(--ak-red, #c0182f);
	font-size: 12.5px;
	font-weight: 700;
}
.ak-pcard__title {
	margin: 0;
	font-size: 17px;
	line-height: 1.4;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0;
}
.ak-pcard__title a {
	color: var(--ak-ink, #0f172a);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ak-pcard__title a::after { content: ""; position: absolute; inset: 0; } /* cả thẻ bấm được */
.ak-pcard { position: relative; }
.ak-pcard__title a:hover { color: var(--ak-primary, #1c22cc); }
.ak-pcard__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	color: var(--ak-primary, #1c22cc);
	font-size: 14px;
	font-weight: 700;
}
.ak-projects__more { margin-top: 28px; text-align: center; }
.ak-projects__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 28px;
	border-radius: 999px;
	background: var(--ak-navy, #16206b);
	color: #fff !important;
	font-weight: 700;
	box-shadow: 0 10px 24px rgba(22, 32, 107, 0.25);
	transition: background 0.2s ease, transform 0.2s ease;
}
.ak-projects__btn:hover { background: var(--ak-primary, #1c22cc); transform: translateY(-2px); }

@media (max-width: 1000px) {
	.ak-projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 600px) {
	/* Mobile: vuốt ngang, mỗi thẻ ~86% màn hình, thấy mép thẻ kế tiếp để gợi ý vuốt */
	.ak-projects__grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 86%;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding: 4px 16px 14px;
		margin: 0 -16px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.ak-projects__grid::-webkit-scrollbar { display: none; }
	.ak-pcard { scroll-snap-align: center; }
	.ak-pcard__title { font-size: 16px; }
	.ak-projects__more { margin-top: 14px; }
	.ak-projects__btn { width: 100%; }
}

/* ---------- Bài dự án ---------- */
.ak-project-info {
	margin: 24px 0;
	overflow: hidden;
	border: 1px solid var(--ak-line, #e5e8f0);
	border-radius: 16px;
	background: var(--ak-soft, #f5f7fb);
}
.ak-project-info__head {
	margin: 0;
	padding: 12px 18px;
	background: var(--ak-navy, #16206b);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
}
.akv2-prose .ak-project-info .ak-project-info__head { color: #fff; margin: 0; }
.akv2-prose .ak-project-info table,
.ak-project-info table { width: 100%; min-width: 0; margin: 0; border: 0; border-radius: 0; border-collapse: collapse; }
.akv2-prose .ak-project-info th,
.akv2-prose .ak-project-info td,
.akv2-prose .ak-project-info tbody tr:nth-child(even) td { background: transparent; }
.akv2-prose .ak-project-info th { color: var(--ak-muted, #64748b); font-weight: 600; }
.akv2-prose .ak-project-info td:first-child { color: var(--ak-ink, #0f172a); }
.ak-project-info td { overflow-wrap: anywhere; }
.ak-project-info th,
.ak-project-info td {
	padding: 11px 18px;
	border: 0;
	border-top: 1px solid var(--ak-line, #e5e8f0);
	font-size: 15px;
	line-height: 1.5;
	text-align: left;
	vertical-align: top;
}
.ak-project-info tr:first-child th,
.ak-project-info tr:first-child td { border-top: 0; }
.ak-project-info th { width: 34%; color: var(--ak-muted, #64748b); font-weight: 600; }
.ak-project-info td { color: var(--ak-ink, #0f172a); font-weight: 600; }

.ak-project-figure { margin: 24px 0; text-align: center; }
.ak-project-figure img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 14px;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.ak-project-figure--portrait img { max-height: 620px; width: auto; }
.ak-project-figure figcaption {
	margin-top: 10px;
	color: var(--ak-muted, #64748b);
	font-size: 13.5px;
	font-style: italic;
}

/* Khung video reel: dọc 9:16 hoặc ngang 16:9, co giãn theo màn hình */
.ak-reel {
	position: relative;
	width: 100%;
	max-width: 360px;
	margin: 20px auto 8px;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: 18px;
	background: #0f172a;
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}
.ak-reel--landscape { max-width: 720px; aspect-ratio: 16 / 9; }
.ak-reel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Ảnh chờ (bấm mới tải video Facebook → trang nhẹ hơn trên mobile) */
.ak-reel__poster {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	padding: 0;
	border: 0;
	background: #0f172a center / cover no-repeat;
	color: #fff;
	font: inherit;
	cursor: pointer;
}
.ak-reel__poster::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.55)); }
.ak-reel__play {
	position: relative;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: rgba(192, 24, 47, 0.92);
	box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.22), 0 12px 30px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease;
}
.ak-reel__poster:hover .ak-reel__play,
.ak-reel__poster:focus-visible .ak-reel__play { transform: scale(1.08); }
.ak-reel__poster .ak-reel__label { color: #fff !important; text-transform: none; letter-spacing: 0; }
.ak-reel__label { position: relative; padding: 6px 14px; border-radius: 999px; background: rgba(15, 23, 42, 0.6); font-size: 14px; font-weight: 700; }
.ak-reel-link { margin: 0 0 24px; text-align: center; font-size: 14px; }
.ak-reel-link a { color: var(--ak-primary, #1c22cc); font-weight: 600; }

.ak-project-related { margin-top: 32px; }
.ak-project-related ul { margin-left: 0; list-style: none; }
.ak-project-related li {
	margin: 0 0 8px;
	padding: 10px 14px;
	border: 1px solid var(--ak-line, #e5e8f0);
	border-radius: 12px;
	background: #fff;
}
.ak-project-related li a { font-weight: 600; }

@media (max-width: 600px) {
	.ak-reel { max-width: 100%; border-radius: 14px; }
	.ak-project-info th, .ak-project-info td { display: block; width: 100%; padding: 4px 16px; border: 0; }
	.ak-project-info th { padding-top: 12px; font-size: 13px; }
	.ak-project-info td { padding-bottom: 12px; border-bottom: 1px solid var(--ak-line, #e5e8f0); }
	.ak-project-info tr:last-child td { border-bottom: 0; }
}

/* Trang chủ: bỏ nền/khoảng cách thừa của khối UX Builder chứa lưới dự án */
.ankhang-home-v2 section:has(.ak-projects) { padding-bottom: 40px !important; }
